From f925f18892d8cd1e1f28d3b442b8b6aef777df37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Tue, 15 Oct 2024 10:54:53 +0800 Subject: [PATCH] =?UTF-8?q?Update(boards):=20xpython=E6=9D=BF=E5=8D=A1?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=20`build:prod`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards/default/micropython_esp32/main.bundle.js | 4 ++-- boards/default/micropython_esp32c2/main.bundle.js | 4 ++-- boards/default/micropython_esp32c3/main.bundle.js | 4 ++-- boards/default/micropython_esp32s2/main.bundle.js | 4 ++-- boards/default/micropython_esp32s3/main.bundle.js | 4 ++-- boards/default/micropython_k210_mixgoai/main.bundle.js | 4 ++-- boards/default/micropython_nrf51822_microbit/main.bundle.js | 4 ++-- boards/default/micropython_nrf51822_mithoncc/main.bundle.js | 4 ++-- boards/default/micropython_robot/main.bundle.js | 4 ++-- boards/default/python_mixpy/main.bundle.js | 4 ++-- boards/default/python_pyodide/index.xml | 2 +- boards/default/python_pyodide/main.bundle.js | 4 ++-- boards/default/python_skulpt/main.bundle.js | 4 ++-- boards/default/python_skulpt_car/main.bundle.js | 4 ++-- boards/default/python_skulpt_mixtoy/main.bundle.js | 4 ++-- 15 files changed, 29 insertions(+), 29 deletions(-) diff --git a/boards/default/micropython_esp32/main.bundle.js b/boards/default/micropython_esp32/main.bundle.js index ab29b6b3..ca54461b 100644 --- a/boards/default/micropython_esp32/main.bundle.js +++ b/boards/default/micropython_esp32/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>kt,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:()=>Ht,controls_try_finally:()=>yt,controls_whileUntil:()=>bt,do_while:()=>jt,garbage_collection:()=>Zt,get_mem_alloc:()=>$t,get_mem_free:()=>te,get_unique_identifier:()=>ee});var n={};t.r(n),t.d(n,{base_map:()=>ge,math_arithmetic:()=>oe,math_bit:()=>ae,math_constant:()=>se,math_constant_mp:()=>_e,math_constrain:()=>Me,math_dec:()=>re,math_indexer_number:()=>me,math_map:()=>he,math_max_min:()=>de,math_number:()=>ne,math_number_base_conversion:()=>Ie,math_random:()=>Te,math_random_seed:()=>Ee,math_round:()=>Oe,math_selfcalcu:()=>pe,math_to_int:()=>le,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:()=>fe,char_to_ascii:()=>Fe,number_to_text:()=>Pe,os_system:()=>ii,text:()=>Ae,text_capital:()=>Ge,text_center:()=>Ue,text_char:()=>Ne,text_char_at:()=>xe,text_char_at2:()=>Ye,text_char_at3:()=>Ze,text_compareTo:()=>je,text_compare_to:()=>Be,text_create_with_container:()=>Qe,text_create_with_item:()=>qe,text_encode:()=>ti,text_equals_starts_ends:()=>Ve,text_eval:()=>ei,text_find:()=>we,text_format:()=>Je,text_format_noreturn:()=>$e,text_join:()=>De,text_join_seq:()=>ke,text_length:()=>ve,text_random_char:()=>Xe,text_replace:()=>He,text_split:()=>We,text_strip:()=>Ke,text_substring:()=>ye,text_substring2:()=>be,text_substring3:()=>ze,text_textarea:()=>Le});var _={};t.r(_),t.d(_,{list_many_input:()=>Ai,list_tolist:()=>fi,list_tolist2:()=>yi,list_trig:()=>gi,lists_2d_get_col_row_data:()=>pi,lists_2d_get_data_with_col_row:()=>oi,lists_append_extend:()=>Ii,lists_change_to:()=>Si,lists_change_to_general:()=>Ni,lists_clear:()=>Ei,lists_create_with:()=>ai,lists_create_with2:()=>Fi,lists_create_with_container:()=>ri,lists_create_with_item:()=>li,lists_create_with_noreturn:()=>Li,lists_create_with_text:()=>ui,lists_create_with_text2:()=>Pi,lists_del_general:()=>Di,lists_find:()=>ci,lists_getIndex3:()=>vi,lists_getSublist3:()=>Yi,lists_get_index:()=>si,lists_get_random_item:()=>Ti,lists_get_random_sublist:()=>Mi,lists_get_sublist:()=>_i,lists_insert_value:()=>hi,lists_insert_value2:()=>Xi,lists_pop:()=>Ri,lists_remove_at:()=>Oi,lists_remove_at2:()=>bi,lists_reverse:()=>mi,lists_setIndex3:()=>xi,lists_set_index:()=>di,lists_sort:()=>Ci});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>$i,dicts_add_or_change:()=>Wi,dicts_clear:()=>Qi,dicts_create_with:()=>Bi,dicts_create_with_container:()=>Gi,dicts_create_with_item:()=>Ui,dicts_create_with_noreturn:()=>nn,dicts_deldict:()=>Zi,dicts_delete:()=>Ki,dicts_get:()=>ki,dicts_get_default:()=>Hi,dicts_items:()=>qi,dicts_keys:()=>wi,dicts_length:()=>ji,dicts_pop:()=>tn,dicts_setdefault:()=>en,dicts_to_json:()=>_n,dicts_todict:()=>sn,dicts_update:()=>Ji,dicts_values:()=>zi,json_to_dicts:()=>on});var p={};t.r(p),t.d(p,{logic_boolean:()=>dn,logic_compare:()=>an,logic_compare_continous:()=>un,logic_is:()=>hn,logic_is_in:()=>Mn,logic_negate:()=>ln,logic_null:()=>In,logic_operation:()=>rn,logic_tobool:()=>mn,logic_true_or_false:()=>Tn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Gn,sdcard_use_spi_init:()=>Bn,storage_can_write_ornot:()=>Ln,storage_change_dir:()=>yn,storage_close_file:()=>Dn,storage_delete_file:()=>Fn,storage_file_seek:()=>Yn,storage_file_tell:()=>vn,storage_file_write:()=>gn,storage_fileopen:()=>On,storage_fileopen_new:()=>Rn,storage_fileopen_new_encoding:()=>cn,storage_get_a_line:()=>An,storage_get_contents:()=>Sn,storage_get_contents_without_para:()=>Cn,storage_get_current_dir:()=>xn,storage_get_file_size:()=>Pn,storage_get_filename:()=>Nn,storage_is_file:()=>Vn,storage_list_all_files:()=>fn,storage_make_dir:()=>Xn,storage_open_file_with_os:()=>En,storage_rename:()=>bn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Jn,procedures_callreturn:()=>Qn,procedures_defnoreturn:()=>kn,procedures_defreturn:()=>Hn,procedures_ifreturn:()=>qn,procedures_mutatorarg:()=>Kn,procedures_mutatorcontainer:()=>Wn,procedures_return:()=>zn});var r={};t.r(r),t.d(r,{tuple_change_to:()=>as,tuple_create_with:()=>Zn,tuple_create_with_container:()=>$n,tuple_create_with_item:()=>ts,tuple_create_with_noreturn:()=>ds,tuple_create_with_text2:()=>es,tuple_create_with_text_return:()=>is,tuple_del:()=>_s,tuple_find:()=>us,tuple_getIndex:()=>ns,tuple_getSublist:()=>ls,tuple_get_random_item:()=>Ts,tuple_get_sublist:()=>Is,tuple_join:()=>os,tuple_length:()=>ss,tuple_max:()=>ps,tuple_totuple:()=>Ms,tuple_trig:()=>rs});var l={};t.r(l),t.d(l,{set_add_discard:()=>As,set_clear:()=>gs,set_create_with:()=>ms,set_create_with_container:()=>Es,set_create_with_item:()=>Os,set_create_with_text_return:()=>Ds,set_length:()=>Rs,set_operate:()=>Cs,set_operate_update:()=>Ss,set_pop:()=>cs,set_sub:()=>Ls,set_toset:()=>fs,set_update:()=>Ns});var d={};t.r(d),t.d(d,{html_content:()=>xs,html_content_more:()=>Xs,html_document:()=>Ps,html_form:()=>ys,html_head_body:()=>Ys,html_style:()=>bs,html_style_color:()=>Bs,html_style_content:()=>Vs,html_text:()=>Gs,html_title:()=>vs});var I={};t.r(I),t.d(I,{attribute_access:()=>t_,function_call:()=>js,function_call_container:()=>Zs,function_call_item:()=>$s,raw_block:()=>ks,raw_empty:()=>Ws,raw_expression:()=>Hs,raw_table:()=>ws,text_comment:()=>Ks,text_print_multiple:()=>Qs,text_print_multiple_container:()=>qs,text_print_multiple_item:()=>zs,type_check:()=>Js});var T={};t.r(T),t.d(T,{controls_type:()=>__,controls_typeLists:()=>o_,lists_zip:()=>p_,unpack_iterable_object:()=>a_,variables_change:()=>n_,variables_get:()=>e_,variables_global:()=>s_,variables_set:()=>i_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>E_,base_setup:()=>r_,controls_delay:()=>m_,controls_flow_statements:()=>h_,controls_for:()=>I_,controls_forEach:()=>C_,controls_for_range:()=>T_,controls_if:()=>l_,controls_interrupts:()=>c_,controls_lambda:()=>A_,controls_main:()=>u_,controls_millis:()=>O_,controls_nointerrupts:()=>g_,controls_pass:()=>N_,controls_range:()=>S_,controls_repeat:()=>X_,controls_repeat_ext:()=>F_,controls_thread:()=>D_,controls_try_finally:()=>d_,controls_whileUntil:()=>M_,do_while:()=>f_,garbage_collection:()=>P_,get_mem_alloc:()=>v_,get_mem_free:()=>Y_,get_unique_identifier:()=>x_,reset:()=>R_,time_sleep:()=>L_});var h={};t.r(h),t.d(h,{base_map:()=>io,math_arithmetic:()=>G_,math_bit:()=>B_,math_constant:()=>y_,math_constant_mp:()=>V_,math_constrain:()=>q_,math_dec:()=>H_,math_indexer_number:()=>Z_,math_map:()=>Q_,math_max_min:()=>K_,math_number:()=>b_,math_number_base_conversion:()=>z_,math_random:()=>J_,math_random_seed:()=>j_,math_round:()=>$_,math_selfcalcu:()=>U_,math_single:()=>w_,math_to_int:()=>W_,math_trig:()=>k_,text_to_number:()=>to,text_to_number_skulpt:()=>eo,turn_to_int:()=>no});var m={};t.r(m),t.d(m,{ascii_to_char:()=>ao,char_to_ascii:()=>uo,number_to_text:()=>ro,os_system:()=>xo,text:()=>so,text_capital:()=>Ro,text_center:()=>co,text_char:()=>oo,text_char_at:()=>To,text_char_at2:()=>Io,text_char_at3:()=>Po,text_compareTo:()=>Fo,text_compare_to:()=>mo,text_encode:()=>vo,text_equals_starts_ends:()=>ho,text_eval:()=>Yo,text_find:()=>go,text_format:()=>No,text_format_noreturn:()=>Do,text_join:()=>po,text_join_seq:()=>Co,text_length:()=>lo,text_random_char:()=>Mo,text_replace:()=>So,text_split:()=>Ao,text_strip:()=>Lo,text_substring:()=>Oo,text_substring2:()=>Eo,text_substring3:()=>fo,text_textarea:()=>_o});var E={};t.r(E),t.d(E,{list_many_input:()=>tp,list_tolist:()=>lp,list_tolist2:()=>dp,list_trig:()=>jo,lists_2d_get_col_row_data:()=>yo,lists_2d_get_data_with_col_row:()=>bo,lists_append_extend:()=>wo,lists_change_to:()=>$o,lists_change_to_general:()=>ip,lists_clear:()=>Jo,lists_create_with:()=>Vo,lists_create_with2:()=>sp,lists_create_with_noreturn:()=>ep,lists_create_with_text:()=>Bo,lists_create_with_text2:()=>_p,lists_del_general:()=>np,lists_find:()=>Qo,lists_getIndex3:()=>op,lists_getSublist3:()=>pp,lists_get_index:()=>Go,lists_get_random_item:()=>ko,lists_get_random_sublist:()=>Ho,lists_get_sublist:()=>Xo,lists_insert_value:()=>Wo,lists_insert_value2:()=>up,lists_pop:()=>zo,lists_remove_at:()=>qo,lists_remove_at2:()=>rp,lists_reverse:()=>Ko,lists_setIndex3:()=>ap,lists_set_index:()=>Uo,lists_sort:()=>Zo});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Ap,dicts_add_or_change:()=>mp,dicts_clear:()=>Rp,dicts_create_with:()=>Ip,dicts_create_with_noreturn:()=>Dp,dicts_deldict:()=>Sp,dicts_delete:()=>Ep,dicts_get:()=>Mp,dicts_get_default:()=>hp,dicts_items:()=>cp,dicts_keys:()=>Tp,dicts_length:()=>Cp,dicts_pop:()=>Lp,dicts_setdefault:()=>Np,dicts_to_json:()=>Fp,dicts_todict:()=>fp,dicts_update:()=>Op,dicts_values:()=>gp,json_to_dicts:()=>Pp});var R={};t.r(R),t.d(R,{logic_boolean:()=>bp,logic_compare:()=>vp,logic_compare_continous:()=>Yp,logic_is:()=>Gp,logic_is_in:()=>Bp,logic_negate:()=>Xp,logic_null:()=>yp,logic_operation:()=>xp,logic_tobool:()=>Up,logic_true_or_false:()=>Vp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>ra,sdcard_use_spi_init:()=>ua,storage_can_write_ornot:()=>zp,storage_change_dir:()=>sa,storage_close_file:()=>Zp,storage_delete_file:()=>ta,storage_file_seek:()=>na,storage_file_tell:()=>ia,storage_file_write:()=>Kp,storage_fileopen:()=>kp,storage_fileopen_new:()=>Hp,storage_fileopen_new_encoding:()=>Wp,storage_get_a_line:()=>qp,storage_get_contents:()=>Qp,storage_get_contents_without_para:()=>Jp,storage_get_current_dir:()=>_a,storage_get_file_size:()=>ea,storage_get_filename:()=>jp,storage_is_file:()=>aa,storage_list_all_files:()=>$p,storage_make_dir:()=>oa,storage_open_file_with_os:()=>wp,storage_rename:()=>pa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ta,procedures_callreturn:()=>Ia,procedures_defnoreturn:()=>da,procedures_defreturn:()=>la,procedures_ifreturn:()=>Ma,procedures_return:()=>ha});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Aa,tuple_create_with:()=>ma,tuple_create_with_noreturn:()=>fa,tuple_create_with_text2:()=>Ea,tuple_create_with_text_return:()=>Oa,tuple_del:()=>ga,tuple_find:()=>La,tuple_getIndex:()=>Ra,tuple_getSublist:()=>Da,tuple_get_random_item:()=>Pa,tuple_get_sublist:()=>Fa,tuple_join:()=>Ca,tuple_length:()=>ca,tuple_max:()=>Sa,tuple_totuple:()=>va,tuple_trig:()=>Na});var S={};t.r(S),t.d(S,{set_add_discard:()=>Ba,set_clear:()=>ba,set_create_with:()=>Ya,set_create_with_text_return:()=>wa,set_length:()=>xa,set_operate:()=>ya,set_operate_update:()=>Va,set_pop:()=>Xa,set_sub:()=>Ga,set_toset:()=>ka,set_update:()=>Ua});var A={};t.r(A),t.d(A,{html_content:()=>Ja,html_content_more:()=>Qa,html_document:()=>Ha,html_form:()=>za,html_head_body:()=>Ka,html_style:()=>qa,html_style_content:()=>ja,html_text:()=>Za,html_title:()=>Wa});var L={};t.r(L),t.d(L,{attribute_access:()=>_u,function_call:()=>su,raw_block:()=>$a,raw_empty:()=>eu,raw_expression:()=>tu,raw_table:()=>iu,type_check:()=>nu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>mu,actuator_extern_get_led_state:()=>Eu,actuator_extern_led_bright:()=>hu,actuator_extern_led_brightness:()=>Ou,actuator_ms32006_dcmotor:()=>Du,actuator_ms32006_init:()=>Nu,actuator_ms32006_stepper:()=>fu,actuator_neopixel_init:()=>Fu,actuator_neopixel_rgb:()=>Pu,actuator_neopixel_rgb_all:()=>vu,actuator_neopixel_write:()=>Yu,actuator_use_uart_init:()=>xu,esp32_music_get_tempo_extern:()=>Iu,esp32_music_pitch:()=>uu,esp32_music_pitch_init:()=>au,esp32_music_pitch_with_time:()=>ru,esp32_music_play_list:()=>lu,esp32_music_reset_extern:()=>Tu,esp32_music_set_tempo_extern:()=>du,esp32_music_stop:()=>Mu,mixbot_actuator_extern_get_addr:()=>Zu,mixbot_actuator_extern_set_addr:()=>$u,mixbot_addr_extern:()=>Bu,robot_led_extern:()=>ku,robot_led_extern_get_value:()=>Hu,robot_motor_extern:()=>Gu,robot_motor_extern_get_speed:()=>Uu,robot_servo_extern_absolute_run:()=>Qu,robot_servo_extern_get_status:()=>Wu,robot_servo_extern_relative_continue:()=>ju,robot_servo_extern_relative_origin:()=>qu,robot_servo_extern_relative_run:()=>zu,robot_servo_extern_stop:()=>Ju,robot_servo_extern_stop_mode:()=>Ku,robot_traffic_light_extern:()=>wu,servo_get_angle:()=>Au,servo_get_speed:()=>Lu,servo_init:()=>Ru,servo_move:()=>cu,servo_set_angle:()=>Cu,servo_set_speed:()=>Su,servo_speed_360:()=>gu,syn6288_builtin_voice:()=>yu,syn6288_get_voice:()=>bu,syn6288_set_voice:()=>Xu,syn6288_tts_play:()=>Vu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Pr,actuator_dc_motor_stop:()=>vr,actuator_get_led_bright:()=>sr,actuator_get_led_state:()=>_r,actuator_led_bright:()=>nr,actuator_led_brightness:()=>or,actuator_mixbot_buzzer_on_off:()=>yr,actuator_mixgo_nova_mic_get:()=>wr,actuator_mixgo_nova_mic_set:()=>Ur,actuator_mixgo_nova_onboard_music_pitch:()=>Qr,actuator_mixgo_nova_onboard_music_stop:()=>qr,actuator_mixgo_nova_play_audio:()=>Kr,actuator_mixgo_nova_play_online_audio:()=>Jr,actuator_mixgo_nova_record_audio:()=>Wr,actuator_mixgo_nova_voice_get:()=>Hr,actuator_mixgo_nova_voice_set:()=>kr,actuator_mixgo_zero_led_color:()=>pr,actuator_onboard_neopixel_rgb:()=>Ir,actuator_onboard_neopixel_rgb_all:()=>Tr,actuator_onboard_neopixel_rgb_show_all_chase:()=>hr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Mr,actuator_onboard_neopixel_write:()=>mr,actuator_rm_onboard_neopixel_rgb:()=>Er,actuator_rm_onboard_neopixel_rgb_all:()=>Or,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Rr,actuator_stepper_keep:()=>fr,actuator_stepper_stop:()=>Fr,analog_ble_keyboard_init:()=>al,analog_ble_keyboard_input:()=>ll,analog_ble_keyboard_send_battery:()=>Il,analog_ble_keyboard_str:()=>dl,analog_ble_mouse_init:()=>Tl,analog_ble_mouse_input:()=>ml,analog_ble_mouse_send_battery:()=>El,analog_keyboard_input:()=>$r,analog_keyboard_str:()=>pl,analog_mouse_input:()=>_l,bitbot_motor:()=>Gr,bitbot_move:()=>Vr,bitbot_stop:()=>Br,ble_keyboard_connect:()=>rl,ble_keyboard_get_mac:()=>ul,ble_mouse_connect:()=>hl,ble_mouse_get_mac:()=>Ml,cc_number:()=>dr,esp32_music_get_tempo:()=>gr,esp32_music_reset:()=>Cr,esp32_music_set_tempo:()=>cr,esp32_onboard_music_pitch:()=>Sr,esp32_onboard_music_pitch_with_time:()=>Ar,esp32_onboard_music_play_list:()=>Nr,esp32_onboard_music_stop:()=>Lr,general_key:()=>el,general_key_tuple:()=>il,generalkey_container:()=>nl,generalkey_create_with_item:()=>sl,get_power_output:()=>jr,ledswitch:()=>ir,mixbot_motor:()=>br,mixbot_motor_status:()=>Yr,mixbot_move:()=>xr,mixbot_stop:()=>Xr,mouse_key:()=>ol,number:()=>er,rm_actuator_get_led_bright:()=>ur,rm_actuator_get_led_state:()=>rr,rm_actuator_led_bright:()=>ar,rm_actuator_led_brightness:()=>lr,rm_motor:()=>Dr,set_all_power_output:()=>Zr,set_power_output:()=>zr,special_key:()=>tl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>Zl,ai_sensor_ailocal_class:()=>Ul,ai_sensor_ailocal_class_result:()=>wl,ai_sensor_ailocal_train:()=>Gl,ai_sensor_asr_recognize:()=>Jl,ai_sensor_audio_play:()=>Hl,ai_sensor_audio_record:()=>kl,ai_sensor_barcode:()=>Ll,ai_sensor_circle:()=>vl,ai_sensor_classifier_faces:()=>jl,ai_sensor_color:()=>bl,ai_sensor_color_chases:()=>Bl,ai_sensor_color_chases_result:()=>Vl,ai_sensor_config:()=>Sl,ai_sensor_face:()=>zl,ai_sensor_find_20objects:()=>$l,ai_sensor_find_barcodes:()=>Nl,ai_sensor_find_circles:()=>Yl,ai_sensor_find_colors:()=>yl,ai_sensor_find_licenseplates:()=>ql,ai_sensor_find_lines:()=>Pl,ai_sensor_find_qrcodes:()=>Cl,ai_sensor_find_rects:()=>Xl,ai_sensor_find_tags:()=>fl,ai_sensor_licenseplate:()=>Ql,ai_sensor_line:()=>Fl,ai_sensor_qrcode:()=>cl,ai_sensor_qrcode_lite:()=>gl,ai_sensor_rect:()=>xl,ai_sensor_rgb:()=>Al,ai_sensor_tag:()=>Dl,ai_sensor_use_uart_init:()=>Rl,ai_sensor_yolo_recognize:()=>Wl,ai_sensor_yolo_recognize_result:()=>Kl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>id,MICROPYTHON_AI_Speech_unit:()=>ed,MICROPYTHON_AI_client:()=>td});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>md,mpython_blynk_app_notify:()=>rd,mpython_blynk_email:()=>Id,mpython_blynk_get_timers:()=>Td,mpython_blynk_on_connected:()=>pd,mpython_blynk_on_disconnected:()=>od,mpython_blynk_run:()=>ud,mpython_blynk_sensor_data_to_app:()=>hd,mpython_blynk_set_property:()=>dd,mpython_blynk_setup:()=>Ed,mpython_blynk_stop_timers:()=>ld,mpython_blynk_sync_virtual:()=>_d,mpython_blynk_terminal_widget_vpin:()=>sd,mpython_blynktimer:()=>Md,mpython_blynktimer_run:()=>ad});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>tI,communicate_bluetooth_connect:()=>sI,communicate_bluetooth_disconnect:()=>_I,communicate_bluetooth_handle:()=>rI,communicate_bluetooth_is_connected:()=>pI,communicate_bluetooth_mac:()=>nI,communicate_bluetooth_peripheral_init:()=>eI,communicate_bluetooth_recv:()=>aI,communicate_bluetooth_recv_only:()=>uI,communicate_bluetooth_scan:()=>iI,communicate_bluetooth_send:()=>oI,communicate_espnow_init:()=>lI,communicate_espnow_init_new:()=>dI,communicate_i2c_available:()=>bd,communicate_i2c_init:()=>gd,communicate_i2c_master_read:()=>Xd,communicate_i2c_onboard:()=>Rd,communicate_i2c_read:()=>Cd,communicate_i2c_scan:()=>Ad,communicate_i2c_write:()=>Sd,communicate_ir_recv_init:()=>Hd,communicate_ir_send_init:()=>qd,communicate_ow_init:()=>Vd,communicate_ow_read:()=>Gd,communicate_ow_reset:()=>kd,communicate_ow_scan:()=>Bd,communicate_ow_select:()=>wd,communicate_ow_write:()=>Ud,communicate_spi_buffer:()=>Dd,communicate_spi_init:()=>Ld,communicate_spi_onboard:()=>cd,communicate_spi_read:()=>fd,communicate_spi_read_output:()=>Fd,communicate_spi_readinto:()=>Pd,communicate_spi_readinto_output:()=>vd,communicate_spi_set:()=>Nd,communicate_spi_write:()=>Yd,communicate_spi_write_readinto:()=>xd,espnow_radio_channel:()=>EI,espnow_radio_channel_new:()=>RI,espnow_radio_on_off:()=>cI,espnow_radio_rec:()=>CI,espnow_radio_recv:()=>AI,espnow_radio_recv_certain_msg:()=>LI,espnow_radio_recv_certain_msg_new:()=>DI,espnow_radio_recv_msg:()=>SI,espnow_radio_recv_new:()=>NI,espnow_radio_send:()=>gI,espnow_radio_txpower:()=>OI,i2c_available:()=>zI,i2c_init:()=>bI,i2c_master_reader2:()=>qI,i2c_read:()=>yI,i2c_scan:()=>BI,i2c_slave_onreceive:()=>yd,i2c_write:()=>VI,internal_variable:()=>Wd,ir_recv_timeout:()=>Qd,ir_transmit_busy:()=>$d,ir_transmit_conventional_data:()=>zd,ir_transmit_raw_code:()=>Zd,ir_transmit_study_code:()=>jd,ir_whether_recv:()=>Jd,lora_init:()=>fI,lora_packet:()=>FI,lora_recv:()=>vI,lora_send:()=>PI,network_espnow_info:()=>TI,network_espnow_mac:()=>II,network_espnow_recv:()=>MI,network_espnow_recv_handle:()=>mI,network_espnow_send:()=>hI,recv_fun:()=>Kd,spi_buffer:()=>wI,spi_init:()=>GI,spi_read:()=>kI,spi_read_output:()=>HI,spi_readinto:()=>WI,spi_readinto_output:()=>KI,spi_set:()=>UI,spi_write:()=>JI,spi_write_readinto:()=>QI,urequests_attribute:()=>xI,urequests_get:()=>YI,urequests_method:()=>XI});var Y={};t.r(Y),t.d(Y,{display_animate:()=>LT,display_blink_rate:()=>gT,display_circle:()=>NT,display_color_seclet:()=>BT,display_draw_4strings:()=>hT,display_fill:()=>AT,display_get_screen_image:()=>cT,display_help:()=>fT,display_image_size:()=>mT,display_lcd_use_i2c_init:()=>WT,display_line:()=>OT,display_line_arbitrarily:()=>RT,display_matrix_extern_bright_point:()=>aT,display_matrix_extern_bright_screen:()=>rT,display_matrix_extern_clear:()=>lT,display_matrix_extern_get_pixel:()=>pT,display_matrix_extern_get_screen_pixel:()=>uT,display_matrix_extern_image_builtins:()=>dT,display_matrix_extern_scroll_string:()=>iT,display_matrix_extern_scroll_string_delay:()=>nT,display_matrix_extern_shift:()=>oT,display_matrix_extern_show_frame_string:()=>sT,display_matrix_extern_show_frame_string_delay:()=>_T,display_matrix_extern_show_image:()=>tT,display_matrix_extern_show_image_or_string_delay:()=>eT,display_matrix_use_i2c_init:()=>$I,display_oled_drawPixel:()=>PT,display_oled_showBitmap:()=>FT,display_oled_use_i2c_init:()=>zT,display_onoff:()=>ST,display_rect:()=>ET,display_rgb_color:()=>CT,display_tm1650_power:()=>YT,display_tm1650_set_brightness:()=>bT,display_tm1650_show_dot:()=>XT,display_tm1650_show_num:()=>xT,display_tm_use_i2c_init:()=>vT,display_triangle:()=>DT,display_use_i2c_init:()=>MT,extern_oled_bright_point:()=>pM,extern_oled_clear:()=>aM,extern_oled_get_pixel:()=>oM,extern_oled_hvline:()=>rM,extern_oled_line:()=>lM,extern_oled_scroll_string:()=>eM,extern_oled_scroll_string_delay:()=>iM,extern_oled_shape_rect:()=>uM,extern_oled_shift:()=>_M,extern_oled_show_frame_string:()=>nM,extern_oled_show_frame_string_delay:()=>sM,extern_oled_show_image:()=>jT,extern_oled_show_image_or_string_delay:()=>tM,extern_oled_show_image_xy:()=>ZT,extern_oled_show_string:()=>$T,lcd_backlight:()=>QT,lcd_clear:()=>qT,lcd_print_string:()=>JT,lcd_show_image_or_string_delay:()=>KT,matrix_extern_image_arithmetic:()=>IT,matrix_extern_image_invert:()=>TT,tft_fill:()=>kT,tft_line_arbitrarily:()=>HT,tft_scroll_string_delay:()=>UT,tft_show_frame_string_delay:()=>wT,tft_show_image_or_string_delay:()=>GT,tft_show_image_xy:()=>VT,tft_use_spi_init:()=>yT});var x={};t.r(x),t.d(x,{bitbot_display_image_create:()=>zM,display_bright_point:()=>LM,display_bright_screen:()=>DM,display_clear:()=>fM,display_get_pixel:()=>AM,display_get_screen_pixel:()=>NM,display_image_builtins:()=>RM,display_image_builtins_all:()=>cM,display_image_create:()=>OM,display_scroll_string:()=>MM,display_scroll_string_delay:()=>hM,display_shift:()=>SM,display_show_frame_string:()=>mM,display_show_frame_string_delay:()=>EM,display_show_image:()=>IM,display_show_image_or_string_delay:()=>TM,draw_pointer:()=>Rh,image_arithmetic:()=>gM,image_invert:()=>CM,mixbot_display_bright_screen:()=>QM,mixbot_display_get_ambientbright:()=>JM,mixbot_display_get_screen_pixel:()=>KM,mixbot_display_image_create:()=>WM,mixbot_display_rotate:()=>qM,mixgo_display_image_create_new:()=>vM,mixgome_display_font:()=>YM,mixgome_display_image_create:()=>FM,mixgomini_display_image_create:()=>PM,mpython_display_hvline:()=>wM,mpython_display_line:()=>kM,mpython_display_shape_rect:()=>UM,mpython_pbm_image:()=>HM,onboard_oled_bright_point:()=>GM,onboard_oled_scroll_string_delay:()=>VM,onboard_oled_show_frame_string_delay:()=>BM,onboard_oled_show_image:()=>xM,onboard_oled_show_image_or_string_delay:()=>yM,onboard_oled_show_image_xy:()=>XM,onboard_oled_show_string:()=>bM,onboard_tft_bright_point:()=>uh,onboard_tft_bright_screen:()=>dh,onboard_tft_clear:()=>rh,onboard_tft_clock_clear:()=>Eh,onboard_tft_clock_draw:()=>mh,onboard_tft_clock_get_rtctime:()=>Mh,onboard_tft_clock_init:()=>Th,onboard_tft_clock_set_time:()=>hh,onboard_tft_display_hvline:()=>_h,onboard_tft_display_line:()=>oh,onboard_tft_display_shape_circle:()=>Oh,onboard_tft_display_shape_rect:()=>sh,onboard_tft_fill:()=>Ih,onboard_tft_get_pixel:()=>ah,onboard_tft_get_screen_pixel:()=>lh,onboard_tft_scroll_string:()=>th,onboard_tft_scroll_string_delay:()=>eh,onboard_tft_shift:()=>ph,onboard_tft_show_frame_string:()=>ih,onboard_tft_show_frame_string_delay:()=>nh,onboard_tft_show_image:()=>jM,onboard_tft_show_image_or_string_delay:()=>$M,onboard_tft_show_image_xy:()=>ZM});var X={};t.r(X),t.d(X,{factory_block:()=>Ph,factory_block_return:()=>vh,factory_block_return_with_textarea:()=>xh,factory_block_with_textarea:()=>Yh,factory_callMethod_noreturn:()=>fh,factory_callMethod_return:()=>Fh,factory_create_with_container:()=>Ah,factory_create_with_item:()=>Lh,factory_declare:()=>Dh,factory_from_import:()=>gh,factory_function_noreturn:()=>Sh,factory_function_return:()=>Nh,factory_import:()=>Ch,folding_block:()=>Xh});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>nm,inout_analog_atten:()=>Wh,inout_analog_read:()=>Hh,inout_analog_read_init:()=>jh,inout_analog_write:()=>Uh,inout_analog_write_init:()=>zh,inout_analog_write_set:()=>wh,inout_analog_write_set_freq:()=>tm,inout_digital_init:()=>Qh,inout_digital_read:()=>Bh,inout_digital_write:()=>Vh,inout_highlow:()=>yh,inout_pinMode:()=>$h,inout_pin_attachInterrupt:()=>Jh,inout_pin_pressed:()=>Kh,inout_pin_pressed_init:()=>Zh,inout_pwm_analog_write:()=>Gh,inout_pwm_analog_write_init:()=>qh,inout_pwm_analog_write_set_freq:()=>kh,pin_pressed:()=>im,pin_pressed_init:()=>em});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Nm,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Lm,IOT_EMQX_PING:()=>Sm,IOT_FORMATTING:()=>gm,IOT_FORMAT_STRING:()=>Cm,IOT_MIXIO_NTP:()=>Am,IOT_MIXIO_PUBLISH:()=>Mm,IOT_MIXIO_SUBSCRIBE:()=>hm,iot_checkonenet:()=>ym,iot_client_onboard:()=>fm,iot_create_with_item:()=>Im,iot_http_client:()=>Fm,iot_http_data:()=>Pm,iot_mixio_check:()=>Om,iot_mixio_connect:()=>Tm,iot_mixio_connect_only:()=>Em,iot_mixio_disconnect:()=>mm,iot_mixio_format_msg:()=>cm,iot_mixio_format_topic:()=>Rm,iot_mixly_key:()=>Dm,iot_mqtt_client:()=>vm,iot_mqtt_data:()=>Ym,iot_onenet_check:()=>am,iot_onenet_connect:()=>om,iot_onenet_disconnect:()=>pm,iot_onenet_publish:()=>rm,iot_onenet_publish_dict:()=>um,iot_onenetconnect:()=>Xm,iot_onenetdisconnect:()=>bm,iot_publish:()=>Vm,iot_publish_container:()=>lm,iot_publish_item:()=>dm,iot_wifi_connect:()=>_m,iot_wificonnect:()=>xm});var V={};t.r(V),t.d(V,{network_ap_connect:()=>qm,network_connect:()=>Hm,network_get_connect:()=>Km,network_get_wifi:()=>Qm,network_init:()=>Gm,network_is_active:()=>wm,network_open:()=>Um,network_scan:()=>km,network_server:()=>zm,network_socket_accept:()=>eE,network_socket_bind:()=>Zm,network_socket_close:()=>oE,network_socket_connect:()=>$m,network_socket_init:()=>jm,network_socket_listen:()=>tE,network_socket_receive:()=>iE,network_socket_receive_from:()=>sE,network_socket_send:()=>nE,network_socket_send_to:()=>_E,network_stop:()=>Jm,network_wifi_connect:()=>Wm,ntptime_address:()=>lE,ntptime_time:()=>rE,requests_attribute:()=>aE,requests_attribute2:()=>ME,requests_get:()=>pE,requests_get2:()=>IE,requests_method:()=>uE,requests_post:()=>TE});var B={};t.r(B),t.d(B,{pe_g1_battery_left:()=>EE,pe_g1_dc_motor:()=>OE,pe_g1_dc_motor_speed:()=>RE,pe_g1_servo_get_angle:()=>CE,pe_g1_servo_get_speed:()=>SE,pe_g1_servo_set_angle:()=>cE,pe_g1_servo_set_speed:()=>gE,pe_g1_use_i2c_init:()=>mE});var G={};t.r(G),t.d(G,{HCSR04:()=>AO,PS2_Button:()=>fO,PS2_Buttons:()=>PO,PS2_Buttons_new:()=>XO,PS2_State:()=>FO,PS2_init:()=>LO,PS2_init_new:()=>YO,PS2_stk:()=>vO,PS2_stk_new:()=>bO,PS2_vibration:()=>DO,PS2_vibration_new:()=>xO,esp32_s2_weather_init:()=>cO,esp32_s2_weather_rain:()=>CO,esp32_s2_weather_wd:()=>gO,esp32_s2_weather_ws:()=>SO,extern_rfid_read:()=>pO,extern_rfid_readcontent:()=>uO,extern_rfid_readid:()=>aO,extern_rfid_status:()=>dO,extern_rfid_write:()=>rO,extern_rfid_write_return:()=>lO,gnss_get_data:()=>GO,gnss_have_data:()=>BO,mixbot_sensor_extern_get_addr:()=>JO,mixbot_sensor_extern_set_addr:()=>QO,pm25_get_data:()=>VO,robot_button_extern_get_value:()=>UO,robot_color_extern_get_value:()=>KO,robot_infrared_extern_get_value:()=>kO,robot_infrared_extern_grey_get_value:()=>HO,robot_potentiometer_extern_get_value:()=>WO,robot_sonar_extern_get_value:()=>qO,robot_sonar_extern_led:()=>zO,robot_touch_extern_get_value:()=>wO,sensor_APDS9960_extern:()=>kE,sensor_DS18X20:()=>BE,sensor_LTR308_extern:()=>HE,sensor_LTR390UV_extern:()=>KE,sensor_MAX30102_extern:()=>wE,sensor_QMC5883L_extern:()=>jE,sensor_VL530LX_extern:()=>JE,sensor_adxl345_get_acceleration:()=>PE,sensor_aht11_extern:()=>qE,sensor_bmp:()=>yE,sensor_compass_reset:()=>_O,sensor_dht11:()=>YE,sensor_hp203_extern:()=>zE,sensor_light_level:()=>vE,sensor_lm35:()=>GE,sensor_ltr381_extern:()=>WE,sensor_mixgo_extern_button_attachInterrupt:()=>fE,sensor_mixgo_extern_button_get_presses:()=>DE,sensor_mixgo_extern_button_is_pressed:()=>LE,sensor_mixgo_extern_button_was_pressed:()=>NE,sensor_mixgo_extern_light:()=>xE,sensor_mixgo_extern_pin_near:()=>bE,sensor_mixgo_extern_sound:()=>XE,sensor_mixgoce_hot_wheel_degrees:()=>RO,sensor_mixgoce_hot_wheel_is_touched:()=>OO,sensor_mpu9250_attachGestureInterrupt:()=>FE,sensor_mpu9250_calibrate_compass:()=>iO,sensor_mpu9250_field_strength:()=>sO,sensor_mpu9250_gesture:()=>ZE,sensor_mpu9250_get_acceleration:()=>$E,sensor_mpu9250_get_gyro:()=>eO,sensor_mpu9250_get_magnetic:()=>tO,sensor_mpu9250_temperature:()=>nO,sensor_sht:()=>VE,sensor_shtc3_extern:()=>QE,sensor_use_i2c_init:()=>UE,sensor_use_spi_init:()=>oO,sensor_use_uart_init:()=>yO,sensor_weather_solo_init:()=>jO,sensor_weather_solo_rain:()=>tR,sensor_weather_solo_wd:()=>ZO,sensor_weather_solo_ws:()=>$O,weather_data:()=>IO,weather_have_data:()=>TO,weather_set_label:()=>hO,weather_set_label_container:()=>mO,weather_set_label_item:()=>EO,weather_uart_mixio:()=>MO});var U={};t.r(U),t.d(U,{HCSR04:()=>mR,RTC_set_date:()=>hR,RTC_set_time:()=>MR,bitbot_als_num:()=>Cc,dht11:()=>Fc,number1:()=>OR,number2:()=>RR,number3:()=>cR,number4:()=>gR,number5:()=>CR,number6:()=>SR,number7:()=>AR,onboard_RTC_get_time:()=>vR,onboard_RTC_get_time_str:()=>VR,onboard_RTC_get_timestamp:()=>YR,onboard_RTC_set_datetime:()=>bR,onboard_RTC_settime_string:()=>XR,onboard_RTC_timestamp_totuple:()=>xR,rfid_readcontent:()=>WR,rfid_readid:()=>HR,rfid_write:()=>KR,rfid_write_return:()=>JR,sensor_LTR308:()=>BR,sensor_aht11:()=>UR,sensor_bitbot_ALS:()=>gc,sensor_button_get_presses:()=>Lc,sensor_button_is_pressed:()=>Sc,sensor_button_was_pressed:()=>Ac,sensor_distance_hrsc04:()=>TR,sensor_eulerangles:()=>qR,sensor_field_strength:()=>Pc,sensor_get_acceleration:()=>QR,sensor_get_temperature:()=>wR,sensor_hp203:()=>kR,sensor_light:()=>fc,sensor_mixbot_get_gyro:()=>cc,sensor_mixbot_patrol_calibrate:()=>Ec,sensor_mixbot_patrol_value:()=>Oc,sensor_mixbot_temperature:()=>Rc,sensor_mixgo_LTR308:()=>PR,sensor_mixgo_button_attachInterrupt:()=>_R,sensor_mixgo_button_get_presses:()=>sR,sensor_mixgo_button_is_pressed:()=>iR,sensor_mixgo_button_was_pressed:()=>nR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>oc,sensor_mixgo_cc_mmc5603_get_angle:()=>_c,sensor_mixgo_cc_mmc5603_get_magnetic:()=>sc,sensor_mixgo_light:()=>ER,sensor_mixgo_nova_LTR308:()=>FR,sensor_mixgo_nova_pin_near:()=>fR,sensor_mixgo_pin_near:()=>DR,sensor_mixgo_pin_near_double:()=>NR,sensor_mixgo_pin_near_single:()=>LR,sensor_mixgo_pin_pressed:()=>rR,sensor_mixgo_touch_slide:()=>IR,sensor_mixgocar42_button_attachInterrupt:()=>uR,sensor_mixgocar42_button_get_presses:()=>aR,sensor_mixgocar42_button_is_pressed:()=>oR,sensor_mixgocar42_button_was_pressed:()=>pR,sensor_mixgocar_battery_left:()=>mc,sensor_mixgocar_pin_near:()=>Mc,sensor_mixgocar_pin_near_line:()=>Tc,sensor_mixgocar_pin_near_state_change:()=>hc,sensor_mixgoce_pin_pressed:()=>lR,sensor_mixgoce_temperature:()=>ac,sensor_mixgome_temperature:()=>pc,sensor_mpython_pin_pressed:()=>dR,sensor_mpython_qmi8658_get_gyro:()=>uc,sensor_mpython_qmi8658_temperature:()=>rc,sensor_onboard_compass_reset:()=>nc,sensor_onboard_mpu9250_calibrate_compass:()=>tc,sensor_onboard_mpu9250_field_strength:()=>ic,sensor_onboard_mpu9250_gesture:()=>zR,sensor_onboard_mpu9250_get_acceleration:()=>jR,sensor_onboard_mpu9250_get_gyro:()=>$R,sensor_onboard_mpu9250_get_magnetic:()=>ZR,sensor_onboard_mpu9250_temperature:()=>ec,sensor_pin_near:()=>Dc,sensor_pin_pressed:()=>Nc,sensor_rm_acc:()=>Ic,sensor_rm_battery_left:()=>dc,sensor_rm_pin_near_double:()=>lc,sensor_rtc_init:()=>yR,sensor_sound:()=>GR,sensor_temperature:()=>vc});var w={};t.r(w),t.d(w,{serial_any:()=>Gc,serial_begin:()=>Wc,serial_print:()=>Xc,serial_print_byte:()=>xc,serial_print_hex:()=>yc,serial_println:()=>bc,serial_read_from_ai:()=>tg,serial_readline:()=>Uc,serial_readstr:()=>Bc,serial_readstr_until:()=>wc,serial_receive_data_event:()=>Vc,serial_send_to_ai:()=>$c,serial_softserial:()=>Hc,serial_softserial_new:()=>kc,system_input:()=>Kc,system_print:()=>Jc,system_print_container:()=>jc,system_print_end:()=>qc,system_print_inline:()=>Qc,system_print_item:()=>Zc,system_print_many:()=>zc});var k={};t.r(k),t.d(k,{Panic_with_status_code:()=>sg,Timer_init:()=>mg,base_delay:()=>Rg,controls_delay:()=>ng,controls_delay_new:()=>ig,controls_millis:()=>og,controls_uname:()=>ag,raw_block:()=>pg,reset:()=>_g,system_bitbot_shutdown:()=>hg,system_machine_reset:()=>Mg,system_ticks_diff:()=>lg,system_timer:()=>rg,system_timer_init:()=>dg,system_wdt_feed:()=>Tg,system_wdt_init:()=>Ig,time_ticks_diff:()=>Og,timer:()=>ug,timer2:()=>Eg});var H={};t.r(H),t.d(H,{Air_daily_content:()=>xg,Air_now_content:()=>Ng,Geo_moon_content:()=>bg,Geo_sun_content:()=>Xg,Life_suggestion_content:()=>fg,Location_search_content:()=>Pg,Tide_daily_content:()=>Fg,WEATHER_DAILY:()=>Cg,WEATHER_HOUR:()=>Sg,WEATHER_NOW:()=>gg,Weather_alarm_content:()=>Dg,Weather_daily:()=>vg,Weather_daily_content:()=>Yg,Weather_now:()=>Ag,Weather_now_content:()=>Lg});var W={};t.r(W),t.d(W,{actuator_extern_get_led_bright:()=>iC,actuator_extern_get_led_state:()=>nC,actuator_extern_led_bright:()=>eC,actuator_extern_led_brightness:()=>sC,actuator_ms32006_dcmotor:()=>Hg,actuator_ms32006_init:()=>kg,actuator_ms32006_stepper:()=>Wg,actuator_neopixel_init:()=>_C,actuator_neopixel_rgb:()=>aC,actuator_neopixel_rgb_all:()=>oC,actuator_neopixel_write:()=>pC,actuator_use_uart_init:()=>uC,esp32_music_get_tempo_extern:()=>jg,esp32_music_pitch:()=>Jg,esp32_music_pitch_init:()=>Kg,esp32_music_pitch_with_time:()=>Qg,esp32_music_play_list:()=>Zg,esp32_music_reset_extern:()=>$g,esp32_music_set_tempo_extern:()=>zg,esp32_music_stop:()=>qg,mixbot_actuator_extern_get_addr:()=>NC,mixbot_actuator_extern_set_addr:()=>DC,mixbot_addr_extern:()=>TC,robot_led_extern:()=>EC,robot_led_extern_get_value:()=>OC,robot_motor_extern:()=>MC,robot_motor_extern_get_speed:()=>hC,robot_servo_extern_absolute_run:()=>CC,robot_servo_extern_get_status:()=>RC,robot_servo_extern_relative_continue:()=>LC,robot_servo_extern_relative_origin:()=>SC,robot_servo_extern_relative_run:()=>AC,robot_servo_extern_stop:()=>gC,robot_servo_extern_stop_mode:()=>cC,robot_traffic_light_extern:()=>mC,servo_get_angle:()=>Ug,servo_get_speed:()=>wg,servo_init:()=>yg,servo_move:()=>tC,servo_set_angle:()=>Bg,servo_set_speed:()=>Gg,servo_speed_360:()=>Vg,syn6288_builtin_voice:()=>dC,syn6288_get_voice:()=>lC,syn6288_set_voice:()=>rC,syn6288_tts_play:()=>IC});var K={};t.r(K),t.d(K,{actuator_dc_motor:()=>iS,actuator_dc_motor_stop:()=>nS,actuator_get_led_bright:()=>BC,actuator_get_led_state:()=>GC,actuator_led_bright:()=>VC,actuator_led_brightness:()=>UC,actuator_mixbot_buzzer_on_off:()=>aS,actuator_mixgo_nova_mic_get:()=>IS,actuator_mixgo_nova_mic_set:()=>dS,actuator_mixgo_nova_onboard_music_pitch:()=>OS,actuator_mixgo_nova_onboard_music_stop:()=>RS,actuator_mixgo_nova_play_audio:()=>mS,actuator_mixgo_nova_play_online_audio:()=>ES,actuator_mixgo_nova_record_audio:()=>hS,actuator_mixgo_nova_voice_get:()=>MS,actuator_mixgo_nova_voice_set:()=>TS,actuator_mixgo_zero_led_color:()=>wC,actuator_onboard_neopixel_rgb:()=>qC,actuator_onboard_neopixel_rgb_all:()=>zC,actuator_onboard_neopixel_rgb_show_all_chase:()=>jC,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>ZC,actuator_onboard_neopixel_write:()=>QC,actuator_stepper_keep:()=>tS,actuator_stepper_stop:()=>eS,analog_ble_keyboard_init:()=>PS,analog_ble_keyboard_input:()=>xS,analog_ble_keyboard_send_battery:()=>bS,analog_ble_keyboard_str:()=>XS,analog_ble_mouse_init:()=>yS,analog_ble_mouse_input:()=>GS,analog_ble_mouse_send_battery:()=>US,analog_keyboard_input:()=>SS,analog_keyboard_str:()=>fS,analog_mouse_input:()=>NS,bitbot_motor:()=>lS,bitbot_move:()=>uS,bitbot_stop:()=>rS,ble_keyboard_connect:()=>YS,ble_keyboard_get_mac:()=>vS,ble_mouse_connect:()=>BS,ble_mouse_get_mac:()=>VS,cc_number:()=>kC,esp32_music_get_tempo:()=>FC,esp32_music_reset:()=>XC,esp32_music_set_tempo:()=>fC,esp32_onboard_music_pitch:()=>PC,esp32_onboard_music_pitch_with_time:()=>vC,esp32_onboard_music_play_list:()=>xC,esp32_onboard_music_stop:()=>YC,general_key:()=>LS,general_key_tuple:()=>FS,get_power_output:()=>gS,ledswitch:()=>yC,mixbot_motor:()=>pS,mixbot_motor_status:()=>sS,mixbot_move:()=>_S,mixbot_stop:()=>oS,mouse_key:()=>DS,number:()=>bC,rm_actuator_get_led_bright:()=>WC,rm_actuator_get_led_state:()=>KC,rm_actuator_led_bright:()=>HC,rm_actuator_led_brightness:()=>JC,rm_motor:()=>$C,set_all_power_output:()=>CS,set_power_output:()=>cS,special_key:()=>AS});var J={};t.r(J),t.d(J,{ai_sensor_20object:()=>RA,ai_sensor_ailocal_class:()=>uA,ai_sensor_ailocal_class_result:()=>rA,ai_sensor_ailocal_train:()=>aA,ai_sensor_asr_recognize:()=>MA,ai_sensor_audio_play:()=>dA,ai_sensor_audio_record:()=>lA,ai_sensor_barcode:()=>QS,ai_sensor_circle:()=>tA,ai_sensor_classifier_faces:()=>OA,ai_sensor_color:()=>sA,ai_sensor_color_chases:()=>pA,ai_sensor_color_chases_result:()=>oA,ai_sensor_config:()=>HS,ai_sensor_face:()=>EA,ai_sensor_find_20objects:()=>cA,ai_sensor_find_barcodes:()=>qS,ai_sensor_find_circles:()=>eA,ai_sensor_find_colors:()=>_A,ai_sensor_find_licenseplates:()=>mA,ai_sensor_find_lines:()=>$S,ai_sensor_find_qrcodes:()=>JS,ai_sensor_find_rects:()=>nA,ai_sensor_find_tags:()=>jS,ai_sensor_licenseplate:()=>hA,ai_sensor_line:()=>ZS,ai_sensor_qrcode:()=>KS,ai_sensor_qrcode_lite:()=>kS,ai_sensor_rect:()=>iA,ai_sensor_rgb:()=>WS,ai_sensor_tag:()=>zS,ai_sensor_use_uart_init:()=>wS,ai_sensor_yolo_recognize:()=>IA,ai_sensor_yolo_recognize_result:()=>TA});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>SA,MICROPYTHON_AI_Speech_unit:()=>CA,MICROPYTHON_AI_client:()=>gA});var q={};t.r(q),t.d(q,{mpython_blynk_app_data:()=>bA,mpython_blynk_app_notify:()=>PA,mpython_blynk_email:()=>yA,mpython_blynk_get_timers:()=>YA,mpython_blynk_on_connected:()=>DA,mpython_blynk_on_disconnected:()=>NA,mpython_blynk_run:()=>FA,mpython_blynk_sensor_data_to_app:()=>XA,mpython_blynk_set_property:()=>VA,mpython_blynk_setup:()=>BA,mpython_blynk_stop_timers:()=>vA,mpython_blynk_sync_virtual:()=>LA,mpython_blynk_terminal_widget_vpin:()=>AA,mpython_blynktimer:()=>xA,mpython_blynktimer_run:()=>fA});var z={};t.r(z),t.d(z,{communicate_bluetooth_central_init:()=>RL,communicate_bluetooth_connect:()=>CL,communicate_bluetooth_disconnect:()=>SL,communicate_bluetooth_handle:()=>FL,communicate_bluetooth_is_connected:()=>LL,communicate_bluetooth_mac:()=>AL,communicate_bluetooth_peripheral_init:()=>cL,communicate_bluetooth_recv:()=>fL,communicate_bluetooth_recv_only:()=>DL,communicate_bluetooth_scan:()=>gL,communicate_bluetooth_send:()=>NL,communicate_espnow_init:()=>PL,communicate_espnow_init_new:()=>vL,communicate_i2c_available:()=>JA,communicate_i2c_init:()=>wA,communicate_i2c_master_read:()=>KA,communicate_i2c_onboard:()=>GA,communicate_i2c_read:()=>kA,communicate_i2c_scan:()=>WA,communicate_i2c_write:()=>HA,communicate_ir_recv_init:()=>rL,communicate_ir_send_init:()=>ML,communicate_ow_init:()=>sL,communicate_ow_read:()=>pL,communicate_ow_reset:()=>oL,communicate_ow_scan:()=>_L,communicate_ow_select:()=>uL,communicate_ow_write:()=>aL,communicate_spi_buffer:()=>jA,communicate_spi_init:()=>qA,communicate_spi_onboard:()=>UA,communicate_spi_read:()=>ZA,communicate_spi_read_output:()=>$A,communicate_spi_readinto:()=>tL,communicate_spi_readinto_output:()=>eL,communicate_spi_set:()=>zA,communicate_spi_write:()=>iL,communicate_spi_write_readinto:()=>nL,espnow_radio_channel:()=>VL,espnow_radio_channel_new:()=>GL,espnow_radio_on_off:()=>UL,espnow_radio_rec:()=>kL,espnow_radio_recv:()=>WL,espnow_radio_recv_certain_msg:()=>KL,espnow_radio_recv_certain_msg_new:()=>QL,espnow_radio_recv_msg:()=>HL,espnow_radio_recv_new:()=>JL,espnow_radio_send:()=>wL,espnow_radio_txpower:()=>BL,i2c_slave_onreceive:()=>QA,internal_variable:()=>lL,ir_recv_timeout:()=>TL,ir_transmit_busy:()=>OL,ir_transmit_conventional_data:()=>hL,ir_transmit_raw_code:()=>EL,ir_transmit_study_code:()=>mL,ir_whether_recv:()=>IL,lora_init:()=>qL,lora_packet:()=>zL,lora_recv:()=>ZL,lora_send:()=>jL,network_espnow_info:()=>xL,network_espnow_mac:()=>YL,network_espnow_recv:()=>XL,network_espnow_recv_handle:()=>yL,network_espnow_send:()=>bL,recv_fun:()=>dL,urequests_attribute:()=>tN,urequests_get:()=>$L,urequests_method:()=>eN});var j={};t.r(j),t.d(j,{display_animate:()=>LN,display_circle:()=>NN,display_color_seclet:()=>VN,display_draw_4strings:()=>ON,display_fill:()=>AN,display_lcd_use_i2c_init:()=>HN,display_line:()=>gN,display_line_arbitrarily:()=>RN,display_matrix_extern_bright_point:()=>dN,display_matrix_extern_bright_screen:()=>TN,display_matrix_extern_clear:()=>uN,display_matrix_extern_get_pixel:()=>lN,display_matrix_extern_get_screen_pixel:()=>IN,display_matrix_extern_image_builtins:()=>MN,display_matrix_extern_scroll_string:()=>pN,display_matrix_extern_scroll_string_delay:()=>aN,display_matrix_extern_shift:()=>rN,display_matrix_extern_show_frame_string:()=>_N,display_matrix_extern_show_frame_string_delay:()=>oN,display_matrix_extern_show_image:()=>nN,display_matrix_extern_show_image_or_string_delay:()=>sN,display_matrix_use_i2c_init:()=>iN,display_oled_drawPixel:()=>FN,display_oled_showBitmap:()=>fN,display_oled_use_i2c_init:()=>qN,display_onoff:()=>CN,display_rect:()=>cN,display_tm1650_power:()=>vN,display_tm1650_set_brightness:()=>XN,display_tm1650_show_dot:()=>xN,display_tm1650_show_num:()=>YN,display_tm_use_i2c_init:()=>PN,display_triangle:()=>DN,display_use_i2c_init:()=>EN,extern_oled_bright_point:()=>pD,extern_oled_clear:()=>sD,extern_oled_get_pixel:()=>oD,extern_oled_hvline:()=>uD,extern_oled_line:()=>rD,extern_oled_scroll_string:()=>iD,extern_oled_scroll_string_delay:()=>nD,extern_oled_shape_rect:()=>aD,extern_oled_shift:()=>_D,extern_oled_show_frame_string:()=>tD,extern_oled_show_frame_string_delay:()=>eD,extern_oled_show_image:()=>zN,extern_oled_show_image_or_string_delay:()=>$N,extern_oled_show_image_xy:()=>jN,extern_oled_show_string:()=>ZN,image_shift:()=>SN,lcd_backlight:()=>JN,lcd_clear:()=>QN,lcd_print_string:()=>KN,lcd_show_image_or_string_delay:()=>WN,matrix_extern_image_arithmetic:()=>hN,matrix_extern_image_invert:()=>mN,tft_fill:()=>wN,tft_line_arbitrarily:()=>kN,tft_scroll_string_delay:()=>UN,tft_show_frame_string_delay:()=>GN,tft_show_image_or_string_delay:()=>BN,tft_show_image_xy:()=>yN,tft_use_spi_init:()=>bN});var Z={};t.r(Z),t.d(Z,{bitbot_display_image_create:()=>QD,display_bright_point:()=>AD,display_bright_screen:()=>ND,display_clear:()=>RD,display_get_pixel:()=>SD,display_get_screen_pixel:()=>LD,display_image_builtins:()=>mD,display_image_builtins_all:()=>ED,display_image_create:()=>OD,display_scroll_string:()=>MD,display_scroll_string_delay:()=>hD,display_shift:()=>CD,display_show_frame_string:()=>ID,display_show_frame_string_delay:()=>TD,display_show_image:()=>lD,display_show_image_or_string_delay:()=>dD,draw_pointer:()=>Of,image_arithmetic:()=>cD,image_invert:()=>gD,mixbot_display_bright_screen:()=>KD,mixbot_display_get_ambientbright:()=>WD,mixbot_display_get_screen_pixel:()=>HD,mixbot_display_image_create:()=>kD,mixbot_display_rotate:()=>JD,mixgo_display_image_create_new:()=>PD,mixgome_display_font:()=>FD,mixgome_display_image_create:()=>DD,mixgomini_display_image_create:()=>fD,mpython_display_hvline:()=>UD,mpython_display_line:()=>wD,mpython_display_shape_rect:()=>GD,mpython_pbm_image:()=>vD,onboard_oled_bright_point:()=>BD,onboard_oled_scroll_string_delay:()=>VD,onboard_oled_show_frame_string_delay:()=>yD,onboard_oled_show_image:()=>YD,onboard_oled_show_image_or_string_delay:()=>bD,onboard_oled_show_image_xy:()=>xD,onboard_oled_show_string:()=>XD,onboard_tft_bright_point:()=>uf,onboard_tft_bright_screen:()=>lf,onboard_tft_clear:()=>of,onboard_tft_clock_clear:()=>mf,onboard_tft_clock_draw:()=>hf,onboard_tft_clock_get_rtctime:()=>Tf,onboard_tft_clock_init:()=>If,onboard_tft_clock_set_time:()=>Mf,onboard_tft_display_hvline:()=>sf,onboard_tft_display_line:()=>_f,onboard_tft_display_shape_circle:()=>Ef,onboard_tft_display_shape_rect:()=>nf,onboard_tft_fill:()=>df,onboard_tft_get_pixel:()=>af,onboard_tft_get_screen_pixel:()=>rf,onboard_tft_scroll_string:()=>tf,onboard_tft_scroll_string_delay:()=>ef,onboard_tft_shift:()=>pf,onboard_tft_show_frame_string:()=>ZD,onboard_tft_show_frame_string_delay:()=>$D,onboard_tft_show_image:()=>qD,onboard_tft_show_image_or_string_delay:()=>jD,onboard_tft_show_image_xy:()=>zD});var $={};t.r($),t.d($,{factory_block:()=>Nf,factory_block_return:()=>Df,factory_block_return_with_textarea:()=>Ff,factory_block_with_textarea:()=>ff,factory_callMethod_noreturn:()=>Af,factory_callMethod_return:()=>Lf,factory_declare:()=>Sf,factory_from_import:()=>Rf,factory_function_noreturn:()=>gf,factory_function_return:()=>Cf,factory_import:()=>cf,folding_block:()=>Pf});var tt={};t.r(tt),t.d(tt,{inout_analog_atten:()=>Kf,inout_analog_read:()=>Bf,inout_analog_read_init:()=>Wf,inout_analog_write:()=>bf,inout_analog_write_init:()=>Hf,inout_analog_write_set:()=>yf,inout_digital_init:()=>wf,inout_digital_read:()=>xf,inout_digital_write:()=>Yf,inout_highlow:()=>vf,inout_pin_attachInterrupt:()=>Uf,inout_pin_pressed:()=>Gf,inout_pin_pressed_init:()=>Jf,inout_pwm_analog_write:()=>Xf,inout_pwm_analog_write_init:()=>kf,inout_pwm_analog_write_set_freq:()=>Vf});var et={};t.r(et),t.d(et,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>dF,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>rF,IOT_EMQX_PING:()=>IF,IOT_FORMATTING:()=>aF,IOT_FORMAT_STRING:()=>uF,IOT_MIXIO_NTP:()=>TF,IOT_MIXIO_PUBLISH:()=>eF,IOT_MIXIO_SUBSCRIBE:()=>iF,iot_client_onboard:()=>MF,iot_http_client:()=>hF,iot_http_data:()=>mF,iot_mixio_check:()=>_F,iot_mixio_connect:()=>tF,iot_mixio_connect_only:()=>sF,iot_mixio_disconnect:()=>nF,iot_mixio_format_msg:()=>pF,iot_mixio_format_topic:()=>oF,iot_mixly_key:()=>lF,iot_mqtt_client:()=>EF,iot_mqtt_data:()=>OF,iot_onenet_check:()=>Zf,iot_onenet_connect:()=>qf,iot_onenet_disconnect:()=>zf,iot_onenet_publish:()=>$f,iot_onenet_publish_dict:()=>jf,iot_wifi_connect:()=>Qf});var it={};t.r(it),t.d(it,{network_ap_connect:()=>DF,network_connect:()=>cF,network_get_connect:()=>CF,network_get_wifi:()=>NF,network_init:()=>RF,network_is_active:()=>LF,network_open:()=>AF,network_scan:()=>fF,network_server:()=>FF,network_socket_accept:()=>XF,network_socket_bind:()=>vF,network_socket_close:()=>GF,network_socket_connect:()=>YF,network_socket_init:()=>PF,network_socket_listen:()=>xF,network_socket_receive:()=>bF,network_socket_receive_from:()=>VF,network_socket_send:()=>yF,network_socket_send_to:()=>BF,network_stop:()=>SF,network_wifi_connect:()=>gF,ntptime_address:()=>WF,ntptime_time:()=>HF,requests_attribute:()=>wF,requests_attribute2:()=>JF,requests_get:()=>UF,requests_get2:()=>KF,requests_method:()=>kF,requests_post:()=>QF});var nt={};t.r(nt),t.d(nt,{pe_g1_battery_left:()=>zF,pe_g1_dc_motor:()=>jF,pe_g1_dc_motor_speed:()=>ZF,pe_g1_servo_get_angle:()=>eP,pe_g1_servo_get_speed:()=>iP,pe_g1_servo_set_angle:()=>$F,pe_g1_servo_set_speed:()=>tP,pe_g1_use_i2c_init:()=>qF});var st={};t.r(st),t.d(st,{HCSR04:()=>WP,PS2_Button:()=>QP,PS2_Buttons:()=>qP,PS2_Buttons_new:()=>nv,PS2_State:()=>zP,PS2_init:()=>KP,PS2_init_new:()=>ev,PS2_stk:()=>jP,PS2_stk_new:()=>sv,PS2_vibration:()=>JP,PS2_vibration_new:()=>iv,RTC_get_time:()=>$P,RTC_set_date:()=>rP,RTC_set_datetime:()=>ZP,RTC_set_time:()=>uP,esp32_s2_weather_init:()=>UP,esp32_s2_weather_rain:()=>kP,esp32_s2_weather_wd:()=>wP,esp32_s2_weather_ws:()=>HP,extern_rfid_read:()=>fP,extern_rfid_readcontent:()=>PP,extern_rfid_readid:()=>FP,extern_rfid_status:()=>xP,extern_rfid_write:()=>vP,extern_rfid_write_return:()=>YP,gnss_get_data:()=>pv,gnss_have_data:()=>av,mixbot_sensor_extern_get_addr:()=>mv,mixbot_sensor_extern_set_addr:()=>Ev,pm25_get_data:()=>ov,robot_button_extern_get_value:()=>uv,robot_color_extern_get_value:()=>Tv,robot_infrared_extern_get_value:()=>lv,robot_infrared_extern_grey_get_value:()=>dv,robot_potentiometer_extern_get_value:()=>Iv,robot_sonar_extern_get_value:()=>Mv,robot_sonar_extern_led:()=>hv,robot_touch_extern_get_value:()=>rv,sensor_APDS9960_extern:()=>OP,sensor_DS18X20:()=>Cv,sensor_LTR308_extern:()=>RP,sensor_LTR390UV_extern:()=>CP,sensor_MAX30102_extern:()=>EP,sensor_QMC5883L_extern:()=>SP,sensor_VL530LX_extern:()=>NP,sensor_aht11_extern:()=>LP,sensor_bmp:()=>MP,sensor_dht11:()=>tv,sensor_distance_hrsc04:()=>aP,sensor_hp203_extern:()=>cP,sensor_ltr381_extern:()=>gP,sensor_mixgo_extern_button_attachInterrupt:()=>oP,sensor_mixgo_extern_button_get_presses:()=>_P,sensor_mixgo_extern_button_is_pressed:()=>nP,sensor_mixgo_extern_button_was_pressed:()=>sP,sensor_mixgo_extern_light:()=>lP,sensor_mixgo_extern_pin_near:()=>IP,sensor_mixgo_extern_sound:()=>dP,sensor_mixgoce_hot_wheel_degrees:()=>GP,sensor_mixgoce_hot_wheel_is_touched:()=>BP,sensor_mpu9250_attachGestureInterrupt:()=>pP,sensor_rtc_init:()=>TP,sensor_sht:()=>hP,sensor_shtc3_extern:()=>AP,sensor_use_i2c_init:()=>mP,sensor_use_spi_init:()=>DP,sensor_use_uart_init:()=>_v,sensor_weather_solo_init:()=>Ov,sensor_weather_solo_rain:()=>gv,sensor_weather_solo_wd:()=>Rv,sensor_weather_solo_ws:()=>cv,weather_data:()=>XP,weather_have_data:()=>bP,weather_set_label:()=>VP,weather_uart_mixio:()=>yP});var _t={};t.r(_t),t.d(_t,{HCSR04:()=>vv,bitbot_als_num:()=>jY,dht11:()=>_x,number1:()=>Yv,number2:()=>xv,number3:()=>Xv,number4:()=>bv,number5:()=>yv,number6:()=>Vv,number7:()=>Bv,onboard_RTC_get_time:()=>DY,onboard_RTC_get_time_str:()=>PY,onboard_RTC_get_timestamp:()=>fY,onboard_RTC_set_datetime:()=>LY,onboard_RTC_settime_string:()=>NY,onboard_RTC_timestamp_totuple:()=>FY,rfid_readcontent:()=>tY,rfid_readid:()=>$v,rfid_write:()=>eY,rfid_write_return:()=>iY,sensor_LTR308:()=>Qv,sensor_adxl345_get_acceleration:()=>lY,sensor_aht11:()=>jv,sensor_bitbot_ALS:()=>zY,sensor_button_get_presses:()=>tx,sensor_button_is_pressed:()=>ZY,sensor_button_was_pressed:()=>$Y,sensor_compass_reset:()=>mY,sensor_ds18x20:()=>Kv,sensor_eulerangles:()=>sY,sensor_get_acceleration:()=>nY,sensor_get_temperature:()=>Zv,sensor_hp203:()=>zv,sensor_light:()=>sx,sensor_lm35:()=>Jv,sensor_mixbot_get_gyro:()=>qY,sensor_mixbot_patrol_calibrate:()=>KY,sensor_mixbot_patrol_value:()=>JY,sensor_mixbot_temperature:()=>QY,sensor_mixgo_LTR308:()=>Hv,sensor_mixgo_button_attachInterrupt:()=>Nv,sensor_mixgo_button_get_presses:()=>Lv,sensor_mixgo_button_is_pressed:()=>Sv,sensor_mixgo_button_was_pressed:()=>Av,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>xY,sensor_mixgo_cc_mmc5603_get_angle:()=>YY,sensor_mixgo_cc_mmc5603_get_magnetic:()=>vY,sensor_mixgo_light:()=>nx,sensor_mixgo_nova_LTR308:()=>Wv,sensor_mixgo_nova_pin_near:()=>kv,sensor_mixgo_pin_near:()=>wv,sensor_mixgo_pin_near_double:()=>Uv,sensor_mixgo_pin_near_single:()=>Gv,sensor_mixgo_pin_pressed:()=>uY,sensor_mixgo_touch_slide:()=>aY,sensor_mixgocar42_button_attachInterrupt:()=>Pv,sensor_mixgocar42_button_get_presses:()=>Fv,sensor_mixgocar42_button_is_pressed:()=>Dv,sensor_mixgocar42_button_was_pressed:()=>fv,sensor_mixgocar_battery_left:()=>WY,sensor_mixgocar_pin_near:()=>kY,sensor_mixgocar_pin_near_line:()=>wY,sensor_mixgocar_pin_near_state_change:()=>HY,sensor_mixgoce_pin_pressed:()=>pY,sensor_mixgoce_temperature:()=>bY,sensor_mixgome_temperature:()=>XY,sensor_mpu9250_calibrate_compass:()=>TY,sensor_mpu9250_field_strength:()=>hY,sensor_mpu9250_gesture:()=>_Y,sensor_mpu9250_get_acceleration:()=>oY,sensor_mpu9250_get_gyro:()=>IY,sensor_mpu9250_get_magnetic:()=>dY,sensor_mpu9250_temperature:()=>MY,sensor_mpython_pin_pressed:()=>rY,sensor_mpython_qmi8658_get_gyro:()=>yY,sensor_mpython_qmi8658_temperature:()=>VY,sensor_onboard_compass_reset:()=>AY,sensor_onboard_mpu9250_calibrate_compass:()=>gY,sensor_onboard_mpu9250_field_strength:()=>SY,sensor_onboard_mpu9250_gesture:()=>EY,sensor_onboard_mpu9250_get_acceleration:()=>OY,sensor_onboard_mpu9250_get_gyro:()=>cY,sensor_onboard_mpu9250_get_magnetic:()=>RY,sensor_onboard_mpu9250_temperature:()=>CY,sensor_pin_near:()=>ix,sensor_pin_pressed:()=>ex,sensor_rm_acc:()=>UY,sensor_rm_battery_left:()=>GY,sensor_rm_pin_near_double:()=>BY,sensor_sound:()=>qv});var ot={};t.r(ot),t.d(ot,{serial_any:()=>rx,serial_print:()=>ox,serial_print_byte:()=>px,serial_print_hex:()=>ux,serial_println:()=>ax,serial_read_from_ai:()=>cx,serial_readline:()=>dx,serial_readstr:()=>lx,serial_send_to_ai:()=>Rx,serial_softserial:()=>Ix,serial_softserial_new:()=>Tx,system_input:()=>Mx,system_print:()=>hx,system_print_end:()=>Ex,system_print_inline:()=>mx,system_print_many:()=>Ox});var pt={};t.r(pt),t.d(pt,{Panic_with_status_code:()=>Yx,Timer_init:()=>Qx,base_delay:()=>jx,controls_delay:()=>Vx,controls_delay_new:()=>Bx,controls_end_program:()=>Xx,controls_millis:()=>xx,controls_uname:()=>yx,reset:()=>bx,system_bitbot_shutdown:()=>Jx,system_device_name:()=>Px,system_device_serial_number:()=>vx,system_event_bus_source:()=>fx,system_event_bus_value:()=>Fx,system_machine_reset:()=>Kx,system_on_event:()=>Lx,system_raise_event:()=>Ax,system_reset:()=>Cx,system_run_in_background:()=>gx,system_ticks_diff:()=>wx,system_timer:()=>Ux,system_timer_init:()=>kx,system_timestamp:()=>Nx,system_value:()=>Dx,system_wait:()=>Sx,system_wdt_feed:()=>Wx,system_wdt_init:()=>Hx,time_ticks_diff:()=>zx,timer:()=>Gx,timer2:()=>qx});var at={};t.r(at),t.d(at,{Air_daily_content:()=>rX,Air_now_content:()=>nX,Geo_moon_content:()=>dX,Geo_sun_content:()=>lX,Life_suggestion_content:()=>_X,Location_search_content:()=>pX,Tide_daily_content:()=>oX,WEATHER_DAILY:()=>$x,WEATHER_HOUR:()=>tX,WEATHER_NOW:()=>Zx,Weather_alarm_content:()=>sX,Weather_daily:()=>aX,Weather_daily_content:()=>uX,Weather_now:()=>eX,Weather_now_content:()=>iX});var ut={};t.r(ut),t.d(ut,{analog_input:()=>SX,analog_output:()=>LX,espnow_channel:()=>cX,haskylens_model:()=>gX,i2c_A_pin:()=>NX,i2c_B_pin:()=>DX,pins_analog:()=>YX,pins_analog_pin:()=>xX,pins_axis:()=>zX,pins_brightness:()=>jX,pins_builtinimg:()=>kX,pins_builtinimg_extern:()=>HX,pins_button:()=>yX,pins_dac:()=>XX,pins_dac_pin:()=>bX,pins_digital:()=>hX,pins_digital_dot:()=>_b,pins_digital_pin:()=>mX,pins_exlcdh:()=>QX,pins_exlcdv:()=>qX,pins_imglist:()=>WX,pins_input_pin:()=>EX,pins_mpython_touch:()=>RX,pins_one_more:()=>sb,pins_output_pin:()=>OX,pins_playlist:()=>KX,pins_playlist_extern:()=>JX,pins_pwm:()=>VX,pins_pwm_pin:()=>BX,pins_radio_datarate:()=>nb,pins_radio_power:()=>ib,pins_serial:()=>wX,pins_tone_notes:()=>eb,pins_touch:()=>UX,pins_touch_pin:()=>GX,pins_tts_bgmusic:()=>tb,pins_tts_builtin_music:()=>$X,pins_tts_voice:()=>ZX,pwm_input:()=>CX,pwm_output:()=>AX,spi_A_pin:()=>fX,spi_B_pin:()=>FX,spi_C_pin:()=>PX,spi_D_pin:()=>vX});var rt={};t.r(rt),t.d(rt,{espnow_channel:()=>Mb,haskylens_model:()=>hb,pins_analog:()=>db,pins_analog_pin:()=>lb,pins_axis:()=>fb,pins_brightness:()=>vb,pins_builtinimg:()=>Sb,pins_builtinimg_extern:()=>Ab,pins_button:()=>pb,pins_dac:()=>Ob,pins_dac_pin:()=>Eb,pins_digital:()=>ob,pins_digital_dot:()=>Gb,pins_digital_pin:()=>ab,pins_exlcdh:()=>Fb,pins_exlcdv:()=>Pb,pins_imglist:()=>Lb,pins_input_pin:()=>ub,pins_interrupt:()=>gb,pins_mpython_touch:()=>mb,pins_one_more:()=>Bb,pins_output_pin:()=>rb,pins_playlist:()=>Nb,pins_playlist_extern:()=>Db,pins_pwm:()=>Tb,pins_pwm_pin:()=>Ib,pins_radio_datarate:()=>Vb,pins_radio_power:()=>yb,pins_serial:()=>Cb,pins_tone_notes:()=>bb,pins_touch:()=>cb,pins_touch_pin:()=>Rb,pins_tts_bgmusic:()=>Xb,pins_tts_builtin_music:()=>xb,pins_tts_voice:()=>Yb});const lt=Blockly,dt=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&&(o+=n)):i=o}else i="i";return i}},Tt=It; +(()=>{"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:()=>kt,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:()=>Ht,controls_try_finally:()=>yt,controls_whileUntil:()=>bt,datetime_fromtimestamp:()=>ie,do_while:()=>jt,garbage_collection:()=>Zt,get_mem_alloc:()=>$t,get_mem_free:()=>te,get_unique_identifier:()=>ee});var n={};t.r(n),t.d(n,{base_map:()=>Ce,math_arithmetic:()=>pe,math_bit:()=>ue,math_constant:()=>_e,math_constant_mp:()=>oe,math_constrain:()=>he,math_dec:()=>le,math_indexer_number:()=>Ee,math_map:()=>me,math_max_min:()=>Ie,math_number:()=>se,math_number_base_conversion:()=>Te,math_random:()=>Me,math_random_seed:()=>Oe,math_round:()=>Re,math_selfcalcu:()=>ae,math_to_int:()=>de,math_trig:()=>re,text_to_number:()=>ce,text_to_number_skulpt:()=>ge,turn_to_int:()=>Se});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Fe,char_to_ascii:()=>Pe,number_to_text:()=>ve,os_system:()=>ni,text:()=>Le,text_capital:()=>Ue,text_center:()=>we,text_char:()=>De,text_char_at:()=>Xe,text_char_at2:()=>xe,text_char_at3:()=>$e,text_compareTo:()=>Ze,text_compare_to:()=>Ge,text_create_with_container:()=>qe,text_create_with_item:()=>ze,text_encode:()=>ei,text_equals_starts_ends:()=>Be,text_eval:()=>ii,text_find:()=>ke,text_format:()=>Qe,text_format_noreturn:()=>ti,text_join:()=>fe,text_join_seq:()=>He,text_length:()=>Ye,text_random_char:()=>be,text_replace:()=>We,text_split:()=>Ke,text_strip:()=>Je,text_substring:()=>Ve,text_substring2:()=>ye,text_substring3:()=>je,text_textarea:()=>Ne});var _={};t.r(_),t.d(_,{ENUMERATE:()=>Bi,enumerate:()=>Gi,list_many_input:()=>Li,list_tolist:()=>Fi,list_tolist2:()=>Vi,list_trig:()=>Ci,lists_2d_get_col_row_data:()=>ai,lists_2d_get_data_with_col_row:()=>pi,lists_append_extend:()=>Ti,lists_change_to:()=>Ai,lists_change_to_general:()=>Di,lists_clear:()=>Oi,lists_create_with:()=>ui,lists_create_with2:()=>Pi,lists_create_with_container:()=>li,lists_create_with_item:()=>di,lists_create_with_noreturn:()=>Ni,lists_create_with_text:()=>ri,lists_create_with_text2:()=>vi,lists_del_general:()=>fi,lists_find:()=>gi,lists_getIndex3:()=>Yi,lists_getSublist3:()=>xi,lists_get_index:()=>_i,lists_get_random_item:()=>Mi,lists_get_random_sublist:()=>hi,lists_get_sublist:()=>oi,lists_insert_value:()=>mi,lists_insert_value2:()=>bi,lists_pop:()=>ci,lists_remove_at:()=>Ri,lists_remove_at2:()=>yi,lists_reverse:()=>Ei,lists_setIndex3:()=>Xi,lists_set_index:()=>Ii,lists_sort:()=>Si});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>nn,dicts_add_or_change:()=>Qi,dicts_clear:()=>ji,dicts_create_with:()=>wi,dicts_create_with_container:()=>ki,dicts_create_with_item:()=>Hi,dicts_create_with_noreturn:()=>on,dicts_deldict:()=>en,dicts_delete:()=>qi,dicts_get:()=>Ki,dicts_get_default:()=>Ji,dicts_items:()=>Zi,dicts_keys:()=>Wi,dicts_length:()=>tn,dicts_pop:()=>sn,dicts_setdefault:()=>_n,dicts_to_json:()=>an,dicts_todict:()=>pn,dicts_update:()=>zi,dicts_values:()=>$i,json_to_dicts:()=>un});var p={};t.r(p),t.d(p,{logic_boolean:()=>Mn,logic_compare:()=>ln,logic_compare_continous:()=>dn,logic_is:()=>On,logic_is_in:()=>En,logic_negate:()=>Tn,logic_null:()=>hn,logic_operation:()=>In,logic_tobool:()=>Rn,logic_true_or_false:()=>mn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>kn,sdcard_use_spi_init:()=>wn,storage_can_write_ornot:()=>fn,storage_change_dir:()=>Gn,storage_close_file:()=>Pn,storage_delete_file:()=>Yn,storage_file_seek:()=>bn,storage_file_tell:()=>Xn,storage_file_write:()=>An,storage_fileopen:()=>gn,storage_fileopen_new:()=>Cn,storage_fileopen_new_encoding:()=>Sn,storage_get_a_line:()=>Dn,storage_get_contents:()=>Nn,storage_get_contents_without_para:()=>Ln,storage_get_current_dir:()=>yn,storage_get_file_size:()=>xn,storage_get_filename:()=>Fn,storage_is_file:()=>Un,storage_list_all_files:()=>vn,storage_make_dir:()=>Vn,storage_open_file_with_os:()=>cn,storage_rename:()=>Bn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>zn,procedures_callreturn:()=>jn,procedures_defnoreturn:()=>Kn,procedures_defreturn:()=>Jn,procedures_ifreturn:()=>Zn,procedures_mutatorarg:()=>qn,procedures_mutatorcontainer:()=>Qn,procedures_return:()=>$n});var r={};t.r(r),t.d(r,{tuple_change_to:()=>ls,tuple_create_with:()=>es,tuple_create_with_container:()=>is,tuple_create_with_item:()=>ns,tuple_create_with_noreturn:()=>Ms,tuple_create_with_text2:()=>ss,tuple_create_with_text_return:()=>_s,tuple_del:()=>as,tuple_find:()=>ds,tuple_getIndex:()=>os,tuple_getSublist:()=>Ts,tuple_get_random_item:()=>ms,tuple_get_sublist:()=>hs,tuple_join:()=>us,tuple_length:()=>ps,tuple_max:()=>rs,tuple_totuple:()=>Es,tuple_trig:()=>Is});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ds,set_clear:()=>As,set_create_with:()=>Rs,set_create_with_container:()=>cs,set_create_with_item:()=>gs,set_create_with_text_return:()=>Ps,set_length:()=>Cs,set_operate:()=>Ls,set_operate_update:()=>Ns,set_pop:()=>Ss,set_sub:()=>fs,set_toset:()=>vs,set_update:()=>Fs});var d={};t.r(d),t.d(d,{html_content:()=>ys,html_content_more:()=>Vs,html_document:()=>xs,html_form:()=>Gs,html_head_body:()=>bs,html_style:()=>Bs,html_style_color:()=>ws,html_style_content:()=>Us,html_text:()=>ks,html_title:()=>Xs});var I={};t.r(I),t.d(I,{attribute_access:()=>n_,function_call:()=>t_,function_call_container:()=>e_,function_call_item:()=>i_,raw_block:()=>Ks,raw_empty:()=>Qs,raw_expression:()=>Js,raw_table:()=>Ws,text_comment:()=>qs,text_print_multiple:()=>js,text_print_multiple_container:()=>Zs,text_print_multiple_item:()=>$s,type_check:()=>zs});var T={};t.r(T),t.d(T,{controls_type:()=>a_,controls_typeLists:()=>u_,lists_zip:()=>r_,unpack_iterable_object:()=>l_,variables_change:()=>o_,variables_get:()=>s_,variables_global:()=>p_,variables_set:()=>__});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>c_,base_setup:()=>I_,controls_delay:()=>R_,controls_flow_statements:()=>O_,controls_for:()=>h_,controls_forEach:()=>L_,controls_for_range:()=>m_,controls_if:()=>T_,controls_interrupts:()=>S_,controls_lambda:()=>D_,controls_main:()=>d_,controls_millis:()=>g_,controls_nointerrupts:()=>A_,controls_pass:()=>F_,controls_range:()=>N_,controls_repeat:()=>V_,controls_repeat_ext:()=>Y_,controls_thread:()=>P_,controls_try_finally:()=>M_,controls_whileUntil:()=>E_,datetime_fromtimestamp:()=>B_,do_while:()=>v_,garbage_collection:()=>x_,get_mem_alloc:()=>X_,get_mem_free:()=>b_,get_unique_identifier:()=>y_,reset:()=>C_,time_sleep:()=>f_});var h={};t.r(h),t.d(h,{base_map:()=>oo,math_arithmetic:()=>H_,math_bit:()=>k_,math_constant:()=>U_,math_constant_mp:()=>w_,math_constrain:()=>$_,math_dec:()=>Q_,math_indexer_number:()=>io,math_map:()=>Z_,math_max_min:()=>z_,math_number:()=>G_,math_number_base_conversion:()=>to,math_random:()=>j_,math_random_seed:()=>eo,math_round:()=>no,math_selfcalcu:()=>W_,math_single:()=>K_,math_to_int:()=>q_,math_trig:()=>J_,text_to_number:()=>so,text_to_number_skulpt:()=>_o,turn_to_int:()=>po});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Io,char_to_ascii:()=>To,number_to_text:()=>Mo,os_system:()=>Vo,text:()=>ao,text_capital:()=>So,text_center:()=>Ao,text_char:()=>ro,text_char_at:()=>Eo,text_char_at2:()=>mo,text_char_at3:()=>Xo,text_compareTo:()=>xo,text_compare_to:()=>co,text_encode:()=>bo,text_equals_starts_ends:()=>Ro,text_eval:()=>yo,text_find:()=>Lo,text_format:()=>Po,text_format_noreturn:()=>vo,text_join:()=>lo,text_join_seq:()=>No,text_length:()=>ho,text_random_char:()=>Oo,text_replace:()=>Do,text_split:()=>fo,text_strip:()=>Fo,text_substring:()=>Co,text_substring2:()=>go,text_substring3:()=>Yo,text_textarea:()=>uo});var E={};t.r(E),t.d(E,{enumerate:()=>mp,list_many_input:()=>sp,list_tolist:()=>Mp,list_tolist2:()=>hp,list_trig:()=>ep,lists_2d_get_col_row_data:()=>Uo,lists_2d_get_data_with_col_row:()=>Go,lists_append_extend:()=>Ko,lists_change_to:()=>np,lists_change_to_general:()=>op,lists_clear:()=>jo,lists_create_with:()=>wo,lists_create_with2:()=>ap,lists_create_with_noreturn:()=>_p,lists_create_with_text:()=>ko,lists_create_with_text2:()=>up,lists_del_general:()=>pp,lists_find:()=>Zo,lists_getIndex3:()=>rp,lists_getSublist3:()=>lp,lists_get_index:()=>Ho,lists_get_random_item:()=>Jo,lists_get_random_sublist:()=>Qo,lists_get_sublist:()=>Bo,lists_insert_value:()=>qo,lists_insert_value2:()=>Ip,lists_pop:()=>tp,lists_remove_at:()=>$o,lists_remove_at2:()=>Tp,lists_reverse:()=>zo,lists_setIndex3:()=>dp,lists_set_index:()=>Wo,lists_sort:()=>ip});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Fp,dicts_add_or_change:()=>gp,dicts_clear:()=>Ap,dicts_create_with:()=>Ep,dicts_create_with_noreturn:()=>Yp,dicts_deldict:()=>fp,dicts_delete:()=>Cp,dicts_get:()=>Rp,dicts_get_default:()=>cp,dicts_items:()=>Lp,dicts_keys:()=>Op,dicts_length:()=>Dp,dicts_pop:()=>Pp,dicts_setdefault:()=>vp,dicts_to_json:()=>Xp,dicts_todict:()=>xp,dicts_update:()=>Sp,dicts_values:()=>Np,json_to_dicts:()=>bp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Up,logic_compare:()=>yp,logic_compare_continous:()=>Vp,logic_is:()=>Wp,logic_is_in:()=>Hp,logic_negate:()=>Gp,logic_null:()=>wp,logic_operation:()=>Bp,logic_tobool:()=>Kp,logic_true_or_false:()=>kp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ma,sdcard_use_spi_init:()=>Ta,storage_can_write_ornot:()=>ea,storage_change_dir:()=>ua,storage_close_file:()=>na,storage_delete_file:()=>_a,storage_file_seek:()=>aa,storage_file_tell:()=>pa,storage_file_write:()=>jp,storage_fileopen:()=>Qp,storage_fileopen_new:()=>qp,storage_fileopen_new_encoding:()=>zp,storage_get_a_line:()=>ta,storage_get_contents:()=>$p,storage_get_contents_without_para:()=>Zp,storage_get_current_dir:()=>ra,storage_get_file_size:()=>oa,storage_get_filename:()=>ia,storage_is_file:()=>Ia,storage_list_all_files:()=>sa,storage_make_dir:()=>la,storage_open_file_with_os:()=>Jp,storage_rename:()=>da});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Oa,procedures_callreturn:()=>Ea,procedures_defnoreturn:()=>ma,procedures_defreturn:()=>ha,procedures_ifreturn:()=>Ra,procedures_return:()=>ca});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Fa,tuple_create_with:()=>ga,tuple_create_with_noreturn:()=>xa,tuple_create_with_text2:()=>Ca,tuple_create_with_text_return:()=>Sa,tuple_del:()=>Na,tuple_find:()=>Pa,tuple_getIndex:()=>Aa,tuple_getSublist:()=>Ya,tuple_get_random_item:()=>ba,tuple_get_sublist:()=>Xa,tuple_join:()=>Da,tuple_length:()=>La,tuple_max:()=>fa,tuple_totuple:()=>ya,tuple_trig:()=>va});var S={};t.r(S),t.d(S,{set_add_discard:()=>Ha,set_clear:()=>Ua,set_create_with:()=>Va,set_create_with_text_return:()=>Ja,set_length:()=>Ba,set_operate:()=>wa,set_operate_update:()=>ka,set_pop:()=>Ga,set_sub:()=>Wa,set_toset:()=>Qa,set_update:()=>Ka});var A={};t.r(A),t.d(A,{html_content:()=>Za,html_content_more:()=>$a,html_document:()=>qa,html_form:()=>eu,html_head_body:()=>ja,html_style:()=>tu,html_style_content:()=>iu,html_text:()=>nu,html_title:()=>za});var L={};t.r(L),t.d(L,{attribute_access:()=>ru,function_call:()=>uu,raw_block:()=>su,raw_empty:()=>ou,raw_expression:()=>_u,raw_table:()=>pu,type_check:()=>au});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>gu,actuator_extern_get_led_state:()=>Cu,actuator_extern_led_bright:()=>cu,actuator_extern_led_brightness:()=>Su,actuator_ms32006_dcmotor:()=>Yu,actuator_ms32006_init:()=>vu,actuator_ms32006_stepper:()=>xu,actuator_neopixel_init:()=>Xu,actuator_neopixel_rgb:()=>bu,actuator_neopixel_rgb_all:()=>yu,actuator_neopixel_write:()=>Vu,actuator_use_uart_init:()=>Bu,esp32_music_get_tempo_extern:()=>Eu,esp32_music_pitch:()=>Tu,esp32_music_pitch_init:()=>Iu,esp32_music_pitch_with_time:()=>Mu,esp32_music_play_list:()=>hu,esp32_music_reset_extern:()=>Ou,esp32_music_set_tempo_extern:()=>mu,esp32_music_stop:()=>Ru,mixbot_actuator_extern_get_addr:()=>nr,mixbot_actuator_extern_set_addr:()=>sr,mixbot_addr_extern:()=>Hu,robot_led_extern:()=>Qu,robot_led_extern_get_value:()=>qu,robot_motor_extern:()=>Wu,robot_motor_extern_get_speed:()=>Ku,robot_servo_extern_absolute_run:()=>$u,robot_servo_extern_get_status:()=>zu,robot_servo_extern_relative_continue:()=>ir,robot_servo_extern_relative_origin:()=>tr,robot_servo_extern_relative_run:()=>er,robot_servo_extern_stop:()=>Zu,robot_servo_extern_stop_mode:()=>ju,robot_traffic_light_extern:()=>Ju,servo_get_angle:()=>Fu,servo_get_speed:()=>Pu,servo_init:()=>Au,servo_move:()=>Lu,servo_set_angle:()=>Du,servo_set_speed:()=>fu,servo_speed_360:()=>Nu,syn6288_builtin_voice:()=>wu,syn6288_get_voice:()=>Uu,syn6288_set_voice:()=>Gu,syn6288_tts_play:()=>ku});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>br,actuator_dc_motor_stop:()=>yr,actuator_get_led_bright:()=>ur,actuator_get_led_state:()=>rr,actuator_led_bright:()=>ar,actuator_led_brightness:()=>lr,actuator_mixbot_buzzer_on_off:()=>wr,actuator_mixgo_nova_mic_get:()=>Jr,actuator_mixgo_nova_mic_set:()=>Kr,actuator_mixgo_nova_onboard_music_pitch:()=>$r,actuator_mixgo_nova_onboard_music_stop:()=>tl,actuator_mixgo_nova_play_audio:()=>jr,actuator_mixgo_nova_play_online_audio:()=>Zr,actuator_mixgo_nova_record_audio:()=>zr,actuator_mixgo_nova_voice_get:()=>qr,actuator_mixgo_nova_voice_set:()=>Qr,actuator_mixgo_zero_led_color:()=>dr,actuator_onboard_neopixel_rgb:()=>Er,actuator_onboard_neopixel_rgb_all:()=>Or,actuator_onboard_neopixel_rgb_show_all_chase:()=>cr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Rr,actuator_onboard_neopixel_write:()=>gr,actuator_rm_onboard_neopixel_rgb:()=>Cr,actuator_rm_onboard_neopixel_rgb_all:()=>Sr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Ar,actuator_stepper_keep:()=>xr,actuator_stepper_stop:()=>Xr,analog_ble_keyboard_init:()=>Il,analog_ble_keyboard_input:()=>hl,analog_ble_keyboard_send_battery:()=>El,analog_ble_keyboard_str:()=>ml,analog_ble_mouse_init:()=>Ol,analog_ble_mouse_input:()=>gl,analog_ble_mouse_send_battery:()=>Cl,analog_keyboard_input:()=>sl,analog_keyboard_str:()=>dl,analog_mouse_input:()=>rl,bitbot_motor:()=>Wr,bitbot_move:()=>kr,bitbot_stop:()=>Hr,ble_keyboard_connect:()=>Ml,ble_keyboard_get_mac:()=>Tl,ble_mouse_connect:()=>cl,ble_mouse_get_mac:()=>Rl,cc_number:()=>mr,esp32_music_get_tempo:()=>Nr,esp32_music_reset:()=>Dr,esp32_music_set_tempo:()=>Lr,esp32_onboard_music_pitch:()=>fr,esp32_onboard_music_pitch_with_time:()=>Fr,esp32_onboard_music_play_list:()=>vr,esp32_onboard_music_stop:()=>Pr,general_key:()=>ol,general_key_tuple:()=>pl,generalkey_container:()=>al,generalkey_create_with_item:()=>ul,get_power_output:()=>il,ledswitch:()=>pr,mixbot_motor:()=>Ur,mixbot_motor_status:()=>Vr,mixbot_move:()=>Br,mixbot_stop:()=>Gr,mouse_key:()=>ll,number:()=>or,rm_actuator_get_led_bright:()=>Tr,rm_actuator_get_led_state:()=>Mr,rm_actuator_led_bright:()=>Ir,rm_actuator_led_brightness:()=>hr,rm_motor:()=>Yr,set_all_power_output:()=>nl,set_power_output:()=>el,special_key:()=>_l});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>nd,ai_sensor_ailocal_class:()=>Kl,ai_sensor_ailocal_class_result:()=>Jl,ai_sensor_ailocal_train:()=>Wl,ai_sensor_asr_recognize:()=>Zl,ai_sensor_audio_play:()=>ql,ai_sensor_audio_record:()=>Ql,ai_sensor_barcode:()=>Pl,ai_sensor_circle:()=>yl,ai_sensor_classifier_faces:()=>id,ai_sensor_color:()=>Ul,ai_sensor_color_chases:()=>Hl,ai_sensor_color_chases_result:()=>kl,ai_sensor_config:()=>fl,ai_sensor_face:()=>ed,ai_sensor_find_20objects:()=>sd,ai_sensor_find_barcodes:()=>vl,ai_sensor_find_circles:()=>Vl,ai_sensor_find_colors:()=>wl,ai_sensor_find_licenseplates:()=>td,ai_sensor_find_lines:()=>bl,ai_sensor_find_qrcodes:()=>Dl,ai_sensor_find_rects:()=>Gl,ai_sensor_find_tags:()=>xl,ai_sensor_licenseplate:()=>$l,ai_sensor_line:()=>Xl,ai_sensor_qrcode:()=>Ll,ai_sensor_qrcode_lite:()=>Nl,ai_sensor_rect:()=>Bl,ai_sensor_rgb:()=>Fl,ai_sensor_tag:()=>Yl,ai_sensor_use_uart_init:()=>Al,ai_sensor_yolo_recognize:()=>zl,ai_sensor_yolo_recognize_result:()=>jl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>pd,MICROPYTHON_AI_Speech_unit:()=>od,MICROPYTHON_AI_client:()=>_d});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>gd,mpython_blynk_app_notify:()=>Md,mpython_blynk_email:()=>Ed,mpython_blynk_get_timers:()=>Od,mpython_blynk_on_connected:()=>dd,mpython_blynk_on_disconnected:()=>ld,mpython_blynk_run:()=>Td,mpython_blynk_sensor_data_to_app:()=>cd,mpython_blynk_set_property:()=>md,mpython_blynk_setup:()=>Cd,mpython_blynk_stop_timers:()=>hd,mpython_blynk_sync_virtual:()=>rd,mpython_blynk_terminal_widget_vpin:()=>ud,mpython_blynktimer:()=>Rd,mpython_blynktimer_run:()=>Id});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>_I,communicate_bluetooth_connect:()=>uI,communicate_bluetooth_disconnect:()=>rI,communicate_bluetooth_handle:()=>MI,communicate_bluetooth_is_connected:()=>dI,communicate_bluetooth_mac:()=>aI,communicate_bluetooth_peripheral_init:()=>oI,communicate_bluetooth_recv:()=>II,communicate_bluetooth_recv_only:()=>TI,communicate_bluetooth_scan:()=>pI,communicate_bluetooth_send:()=>lI,communicate_espnow_init:()=>hI,communicate_espnow_init_new:()=>mI,communicate_i2c_available:()=>Ud,communicate_i2c_init:()=>Nd,communicate_i2c_master_read:()=>Gd,communicate_i2c_onboard:()=>Ad,communicate_i2c_read:()=>Dd,communicate_i2c_scan:()=>Fd,communicate_i2c_write:()=>fd,communicate_ir_recv_init:()=>qd,communicate_ir_send_init:()=>tI,communicate_ow_init:()=>kd,communicate_ow_read:()=>Wd,communicate_ow_reset:()=>Qd,communicate_ow_scan:()=>Hd,communicate_ow_select:()=>Jd,communicate_ow_write:()=>Kd,communicate_spi_buffer:()=>Yd,communicate_spi_init:()=>Pd,communicate_spi_onboard:()=>Ld,communicate_spi_read:()=>xd,communicate_spi_read_output:()=>Xd,communicate_spi_readinto:()=>bd,communicate_spi_readinto_output:()=>yd,communicate_spi_set:()=>vd,communicate_spi_write:()=>Vd,communicate_spi_write_readinto:()=>Bd,espnow_radio_channel:()=>CI,espnow_radio_channel_new:()=>AI,espnow_radio_on_off:()=>LI,espnow_radio_rec:()=>DI,espnow_radio_recv:()=>FI,espnow_radio_recv_certain_msg:()=>PI,espnow_radio_recv_certain_msg_new:()=>YI,espnow_radio_recv_msg:()=>fI,espnow_radio_recv_new:()=>vI,espnow_radio_send:()=>NI,espnow_radio_txpower:()=>SI,i2c_available:()=>eT,i2c_init:()=>UI,i2c_master_reader2:()=>tT,i2c_read:()=>wI,i2c_scan:()=>HI,i2c_slave_onreceive:()=>wd,i2c_write:()=>kI,internal_variable:()=>zd,ir_recv_timeout:()=>$d,ir_transmit_busy:()=>sI,ir_transmit_conventional_data:()=>eI,ir_transmit_raw_code:()=>nI,ir_transmit_study_code:()=>iI,ir_whether_recv:()=>Zd,lora_init:()=>xI,lora_packet:()=>XI,lora_recv:()=>yI,lora_send:()=>bI,network_espnow_info:()=>OI,network_espnow_mac:()=>EI,network_espnow_recv:()=>RI,network_espnow_recv_handle:()=>gI,network_espnow_send:()=>cI,recv_fun:()=>jd,spi_buffer:()=>JI,spi_init:()=>WI,spi_read:()=>QI,spi_read_output:()=>qI,spi_readinto:()=>zI,spi_readinto_output:()=>jI,spi_set:()=>KI,spi_write:()=>ZI,spi_write_readinto:()=>$I,urequests_attribute:()=>BI,urequests_get:()=>VI,urequests_method:()=>GI});var Y={};t.r(Y),t.d(Y,{display_animate:()=>PT,display_blink_rate:()=>NT,display_circle:()=>vT,display_color_seclet:()=>HT,display_draw_4strings:()=>cT,display_fill:()=>FT,display_get_screen_image:()=>LT,display_help:()=>xT,display_image_size:()=>gT,display_lcd_use_i2c_init:()=>zT,display_line:()=>ST,display_line_arbitrarily:()=>AT,display_matrix_extern_bright_point:()=>IT,display_matrix_extern_bright_screen:()=>MT,display_matrix_extern_clear:()=>hT,display_matrix_extern_get_pixel:()=>dT,display_matrix_extern_get_screen_pixel:()=>TT,display_matrix_extern_image_builtins:()=>mT,display_matrix_extern_scroll_string:()=>pT,display_matrix_extern_scroll_string_delay:()=>aT,display_matrix_extern_shift:()=>lT,display_matrix_extern_show_frame_string:()=>uT,display_matrix_extern_show_frame_string_delay:()=>rT,display_matrix_extern_show_image:()=>_T,display_matrix_extern_show_image_or_string_delay:()=>oT,display_matrix_use_i2c_init:()=>sT,display_oled_drawPixel:()=>bT,display_oled_showBitmap:()=>XT,display_oled_use_i2c_init:()=>eM,display_onoff:()=>fT,display_rect:()=>CT,display_rgb_color:()=>DT,display_tm1650_power:()=>VT,display_tm1650_set_brightness:()=>UT,display_tm1650_show_dot:()=>GT,display_tm1650_show_num:()=>BT,display_tm_use_i2c_init:()=>yT,display_triangle:()=>YT,display_use_i2c_init:()=>RT,extern_oled_bright_point:()=>dM,extern_oled_clear:()=>IM,extern_oled_get_pixel:()=>lM,extern_oled_hvline:()=>MM,extern_oled_line:()=>hM,extern_oled_scroll_string:()=>oM,extern_oled_scroll_string_delay:()=>pM,extern_oled_shape_rect:()=>TM,extern_oled_shift:()=>rM,extern_oled_show_frame_string:()=>aM,extern_oled_show_frame_string_delay:()=>uM,extern_oled_show_image:()=>iM,extern_oled_show_image_or_string_delay:()=>_M,extern_oled_show_image_xy:()=>nM,extern_oled_show_string:()=>sM,lcd_backlight:()=>$T,lcd_clear:()=>tM,lcd_print_string:()=>ZT,lcd_show_image_or_string_delay:()=>jT,matrix_extern_image_arithmetic:()=>ET,matrix_extern_image_invert:()=>OT,tft_fill:()=>QT,tft_line_arbitrarily:()=>qT,tft_scroll_string_delay:()=>KT,tft_show_frame_string_delay:()=>JT,tft_show_image_or_string_delay:()=>WT,tft_show_image_xy:()=>kT,tft_use_spi_init:()=>wT});var x={};t.r(x),t.d(x,{bitbot_display_image_create:()=>eh,display_bright_point:()=>PM,display_bright_screen:()=>YM,display_clear:()=>xM,display_get_pixel:()=>FM,display_get_screen_pixel:()=>vM,display_image_builtins:()=>AM,display_image_builtins_all:()=>LM,display_image_create:()=>SM,display_scroll_string:()=>RM,display_scroll_string_delay:()=>cM,display_shift:()=>fM,display_show_frame_string:()=>gM,display_show_frame_string_delay:()=>CM,display_show_image:()=>EM,display_show_image_or_string_delay:()=>OM,draw_pointer:()=>Ah,image_arithmetic:()=>NM,image_invert:()=>DM,mixbot_display_bright_screen:()=>$M,mixbot_display_get_ambientbright:()=>ZM,mixbot_display_get_screen_pixel:()=>jM,mixbot_display_image_create:()=>zM,mixbot_display_rotate:()=>th,mixgo_display_image_create_new:()=>yM,mixgome_display_font:()=>VM,mixgome_display_image_create:()=>XM,mixgomini_display_image_create:()=>bM,mpython_display_hvline:()=>JM,mpython_display_line:()=>QM,mpython_display_shape_rect:()=>KM,mpython_pbm_image:()=>qM,onboard_oled_bright_point:()=>WM,onboard_oled_scroll_string_delay:()=>kM,onboard_oled_show_frame_string_delay:()=>HM,onboard_oled_show_image:()=>BM,onboard_oled_show_image_or_string_delay:()=>wM,onboard_oled_show_image_xy:()=>GM,onboard_oled_show_string:()=>UM,onboard_tft_bright_point:()=>Th,onboard_tft_bright_screen:()=>mh,onboard_tft_clear:()=>Mh,onboard_tft_clock_clear:()=>Ch,onboard_tft_clock_draw:()=>gh,onboard_tft_clock_get_rtctime:()=>Rh,onboard_tft_clock_init:()=>Oh,onboard_tft_clock_set_time:()=>ch,onboard_tft_display_hvline:()=>rh,onboard_tft_display_line:()=>lh,onboard_tft_display_shape_circle:()=>Sh,onboard_tft_display_shape_rect:()=>uh,onboard_tft_fill:()=>Eh,onboard_tft_get_pixel:()=>Ih,onboard_tft_get_screen_pixel:()=>hh,onboard_tft_scroll_string:()=>_h,onboard_tft_scroll_string_delay:()=>oh,onboard_tft_shift:()=>dh,onboard_tft_show_frame_string:()=>ph,onboard_tft_show_frame_string_delay:()=>ah,onboard_tft_show_image:()=>ih,onboard_tft_show_image_or_string_delay:()=>sh,onboard_tft_show_image_xy:()=>nh});var X={};t.r(X),t.d(X,{factory_block:()=>bh,factory_block_return:()=>yh,factory_block_return_with_textarea:()=>Bh,factory_block_with_textarea:()=>Vh,factory_callMethod_noreturn:()=>xh,factory_callMethod_return:()=>Xh,factory_create_with_container:()=>Fh,factory_create_with_item:()=>Ph,factory_declare:()=>Yh,factory_from_import:()=>Nh,factory_function_noreturn:()=>fh,factory_function_return:()=>vh,factory_import:()=>Dh,folding_block:()=>Gh});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>am,inout_analog_atten:()=>zh,inout_analog_read:()=>qh,inout_analog_read_init:()=>im,inout_analog_write:()=>Kh,inout_analog_write_init:()=>em,inout_analog_write_set:()=>Jh,inout_analog_write_set_freq:()=>_m,inout_digital_init:()=>$h,inout_digital_read:()=>Hh,inout_digital_write:()=>kh,inout_highlow:()=>wh,inout_pinMode:()=>sm,inout_pin_attachInterrupt:()=>Zh,inout_pin_pressed:()=>jh,inout_pin_pressed_init:()=>nm,inout_pwm_analog_write:()=>Wh,inout_pwm_analog_write_init:()=>tm,inout_pwm_analog_write_set_freq:()=>Qh,pin_pressed:()=>pm,pin_pressed_init:()=>om});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>vm,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Pm,IOT_EMQX_PING:()=>fm,IOT_FORMATTING:()=>Nm,IOT_FORMAT_STRING:()=>Dm,IOT_MIXIO_NTP:()=>Fm,IOT_MIXIO_PUBLISH:()=>Rm,IOT_MIXIO_SUBSCRIBE:()=>cm,iot_checkonenet:()=>wm,iot_client_onboard:()=>xm,iot_create_with_item:()=>Em,iot_http_client:()=>Xm,iot_http_data:()=>bm,iot_mixio_check:()=>Sm,iot_mixio_connect:()=>Om,iot_mixio_connect_only:()=>Cm,iot_mixio_disconnect:()=>gm,iot_mixio_format_msg:()=>Lm,iot_mixio_format_topic:()=>Am,iot_mixly_key:()=>Ym,iot_mqtt_client:()=>ym,iot_mqtt_data:()=>Vm,iot_onenet_check:()=>Im,iot_onenet_connect:()=>lm,iot_onenet_disconnect:()=>dm,iot_onenet_publish:()=>Mm,iot_onenet_publish_dict:()=>Tm,iot_onenetconnect:()=>Gm,iot_onenetdisconnect:()=>Um,iot_publish:()=>km,iot_publish_container:()=>hm,iot_publish_item:()=>mm,iot_wifi_connect:()=>rm,iot_wificonnect:()=>Bm});var V={};t.r(V),t.d(V,{network_ap_connect:()=>tE,network_connect:()=>qm,network_get_connect:()=>jm,network_get_wifi:()=>$m,network_init:()=>Wm,network_is_active:()=>Jm,network_open:()=>Km,network_scan:()=>Qm,network_server:()=>eE,network_socket_accept:()=>oE,network_socket_bind:()=>nE,network_socket_close:()=>lE,network_socket_connect:()=>sE,network_socket_init:()=>iE,network_socket_listen:()=>_E,network_socket_receive:()=>pE,network_socket_receive_from:()=>uE,network_socket_send:()=>aE,network_socket_send_to:()=>rE,network_stop:()=>Zm,network_wifi_connect:()=>zm,ntptime_address:()=>hE,ntptime_time:()=>ME,requests_attribute:()=>IE,requests_attribute2:()=>RE,requests_get:()=>dE,requests_get2:()=>EE,requests_method:()=>TE,requests_post:()=>OE});var B={};t.r(B),t.d(B,{pe_g1_battery_left:()=>CE,pe_g1_dc_motor:()=>SE,pe_g1_dc_motor_speed:()=>AE,pe_g1_servo_get_angle:()=>DE,pe_g1_servo_get_speed:()=>fE,pe_g1_servo_set_angle:()=>LE,pe_g1_servo_set_speed:()=>NE,pe_g1_use_i2c_init:()=>gE});var G={};t.r(G),t.d(G,{HCSR04:()=>FO,PS2_Button:()=>xO,PS2_Buttons:()=>bO,PS2_Buttons_new:()=>GO,PS2_State:()=>XO,PS2_init:()=>PO,PS2_init_new:()=>VO,PS2_stk:()=>yO,PS2_stk_new:()=>UO,PS2_vibration:()=>YO,PS2_vibration_new:()=>BO,esp32_s2_weather_init:()=>LO,esp32_s2_weather_rain:()=>DO,esp32_s2_weather_wd:()=>NO,esp32_s2_weather_ws:()=>fO,extern_rfid_read:()=>dO,extern_rfid_readcontent:()=>TO,extern_rfid_readid:()=>IO,extern_rfid_status:()=>mO,extern_rfid_write:()=>MO,extern_rfid_write_return:()=>hO,gnss_get_data:()=>WO,gnss_have_data:()=>HO,mixbot_sensor_extern_get_addr:()=>ZO,mixbot_sensor_extern_set_addr:()=>$O,pm25_get_data:()=>kO,robot_button_extern_get_value:()=>KO,robot_color_extern_get_value:()=>jO,robot_infrared_extern_get_value:()=>QO,robot_infrared_extern_grey_get_value:()=>qO,robot_potentiometer_extern_get_value:()=>zO,robot_sonar_extern_get_value:()=>tR,robot_sonar_extern_led:()=>eR,robot_touch_extern_get_value:()=>JO,sensor_APDS9960_extern:()=>QE,sensor_DS18X20:()=>HE,sensor_LTR308_extern:()=>qE,sensor_LTR390UV_extern:()=>jE,sensor_MAX30102_extern:()=>JE,sensor_QMC5883L_extern:()=>iO,sensor_VL530LX_extern:()=>ZE,sensor_adxl345_get_acceleration:()=>bE,sensor_aht11_extern:()=>tO,sensor_bmp:()=>wE,sensor_compass_reset:()=>rO,sensor_dht11:()=>VE,sensor_hp203_extern:()=>eO,sensor_light_level:()=>yE,sensor_lm35:()=>WE,sensor_ltr381_extern:()=>zE,sensor_mixgo_extern_button_attachInterrupt:()=>xE,sensor_mixgo_extern_button_get_presses:()=>YE,sensor_mixgo_extern_button_is_pressed:()=>PE,sensor_mixgo_extern_button_was_pressed:()=>vE,sensor_mixgo_extern_light:()=>BE,sensor_mixgo_extern_pin_near:()=>UE,sensor_mixgo_extern_sound:()=>GE,sensor_mixgoce_hot_wheel_degrees:()=>AO,sensor_mixgoce_hot_wheel_is_touched:()=>SO,sensor_mpu9250_attachGestureInterrupt:()=>XE,sensor_mpu9250_calibrate_compass:()=>pO,sensor_mpu9250_field_strength:()=>uO,sensor_mpu9250_gesture:()=>nO,sensor_mpu9250_get_acceleration:()=>sO,sensor_mpu9250_get_gyro:()=>oO,sensor_mpu9250_get_magnetic:()=>_O,sensor_mpu9250_temperature:()=>aO,sensor_sht:()=>kE,sensor_shtc3_extern:()=>$E,sensor_use_i2c_init:()=>KE,sensor_use_spi_init:()=>lO,sensor_use_uart_init:()=>wO,sensor_weather_solo_init:()=>iR,sensor_weather_solo_rain:()=>_R,sensor_weather_solo_wd:()=>nR,sensor_weather_solo_ws:()=>sR,weather_data:()=>EO,weather_have_data:()=>OO,weather_set_label:()=>cO,weather_set_label_container:()=>gO,weather_set_label_item:()=>CO,weather_uart_mixio:()=>RO});var U={};t.r(U),t.d(U,{HCSR04:()=>gR,RTC_set_date:()=>cR,RTC_set_time:()=>RR,bitbot_als_num:()=>Dc,dht11:()=>Xc,number1:()=>SR,number2:()=>AR,number3:()=>LR,number4:()=>NR,number5:()=>DR,number6:()=>fR,number7:()=>FR,onboard_RTC_get_time:()=>yR,onboard_RTC_get_time_str:()=>kR,onboard_RTC_get_timestamp:()=>VR,onboard_RTC_set_datetime:()=>UR,onboard_RTC_settime_string:()=>GR,onboard_RTC_timestamp_totuple:()=>BR,rfid_readcontent:()=>zR,rfid_readid:()=>qR,rfid_write:()=>jR,rfid_write_return:()=>ZR,sensor_LTR308:()=>HR,sensor_aht11:()=>KR,sensor_bitbot_ALS:()=>Nc,sensor_button_get_presses:()=>Pc,sensor_button_is_pressed:()=>fc,sensor_button_was_pressed:()=>Fc,sensor_distance_hrsc04:()=>OR,sensor_eulerangles:()=>tc,sensor_field_strength:()=>bc,sensor_get_acceleration:()=>$R,sensor_get_temperature:()=>JR,sensor_hp203:()=>QR,sensor_light:()=>xc,sensor_mixbot_get_gyro:()=>Lc,sensor_mixbot_patrol_calibrate:()=>Cc,sensor_mixbot_patrol_value:()=>Sc,sensor_mixbot_temperature:()=>Ac,sensor_mixgo_LTR308:()=>bR,sensor_mixgo_button_attachInterrupt:()=>rR,sensor_mixgo_button_get_presses:()=>uR,sensor_mixgo_button_is_pressed:()=>pR,sensor_mixgo_button_was_pressed:()=>aR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>lc,sensor_mixgo_cc_mmc5603_get_angle:()=>rc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>uc,sensor_mixgo_light:()=>CR,sensor_mixgo_nova_LTR308:()=>XR,sensor_mixgo_nova_pin_near:()=>xR,sensor_mixgo_pin_near:()=>YR,sensor_mixgo_pin_near_double:()=>vR,sensor_mixgo_pin_near_single:()=>PR,sensor_mixgo_pin_pressed:()=>MR,sensor_mixgo_touch_slide:()=>ER,sensor_mixgocar42_button_attachInterrupt:()=>TR,sensor_mixgocar42_button_get_presses:()=>IR,sensor_mixgocar42_button_is_pressed:()=>lR,sensor_mixgocar42_button_was_pressed:()=>dR,sensor_mixgocar_battery_left:()=>gc,sensor_mixgocar_pin_near:()=>Rc,sensor_mixgocar_pin_near_line:()=>Oc,sensor_mixgocar_pin_near_state_change:()=>cc,sensor_mixgoce_pin_pressed:()=>hR,sensor_mixgoce_temperature:()=>Ic,sensor_mixgome_temperature:()=>dc,sensor_mpython_pin_pressed:()=>mR,sensor_mpython_qmi8658_get_gyro:()=>Tc,sensor_mpython_qmi8658_temperature:()=>Mc,sensor_onboard_compass_reset:()=>ac,sensor_onboard_mpu9250_calibrate_compass:()=>_c,sensor_onboard_mpu9250_field_strength:()=>pc,sensor_onboard_mpu9250_gesture:()=>ec,sensor_onboard_mpu9250_get_acceleration:()=>ic,sensor_onboard_mpu9250_get_gyro:()=>sc,sensor_onboard_mpu9250_get_magnetic:()=>nc,sensor_onboard_mpu9250_temperature:()=>oc,sensor_pin_near:()=>Yc,sensor_pin_pressed:()=>vc,sensor_rm_acc:()=>Ec,sensor_rm_battery_left:()=>mc,sensor_rm_pin_near_double:()=>hc,sensor_rtc_init:()=>wR,sensor_sound:()=>WR,sensor_temperature:()=>yc});var w={};t.r(w),t.d(w,{serial_any:()=>Wc,serial_begin:()=>zc,serial_print:()=>Gc,serial_print_byte:()=>Bc,serial_print_hex:()=>wc,serial_println:()=>Uc,serial_read_from_ai:()=>_g,serial_readline:()=>Kc,serial_readstr:()=>Hc,serial_readstr_until:()=>Jc,serial_receive_data_event:()=>kc,serial_send_to_ai:()=>sg,serial_softserial:()=>qc,serial_softserial_new:()=>Qc,system_input:()=>jc,system_print:()=>Zc,system_print_container:()=>ig,system_print_end:()=>tg,system_print_inline:()=>$c,system_print_item:()=>ng,system_print_many:()=>eg});var k={};t.r(k),t.d(k,{Panic_with_status_code:()=>ug,Timer_init:()=>gg,base_delay:()=>Ag,controls_delay:()=>ag,controls_delay_new:()=>pg,controls_millis:()=>lg,controls_uname:()=>Ig,raw_block:()=>dg,reset:()=>rg,system_bitbot_shutdown:()=>cg,system_machine_reset:()=>Rg,system_ticks_diff:()=>hg,system_timer:()=>Mg,system_timer_init:()=>mg,system_wdt_feed:()=>Og,system_wdt_init:()=>Eg,time_ticks_diff:()=>Sg,timer:()=>Tg,timer2:()=>Cg});var H={};t.r(H),t.d(H,{Air_daily_content:()=>Bg,Air_now_content:()=>vg,Geo_moon_content:()=>Ug,Geo_sun_content:()=>Gg,Life_suggestion_content:()=>xg,Location_search_content:()=>bg,Tide_daily_content:()=>Xg,WEATHER_DAILY:()=>Dg,WEATHER_HOUR:()=>fg,WEATHER_NOW:()=>Ng,Weather_alarm_content:()=>Yg,Weather_daily:()=>yg,Weather_daily_content:()=>Vg,Weather_now:()=>Fg,Weather_now_content:()=>Pg});var W={};t.r(W),t.d(W,{actuator_extern_get_led_bright:()=>pC,actuator_extern_get_led_state:()=>aC,actuator_extern_led_bright:()=>oC,actuator_extern_led_brightness:()=>uC,actuator_ms32006_dcmotor:()=>qg,actuator_ms32006_init:()=>Qg,actuator_ms32006_stepper:()=>zg,actuator_neopixel_init:()=>rC,actuator_neopixel_rgb:()=>IC,actuator_neopixel_rgb_all:()=>lC,actuator_neopixel_write:()=>dC,actuator_use_uart_init:()=>TC,esp32_music_get_tempo_extern:()=>iC,esp32_music_pitch:()=>Zg,esp32_music_pitch_init:()=>jg,esp32_music_pitch_with_time:()=>$g,esp32_music_play_list:()=>nC,esp32_music_reset_extern:()=>sC,esp32_music_set_tempo_extern:()=>eC,esp32_music_stop:()=>tC,mixbot_actuator_extern_get_addr:()=>vC,mixbot_actuator_extern_set_addr:()=>YC,mixbot_addr_extern:()=>OC,robot_led_extern:()=>CC,robot_led_extern_get_value:()=>SC,robot_motor_extern:()=>RC,robot_motor_extern_get_speed:()=>cC,robot_servo_extern_absolute_run:()=>DC,robot_servo_extern_get_status:()=>AC,robot_servo_extern_relative_continue:()=>PC,robot_servo_extern_relative_origin:()=>fC,robot_servo_extern_relative_run:()=>FC,robot_servo_extern_stop:()=>NC,robot_servo_extern_stop_mode:()=>LC,robot_traffic_light_extern:()=>gC,servo_get_angle:()=>Kg,servo_get_speed:()=>Jg,servo_init:()=>wg,servo_move:()=>_C,servo_set_angle:()=>Hg,servo_set_speed:()=>Wg,servo_speed_360:()=>kg,syn6288_builtin_voice:()=>mC,syn6288_get_voice:()=>hC,syn6288_set_voice:()=>MC,syn6288_tts_play:()=>EC});var K={};t.r(K),t.d(K,{actuator_dc_motor:()=>pS,actuator_dc_motor_stop:()=>aS,actuator_get_led_bright:()=>HC,actuator_get_led_state:()=>WC,actuator_led_bright:()=>kC,actuator_led_brightness:()=>KC,actuator_mixbot_buzzer_on_off:()=>IS,actuator_mixgo_nova_mic_get:()=>ES,actuator_mixgo_nova_mic_set:()=>mS,actuator_mixgo_nova_onboard_music_pitch:()=>SS,actuator_mixgo_nova_onboard_music_stop:()=>AS,actuator_mixgo_nova_play_audio:()=>gS,actuator_mixgo_nova_play_online_audio:()=>CS,actuator_mixgo_nova_record_audio:()=>cS,actuator_mixgo_nova_voice_get:()=>RS,actuator_mixgo_nova_voice_set:()=>OS,actuator_mixgo_zero_led_color:()=>JC,actuator_onboard_neopixel_rgb:()=>tS,actuator_onboard_neopixel_rgb_all:()=>eS,actuator_onboard_neopixel_rgb_show_all_chase:()=>iS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>nS,actuator_onboard_neopixel_write:()=>$C,actuator_stepper_keep:()=>_S,actuator_stepper_stop:()=>oS,analog_ble_keyboard_init:()=>bS,analog_ble_keyboard_input:()=>BS,analog_ble_keyboard_send_battery:()=>US,analog_ble_keyboard_str:()=>GS,analog_ble_mouse_init:()=>wS,analog_ble_mouse_input:()=>WS,analog_ble_mouse_send_battery:()=>KS,analog_keyboard_input:()=>fS,analog_keyboard_str:()=>xS,analog_mouse_input:()=>vS,bitbot_motor:()=>hS,bitbot_move:()=>TS,bitbot_stop:()=>MS,ble_keyboard_connect:()=>VS,ble_keyboard_get_mac:()=>yS,ble_mouse_connect:()=>HS,ble_mouse_get_mac:()=>kS,cc_number:()=>QC,esp32_music_get_tempo:()=>XC,esp32_music_reset:()=>GC,esp32_music_set_tempo:()=>xC,esp32_onboard_music_pitch:()=>bC,esp32_onboard_music_pitch_with_time:()=>yC,esp32_onboard_music_play_list:()=>BC,esp32_onboard_music_stop:()=>VC,general_key:()=>PS,general_key_tuple:()=>XS,get_power_output:()=>NS,ledswitch:()=>wC,mixbot_motor:()=>dS,mixbot_motor_status:()=>uS,mixbot_move:()=>rS,mixbot_stop:()=>lS,mouse_key:()=>YS,number:()=>UC,rm_actuator_get_led_bright:()=>zC,rm_actuator_get_led_state:()=>jC,rm_actuator_led_bright:()=>qC,rm_actuator_led_brightness:()=>ZC,rm_motor:()=>sS,set_all_power_output:()=>DS,set_power_output:()=>LS,special_key:()=>FS});var J={};t.r(J),t.d(J,{ai_sensor_20object:()=>AA,ai_sensor_ailocal_class:()=>TA,ai_sensor_ailocal_class_result:()=>MA,ai_sensor_ailocal_train:()=>IA,ai_sensor_asr_recognize:()=>RA,ai_sensor_audio_play:()=>mA,ai_sensor_audio_record:()=>hA,ai_sensor_barcode:()=>$S,ai_sensor_circle:()=>_A,ai_sensor_classifier_faces:()=>SA,ai_sensor_color:()=>uA,ai_sensor_color_chases:()=>dA,ai_sensor_color_chases_result:()=>lA,ai_sensor_config:()=>qS,ai_sensor_face:()=>CA,ai_sensor_find_20objects:()=>LA,ai_sensor_find_barcodes:()=>tA,ai_sensor_find_circles:()=>oA,ai_sensor_find_colors:()=>rA,ai_sensor_find_licenseplates:()=>gA,ai_sensor_find_lines:()=>sA,ai_sensor_find_qrcodes:()=>ZS,ai_sensor_find_rects:()=>aA,ai_sensor_find_tags:()=>iA,ai_sensor_licenseplate:()=>cA,ai_sensor_line:()=>nA,ai_sensor_qrcode:()=>jS,ai_sensor_qrcode_lite:()=>QS,ai_sensor_rect:()=>pA,ai_sensor_rgb:()=>zS,ai_sensor_tag:()=>eA,ai_sensor_use_uart_init:()=>JS,ai_sensor_yolo_recognize:()=>EA,ai_sensor_yolo_recognize_result:()=>OA});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>fA,MICROPYTHON_AI_Speech_unit:()=>DA,MICROPYTHON_AI_client:()=>NA});var q={};t.r(q),t.d(q,{mpython_blynk_app_data:()=>UA,mpython_blynk_app_notify:()=>bA,mpython_blynk_email:()=>wA,mpython_blynk_get_timers:()=>VA,mpython_blynk_on_connected:()=>YA,mpython_blynk_on_disconnected:()=>vA,mpython_blynk_run:()=>XA,mpython_blynk_sensor_data_to_app:()=>GA,mpython_blynk_set_property:()=>kA,mpython_blynk_setup:()=>HA,mpython_blynk_stop_timers:()=>yA,mpython_blynk_sync_virtual:()=>PA,mpython_blynk_terminal_widget_vpin:()=>FA,mpython_blynktimer:()=>BA,mpython_blynktimer_run:()=>xA});var z={};t.r(z),t.d(z,{communicate_bluetooth_central_init:()=>AL,communicate_bluetooth_connect:()=>DL,communicate_bluetooth_disconnect:()=>fL,communicate_bluetooth_handle:()=>XL,communicate_bluetooth_is_connected:()=>PL,communicate_bluetooth_mac:()=>FL,communicate_bluetooth_peripheral_init:()=>LL,communicate_bluetooth_recv:()=>xL,communicate_bluetooth_recv_only:()=>YL,communicate_bluetooth_scan:()=>NL,communicate_bluetooth_send:()=>vL,communicate_espnow_init:()=>bL,communicate_espnow_init_new:()=>yL,communicate_i2c_available:()=>ZA,communicate_i2c_init:()=>JA,communicate_i2c_master_read:()=>jA,communicate_i2c_onboard:()=>WA,communicate_i2c_read:()=>QA,communicate_i2c_scan:()=>zA,communicate_i2c_write:()=>qA,communicate_ir_recv_init:()=>ML,communicate_ir_send_init:()=>RL,communicate_ow_init:()=>uL,communicate_ow_read:()=>dL,communicate_ow_reset:()=>lL,communicate_ow_scan:()=>rL,communicate_ow_select:()=>TL,communicate_ow_write:()=>IL,communicate_spi_buffer:()=>iL,communicate_spi_init:()=>tL,communicate_spi_onboard:()=>KA,communicate_spi_read:()=>nL,communicate_spi_read_output:()=>sL,communicate_spi_readinto:()=>_L,communicate_spi_readinto_output:()=>oL,communicate_spi_set:()=>eL,communicate_spi_write:()=>pL,communicate_spi_write_readinto:()=>aL,espnow_radio_channel:()=>kL,espnow_radio_channel_new:()=>WL,espnow_radio_on_off:()=>KL,espnow_radio_rec:()=>QL,espnow_radio_recv:()=>zL,espnow_radio_recv_certain_msg:()=>jL,espnow_radio_recv_certain_msg_new:()=>$L,espnow_radio_recv_msg:()=>qL,espnow_radio_recv_new:()=>ZL,espnow_radio_send:()=>JL,espnow_radio_txpower:()=>HL,i2c_slave_onreceive:()=>$A,internal_variable:()=>hL,ir_recv_timeout:()=>OL,ir_transmit_busy:()=>SL,ir_transmit_conventional_data:()=>cL,ir_transmit_raw_code:()=>CL,ir_transmit_study_code:()=>gL,ir_whether_recv:()=>EL,lora_init:()=>tN,lora_packet:()=>eN,lora_recv:()=>nN,lora_send:()=>iN,network_espnow_info:()=>BL,network_espnow_mac:()=>VL,network_espnow_recv:()=>GL,network_espnow_recv_handle:()=>wL,network_espnow_send:()=>UL,recv_fun:()=>mL,urequests_attribute:()=>_N,urequests_get:()=>sN,urequests_method:()=>oN});var j={};t.r(j),t.d(j,{display_animate:()=>PN,display_circle:()=>vN,display_color_seclet:()=>kN,display_draw_4strings:()=>SN,display_fill:()=>FN,display_lcd_use_i2c_init:()=>qN,display_line:()=>NN,display_line_arbitrarily:()=>AN,display_matrix_extern_bright_point:()=>mN,display_matrix_extern_bright_screen:()=>ON,display_matrix_extern_clear:()=>TN,display_matrix_extern_get_pixel:()=>hN,display_matrix_extern_get_screen_pixel:()=>EN,display_matrix_extern_image_builtins:()=>RN,display_matrix_extern_scroll_string:()=>dN,display_matrix_extern_scroll_string_delay:()=>IN,display_matrix_extern_shift:()=>MN,display_matrix_extern_show_frame_string:()=>rN,display_matrix_extern_show_frame_string_delay:()=>lN,display_matrix_extern_show_image:()=>aN,display_matrix_extern_show_image_or_string_delay:()=>uN,display_matrix_use_i2c_init:()=>pN,display_oled_drawPixel:()=>XN,display_oled_showBitmap:()=>xN,display_oled_use_i2c_init:()=>tD,display_onoff:()=>DN,display_rect:()=>LN,display_tm1650_power:()=>yN,display_tm1650_set_brightness:()=>GN,display_tm1650_show_dot:()=>BN,display_tm1650_show_num:()=>VN,display_tm_use_i2c_init:()=>bN,display_triangle:()=>YN,display_use_i2c_init:()=>CN,extern_oled_bright_point:()=>dD,extern_oled_clear:()=>uD,extern_oled_get_pixel:()=>lD,extern_oled_hvline:()=>TD,extern_oled_line:()=>MD,extern_oled_scroll_string:()=>pD,extern_oled_scroll_string_delay:()=>aD,extern_oled_shape_rect:()=>ID,extern_oled_shift:()=>rD,extern_oled_show_frame_string:()=>_D,extern_oled_show_frame_string_delay:()=>oD,extern_oled_show_image:()=>eD,extern_oled_show_image_or_string_delay:()=>sD,extern_oled_show_image_xy:()=>iD,extern_oled_show_string:()=>nD,image_shift:()=>fN,lcd_backlight:()=>ZN,lcd_clear:()=>$N,lcd_print_string:()=>jN,lcd_show_image_or_string_delay:()=>zN,matrix_extern_image_arithmetic:()=>cN,matrix_extern_image_invert:()=>gN,tft_fill:()=>JN,tft_line_arbitrarily:()=>QN,tft_scroll_string_delay:()=>KN,tft_show_frame_string_delay:()=>WN,tft_show_image_or_string_delay:()=>HN,tft_show_image_xy:()=>wN,tft_use_spi_init:()=>UN});var Z={};t.r(Z),t.d(Z,{bitbot_display_image_create:()=>$D,display_bright_point:()=>FD,display_bright_screen:()=>vD,display_clear:()=>AD,display_get_pixel:()=>fD,display_get_screen_pixel:()=>PD,display_image_builtins:()=>gD,display_image_builtins_all:()=>CD,display_image_create:()=>SD,display_scroll_string:()=>RD,display_scroll_string_delay:()=>cD,display_shift:()=>DD,display_show_frame_string:()=>ED,display_show_frame_string_delay:()=>OD,display_show_image:()=>hD,display_show_image_or_string_delay:()=>mD,draw_pointer:()=>Sf,image_arithmetic:()=>LD,image_invert:()=>ND,mixbot_display_bright_screen:()=>jD,mixbot_display_get_ambientbright:()=>zD,mixbot_display_get_screen_pixel:()=>qD,mixbot_display_image_create:()=>QD,mixbot_display_rotate:()=>ZD,mixgo_display_image_create_new:()=>bD,mixgome_display_font:()=>XD,mixgome_display_image_create:()=>YD,mixgomini_display_image_create:()=>xD,mpython_display_hvline:()=>KD,mpython_display_line:()=>JD,mpython_display_shape_rect:()=>WD,mpython_pbm_image:()=>yD,onboard_oled_bright_point:()=>HD,onboard_oled_scroll_string_delay:()=>kD,onboard_oled_show_frame_string_delay:()=>wD,onboard_oled_show_image:()=>VD,onboard_oled_show_image_or_string_delay:()=>UD,onboard_oled_show_image_xy:()=>BD,onboard_oled_show_string:()=>GD,onboard_tft_bright_point:()=>Tf,onboard_tft_bright_screen:()=>hf,onboard_tft_clear:()=>lf,onboard_tft_clock_clear:()=>gf,onboard_tft_clock_draw:()=>cf,onboard_tft_clock_get_rtctime:()=>Of,onboard_tft_clock_init:()=>Ef,onboard_tft_clock_set_time:()=>Rf,onboard_tft_display_hvline:()=>uf,onboard_tft_display_line:()=>rf,onboard_tft_display_shape_circle:()=>Cf,onboard_tft_display_shape_rect:()=>af,onboard_tft_fill:()=>mf,onboard_tft_get_pixel:()=>If,onboard_tft_get_screen_pixel:()=>Mf,onboard_tft_scroll_string:()=>of,onboard_tft_scroll_string_delay:()=>pf,onboard_tft_shift:()=>df,onboard_tft_show_frame_string:()=>sf,onboard_tft_show_frame_string_delay:()=>_f,onboard_tft_show_image:()=>tf,onboard_tft_show_image_or_string_delay:()=>nf,onboard_tft_show_image_xy:()=>ef});var $={};t.r($),t.d($,{factory_block:()=>vf,factory_block_return:()=>Yf,factory_block_return_with_textarea:()=>Xf,factory_block_with_textarea:()=>xf,factory_callMethod_noreturn:()=>Ff,factory_callMethod_return:()=>Pf,factory_declare:()=>ff,factory_from_import:()=>Af,factory_function_noreturn:()=>Nf,factory_function_return:()=>Df,factory_import:()=>Lf,folding_block:()=>bf});var tt={};t.r(tt),t.d(tt,{inout_analog_atten:()=>jf,inout_analog_read:()=>Hf,inout_analog_read_init:()=>zf,inout_analog_write:()=>Uf,inout_analog_write_init:()=>qf,inout_analog_write_set:()=>wf,inout_digital_init:()=>Jf,inout_digital_read:()=>Bf,inout_digital_write:()=>Vf,inout_highlow:()=>yf,inout_pin_attachInterrupt:()=>Kf,inout_pin_pressed:()=>Wf,inout_pin_pressed_init:()=>Zf,inout_pwm_analog_write:()=>Gf,inout_pwm_analog_write_init:()=>Qf,inout_pwm_analog_write_set_freq:()=>kf});var et={};t.r(et),t.d(et,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>mF,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>MF,IOT_EMQX_PING:()=>EF,IOT_FORMATTING:()=>IF,IOT_FORMAT_STRING:()=>TF,IOT_MIXIO_NTP:()=>OF,IOT_MIXIO_PUBLISH:()=>oF,IOT_MIXIO_SUBSCRIBE:()=>pF,iot_client_onboard:()=>RF,iot_http_client:()=>cF,iot_http_data:()=>gF,iot_mixio_check:()=>rF,iot_mixio_connect:()=>_F,iot_mixio_connect_only:()=>uF,iot_mixio_disconnect:()=>aF,iot_mixio_format_msg:()=>dF,iot_mixio_format_topic:()=>lF,iot_mixly_key:()=>hF,iot_mqtt_client:()=>CF,iot_mqtt_data:()=>SF,iot_onenet_check:()=>nF,iot_onenet_connect:()=>tF,iot_onenet_disconnect:()=>eF,iot_onenet_publish:()=>sF,iot_onenet_publish_dict:()=>iF,iot_wifi_connect:()=>$f});var it={};t.r(it),t.d(it,{network_ap_connect:()=>YF,network_connect:()=>LF,network_get_connect:()=>DF,network_get_wifi:()=>vF,network_init:()=>AF,network_is_active:()=>PF,network_open:()=>FF,network_scan:()=>xF,network_server:()=>XF,network_socket_accept:()=>GF,network_socket_bind:()=>yF,network_socket_close:()=>WF,network_socket_connect:()=>VF,network_socket_init:()=>bF,network_socket_listen:()=>BF,network_socket_receive:()=>UF,network_socket_receive_from:()=>kF,network_socket_send:()=>wF,network_socket_send_to:()=>HF,network_stop:()=>fF,network_wifi_connect:()=>NF,ntptime_address:()=>zF,ntptime_time:()=>qF,requests_attribute:()=>JF,requests_attribute2:()=>ZF,requests_get:()=>KF,requests_get2:()=>jF,requests_method:()=>QF,requests_post:()=>$F});var nt={};t.r(nt),t.d(nt,{pe_g1_battery_left:()=>eP,pe_g1_dc_motor:()=>iP,pe_g1_dc_motor_speed:()=>nP,pe_g1_servo_get_angle:()=>oP,pe_g1_servo_get_speed:()=>pP,pe_g1_servo_set_angle:()=>sP,pe_g1_servo_set_speed:()=>_P,pe_g1_use_i2c_init:()=>tP});var st={};t.r(st),t.d(st,{HCSR04:()=>zP,PS2_Button:()=>$P,PS2_Buttons:()=>tv,PS2_Buttons_new:()=>av,PS2_State:()=>ev,PS2_init:()=>jP,PS2_init_new:()=>ov,PS2_stk:()=>iv,PS2_stk_new:()=>uv,PS2_vibration:()=>ZP,PS2_vibration_new:()=>pv,RTC_get_time:()=>sv,RTC_set_date:()=>MP,RTC_set_datetime:()=>nv,RTC_set_time:()=>TP,esp32_s2_weather_init:()=>KP,esp32_s2_weather_rain:()=>QP,esp32_s2_weather_wd:()=>JP,esp32_s2_weather_ws:()=>qP,extern_rfid_read:()=>xP,extern_rfid_readcontent:()=>bP,extern_rfid_readid:()=>XP,extern_rfid_status:()=>BP,extern_rfid_write:()=>yP,extern_rfid_write_return:()=>VP,gnss_get_data:()=>dv,gnss_have_data:()=>Iv,mixbot_sensor_extern_get_addr:()=>gv,mixbot_sensor_extern_set_addr:()=>Cv,pm25_get_data:()=>lv,robot_button_extern_get_value:()=>Tv,robot_color_extern_get_value:()=>Ov,robot_infrared_extern_get_value:()=>hv,robot_infrared_extern_grey_get_value:()=>mv,robot_potentiometer_extern_get_value:()=>Ev,robot_sonar_extern_get_value:()=>Rv,robot_sonar_extern_led:()=>cv,robot_touch_extern_get_value:()=>Mv,sensor_APDS9960_extern:()=>SP,sensor_DS18X20:()=>Dv,sensor_LTR308_extern:()=>AP,sensor_LTR390UV_extern:()=>DP,sensor_MAX30102_extern:()=>CP,sensor_QMC5883L_extern:()=>fP,sensor_VL530LX_extern:()=>vP,sensor_aht11_extern:()=>PP,sensor_bmp:()=>RP,sensor_dht11:()=>_v,sensor_distance_hrsc04:()=>IP,sensor_hp203_extern:()=>LP,sensor_ltr381_extern:()=>NP,sensor_mixgo_extern_button_attachInterrupt:()=>lP,sensor_mixgo_extern_button_get_presses:()=>rP,sensor_mixgo_extern_button_is_pressed:()=>aP,sensor_mixgo_extern_button_was_pressed:()=>uP,sensor_mixgo_extern_light:()=>hP,sensor_mixgo_extern_pin_near:()=>EP,sensor_mixgo_extern_sound:()=>mP,sensor_mixgoce_hot_wheel_degrees:()=>WP,sensor_mixgoce_hot_wheel_is_touched:()=>HP,sensor_mpu9250_attachGestureInterrupt:()=>dP,sensor_rtc_init:()=>OP,sensor_sht:()=>cP,sensor_shtc3_extern:()=>FP,sensor_use_i2c_init:()=>gP,sensor_use_spi_init:()=>YP,sensor_use_uart_init:()=>rv,sensor_weather_solo_init:()=>Sv,sensor_weather_solo_rain:()=>Nv,sensor_weather_solo_wd:()=>Av,sensor_weather_solo_ws:()=>Lv,weather_data:()=>GP,weather_have_data:()=>UP,weather_set_label:()=>kP,weather_uart_mixio:()=>wP});var _t={};t.r(_t),t.d(_t,{HCSR04:()=>yv,bitbot_als_num:()=>ix,dht11:()=>rx,number1:()=>Vv,number2:()=>Bv,number3:()=>Gv,number4:()=>Uv,number5:()=>wv,number6:()=>kv,number7:()=>Hv,onboard_RTC_get_time:()=>YY,onboard_RTC_get_time_str:()=>bY,onboard_RTC_get_timestamp:()=>xY,onboard_RTC_set_datetime:()=>PY,onboard_RTC_settime_string:()=>vY,onboard_RTC_timestamp_totuple:()=>XY,rfid_readcontent:()=>_Y,rfid_readid:()=>sY,rfid_write:()=>oY,rfid_write_return:()=>pY,sensor_LTR308:()=>$v,sensor_adxl345_get_acceleration:()=>hY,sensor_aht11:()=>iY,sensor_bitbot_ALS:()=>ex,sensor_button_get_presses:()=>_x,sensor_button_is_pressed:()=>nx,sensor_button_was_pressed:()=>sx,sensor_compass_reset:()=>gY,sensor_ds18x20:()=>jv,sensor_eulerangles:()=>uY,sensor_get_acceleration:()=>aY,sensor_get_temperature:()=>nY,sensor_hp203:()=>eY,sensor_light:()=>ux,sensor_lm35:()=>Zv,sensor_mixbot_get_gyro:()=>tx,sensor_mixbot_patrol_calibrate:()=>jY,sensor_mixbot_patrol_value:()=>ZY,sensor_mixbot_temperature:()=>$Y,sensor_mixgo_LTR308:()=>qv,sensor_mixgo_button_attachInterrupt:()=>vv,sensor_mixgo_button_get_presses:()=>Pv,sensor_mixgo_button_is_pressed:()=>fv,sensor_mixgo_button_was_pressed:()=>Fv,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>BY,sensor_mixgo_cc_mmc5603_get_angle:()=>VY,sensor_mixgo_cc_mmc5603_get_magnetic:()=>yY,sensor_mixgo_light:()=>ax,sensor_mixgo_nova_LTR308:()=>zv,sensor_mixgo_nova_pin_near:()=>Qv,sensor_mixgo_pin_near:()=>Jv,sensor_mixgo_pin_near_double:()=>Kv,sensor_mixgo_pin_near_single:()=>Wv,sensor_mixgo_pin_pressed:()=>TY,sensor_mixgo_touch_slide:()=>IY,sensor_mixgocar42_button_attachInterrupt:()=>bv,sensor_mixgocar42_button_get_presses:()=>Xv,sensor_mixgocar42_button_is_pressed:()=>Yv,sensor_mixgocar42_button_was_pressed:()=>xv,sensor_mixgocar_battery_left:()=>zY,sensor_mixgocar_pin_near:()=>QY,sensor_mixgocar_pin_near_line:()=>JY,sensor_mixgocar_pin_near_state_change:()=>qY,sensor_mixgoce_pin_pressed:()=>dY,sensor_mixgoce_temperature:()=>UY,sensor_mixgome_temperature:()=>GY,sensor_mpu9250_calibrate_compass:()=>OY,sensor_mpu9250_field_strength:()=>cY,sensor_mpu9250_gesture:()=>rY,sensor_mpu9250_get_acceleration:()=>lY,sensor_mpu9250_get_gyro:()=>EY,sensor_mpu9250_get_magnetic:()=>mY,sensor_mpu9250_temperature:()=>RY,sensor_mpython_pin_pressed:()=>MY,sensor_mpython_qmi8658_get_gyro:()=>wY,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:()=>px,sensor_pin_pressed:()=>ox,sensor_rm_acc:()=>KY,sensor_rm_battery_left:()=>WY,sensor_rm_pin_near_double:()=>HY,sensor_sound:()=>tY});var ot={};t.r(ot),t.d(ot,{serial_any:()=>Mx,serial_print:()=>lx,serial_print_byte:()=>dx,serial_print_hex:()=>Tx,serial_println:()=>Ix,serial_read_from_ai:()=>Lx,serial_readline:()=>mx,serial_readstr:()=>hx,serial_send_to_ai:()=>Ax,serial_softserial:()=>Ex,serial_softserial_new:()=>Ox,system_input:()=>Rx,system_print:()=>cx,system_print_end:()=>Cx,system_print_inline:()=>gx,system_print_many:()=>Sx});var pt={};t.r(pt),t.d(pt,{Panic_with_status_code:()=>Vx,Timer_init:()=>$x,base_delay:()=>iX,controls_delay:()=>kx,controls_delay_new:()=>Hx,controls_end_program:()=>Gx,controls_millis:()=>Bx,controls_uname:()=>wx,reset:()=>Ux,system_bitbot_shutdown:()=>Zx,system_device_name:()=>bx,system_device_serial_number:()=>yx,system_event_bus_source:()=>xx,system_event_bus_value:()=>Xx,system_machine_reset:()=>jx,system_on_event:()=>Px,system_raise_event:()=>Fx,system_reset:()=>Dx,system_run_in_background:()=>Nx,system_ticks_diff:()=>Jx,system_timer:()=>Kx,system_timer_init:()=>Qx,system_timestamp:()=>vx,system_value:()=>Yx,system_wait:()=>fx,system_wdt_feed:()=>zx,system_wdt_init:()=>qx,time_ticks_diff:()=>eX,timer:()=>Wx,timer2:()=>tX});var at={};t.r(at),t.d(at,{Air_daily_content:()=>MX,Air_now_content:()=>aX,Geo_moon_content:()=>mX,Geo_sun_content:()=>hX,Life_suggestion_content:()=>rX,Location_search_content:()=>dX,Tide_daily_content:()=>lX,WEATHER_DAILY:()=>sX,WEATHER_HOUR:()=>_X,WEATHER_NOW:()=>nX,Weather_alarm_content:()=>uX,Weather_daily:()=>IX,Weather_daily_content:()=>TX,Weather_now:()=>oX,Weather_now_content:()=>pX});var ut={};t.r(ut),t.d(ut,{analog_input:()=>fX,analog_output:()=>PX,espnow_channel:()=>LX,haskylens_model:()=>NX,i2c_A_pin:()=>vX,i2c_B_pin:()=>YX,pins_analog:()=>VX,pins_analog_pin:()=>BX,pins_axis:()=>eb,pins_brightness:()=>ib,pins_builtinimg:()=>QX,pins_builtinimg_extern:()=>qX,pins_button:()=>wX,pins_dac:()=>GX,pins_dac_pin:()=>UX,pins_digital:()=>cX,pins_digital_dot:()=>rb,pins_digital_pin:()=>gX,pins_exlcdh:()=>$X,pins_exlcdv:()=>tb,pins_imglist:()=>zX,pins_input_pin:()=>CX,pins_mpython_touch:()=>AX,pins_one_more:()=>ub,pins_output_pin:()=>SX,pins_playlist:()=>jX,pins_playlist_extern:()=>ZX,pins_pwm:()=>kX,pins_pwm_pin:()=>HX,pins_radio_datarate:()=>ab,pins_radio_power:()=>pb,pins_serial:()=>JX,pins_tone_notes:()=>ob,pins_touch:()=>KX,pins_touch_pin:()=>WX,pins_tts_bgmusic:()=>_b,pins_tts_builtin_music:()=>sb,pins_tts_voice:()=>nb,pwm_input:()=>DX,pwm_output:()=>FX,spi_A_pin:()=>xX,spi_B_pin:()=>XX,spi_C_pin:()=>bX,spi_D_pin:()=>yX});var rt={};t.r(rt),t.d(rt,{espnow_channel:()=>Rb,haskylens_model:()=>cb,pins_analog:()=>mb,pins_analog_pin:()=>hb,pins_axis:()=>xb,pins_brightness:()=>yb,pins_builtinimg:()=>fb,pins_builtinimg_extern:()=>Fb,pins_button:()=>db,pins_dac:()=>Sb,pins_dac_pin:()=>Cb,pins_digital:()=>lb,pins_digital_dot:()=>Wb,pins_digital_pin:()=>Ib,pins_exlcdh:()=>Xb,pins_exlcdv:()=>bb,pins_imglist:()=>Pb,pins_input_pin:()=>Tb,pins_interrupt:()=>Nb,pins_mpython_touch:()=>gb,pins_one_more:()=>Hb,pins_output_pin:()=>Mb,pins_playlist:()=>vb,pins_playlist_extern:()=>Yb,pins_pwm:()=>Ob,pins_pwm_pin:()=>Eb,pins_radio_datarate:()=>kb,pins_radio_power:()=>wb,pins_serial:()=>Db,pins_tone_notes:()=>Ub,pins_touch:()=>Lb,pins_touch_pin:()=>Ab,pins_tts_bgmusic:()=>Gb,pins_tts_builtin_music:()=>Bb,pins_tts_voice:()=>Vb});const lt=Blockly,dt=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&&(o+=n)):i=o}else i="i";return i}},Tt=It; /** * @license * Visual Blocks Editor @@ -18,4 +18,4 @@ * 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(lt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(lt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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(lt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(lt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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(lt.inputs.Align.RIGHT).appendField(lt.Msg.PYTHON_RANGE).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Xt={init:function(){this.setColour(Dt),this.appendValueInput("LIST").setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(lt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return lt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},bt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new lt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(lt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:lt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:lt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},yt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(lt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new lt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(lt.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(lt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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(lt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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 lt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:lt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:lt.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(lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Bt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new lt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return lt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new lt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return lt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};bt.OPERATORS=[[lt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[lt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Vt.OPERATORS=[[lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Ut={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(lt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},wt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(lt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Ht={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(lt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(lt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(lt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Jt={init:function(){this.jsonInit({message0:lt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Dt,tooltip:lt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:lt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Qt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_STAT),this.setOutput(!0)}},qt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(lt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},jt={init:function(){this.appendDummyInput().appendField(lt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+lt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(lt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new lt.FieldDropdown([[lt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[lt.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("")}},Zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$t={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},te={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ee={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ie=230;lt.FieldTextInput.math_number_validator=function(t){return String(t)},lt.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 lt.FieldTextInput("0",lt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(ie);this.appendDummyInput("").appendField(lt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new lt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},_e={init:function(){this.setColour(ie);this.appendDummyInput("").appendField(lt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new lt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},oe={init:function(){this.setColour(ie),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.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:lt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:lt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:lt.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 lt.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:lt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:lt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:lt.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 lt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ue={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new lt.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:lt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:lt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:lt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:lt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:lt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:lt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:lt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},re={init:function(){var t=[[lt.Msg.MATH_BIN,"bin"],[lt.Msg.MATH_OCT,"oct"],[lt.Msg.MATH_HEX,"hex"]];this.setColour(ie),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new lt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:lt.Msg.MATH_DEC_TOOLTIP_BIN,oct:lt.Msg.MATH_DEC_TOOLTIP_OCT,hex:lt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},le={init:function(){var t=[[lt.Msg.LANG_MATH_TO_ROUND,"round"],[lt.Msg.LANG_MATH_TO_CEIL,"ceil"],[lt.Msg.LANG_MATH_TO_FLOOR,"floor"],[lt.Msg.MATH_ABS,"fabs"],[lt.Msg.MATH_SQRT,"sqrt"]];this.setColour(ie),this.appendValueInput("A").setCheck(Number).appendField(new lt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:lt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:lt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:lt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:lt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:lt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:lt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},de={init:function(){var t=[[lt.Msg.MIXLY_MAX,"max"],[lt.Msg.MIXLY_MIN,"min"]];this.setColour(ie),this.appendValueInput("A").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(lt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:lt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:lt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ie={init:function(){var t=[[lt.Msg.MATH_TWO,"two"],[lt.Msg.MATH_EIGHT,"eight"],[lt.Msg.MATH_TEN,"ten"],[lt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(ie),this.appendDummyInput("").appendField(lt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new lt.FieldDropdown(t),"OP").appendField(lt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MATH_ZHW).appendField(new lt.FieldDropdown(t),"OP2").appendField(lt.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:lt.Msg.MATH_Before_two,eight:lt.Msg.MATH_Before_eight,ten:lt.Msg.MATH_Before_ten,sixteen:lt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:lt.Msg.MATH_Behind_two,eight:lt.Msg.MATH_Behind_eight,ten:lt.Msg.MATH_Behind_ten,sixteen:lt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Te={init:function(){var t=[[lt.Msg.LANG_MATH_INT,"int"],[lt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ie),this.setOutput(!0,Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new lt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:lt.Msg.LANG_MATH_INT,float:lt.Msg.LANG_MATH_FLOAT_RANDOM};return lt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Me={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(lt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(lt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(lt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(lt.Msg.MATH_CONSTRAIN_TOOLTIP)}},he={init:function(){this.setColour(ie),this.appendValueInput("NUM",Number).appendField(lt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(lt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(lt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},me={init:function(){this.setColour(ie),this.appendDummyInput().appendField(new lt.FieldTextInput("0",lt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(lt.Msg.MATH_NUMBER_TOOLTIP)}},Ee={init:function(){this.setColour(ie),this.appendValueInput("NUM").setCheck(Number).appendField(lt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.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(lt.Msg.MATH_ROUND).appendField(lt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(lt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(lt.Msg.MATH_ROUND_NEW_TOOLTIP)}},Re={init:function(){var t=[[lt.Msg.MIXLY_TO_INT,"int"],[lt.Msg.MIXLY_TO_FLOAT,"float"],[lt.Msg.MIXLY_TO_BITES,"b"],[lt.Msg.LANG_MATH_BYTE+lt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(ie),this.appendValueInput("VAR").appendField(new lt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:lt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:lt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:lt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ce={init:function(){var t=[[lt.Msg.MIXLY_TO_INT,"int"],[lt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ie),this.appendValueInput("VAR").appendField(new lt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:lt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:lt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ge=he,Ce={init:function(){this.setColour(ie),this.appendValueInput("VAR").appendField(lt.Msg.LANG_MATH_BYTE+lt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Se=160,Ae={init:function(){this.setColour(Se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new lt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(lt.Msg.TEXT_TEXT_TOOLTIP)},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 lt.FieldImage(e,12,12,'"')}},Le={init:function(){this.setColour(Se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new lt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(lt.Msg.TEXT_LINES_TOOLTIP)},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 lt.FieldImage(e,12,12,'"')}};lt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 Ne={init:function(){this.setColour(Se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new lt.FieldTextInput("",lt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(lt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new lt.FieldImage(e,7,12,'"')}},De={init:function(){this.setColour(Se),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(lt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},fe={init:function(){this.setColour(Se),this.appendValueInput("VAR").setCheck(Number).appendField(lt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Fe={init:function(){this.setColour(Se),this.appendValueInput("VAR").setCheck(String).appendField(lt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Pe={init:function(){this.setColour(Se),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ve={init:function(){this.setColour(Se),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ye={init:function(){this.WHERE_OPTIONS=[[lt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[lt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[lt.Msg.TEXT_GET_INDEX_RANDOM+1+lt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(lt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(lt.Msg.LISTS_GET_INDEX_GET,"MODE"),lt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(lt.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=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+lt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",lt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:lt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:lt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:lt.Msg.TEXT_GET_INDEX_RANDOM};return lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+lt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==lt.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),lt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(lt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new lt.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"),lt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},xe={init:function(){this.setHelpUrl(lt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(lt.Msg.LISTS_GET_INDEX_GET+" "+lt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(lt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_MICROBIT_TYPE_STRING+lt.Msg.LISTS_GET_INDEX_FROM_START+"n"+lt.Msg.TEXT_CHARAT2)}},Xe={init:function(){this.setHelpUrl(lt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(lt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(lt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},be={init:function(){this.WHERE_OPTIONS_1=[[lt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[lt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[lt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[lt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[lt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[lt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(lt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(lt.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(lt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==lt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==lt.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),lt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(lt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new lt.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"))}},ye={init:function(){this.setHelpUrl(lt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(lt.Msg.LISTS_GET_INDEX_GET+" "+lt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(lt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(lt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(lt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Ve={init:function(){var t=[[lt.Msg.MIXLY_EQUALS,"==="],[lt.Msg.MIXLY_STARTSWITH,"startswith"],[lt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new lt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Be={init:function(){this.setColour(Se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(lt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_COMPARETO_HELP)}},Ge={init:function(){var t=[[lt.Msg.TEXT_UPPER,"upper"],[lt.Msg.TEXT_TITLE,"title"],[lt.Msg.TEXT_CAPITALIZE,"capitalize"],[lt.Msg.TEXT_SWAPCASE,"swapcase"],[lt.Msg.TEXT_LOWER,"lower"]];this.setColour(Se),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new lt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:lt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:lt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:lt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:lt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:lt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ue={init:function(){var t=[[lt.Msg.TEXT_LJUST,"ljust"],[lt.Msg.TEXT_CENTER,"center"],[lt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Se),this.appendValueInput("VAR").appendField(new lt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(lt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(lt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},we={init:function(){this.setColour(Se),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(lt.Msg.MIXLY_MID+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(lt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ke={init:function(){this.setColour(Se),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},He={init:function(){this.setColour(Se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(lt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(lt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},We={init:function(){this.setColour(Se),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(lt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(lt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Ke={init:function(){var t=[[lt.Msg.TEXT_TRIM_BOTH,"strip"],[lt.Msg.TEXT_TRIM_LEFT,"lstrip"],[lt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Se),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(lt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new lt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(lt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:lt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:lt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:lt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Je={init:function(){this.setColour(Se),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new lt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new lt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(lt.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){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gi={init:function(){this.setColour(Vi),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ui={init:function(){this.setColour(Vi),this.appendDummyInput().appendField(lt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},wi={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_KEYS),this.setTooltip(lt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},ki={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(lt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(lt.Msg.DICTS_GET_TOOLTIP)}},Hi={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(lt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(lt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(lt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Wi={init:function(){this.setColour(Vi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(lt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ki={init:function(){this.setColour(Vi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(lt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_DELETE_TOOLTIP)}},Ji={init:function(){this.setColour(Vi),this.appendValueInput("DICT2").setCheck("Dict").appendField(lt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(lt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MID),this.setTooltip(lt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qi={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_CLEAR),this.setTooltip(lt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qi={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_ITEMS),this.setTooltip(lt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},zi={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_VALUES),this.setTooltip(lt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},ji={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_LENGTH),this.setTooltip(lt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Zi={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_DELDICT),this.setTooltip(lt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$i={init:function(){this.MODE=[[lt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[lt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(lt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(lt.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=lt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=lt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==lt.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 lt.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")}},tn={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(lt.Msg.DICTS_ADD_VALUE),this.setTooltip(lt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},en={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(lt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},nn={init:function(){this.setColour(Vi),this.appendDummyInput("").appendField(new lt.FieldLabel(lt.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 lt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(lt.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){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},sn={init:function(){this.setColour(Vi),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},_n={init:function(){this.setColour(Vi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_TO_JSON),this.setTooltip(lt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},on={init:function(){this.setColour(Vi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(lt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},pn=210,an={init:function(){var t=lt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(pn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:lt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:lt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:lt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:lt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:lt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:lt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},un={init:function(){var t=lt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=lt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(pn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new lt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},rn={init:function(){var t=[[lt.Msg.LOGIC_OPERATION_AND,"AND"],[lt.Msg.LOGIC_OPERATION_OR,"OR"],[lt.Msg.LOGIC_OPERATION_NOR,"NOR"],[lt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(pn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new lt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:lt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:lt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:lt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:lt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},ln={init:function(){this.setColour(pn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(lt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(lt.Msg.LOGIC_NEGATE_TOOLTIP)}},dn={init:function(){var t=[[lt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[lt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(pn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new lt.FieldDropdown(t),"BOOL"),this.setTooltip(lt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},In={init:function(){this.setColour(pn),this.setOutput(!0),this.appendDummyInput().appendField(lt.Msg.LOGIC_NULL),this.setTooltip(lt.Msg.LOGIC_NULL_TOOLTIP)}},Tn={init:function(){this.setColour(pn),this.appendValueInput("A"),this.appendValueInput("B").appendField(lt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(lt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Mn={init:function(){var t=[[lt.Msg.TEXT_APPEND_TO,"in"],[lt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(pn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new lt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(lt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.IN)}},hn={init:function(){var t=[[lt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[lt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(pn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},mn={init:function(){this.setColour(pn),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},En={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(lt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},On={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(lt.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=lt.Msg.MIXLY_USE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=lt.Msg.MIXLY_BELONG;return i+{r:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[lt.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=lt.Msg.MIXLY_USE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=lt.Msg.MIXLY_BELONG,o=lt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},cn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(lt.Msg.MIXPY_TEXT_ENCODE).appendField(new lt.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=lt.Msg.MIXLY_USE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=lt.Msg.MIXLY_BELONG,o=lt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},gn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+lt.Msg.MIXLY_MICROBIT_TYPE_STRING+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Cn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},An={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(lt.Msg.MICROBIT_PYTHON_TYPE)}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.HTML_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Nn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},fn={init:function(){this.setColour(0),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};lt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Fn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[lt.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(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Yn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},xn={init:function(){this.setColour(0),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Xn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[lt.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 lt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+lt.Msg.MIXLY_ESP32_SET+{mkdir:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(lt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.HTML_FILE,"isfile"],[lt.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 lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(lt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Gn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(lt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Un={};Un.NAME_TYPE=lt.PROCEDURE_CATEGORY_NAME,Un.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(lt.Msg.MIXLY_AIP_ATTR).setAlign(lt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(lt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ys={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(lt.Msg.HTML_FORM_CONTENT).appendField(new lt.FieldDropdown([[lt.Msg.HTML_TEXT,"text"],[lt.Msg.HTML_EMAIL,"email"],[lt.Msg.HTML_NUMBER,"number"],[lt.Msg.HTML_PASSWORD,"password"],[lt.Msg.HTML_CHECKBOX,"checkbox"],[lt.Msg.HTML_RADIOBUTTON,"radiobutton"],[lt.Msg.HTML_BUTTON,"button"],[lt.Msg.HTML_COLOUR,"colour"],[lt.Msg.HTML_DATE,"date"],[lt.Msg.HTML_LOCALTIME,"local time"],[lt.Msg.HTML_FILE,"file"],[lt.Msg.HTML_HIDDEN,"hidden"],[lt.Msg.HTML_IMAGE,"image"],[lt.Msg.HTML_MONTH,"month"],[lt.Msg.HTML_RANGE,"range"],[lt.Msg.HTML_RESET,"reset"],[lt.Msg.HTML_SEARCH,"search"],[lt.Msg.HTML_SUBMIT,"submit"],[lt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[lt.Msg.HTML_TIME,"time"],[lt.Msg.HTML_URL,"url"],[lt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(lt.Msg.HTML_NAME).appendField(new lt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(lt.Msg.HTML_VALUE).appendField(new lt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(lt.Msg.MIXLY_AIP_ATTR).setAlign(lt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(new lt.FieldTextInput("property"),"KEY").appendField(":").appendField(new lt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(new lt.FieldTextInput("property"),"KEY").appendField(":").appendField(new lt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(lt.Msg.HTML_TEXT).appendField(new lt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Us=160,ws={init:function(){this.setColour(Us),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new lt.FieldTable(""),"TEXT")}},ks={init:function(){this.setColour(Us),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new lt.FieldMultilineInput(""),"TEXT")}},Hs={init:function(){this.setColour(Us),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new lt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ws={init:function(){this.setColour(Us),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Ks={init:function(){this.setColour(Us),this.appendDummyInput().appendTitle("Comment:").appendTitle(new lt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Js={init:function(){this.setColour(Us),this.appendValueInput("VALUE").appendField(lt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Qs={init:function(){this.setColour(Us),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new lt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(lt.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=lt.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+")"},lt.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 xp=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]},Xp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},bp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},yp=function(t,e){return["None",e.ORDER_ATOMIC]},Vp=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]},Bp=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]},Gp=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]},Up=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},wp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},kp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Hp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Wp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Kp=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Jp=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Qp=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]},qp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zp=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]},Zp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},$p=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ta=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ea=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ia=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"},sa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},_a=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},oa=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"},aa=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]},ua=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"},ra=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"},la=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),lt.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]},Wa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ka=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},Ja=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Qa=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},qa=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},za=function(t,e){return'"},ja=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Za=function(){return this.getFieldValue("TEXT")+"\n"},$a=function(t){return t.getFieldValue("TEXT")+"\n"},tu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},eu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},iu=function(){return""},nu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},su=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.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){(_=t.getCommentText())&&(_=lt.utils.string.wrap(_,ou.COMMENT_WRAP-3),n+=ou.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const pu="#74A55B",au={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(lt.Msg.MIXLY_RGB_PIN_COUNT)}},uu={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ru={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},lu={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},du={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(lt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(lt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(lt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Iu={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Tu={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Mu={init:function(){this.setColour(pu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},mu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Eu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ou={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Ru={init:function(){this.setColour(pu),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cu={init:function(){this.setColour(pu),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_MOVE)}},gu={init:function(){this.setColour(pu),this.appendValueInput("VAR").appendField("360°"+lt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SETTING+lt.Msg.blockpy_turtle_rotate+lt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},Cu={init:function(){this.setColour(pu),this.appendValueInput("PIN",Number).appendField("180°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Su={init:function(){this.setColour(pu),this.appendValueInput("PIN",Number).appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Au={init:function(){this.setColour(pu),this.appendValueInput("PIN",Number).appendField("180°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lu={init:function(){this.setColour(pu),this.appendValueInput("PIN",Number).appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nu={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new lt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(lt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},Du={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[lt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[lt.Msg.MOTOR_N,"ms32006.MOT_N"],[lt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},fu={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new lt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[lt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},Fu={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(lt.Msg.MIXLY_RGB_PIN_COUNT)}},Pu={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},vu={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Yu={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_WRI)}},xu={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new lt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO+"SYN6288"+lt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Xu={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(lt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},bu={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},yu={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(lt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(lt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Vu={init:function(){this.setColour(pu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(lt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(lt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(lt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Bu={init:function(){this.setColour(pu),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Gu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Uu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},wu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LISTS_SET_INDEX_SET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ku={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_WHITE,"W"],[lt.Msg.COLOUR_RGB_RED,"R"],[lt.Msg.COLOUR_RGB_YELLOW,"Y"],[lt.Msg.COLOUR_RGB_GREEN,"G"],[lt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Hu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_WHITE,"W"],[lt.Msg.COLOUR_RGB_RED,"R"],[lt.Msg.COLOUR_RGB_YELLOW,"Y"],[lt.Msg.COLOUR_RGB_GREEN,"G"],[lt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Wu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[lt.Msg.MIXLY_SPEED,"[1]"],[lt.Msg.MATH_SINGLE_OP_ABSOLUTE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[lt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[lt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[lt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ku={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[lt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[lt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ju={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MATH_SINGLE_OP_ABSOLUTE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MODE).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPEED+lt.Msg.MIXLY_MODE,"0"],[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+lt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"0"],[lt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[lt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},qu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField("("+lt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MODE).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPEED+lt.Msg.MIXLY_MODE,"0"],[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+lt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},ju={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField("("+lt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MODE).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPEED+lt.Msg.MIXLY_MODE,"0"],[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+lt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"0"],[lt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MOTOR,"ext_motor"],[lt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[lt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[lt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[lt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[lt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[lt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[lt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},$u={init:function(){this.setColour(pu),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MOTOR,"ext_motor"],[lt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[lt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[lt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[lt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[lt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[lt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[lt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tr="#6C9858",er={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(new lt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},ir={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_ON,"1"],[lt.Msg.MIXLY_ESP32_OFF,"0"],[lt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},nr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},sr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(lt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},_r={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},or={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SETTING+lt.Msg.MIXLY_BUILDIN_LED+lt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},pr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(lt.Msg.MIXLY_LCD_SETCOLOR).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LIGHT_RED,"1"],[lt.Msg.MIXLY_LIGHT_GREEN,"2"],[lt.Msg.MIXLY_LIGHT_BLUE,"3"],[lt.Msg.MIXLY_LIGHT_YELLOW,"4"],[lt.Msg.MIXLY_LIGHT_CYAN,"5"],[lt.Msg.MIXLY_LIGHT_PURPLE,"6"],[lt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ar={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},ur={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(lt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},rr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},lr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SETTING+lt.Msg.MIXLY_BUILDIN_LED+lt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},dr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(new lt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Ir={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(dt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Tr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Mr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.MIXLY_DURATION).appendField(lt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},hr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(lt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.PYTHON_RANGE_STEP).appendField(lt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},mr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_WRI)}},Er={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(dt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Or={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Rr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(lt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.PYTHON_RANGE_STEP).appendField(lt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},cr={init:function(){this.setColour(tr),this.appendValueInput("TICKS").setCheck(Number).appendField(lt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(lt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(lt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},gr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Cr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Sr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Ar={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Lr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nr={init:function(){this.setColour(tr),this.appendValueInput("LIST").appendField(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Dr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MOTOR_DC).appendField(new lt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"],[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(tr),this.appendDummyInput().appendField("MixGo Car").appendField(new lt.FieldDropdown([[lt.Msg.blockpy_forward,"F"],[lt.Msg.blockpy_backward,"B"],[lt.Msg.blockpy_left,"L"],[lt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(tr),this.appendDummyInput("").appendField("MixGo Car").appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Pr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MOTOR_DC).appendField(new lt.FieldDropdown([[lt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[lt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MOTOR_DC).appendField(new lt.FieldDropdown([[lt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[lt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_STOP).appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},xr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(new lt.FieldDropdown([[lt.Msg.blockpy_forward,"F"],[lt.Msg.blockpy_backward,"B"],[lt.Msg.blockpy_left,"L"],[lt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[lt.Msg.MIXLY_SPEED,"SPEED"],[lt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Xr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(lt.Msg.MIXLY_MOTOR).appendField(new lt.FieldDropdown([[lt.Msg.TEXT_TRIM_LEFT,"1"],[lt.Msg.TEXT_TRIM_RIGHT,"2"],[lt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[lt.Msg.MIXLY_SPEED,"SPEED"],[lt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},yr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[lt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.BITBOT).appendField(new lt.FieldDropdown([[lt.Msg.blockpy_forward,"F"],[lt.Msg.blockpy_backward,"B"],[lt.Msg.blockpy_left,"L"],[lt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Br={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.BITBOT).appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.BITBOT).appendField(lt.Msg.MIXLY_MOTOR).appendField(new lt.FieldDropdown([[lt.Msg.TEXT_TRIM_LEFT,"0"],[lt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"],[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ur={init:function(){this.setColour(tr),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},wr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},kr={init:function(){this.setColour(tr),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_SETTING+lt.Msg.MIXLY_MIXBOT_BUZZER+lt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Hr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_MIXBOT_BUZZER+lt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Wr={init:function(){this.setColour(tr),this.appendValueInput("PATH").appendField(lt.Msg.MIXLY_RECORD_AUDIO).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(lt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Kr={init:function(){this.setColour(tr),this.appendValueInput("PATH").appendField(lt.Msg.MIXLY_PLAY_AUDIO).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Jr={init:function(){this.setColour(tr),this.appendValueInput("PATH").appendField(lt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Qr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},qr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.LISTS_SET_INDEX_SET+lt.Msg.ME_GO_MOTOR_EXTERN).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.blynk_IOT_IR_POWER+lt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},jr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.ME_GO_MOTOR_EXTERN).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.blynk_IOT_IR_POWER+lt.Msg.MIXLY_PINMODEOUT+lt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zr={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.LISTS_SET_INDEX_SET+lt.Msg.ME_GO_MOTOR_EXTERN).appendField(lt.Msg.MIXLY_ALL+lt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(lt.ALIGN_RIGHT).appendField(lt.Msg.blynk_IOT_IR_POWER+lt.Msg.MIXLY_PINMODEOUT+lt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},$r={init:function(){this.setColour(tr),this.appendDummyInput().appendField(lt.Msg.ANALOG+lt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(lt.Msg.MIXLY_RELEASE).appendField(new lt.FieldDropdown([[lt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[lt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.ANALOG+lt.Msg.MIXLY_KEYBOARD_INPUT)}},tl={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SPECIAL_KEY).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[lt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[lt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[lt.Msg.MIXLY_SPECIAL_KEY1,"0x04"],[lt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[lt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[lt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[lt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[lt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},el={init:function(){this.setColour(tr),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GENERAL_KEY).appendField(new lt.FieldDropdown([[lt.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)}},il={init:function(){this.setColour(tr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new lt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(lt.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;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},lm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},dm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Im={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Tm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(lt.Msg.MIXLY_EMQX_SERVER).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(lt.Msg.MIXLY_WIFI_USERNAME).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(lt.Msg.MIXLY_IOT_PASSWORD).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(lt.Msg.MIXLY_EMQX_PROJECT).setAlign(lt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(lt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(lt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(lt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},hm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(lt.Msg.MIXLY_EMQX_SUBSCRIBE+lt.Msg.MIXLY_MICROBIT_MSG).appendField(lt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(lt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},mm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Em={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Om={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(lt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},cm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(lt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},gm={init:function(){this.setColour(sm),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},Cm={init:function(){this.setColour(sm),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Sm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Am={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO").appendField(lt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(lt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},Lm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(lt.Msg.MIXLY_EMQX_SERVER).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+lt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(lt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nm={init:function(){this.setColour(sm),this.appendDummyInput().appendField(lt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(lt.Msg.MIXLY_EMQX_SERVER).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(lt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Dm={init:function(){this.VISITOR_ID=dt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(sm),this.appendDummyInput("").appendField(new lt.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")}},fm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MixIO").appendField(lt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Fm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("HTTP"+lt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(lt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(lt.Msg.MIXLY_REQUESTS_GET).appendField(lt.Msg.MIXLY_GET_CURRENT_TIME).appendField(lt.Msg.MIXLY_OPEN_DEBUG).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("HTTP"+lt.Msg.MIXLY_Client).appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[lt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[lt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},vm={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MQTT"+lt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(lt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(lt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(lt.Msg.MQTT_Topic).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(lt.Msg.MIXLY_OPEN_DEBUG).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ym={init:function(){this.setColour(sm),this.appendDummyInput().appendField("MQTT"+lt.Msg.MIXLY_Client).appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[lt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[lt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},xm=_m,Xm=om,bm=pm,ym=am,Vm=rm,Bm=225,Gm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(lt.Msg.MIXLY_NETWORK_MODE).appendField(new lt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},Um={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[lt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(lt.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=lt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:lt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:lt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},wm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},km={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return lt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:lt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},Hm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(lt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(lt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},Wm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_WIFI_CONNECT+lt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},Km={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[lt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[lt.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 lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:lt.Msg.MIXLY_ESP32_NETWORK_IP,1:lt.Msg.MIXLY_ESP32_NETWORK_MASK,2:lt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},Jm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},Qm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[lt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},qm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(lt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(lt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},zm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},jm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new lt.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 lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},Zm={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},$m={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},tE={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},eE={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},iE={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},nE={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},sE={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},_E={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},oE={init:function(){this.setColour(Bm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},pE={init:function(){this.setColour(Bm),this.appendValueInput("DOMAIN").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(lt.Msg.blockpy_REQUESTS_GET).appendField(new lt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},aE={init:function(){this.appendValueInput("VAL");var t=[[lt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]];this.setColour(Bm),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:lt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:lt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:lt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},uE={init:function(){this.appendValueInput("VAR").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(Bm),this.appendDummyInput("").appendField(lt.Msg.blockpy_CONDUCT).appendField(new lt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(lt.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:lt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:lt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},rE={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(lt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},lE={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField(new lt.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)}},dE="#3288dd",IE={init:function(){this.setColour(dE),this.appendValueInput("URL").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(lt.Msg.blockpy_CONDUCT).appendField(new lt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(lt.Msg.blockpy_REQUESTS).appendField(lt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},TE={init:function(){this.setColour(dE),this.appendValueInput("URL").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(lt.Msg.blockpy_CONDUCT).appendField(new lt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(lt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(lt.Msg.blockpy_REQUESTS+lt.Msg.OLED_STRING),this.appendDummyInput("").appendField(lt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ME={init:function(){this.appendValueInput("VAL");var t=[[lt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[lt.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(dE),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},hE=100,mE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("I2CSUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},EE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},OE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(lt.Msg.MOTOR_DC).appendField(lt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"],[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},RE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(lt.Msg.MOTOR_DC).appendField(lt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(lt.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},cE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_MOVE)}},gE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},CE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+lt.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},SE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(hE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},AE="#A58C5B",LE={init:function(){this.setColour(AE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(lt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SENOR_IS_PRESSED)}},NE={init:function(){this.setColour(AE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(lt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SENOR_WAS_PRESSED)}},DE={init:function(){this.setColour(AE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(lt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_BUTTON+lt.Msg.MIXLY_GET_PRESSES)}},fE={init:function(){this.setColour(AE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[lt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[lt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},FE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_shake,"shake"],[lt.Msg.MIXLY_UP,"up"],[lt.Msg.MIXLY_DOWN,"down"],[lt.Msg.MIXLY_LEFT,"left"],[lt.Msg.MIXLY_RIGHT,"right"],[lt.Msg.MIXLY_MICROBIT_face_up,"face up"],[lt.Msg.MIXLY_MICROBIT_face_down,"face down"],[lt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=lt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=lt.Msg.MSG.catSensor,s=lt.Msg.MIXLY_MICROBIT_JS_STATE,_=lt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:lt.Msg.MIXLY_MICROBIT_shake,up:lt.Msg.MIXLY_UP,down:lt.Msg.MIXLY_DOWN,left:lt.Msg.MIXLY_LEFT,right:lt.Msg.MIXLY_RIGHT,"face up":lt.Msg.MIXLY_MICROBIT_face_up,"face down":lt.Msg.MIXLY_MICROBIT_face_down,freefall:lt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},PE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new lt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},vE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},YE={init:function(){var t=[[lt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[lt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(AE),this.appendValueInput("PIN",Number).appendField(new lt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new lt.FieldDropdown(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))}},xE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},XE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},bE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new lt.FieldDropdown([[lt.Msg.TEXT_TRIM_LEFT,"left"],[lt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(lt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=lt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=lt.Msg.MIXLY_ESP32_NEAR;return i+{left:lt.Msg.TEXT_TRIM_LEFT,right:lt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},yE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[lt.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()":lt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":lt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},VE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[lt.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()":lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},BE={init:function(){this.setColour(AE),this.appendValueInput("PIN",Number).appendField("DS18X20 "+lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},GE={init:function(){this.setColour(AE),this.appendDummyInput("").appendField("LM35"+lt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_LM35)}},UE={init:function(){this.setColour(AE),this.appendValueInput("I2CSUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new lt.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},wE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[lt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[lt.Msg.MIXLY_ESP32_MAX30102_IR+","+lt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},kE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[lt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[lt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},HE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},WE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.HTML_COLOUR+lt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GET+lt.Msg.HTML_COLOUR,"[2]"],[lt.Msg.MIXLY_GET+lt.Msg.MIXLY_IR_STRENGTH,"[1]"],[lt.Msg.MIXLY_GET+lt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},KE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[lt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},JE={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},QE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[lt.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:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},qE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[lt.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:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},zE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_Altitude+lt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETPRESSURE,"pressure()"],[lt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[lt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},jE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MIXGOPE_FIELD+lt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[lt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ZE={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_shake,"shake"],[lt.Msg.MIXLY_UP,"up"],[lt.Msg.MIXLY_DOWN,"down"],[lt.Msg.MIXLY_LEFT,"left"],[lt.Msg.MIXLY_RIGHT,"right"],[lt.Msg.MIXLY_MICROBIT_face_up,"face up"],[lt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=lt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=lt.Msg.MSG.catSensor,s=lt.Msg.MIXLY_MICROBIT_JS_STATE,_=lt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:lt.Msg.MIXLY_MICROBIT_shake,up:lt.Msg.MIXLY_UP,down:lt.Msg.MIXLY_DOWN,left:lt.Msg.MIXLY_LEFT,right:lt.Msg.MIXLY_RIGHT,"face up":lt.Msg.MIXLY_MICROBIT_face_up,"face down":lt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},$E={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new lt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},tO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_GET+lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},eO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+lt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},iO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},nO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_GETTEMPERATUE)}},sO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[lt.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 lt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},_O={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},oO={init:function(){this.setColour(AE),this.appendValueInput("SPISUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new lt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},pO={init:function(){this.setColour(AE),this.appendDummyInput().appendField("RFID"+lt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[lt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},aO={init:function(){this.setColour(AE),this.appendDummyInput().appendField("RFID"+lt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},uO={init:function(){this.setColour(AE),this.appendDummyInput().appendField("RFID"+lt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},rO={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(lt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},lO={init:function(){this.setColour(AE),this.appendDummyInput().appendField(lt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(lt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(lt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},dO={init:function(){this.setColour(AE),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_RFID_SCAN_OK,"0"],[lt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[lt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},IO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.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)")}},TO={init:function(){this.setColour(AE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},MO={init:function(){this.setColour(AE),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)}},hO={init:function(){this.setColour(AE),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 lt.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_zero"].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},nN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},sN=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"},_N=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},oN=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"},pN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},aN=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"},uN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},rN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},lN=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]},dN=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"},IN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},TN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},MN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},hN=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]},mN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EN=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"},ON=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"},RN=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"},cN=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"}},gN=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"},CN=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},SN=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]},AN=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"},LN=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},NN=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"}},DN=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"}},fN=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"},FN=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"},PN=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},vN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},YN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},xN=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"},XN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},bN=function(t,e){e.definitions_.import_st7789="import st7789";var i=dt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_zero"].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"},yN=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},VN=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]},BN=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},GN=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},UN=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},wN=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},kN=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},HN=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"},WN=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"},KN=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"},JN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},QN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},qN=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),_=dt.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},zN=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"},jN=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"},ZN=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"},$N=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"},tD=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"},eD=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"},iD=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"},nD=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"},sD=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"},_D=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"},oD=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]},pD=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"},aD=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"},uD=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"},rD=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"},lD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},dD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},ID=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},TD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},MD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},hD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},mD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},ED=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},OD=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},jD=function(t,e){var i=dt.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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},ZD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},$D=function(t,e){var i=dt.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},tf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},ef=function(t,e){var i=dt.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},nf=function(t,e){var i=dt.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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},sf=function(t,e){var i=dt.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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},_f=function(t,e){var i=dt.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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},of=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},pf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},af=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},uf=function(t,e){var i=dt.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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},rf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},lf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},df=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},If=function(t,e){var i=dt.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},Tf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Mf=function(t,e){var i=dt.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"},hf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},mf=function(t,e){var i=dt.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 _},Ef=function(t,e){var i=dt.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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},Of=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},Rf=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},cf=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},gf=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},Cx=function(){return"control.reset()\n"},Sx=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||dt.Profile.default.serial)+")\n"},Ax=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||dt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||dt.Profile.default.serial)+")\n"},Lx=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||dt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||dt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},Nx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},Dx=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},fx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Fx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Px=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},vx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},Yx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},xx=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]}},Xx=function(){return"while True:\n pass\n"},bx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},yx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},Vx=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"}},Bx=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"}},Gx=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"},Ux=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"},wx=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]},kx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},Hx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},Wx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Kx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Jx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},Qx=kx,qx=Ux,zx=wx,jx=Vx,Zx=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]},$x=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]},tX=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]},eX=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"},iX=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]},nX=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]},sX=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]},_X=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]},oX=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]},pX=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]},aX=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"},uX=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]},rX=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]},lX=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]},dX=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]},IX={};IX["MixGo(ESP32, 4M)"]={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"]],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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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"]]},IX["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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-7"]),exlcdv:dt.Profile.generate(["0-4"]),brightness:dt.Profile.generate(["0-9"]),tts_voice:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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"]]},IX["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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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"]]},IX.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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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 TX=IX,MX=230,hX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.digital),"PIN"),this.setOutput(!0)}},mX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},EX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},OX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},RX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},cX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},gX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},CX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},SX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},AX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},LX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},NX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},DX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},fX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},FX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},PX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},vX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},YX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog),"PIN"),this.setOutput(!0)}},xX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},XX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.dac),"PIN"),this.setOutput(!0)}},bX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},yX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},VX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},BX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},GX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},UX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.touch),"PIN"),this.setOutput(!0)}},wX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},kX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},HX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},WX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},KX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},JX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},QX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},qX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},zX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},jX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},ZX={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},$X={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},tb={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},eb={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},sb={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},_b={init:function(){this.setColour(MX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},ob=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},pb=ob,ab=ob,ub=ob,rb=ob,lb=ob,db=ob,Ib=ob,Tb=ob,Mb=ob,hb=ob,mb=ob,Eb=ob,Ob=ob,Rb=ob,cb=ob,gb=ob,Cb=ob,Sb=ob,Ab=ob,Lb=ob,Nb=ob,Db=ob,fb=ob,Fb=ob,Pb=ob,vb=ob,Yb=ob,xb=ob,Xb=ob,bb=ob,yb=ob,Vb=ob,Bb=ob,Gb=ob;Object.assign(lt.Variables,Tt),Object.assign(lt.Procedures,wn),lt.Python=ou,lt.generator=ou,dt.Profile.default={},Object.assign(dt.Profile,TX),Object.assign(dt.Profile.default,TX["ESP32 Generic"]),Object.assign(lt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,b,k,w,v,y,H,f,U,G,B,V,F,D,N,x,Y,X,P,ut),Object.assign(lt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,tt,pt,ot,z,et,at,J,_t,st,nt,it,Q,K,W,Z,j,$,q,rt)})(); \ No newline at end of file +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(lt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(lt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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(lt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(lt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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(lt.inputs.Align.RIGHT).appendField(lt.Msg.PYTHON_RANGE).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Xt={init:function(){this.setColour(Dt),this.appendValueInput("LIST").setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(lt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return lt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},bt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new lt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(lt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:lt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:lt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},yt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(lt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new lt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(lt.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(lt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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(lt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(lt.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 lt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:lt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:lt.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(lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Bt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new lt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return lt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new lt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return lt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};bt.OPERATORS=[[lt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[lt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Vt.OPERATORS=[[lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[lt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Ut={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(lt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},wt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(lt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Ht={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(lt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(lt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(lt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Jt={init:function(){this.jsonInit({message0:lt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Dt,tooltip:lt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:lt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Qt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_STAT),this.setOutput(!0)}},qt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(lt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},jt={init:function(){this.appendDummyInput().appendField(lt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+lt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(lt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new lt.FieldDropdown([[lt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[lt.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("")}},Zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$t={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},te={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ee={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ie={init:function(){this.setColour(Dt),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(lt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ne=230;lt.FieldTextInput.math_number_validator=function(t){return String(t)},lt.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 se={init:function(){this.setColour(ne),this.appendDummyInput().appendField(new lt.FieldTextInput("0",lt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MATH_NUMBER_TOOLTIP)}},_e={init:function(){this.setColour(ne);this.appendDummyInput("").appendField(lt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new lt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},oe={init:function(){this.setColour(ne);this.appendDummyInput("").appendField(lt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new lt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:lt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},pe={init:function(){this.setColour(ne),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.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:lt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:lt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:lt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ae={init:function(){this.setColour(ne),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.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:lt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:lt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:lt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:lt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:lt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ue={init:function(){this.setColour(ne),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new lt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},re={init:function(){this.setColour(ne),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new lt.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:lt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:lt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:lt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:lt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:lt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:lt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:lt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},le={init:function(){var t=[[lt.Msg.MATH_BIN,"bin"],[lt.Msg.MATH_OCT,"oct"],[lt.Msg.MATH_HEX,"hex"]];this.setColour(ne),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new lt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:lt.Msg.MATH_DEC_TOOLTIP_BIN,oct:lt.Msg.MATH_DEC_TOOLTIP_OCT,hex:lt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},de={init:function(){var t=[[lt.Msg.LANG_MATH_TO_ROUND,"round"],[lt.Msg.LANG_MATH_TO_CEIL,"ceil"],[lt.Msg.LANG_MATH_TO_FLOOR,"floor"],[lt.Msg.MATH_ABS,"fabs"],[lt.Msg.MATH_SQRT,"sqrt"]];this.setColour(ne),this.appendValueInput("A").setCheck(Number).appendField(new lt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:lt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:lt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:lt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:lt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:lt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:lt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Ie={init:function(){var t=[[lt.Msg.MIXLY_MAX,"max"],[lt.Msg.MIXLY_MIN,"min"]];this.setColour(ne),this.appendValueInput("A").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(lt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:lt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:lt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Te={init:function(){var t=[[lt.Msg.MATH_TWO,"two"],[lt.Msg.MATH_EIGHT,"eight"],[lt.Msg.MATH_TEN,"ten"],[lt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(ne),this.appendDummyInput("").appendField(lt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new lt.FieldDropdown(t),"OP").appendField(lt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MATH_ZHW).appendField(new lt.FieldDropdown(t),"OP2").appendField(lt.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:lt.Msg.MATH_Before_two,eight:lt.Msg.MATH_Before_eight,ten:lt.Msg.MATH_Before_ten,sixteen:lt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:lt.Msg.MATH_Behind_two,eight:lt.Msg.MATH_Behind_eight,ten:lt.Msg.MATH_Behind_ten,sixteen:lt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Me={init:function(){var t=[[lt.Msg.LANG_MATH_INT,"int"],[lt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ne),this.setOutput(!0,Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new lt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(lt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:lt.Msg.LANG_MATH_INT,float:lt.Msg.LANG_MATH_FLOAT_RANDOM};return lt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},he={init:function(){this.setColour(ne),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(lt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(lt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(lt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(lt.Msg.MATH_CONSTRAIN_TOOLTIP)}},me={init:function(){this.setColour(ne),this.appendValueInput("NUM",Number).appendField(lt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(lt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(lt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ee={init:function(){this.setColour(ne),this.appendDummyInput().appendField(new lt.FieldTextInput("0",lt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(lt.Msg.MATH_NUMBER_TOOLTIP)}},Oe={init:function(){this.setColour(ne),this.appendValueInput("NUM").setCheck(Number).appendField(lt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Re={init:function(){this.setColour(ne),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(lt.Msg.MATH_ROUND).appendField(lt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(lt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(lt.Msg.MATH_ROUND_NEW_TOOLTIP)}},ce={init:function(){var t=[[lt.Msg.MIXLY_TO_INT,"int"],[lt.Msg.MIXLY_TO_FLOAT,"float"],[lt.Msg.MIXLY_TO_BITES,"b"],[lt.Msg.LANG_MATH_BYTE+lt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(ne),this.appendValueInput("VAR").appendField(new lt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:lt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:lt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:lt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ge={init:function(){var t=[[lt.Msg.MIXLY_TO_INT,"int"],[lt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ne),this.appendValueInput("VAR").appendField(new lt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:lt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:lt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Ce=me,Se={init:function(){this.setColour(ne),this.appendValueInput("VAR").appendField(lt.Msg.LANG_MATH_BYTE+lt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Ae=160,Le={init:function(){this.setColour(Ae),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new lt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(lt.Msg.TEXT_TEXT_TOOLTIP)},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 lt.FieldImage(e,12,12,'"')}},Ne={init:function(){this.setColour(Ae),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new lt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(lt.Msg.TEXT_LINES_TOOLTIP)},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 lt.FieldImage(e,12,12,'"')}};lt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 De={init:function(){this.setColour(Ae),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new lt.FieldTextInput("",lt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(lt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new lt.FieldImage(e,7,12,'"')}},fe={init:function(){this.setColour(Ae),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(lt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Fe={init:function(){this.setColour(Ae),this.appendValueInput("VAR").setCheck(Number).appendField(lt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Pe={init:function(){this.setColour(Ae),this.appendValueInput("VAR").setCheck(String).appendField(lt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},ve={init:function(){this.setColour(Ae),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ye={init:function(){this.setColour(Ae),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},xe={init:function(){this.WHERE_OPTIONS=[[lt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[lt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[lt.Msg.TEXT_GET_INDEX_RANDOM+1+lt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(lt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ae),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(lt.Msg.LISTS_GET_INDEX_GET,"MODE"),lt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(lt.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=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=lt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+lt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",lt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:lt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:lt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:lt.Msg.TEXT_GET_INDEX_RANDOM};return lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+lt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==lt.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),lt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(lt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new lt.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"),lt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Xe={init:function(){this.setHelpUrl(lt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ae),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(lt.Msg.LISTS_GET_INDEX_GET+" "+lt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(lt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_MICROBIT_TYPE_STRING+lt.Msg.LISTS_GET_INDEX_FROM_START+"n"+lt.Msg.TEXT_CHARAT2)}},be={init:function(){this.setHelpUrl(lt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ae),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(lt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(lt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ye={init:function(){this.WHERE_OPTIONS_1=[[lt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[lt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[lt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[lt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[lt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[lt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(lt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ae),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(lt.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(lt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==lt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==lt.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),lt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(lt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new lt.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"))}},Ve={init:function(){this.setHelpUrl(lt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ae),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(lt.Msg.LISTS_GET_INDEX_GET+" "+lt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(lt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(lt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(lt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Be={init:function(){var t=[[lt.Msg.MIXLY_EQUALS,"==="],[lt.Msg.MIXLY_STARTSWITH,"startswith"],[lt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ae),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new lt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ge={init:function(){this.setColour(Ae),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(lt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_COMPARETO_HELP)}},Ue={init:function(){var t=[[lt.Msg.TEXT_UPPER,"upper"],[lt.Msg.TEXT_TITLE,"title"],[lt.Msg.TEXT_CAPITALIZE,"capitalize"],[lt.Msg.TEXT_SWAPCASE,"swapcase"],[lt.Msg.TEXT_LOWER,"lower"]];this.setColour(Ae),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new lt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:lt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:lt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:lt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:lt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:lt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},we={init:function(){var t=[[lt.Msg.TEXT_LJUST,"ljust"],[lt.Msg.TEXT_CENTER,"center"],[lt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ae),this.appendValueInput("VAR").appendField(new lt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(lt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(lt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ke={init:function(){this.setColour(Ae),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(lt.Msg.MIXLY_MID+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(lt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},He={init:function(){this.setColour(Ae),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},We={init:function(){this.setColour(Ae),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(lt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(lt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Ke={init:function(){this.setColour(Ae),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(lt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(lt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(lt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Je={init:function(){var t=[[lt.Msg.TEXT_TRIM_BOTH,"strip"],[lt.Msg.TEXT_TRIM_LEFT,"lstrip"],[lt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ae),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(lt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new lt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(lt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:lt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:lt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:lt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Qe={init:function(){this.setColour(Ae),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new lt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new lt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(lt.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){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ki={init:function(){this.setColour(Ui),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Hi={init:function(){this.setColour(Ui),this.appendDummyInput().appendField(lt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Wi={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_KEYS),this.setTooltip(lt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Ki={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(lt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(lt.Msg.DICTS_GET_TOOLTIP)}},Ji={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(lt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(lt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(lt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Qi={init:function(){this.setColour(Ui),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(lt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},qi={init:function(){this.setColour(Ui),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(lt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_DELETE_TOOLTIP)}},zi={init:function(){this.setColour(Ui),this.appendValueInput("DICT2").setCheck("Dict").appendField(lt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(lt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MID),this.setTooltip(lt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ji={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_CLEAR),this.setTooltip(lt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zi={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_ITEMS),this.setTooltip(lt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},$i={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_VALUES),this.setTooltip(lt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},tn={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_LENGTH),this.setTooltip(lt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},en={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.DICT_DELDICT),this.setTooltip(lt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nn={init:function(){this.MODE=[[lt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[lt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(lt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(lt.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=lt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=lt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==lt.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 lt.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")}},sn={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(lt.Msg.DICTS_ADD_VALUE),this.setTooltip(lt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},_n={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(lt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(lt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},on={init:function(){this.setColour(Ui),this.appendDummyInput("").appendField(new lt.FieldLabel(lt.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 lt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(lt.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){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},pn={init:function(){this.setColour(Ui),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},an={init:function(){this.setColour(Ui),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_TO_JSON),this.setTooltip(lt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},un={init:function(){this.setColour(Ui),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(lt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},rn=210,ln={init:function(){var t=lt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(rn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:lt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:lt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:lt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:lt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:lt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:lt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},dn={init:function(){var t=lt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=lt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(rn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new lt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},In={init:function(){var t=[[lt.Msg.LOGIC_OPERATION_AND,"AND"],[lt.Msg.LOGIC_OPERATION_OR,"OR"],[lt.Msg.LOGIC_OPERATION_NOR,"NOR"],[lt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(rn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new lt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:lt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:lt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:lt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:lt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Tn={init:function(){this.setColour(rn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(lt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(lt.Msg.LOGIC_NEGATE_TOOLTIP)}},Mn={init:function(){var t=[[lt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[lt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(rn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new lt.FieldDropdown(t),"BOOL"),this.setTooltip(lt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},hn={init:function(){this.setColour(rn),this.setOutput(!0),this.appendDummyInput().appendField(lt.Msg.LOGIC_NULL),this.setTooltip(lt.Msg.LOGIC_NULL_TOOLTIP)}},mn={init:function(){this.setColour(rn),this.appendValueInput("A"),this.appendValueInput("B").appendField(lt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(lt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},En={init:function(){var t=[[lt.Msg.TEXT_APPEND_TO,"in"],[lt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(rn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new lt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(lt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.IN)}},On={init:function(){var t=[[lt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[lt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(rn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new lt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Rn={init:function(){this.setColour(rn),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(lt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},cn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(lt.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(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(lt.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=lt.Msg.MIXLY_USE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=lt.Msg.MIXLY_BELONG;return i+{r:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Cn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[lt.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=lt.Msg.MIXLY_USE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=lt.Msg.MIXLY_BELONG,o=lt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(lt.Msg.MIXPY_TEXT_ENCODE).appendField(new lt.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=lt.Msg.MIXLY_USE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=lt.Msg.MIXLY_BELONG,o=lt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},An={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+lt.Msg.MIXLY_MICROBIT_TYPE_STRING+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Nn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(lt.Msg.MICROBIT_PYTHON_TYPE)}},fn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.HTML_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},vn={init:function(){this.setColour(0),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};lt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Yn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[lt.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(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},yn={init:function(){this.setColour(0),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Vn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[lt.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 lt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+lt.Msg.MIXLY_ESP32_SET+{mkdir:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(lt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.HTML_FILE,"isfile"],[lt.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 lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+lt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},wn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(lt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},kn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(lt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Hn={};Hn.NAME_TYPE=lt.PROCEDURE_CATEGORY_NAME,Hn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(lt.Msg.MIXLY_AIP_ATTR).setAlign(lt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bs={init:function(){this.setColour(Ys),this.appendDummyInput().appendField(lt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Gs={init:function(){this.setColour(Ys),this.appendDummyInput().appendField(lt.Msg.HTML_FORM_CONTENT).appendField(new lt.FieldDropdown([[lt.Msg.HTML_TEXT,"text"],[lt.Msg.HTML_EMAIL,"email"],[lt.Msg.HTML_NUMBER,"number"],[lt.Msg.HTML_PASSWORD,"password"],[lt.Msg.HTML_CHECKBOX,"checkbox"],[lt.Msg.HTML_RADIOBUTTON,"radiobutton"],[lt.Msg.HTML_BUTTON,"button"],[lt.Msg.HTML_COLOUR,"colour"],[lt.Msg.HTML_DATE,"date"],[lt.Msg.HTML_LOCALTIME,"local time"],[lt.Msg.HTML_FILE,"file"],[lt.Msg.HTML_HIDDEN,"hidden"],[lt.Msg.HTML_IMAGE,"image"],[lt.Msg.HTML_MONTH,"month"],[lt.Msg.HTML_RANGE,"range"],[lt.Msg.HTML_RESET,"reset"],[lt.Msg.HTML_SEARCH,"search"],[lt.Msg.HTML_SUBMIT,"submit"],[lt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[lt.Msg.HTML_TIME,"time"],[lt.Msg.HTML_URL,"url"],[lt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(lt.Msg.HTML_NAME).appendField(new lt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(lt.Msg.HTML_VALUE).appendField(new lt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(lt.Msg.MIXLY_AIP_ATTR).setAlign(lt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Us={init:function(){this.setColour(Ys),this.appendDummyInput().appendField(new lt.FieldTextInput("property"),"KEY").appendField(":").appendField(new lt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Ys),this.appendDummyInput().appendField(new lt.FieldTextInput("property"),"KEY").appendField(":").appendField(new lt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(Ys),this.appendDummyInput().appendField(lt.Msg.HTML_TEXT).appendField(new lt.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 lt.FieldTable(""),"TEXT")}},Ks={init:function(){this.setColour(Hs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new lt.FieldMultilineInput(""),"TEXT")}},Js={init:function(){this.setColour(Hs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new lt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Qs={init:function(){this.setColour(Hs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},qs={init:function(){this.setColour(Hs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new lt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},zs={init:function(){this.setColour(Hs),this.appendValueInput("VALUE").appendField(lt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},js={init:function(){this.setColour(Hs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new lt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(lt.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=lt.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+")"},lt.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 Bp=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]},Gp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Up=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},wp=function(t,e){return["None",e.ORDER_ATOMIC]},kp=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]},Hp=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]},Wp=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]},Kp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Jp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Qp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},qp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},zp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},jp=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Zp=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},$p=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]},ta=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ea=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]},na=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]},_a=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]},pa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},aa=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"},ua=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ra=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},la=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},da=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"},Ia=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]},Ta=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"},Ma=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"},ha=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),lt.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]},za=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},ja=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},Za=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},$a=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]},eu=function(t,e){return'"},iu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},nu=function(){return this.getFieldValue("TEXT")+"\n"},su=function(t){return t.getFieldValue("TEXT")+"\n"},_u=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},ou=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},pu=function(){return""},au=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},uu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},lu.scrubNakedValue=function(t){return t+"\n"},lu.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},lu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=lt.utils.string.wrap(_,lu.COMMENT_WRAP-3),n+=lu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const du="#74A55B",Iu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(lt.Msg.MIXLY_RGB_PIN_COUNT)}},Tu={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Mu={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},hu={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},mu={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(lt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(lt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(lt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Eu={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Ou={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Ru={init:function(){this.setColour(du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},gu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Cu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Su={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Au={init:function(){this.setColour(du),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lu={init:function(){this.setColour(du),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Nu={init:function(){this.setColour(du),this.appendValueInput("VAR").appendField("360°"+lt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SETTING+lt.Msg.blockpy_turtle_rotate+lt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},Du={init:function(){this.setColour(du),this.appendValueInput("PIN",Number).appendField("180°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_MOVE)}},fu={init:function(){this.setColour(du),this.appendValueInput("PIN",Number).appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Fu={init:function(){this.setColour(du),this.appendValueInput("PIN",Number).appendField("180°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pu={init:function(){this.setColour(du),this.appendValueInput("PIN",Number).appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},vu={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new lt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(lt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},Yu={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[lt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[lt.Msg.MOTOR_N,"ms32006.MOT_N"],[lt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},xu={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new lt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[lt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},Xu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(lt.Msg.MIXLY_RGB_PIN_COUNT)}},bu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},yu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Vu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_WRI)}},Bu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new lt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO+"SYN6288"+lt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Gu={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(lt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Uu={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},wu={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(lt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(lt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},ku={init:function(){this.setColour(du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(lt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(lt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(lt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Hu={init:function(){this.setColour(du),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Wu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Ku={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ju={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.LISTS_SET_INDEX_SET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[lt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_WHITE,"W"],[lt.Msg.COLOUR_RGB_RED,"R"],[lt.Msg.COLOUR_RGB_YELLOW,"Y"],[lt.Msg.COLOUR_RGB_GREEN,"G"],[lt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_WHITE,"W"],[lt.Msg.COLOUR_RGB_RED,"R"],[lt.Msg.COLOUR_RGB_YELLOW,"Y"],[lt.Msg.COLOUR_RGB_GREEN,"G"],[lt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},zu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[lt.Msg.MIXLY_SPEED,"[1]"],[lt.Msg.MATH_SINGLE_OP_ABSOLUTE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[lt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[lt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[lt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ju={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[lt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[lt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$u={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MATH_SINGLE_OP_ABSOLUTE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MODE).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPEED+lt.Msg.MIXLY_MODE,"0"],[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+lt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"0"],[lt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[lt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},tr={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},er={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField("("+lt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MODE).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPEED+lt.Msg.MIXLY_MODE,"0"],[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+lt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},ir={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.ME_GO_MOTOR_EXTERN+lt.Msg.MIXLY_SERVO_MOTOR).appendField(lt.Msg.MIXLY_RELATIVE+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+lt.Msg.MSG.run).appendField("("+lt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LEFT,"0"],[lt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MODE).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPEED+lt.Msg.MIXLY_MODE,"0"],[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+lt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(lt.inputs.Align.RIGHT).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"0"],[lt.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(lt.Msg.MIXBOT).appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MOTOR,"ext_motor"],[lt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[lt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[lt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[lt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[lt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[lt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[lt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},sr={init:function(){this.setColour(du),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(lt.Msg.ME_GO_MOTOR_EXTERN).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MOTOR,"ext_motor"],[lt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[lt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[lt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[lt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[lt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[lt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[lt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},_r="#6C9858",or={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(new lt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},pr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_ON,"1"],[lt.Msg.MIXLY_ESP32_OFF,"0"],[lt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},ar={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},ur={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(lt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},rr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},lr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SETTING+lt.Msg.MIXLY_BUILDIN_LED+lt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},dr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(lt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(lt.Msg.MIXLY_LCD_SETCOLOR).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_LIGHT_RED,"1"],[lt.Msg.MIXLY_LIGHT_GREEN,"2"],[lt.Msg.MIXLY_LIGHT_BLUE,"3"],[lt.Msg.MIXLY_LIGHT_YELLOW,"4"],[lt.Msg.MIXLY_LIGHT_CYAN,"5"],[lt.Msg.MIXLY_LIGHT_PURPLE,"6"],[lt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Ir={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Tr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(lt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Mr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(lt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},hr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_SETTING).appendField(lt.Msg.MIXLY_BUILDIN_LED).appendField(new lt.FieldDropdown([[lt.Msg.COLOUR_RGB_RED,"r"],[lt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SETTING+lt.Msg.MIXLY_BUILDIN_LED+lt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},mr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(new lt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Er={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(dt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Or={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Rr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.MIXLY_DURATION).appendField(lt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},cr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(lt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.PYTHON_RANGE_STEP).appendField(lt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},gr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_WRI)}},Cr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(dt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(lt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Sr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(lt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Ar={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(lt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.PYTHON_RANGE_STEP).appendField(lt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Lr={init:function(){this.setColour(_r),this.appendValueInput("TICKS").setCheck(Number).appendField(lt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(lt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(lt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Nr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Dr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_RESET)}},fr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Fr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(lt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Pr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vr={init:function(){this.setColour(_r),this.appendValueInput("LIST").appendField(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Yr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MOTOR_DC).appendField(new lt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"],[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(_r),this.appendDummyInput().appendField("MixGo Car").appendField(new lt.FieldDropdown([[lt.Msg.blockpy_forward,"F"],[lt.Msg.blockpy_backward,"B"],[lt.Msg.blockpy_left,"L"],[lt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(_r),this.appendDummyInput("").appendField("MixGo Car").appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},br={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MOTOR_DC).appendField(new lt.FieldDropdown([[lt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[lt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MOTOR_DC).appendField(new lt.FieldDropdown([[lt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[lt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_STOP).appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Br={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(new lt.FieldDropdown([[lt.Msg.blockpy_forward,"F"],[lt.Msg.blockpy_backward,"B"],[lt.Msg.blockpy_left,"L"],[lt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[lt.Msg.MIXLY_SPEED,"SPEED"],[lt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Gr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ur={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXBOT).appendField(lt.Msg.MIXLY_MOTOR).appendField(new lt.FieldDropdown([[lt.Msg.TEXT_TRIM_LEFT,"1"],[lt.Msg.TEXT_TRIM_RIGHT,"2"],[lt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[lt.Msg.MIXLY_SPEED,"SPEED"],[lt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},wr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[lt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},kr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.BITBOT).appendField(new lt.FieldDropdown([[lt.Msg.blockpy_forward,"F"],[lt.Msg.blockpy_backward,"B"],[lt.Msg.blockpy_left,"L"],[lt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Hr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.BITBOT).appendField(new lt.FieldDropdown([[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.BITBOT).appendField(lt.Msg.MIXLY_MOTOR).appendField(new lt.FieldDropdown([[lt.Msg.TEXT_TRIM_LEFT,"0"],[lt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"],[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Kr={init:function(){this.setColour(_r),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Jr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Qr={init:function(){this.setColour(_r),this.appendValueInput("bright").appendField(lt.Msg.MIXLY_SETTING+lt.Msg.MIXLY_MIXBOT_BUZZER+lt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_SETONOFF)}},qr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_MIXBOT_BUZZER+lt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_LED_GETONOFF)}},zr={init:function(){this.setColour(_r),this.appendValueInput("PATH").appendField(lt.Msg.MIXLY_RECORD_AUDIO).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(lt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},jr={init:function(){this.setColour(_r),this.appendValueInput("PATH").appendField(lt.Msg.MIXLY_PLAY_AUDIO).appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Zr={init:function(){this.setColour(_r),this.appendValueInput("PATH").appendField(lt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},$r={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(lt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},tl={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},el={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.LISTS_SET_INDEX_SET+lt.Msg.ME_GO_MOTOR_EXTERN).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.blynk_IOT_IR_POWER+lt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},il={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.ME_GO_MOTOR_EXTERN).appendField(lt.Msg.PIN_NUMBERING).appendField(new lt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.blynk_IOT_IR_POWER+lt.Msg.MIXLY_PINMODEOUT+lt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},nl={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.LISTS_SET_INDEX_SET+lt.Msg.ME_GO_MOTOR_EXTERN).appendField(lt.Msg.MIXLY_ALL+lt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(lt.ALIGN_RIGHT).appendField(lt.Msg.blynk_IOT_IR_POWER+lt.Msg.MIXLY_PINMODEOUT+lt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},sl={init:function(){this.setColour(_r),this.appendDummyInput().appendField(lt.Msg.ANALOG+lt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(lt.Msg.MIXLY_RELEASE).appendField(new lt.FieldDropdown([[lt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[lt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.ANALOG+lt.Msg.MIXLY_KEYBOARD_INPUT)}},_l={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SPECIAL_KEY).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[lt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[lt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[lt.Msg.MIXLY_SPECIAL_KEY1,"0x04"],[lt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[lt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[lt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[lt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[lt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},ol={init:function(){this.setColour(_r),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GENERAL_KEY).appendField(new lt.FieldDropdown([[lt.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)}},pl={init:function(){this.setColour(_r),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new lt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(lt.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;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},hm={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},mm={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Em={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Om={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(lt.Msg.MIXLY_EMQX_SERVER).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(lt.Msg.MIXLY_WIFI_USERNAME).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(lt.Msg.MIXLY_IOT_PASSWORD).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(lt.Msg.MIXLY_EMQX_PROJECT).setAlign(lt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(lt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(lt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(lt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},cm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(lt.Msg.MIXLY_EMQX_SUBSCRIBE+lt.Msg.MIXLY_MICROBIT_MSG).appendField(lt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(lt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},gm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Am={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(lt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Lm={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(lt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Nm={init:function(){this.setColour(um),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},Dm={init:function(){this.setColour(um),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},fm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(lt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Fm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO").appendField(lt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(lt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},Pm={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(lt.Msg.MIXLY_EMQX_SERVER).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+lt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(lt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vm={init:function(){this.setColour(um),this.appendDummyInput().appendField(lt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(lt.Msg.MIXLY_EMQX_SERVER).setAlign(lt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(lt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ym={init:function(){this.VISITOR_ID=dt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(um),this.appendDummyInput("").appendField(new lt.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")}},xm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MixIO").appendField(lt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Xm={init:function(){this.setColour(um),this.appendDummyInput().appendField("HTTP"+lt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(lt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(lt.Msg.MIXLY_REQUESTS_GET).appendField(lt.Msg.MIXLY_GET_CURRENT_TIME).appendField(lt.Msg.MIXLY_OPEN_DEBUG).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bm={init:function(){this.setColour(um),this.appendDummyInput().appendField("HTTP"+lt.Msg.MIXLY_Client).appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[lt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[lt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},ym={init:function(){this.setColour(um),this.appendDummyInput().appendField("MQTT"+lt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(lt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(lt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(lt.Msg.MQTT_Topic).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(lt.Msg.MIXLY_OPEN_DEBUG).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[lt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vm={init:function(){this.setColour(um),this.appendDummyInput().appendField("MQTT"+lt.Msg.MIXLY_Client).appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[lt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[lt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},Bm=rm,Gm=lm,Um=dm,wm=Im,km=Mm,Hm=225,Wm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(lt.Msg.MIXLY_NETWORK_MODE).appendField(new lt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},Km={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[lt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(lt.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=lt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:lt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:lt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},Jm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},Qm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return lt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:lt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},qm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(lt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(lt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},zm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_NETWORK_WIFI_CONNECT+lt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},jm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[lt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[lt.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 lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:lt.Msg.MIXLY_ESP32_NETWORK_IP,1:lt.Msg.MIXLY_ESP32_NETWORK_MASK,2:lt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},Zm={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},$m={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[lt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},tE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(lt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(lt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},eE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(lt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},iE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new lt.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 lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},nE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},sE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},_E={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},oE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},pE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},aE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},uE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},rE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},lE={init:function(){this.setColour(Hm),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},dE={init:function(){this.setColour(Hm),this.appendValueInput("DOMAIN").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(lt.Msg.blockpy_REQUESTS_GET).appendField(new lt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){lt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},IE={init:function(){this.appendValueInput("VAL");var t=[[lt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]];this.setColour(Hm),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:lt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:lt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:lt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},TE={init:function(){this.appendValueInput("VAR").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(Hm),this.appendDummyInput("").appendField(lt.Msg.blockpy_CONDUCT).appendField(new lt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(lt.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:lt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:lt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},ME={init:function(){this.setColour(Hm),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(lt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},hE={init:function(){this.setColour(Hm),this.appendDummyInput("").appendField(new lt.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)}},mE="#3288dd",EE={init:function(){this.setColour(mE),this.appendValueInput("URL").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(lt.Msg.blockpy_CONDUCT).appendField(new lt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(lt.Msg.blockpy_REQUESTS).appendField(lt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},OE={init:function(){this.setColour(mE),this.appendValueInput("URL").appendField(lt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(lt.Msg.blockpy_CONDUCT).appendField(new lt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(lt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(lt.Msg.blockpy_REQUESTS+lt.Msg.OLED_STRING),this.appendDummyInput("").appendField(lt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},RE={init:function(){this.appendValueInput("VAL");var t=[[lt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[lt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[lt.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(mE),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},cE=100,gE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("I2CSUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},CE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},SE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(lt.Msg.MOTOR_DC).appendField(lt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Direction).appendField(new lt.FieldDropdown([[lt.Msg.CLOCKWISE,"CW"],[lt.Msg.ANTI_CLOCKWISE,"CCW"],[lt.Msg.MOTOR_P,"P"],[lt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},AE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(lt.Msg.MOTOR_DC).appendField(lt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(lt.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},LE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_MOVE)}},NE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(lt.inputs.Align.RIGHT).appendField(lt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},DE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+lt.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},fE={init:function(){var t=dt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(cE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+lt.Msg.MIXLY_SERVO).appendField(lt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET+lt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},FE="#A58C5B",PE={init:function(){this.setColour(FE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(lt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SENOR_IS_PRESSED)}},vE={init:function(){this.setColour(FE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(lt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_SENOR_WAS_PRESSED)}},YE={init:function(){this.setColour(FE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(lt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.PROCEDURES_DEFRETURN_RETURN+lt.Msg.MIXLY_BUTTON+lt.Msg.MIXLY_GET_PRESSES)}},xE={init:function(){this.setColour(FE),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_BUTTON).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MODE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[lt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[lt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},XE={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_shake,"shake"],[lt.Msg.MIXLY_UP,"up"],[lt.Msg.MIXLY_DOWN,"down"],[lt.Msg.MIXLY_LEFT,"left"],[lt.Msg.MIXLY_RIGHT,"right"],[lt.Msg.MIXLY_MICROBIT_face_up,"face up"],[lt.Msg.MIXLY_MICROBIT_face_down,"face down"],[lt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(lt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=lt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=lt.Msg.MSG.catSensor,s=lt.Msg.MIXLY_MICROBIT_JS_STATE,_=lt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:lt.Msg.MIXLY_MICROBIT_shake,up:lt.Msg.MIXLY_UP,down:lt.Msg.MIXLY_DOWN,left:lt.Msg.MIXLY_LEFT,right:lt.Msg.MIXLY_RIGHT,"face up":lt.Msg.MIXLY_MICROBIT_face_up,"face down":lt.Msg.MIXLY_MICROBIT_face_down,freefall:lt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},bE={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new lt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},yE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},VE={init:function(){var t=[[lt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[lt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(FE),this.appendValueInput("PIN",Number).appendField(new lt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new lt.FieldDropdown(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:lt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))}},BE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},GE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},UE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new lt.FieldDropdown([[lt.Msg.TEXT_TRIM_LEFT,"left"],[lt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(lt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=lt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=lt.Msg.MIXLY_ESP32_NEAR;return i+{left:lt.Msg.TEXT_TRIM_LEFT,right:lt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},wE={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[lt.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()":lt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":lt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},kE={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[lt.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()":lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},HE={init:function(){this.setColour(FE),this.appendValueInput("PIN",Number).appendField("DS18X20 "+lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},WE={init:function(){this.setColour(FE),this.appendDummyInput("").appendField("LM35"+lt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(lt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(lt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(lt.Msg.MIXLY_TOOLTIP_LM35)}},KE={init:function(){this.setColour(FE),this.appendValueInput("I2CSUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new lt.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},JE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[lt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[lt.Msg.MIXLY_ESP32_MAX30102_IR+","+lt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},QE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[lt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[lt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},qE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},zE={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.HTML_COLOUR+lt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GET+lt.Msg.HTML_COLOUR,"[2]"],[lt.Msg.MIXLY_GET+lt.Msg.MIXLY_IR_STRENGTH,"[1]"],[lt.Msg.MIXLY_GET+lt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},jE={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[lt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ZE={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},$E={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[lt.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:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},tO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[lt.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:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:lt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},eO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_Altitude+lt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_GETPRESSURE,"pressure()"],[lt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[lt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},iO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MIXGOPE_FIELD+lt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[lt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},nO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_shake,"shake"],[lt.Msg.MIXLY_UP,"up"],[lt.Msg.MIXLY_DOWN,"down"],[lt.Msg.MIXLY_LEFT,"left"],[lt.Msg.MIXLY_RIGHT,"right"],[lt.Msg.MIXLY_MICROBIT_face_up,"face up"],[lt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=lt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=lt.Msg.MSG.catSensor,s=lt.Msg.MIXLY_MICROBIT_JS_STATE,_=lt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:lt.Msg.MIXLY_MICROBIT_shake,up:lt.Msg.MIXLY_UP,down:lt.Msg.MIXLY_DOWN,left:lt.Msg.MIXLY_LEFT,right:lt.Msg.MIXLY_RIGHT,"face up":lt.Msg.MIXLY_MICROBIT_face_up,"face down":lt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},sO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new lt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},_O={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_GET+lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},oO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+lt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new lt.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=lt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=lt.Msg.MIXLY_MICROBIT_Direction,s=lt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":lt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},pO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},aO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_GETTEMPERATUE)}},uO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[lt.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 lt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:lt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:lt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},rO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(lt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(lt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},lO={init:function(){this.setColour(FE),this.appendValueInput("SPISUB").appendField(lt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(lt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SETUP+lt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new lt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},dO={init:function(){this.setColour(FE),this.appendDummyInput().appendField("RFID"+lt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[lt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},IO={init:function(){this.setColour(FE),this.appendDummyInput().appendField("RFID"+lt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},TO={init:function(){this.setColour(FE),this.appendDummyInput().appendField("RFID"+lt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},MO={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(lt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},hO={init:function(){this.setColour(FE),this.appendDummyInput().appendField(lt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(lt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(lt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(lt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},mO={init:function(){this.setColour(FE),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new lt.FieldDropdown([[lt.Msg.MIXLY_RFID_SCAN_OK,"0"],[lt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[lt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},EO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new lt.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)")}},OO={init:function(){this.setColour(FE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(lt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},RO={init:function(){this.setColour(FE),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)}},cO={init:function(){this.setColour(FE),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 lt.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_zero"].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},aN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uN=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"},rN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},lN=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"},dN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},IN=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"},TN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},MN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},hN=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]},mN=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"},EN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},ON=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},RN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},cN=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]},gN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},CN=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"},SN=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"},AN=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"},LN=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"}},NN=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"},DN=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},fN=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]},FN=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"},PN=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},vN=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"}},YN=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"}},xN=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"},XN=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"},bN=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},yN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},VN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},BN=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"},GN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},UN=function(t,e){e.definitions_.import_st7789="import st7789";var i=dt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_zero"].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"},wN=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},kN=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]},HN=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},WN=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},KN=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},JN=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},QN=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},qN=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"},zN=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"},jN=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"},ZN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},$N=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},tD=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),_=dt.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},eD=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"},iD=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"},nD=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"},sD=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"},_D=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"},oD=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"},pD=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"},aD=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"},uD=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"},rD=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"},lD=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]},dD=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"},ID=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"},TD=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"},MD=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"},hD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},mD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},ED=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},OD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},RD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},cD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},gD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},CD=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},SD=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},nf=function(t,e){var i=dt.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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},sf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},_f=function(t,e){var i=dt.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},of=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},pf=function(t,e){var i=dt.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},af=function(t,e){var i=dt.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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},uf=function(t,e){var i=dt.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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},rf=function(t,e){var i=dt.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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},lf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},df=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},If=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},Tf=function(t,e){var i=dt.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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},Mf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},hf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},mf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},Ef=function(t,e){var i=dt.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},Of=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Rf=function(t,e){var i=dt.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"},cf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},gf=function(t,e){var i=dt.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 _},Cf=function(t,e){var i=dt.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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},Sf=function(t,e){var i=dt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},Af=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Lf=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Nf=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},Dx=function(){return"control.reset()\n"},fx=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||dt.Profile.default.serial)+")\n"},Fx=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||dt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||dt.Profile.default.serial)+")\n"},Px=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||dt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||dt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},vx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},Yx=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},xx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Xx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},bx=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},yx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},Vx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Bx=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]}},Gx=function(){return"while True:\n pass\n"},Ux=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},wx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},kx=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"}},Hx=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"}},Wx=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"},Kx=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"},Jx=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]},Qx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},qx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},zx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},jx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Zx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},$x=Qx,tX=Kx,eX=Jx,iX=kx,nX=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]},sX=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]},_X=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]},oX=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"},pX=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]},aX=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]},uX=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]},rX=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]},lX=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]},dX=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]},IX=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"},TX=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]},MX=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]},hX=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]},mX=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]},EX={};EX["MixGo(ESP32, 4M)"]={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"]],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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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"]]},EX["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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-7"]),exlcdv:dt.Profile.generate(["0-4"]),brightness:dt.Profile.generate(["0-9"]),tts_voice:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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"]]},EX["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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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"]]},EX.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:dt.Profile.generate(["1-13"]),haskylens_model:dt.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:dt.Profile.generate(["0-16"]),tts_builtin_music:dt.Profile.generate(["0-47"]),tts_bgmusic:dt.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 OX=EX,RX=230,cX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.digital),"PIN"),this.setOutput(!0)}},gX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},CX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},SX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},AX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},LX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},NX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},DX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},fX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},FX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},PX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},vX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},YX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},xX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},XX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},bX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},yX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},VX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog),"PIN"),this.setOutput(!0)}},BX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},GX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.dac),"PIN"),this.setOutput(!0)}},UX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},wX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},kX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},HX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},WX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},KX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.touch),"PIN"),this.setOutput(!0)}},JX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},QX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},qX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},zX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},jX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},ZX={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},$X={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},tb={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},eb={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},sb={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},_b={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},ob={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},pb={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},ab={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},ub={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},rb={init:function(){this.setColour(RX),this.appendDummyInput("").appendField(new lt.FieldDropdown(dt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},lb=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},db=lb,Ib=lb,Tb=lb,Mb=lb,hb=lb,mb=lb,Eb=lb,Ob=lb,Rb=lb,cb=lb,gb=lb,Cb=lb,Sb=lb,Ab=lb,Lb=lb,Nb=lb,Db=lb,fb=lb,Fb=lb,Pb=lb,vb=lb,Yb=lb,xb=lb,Xb=lb,bb=lb,yb=lb,Vb=lb,Bb=lb,Gb=lb,Ub=lb,wb=lb,kb=lb,Hb=lb,Wb=lb;Object.assign(lt.Variables,Tt),Object.assign(lt.Procedures,Wn),lt.Python=lu,lt.generator=lu,dt.Profile.default={},Object.assign(dt.Profile,OX),Object.assign(dt.Profile.default,OX["ESP32 Generic"]),Object.assign(lt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,b,k,w,v,y,H,f,U,G,B,V,F,D,N,x,Y,X,P,ut),Object.assign(lt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,tt,pt,ot,z,et,at,J,_t,st,nt,it,Q,K,W,Z,j,$,q,rt)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32c2/main.bundle.js b/boards/default/micropython_esp32c2/main.bundle.js index 7b031abc..bc3c5a36 100644 --- a/boards/default/micropython_esp32c2/main.bundle.js +++ b/boards/default/micropython_esp32c2/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>xt,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:()=>$t,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:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>Ht,do_while:()=>_e,garbage_collection:()=>oe,get_mem_alloc:()=>pe,get_mem_free:()=>ae,get_unique_identifier:()=>ue});var n={};t.r(n),t.d(n,{base_map:()=>Fe,math_arithmetic:()=>Te,math_bit:()=>he,math_constant:()=>de,math_constant_mp:()=>Ie,math_constrain:()=>Ce,math_dec:()=>Oe,math_indexer_number:()=>Ae,math_map:()=>Se,math_max_min:()=>Re,math_number:()=>le,math_number_base_conversion:()=>ce,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>Ne,math_selfcalcu:()=>Me,math_to_int:()=>Ee,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:()=>be,char_to_ascii:()=>Ve,number_to_text:()=>Be,os_system:()=>ri,text:()=>Ye,text_capital:()=>qe,text_center:()=>ze,text_char:()=>xe,text_char_at:()=>we,text_char_at2:()=>Ue,text_char_at3:()=>oi,text_compareTo:()=>_i,text_compare_to:()=>Je,text_create_with_container:()=>ii,text_create_with_item:()=>ni,text_encode:()=>ai,text_equals_starts_ends:()=>Ke,text_eval:()=>ui,text_find:()=>Qe,text_format:()=>ei,text_format_noreturn:()=>pi,text_join:()=>ye,text_join_seq:()=>je,text_length:()=>Ge,text_random_char:()=>ke,text_replace:()=>Ze,text_split:()=>$e,text_strip:()=>ti,text_substring:()=>We,text_substring2:()=>He,text_substring3:()=>si,text_textarea:()=>Xe});var _={};t.r(_),t.d(_,{list_many_input:()=>Yi,list_tolist:()=>bi,list_tolist2:()=>Wi,list_trig:()=>Fi,lists_2d_get_col_row_data:()=>Mi,lists_2d_get_data_with_col_row:()=>Ti,lists_append_extend:()=>ci,lists_change_to:()=>vi,lists_change_to_general:()=>xi,lists_clear:()=>Li,lists_create_with:()=>hi,lists_create_with2:()=>Vi,lists_create_with_container:()=>Oi,lists_create_with_item:()=>Ei,lists_create_with_noreturn:()=>Xi,lists_create_with_text:()=>mi,lists_create_with_text2:()=>Bi,lists_del_general:()=>yi,lists_find:()=>fi,lists_getIndex3:()=>Gi,lists_getSublist3:()=>Ui,lists_get_index:()=>di,lists_get_random_item:()=>gi,lists_get_random_sublist:()=>Ci,lists_get_sublist:()=>Ii,lists_insert_value:()=>Si,lists_insert_value2:()=>ki,lists_pop:()=>Di,lists_remove_at:()=>Ni,lists_remove_at2:()=>Hi,lists_reverse:()=>Ai,lists_setIndex3:()=>wi,lists_set_index:()=>Ri,lists_sort:()=>Pi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>an,dicts_add_or_change:()=>$i,dicts_clear:()=>nn,dicts_create_with:()=>Ji,dicts_create_with_container:()=>qi,dicts_create_with_item:()=>zi,dicts_create_with_noreturn:()=>ln,dicts_deldict:()=>pn,dicts_delete:()=>tn,dicts_get:()=>ji,dicts_get_default:()=>Zi,dicts_items:()=>sn,dicts_keys:()=>Qi,dicts_length:()=>on,dicts_pop:()=>un,dicts_setdefault:()=>rn,dicts_to_json:()=>In,dicts_todict:()=>dn,dicts_update:()=>en,dicts_values:()=>_n,json_to_dicts:()=>Tn});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:()=>En,logic_null:()=>cn,logic_operation:()=>On,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:()=>xn,storage_is_file:()=>Kn,storage_list_all_files:()=>bn,storage_make_dir:()=>kn,storage_open_file_with_os:()=>Ln,storage_rename:()=>Hn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>es,procedures_callreturn:()=>is,procedures_defnoreturn:()=>jn,procedures_defreturn:()=>Zn,procedures_ifreturn:()=>ns,procedures_mutatorarg:()=>ts,procedures_mutatorcontainer:()=>$n,procedures_return:()=>ss});var r={};t.r(r),t.d(r,{tuple_change_to:()=>hs,tuple_create_with:()=>os,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:()=>ls,tuple_getSublist:()=>Es,tuple_get_random_item:()=>gs,tuple_get_sublist:()=>cs,tuple_join:()=>Ts,tuple_length:()=>ds,tuple_max:()=>Ms,tuple_totuple:()=>Cs,tuple_trig:()=>Os});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ys,set_clear:()=>Fs,set_create_with:()=>As,set_create_with_container:()=>Ls,set_create_with_item:()=>Ns,set_create_with_text_return:()=>ys,set_length:()=>Ds,set_operate:()=>Ps,set_operate_update:()=>vs,set_pop:()=>fs,set_sub:()=>Xs,set_toset:()=>bs,set_update:()=>xs});var d={};t.r(d),t.d(d,{html_content:()=>ws,html_content_more:()=>ks,html_document:()=>Bs,html_form:()=>Ws,html_head_body:()=>Us,html_style:()=>Hs,html_style_color:()=>Js,html_style_content:()=>Ks,html_text:()=>qs,html_title:()=>Gs});var I={};t.r(I),t.d(I,{attribute_access:()=>a_,function_call:()=>__,function_call_container:()=>o_,function_call_item:()=>p_,raw_block:()=>js,raw_empty:()=>$s,raw_expression:()=>Zs,raw_table:()=>Qs,text_comment:()=>t_,text_print_multiple:()=>i_,text_print_multiple_container:()=>n_,text_print_multiple_item:()=>s_,type_check:()=>e_});var T={};t.r(T),t.d(T,{controls_type:()=>I_,controls_typeLists:()=>T_,lists_zip:()=>M_,unpack_iterable_object:()=>h_,variables_change:()=>l_,variables_get:()=>u_,variables_global:()=>d_,variables_set:()=>r_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>L_,base_setup:()=>O_,controls_delay:()=>A_,controls_flow_statements:()=>S_,controls_for:()=>c_,controls_forEach:()=>P_,controls_for_range:()=>g_,controls_if:()=>E_,controls_interrupts:()=>f_,controls_lambda:()=>Y_,controls_main:()=>m_,controls_millis:()=>N_,controls_nointerrupts:()=>F_,controls_pass:()=>x_,controls_range:()=>v_,controls_repeat:()=>k_,controls_repeat_ext:()=>V_,controls_thread:()=>y_,controls_try_finally:()=>R_,controls_whileUntil:()=>C_,do_while:()=>b_,garbage_collection:()=>B_,get_mem_alloc:()=>G_,get_mem_free:()=>U_,get_unique_identifier:()=>w_,reset:()=>D_,time_sleep:()=>X_});var h={};t.r(h),t.d(h,{base_map:()=>ro,math_arithmetic:()=>q_,math_bit:()=>J_,math_constant:()=>W_,math_constant_mp:()=>K_,math_constrain:()=>no,math_dec:()=>Z_,math_indexer_number:()=>oo,math_map:()=>io,math_max_min:()=>to,math_number:()=>H_,math_number_base_conversion:()=>so,math_random:()=>eo,math_random_seed:()=>_o,math_round:()=>po,math_selfcalcu:()=>z_,math_single:()=>Q_,math_to_int:()=>$_,math_trig:()=>j_,text_to_number:()=>ao,text_to_number_skulpt:()=>uo,turn_to_int:()=>lo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>mo,char_to_ascii:()=>Oo,number_to_text:()=>Eo,os_system:()=>wo,text:()=>Io,text_capital:()=>Do,text_center:()=>fo,text_char:()=>Mo,text_char_at:()=>go,text_char_at2:()=>co,text_char_at3:()=>Bo,text_compareTo:()=>Vo,text_compare_to:()=>Ao,text_encode:()=>Go,text_equals_starts_ends:()=>So,text_eval:()=>Uo,text_find:()=>Fo,text_format:()=>xo,text_format_noreturn:()=>yo,text_join:()=>ho,text_join_seq:()=>Po,text_length:()=>Ro,text_random_char:()=>Co,text_replace:()=>vo,text_split:()=>Yo,text_strip:()=>Xo,text_substring:()=>No,text_substring2:()=>Lo,text_substring3:()=>bo,text_textarea:()=>To});var O={};t.r(O),t.d(O,{list_many_input:()=>ap,list_tolist:()=>Ep,list_tolist2:()=>Rp,list_trig:()=>_p,lists_2d_get_col_row_data:()=>Wo,lists_2d_get_data_with_col_row:()=>Ho,lists_append_extend:()=>Qo,lists_change_to:()=>pp,lists_change_to_general:()=>rp,lists_clear:()=>ep,lists_create_with:()=>Ko,lists_create_with2:()=>dp,lists_create_with_noreturn:()=>up,lists_create_with_text:()=>Jo,lists_create_with_text2:()=>Ip,lists_del_general:()=>lp,lists_find:()=>ip,lists_getIndex3:()=>Tp,lists_getSublist3:()=>Mp,lists_get_index:()=>qo,lists_get_random_item:()=>jo,lists_get_random_sublist:()=>Zo,lists_get_sublist:()=>ko,lists_insert_value:()=>$o,lists_insert_value2:()=>mp,lists_pop:()=>sp,lists_remove_at:()=>np,lists_remove_at2:()=>Op,lists_reverse:()=>tp,lists_setIndex3:()=>hp,lists_set_index:()=>zo,lists_sort:()=>op});var E={};t.r(E),t.d(E,{dicts_add_change_del:()=>Yp,dicts_add_or_change:()=>Ap,dicts_clear:()=>Dp,dicts_create_with:()=>cp,dicts_create_with_noreturn:()=>yp,dicts_deldict:()=>vp,dicts_delete:()=>Lp,dicts_get:()=>Cp,dicts_get_default:()=>Sp,dicts_items:()=>fp,dicts_keys:()=>gp,dicts_length:()=>Pp,dicts_pop:()=>Xp,dicts_setdefault:()=>xp,dicts_to_json:()=>Vp,dicts_todict:()=>bp,dicts_update:()=>Np,dicts_values:()=>Fp,json_to_dicts:()=>Bp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Hp,logic_compare:()=>Gp,logic_compare_continous:()=>Up,logic_is:()=>qp,logic_is_in:()=>Jp,logic_negate:()=>kp,logic_null:()=>Wp,logic_operation:()=>wp,logic_tobool:()=>zp,logic_true_or_false:()=>Kp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Oa,sdcard_use_spi_init:()=>ma,storage_can_write_ornot:()=>sa,storage_change_dir:()=>da,storage_close_file:()=>oa,storage_delete_file:()=>aa,storage_file_seek:()=>la,storage_file_tell:()=>ra,storage_file_write:()=>ta,storage_fileopen:()=>jp,storage_fileopen_new:()=>Zp,storage_fileopen_new_encoding:()=>$p,storage_get_a_line:()=>na,storage_get_contents:()=>ia,storage_get_contents_without_para:()=>ea,storage_get_current_dir:()=>Ia,storage_get_file_size:()=>ua,storage_get_filename:()=>_a,storage_is_file:()=>ha,storage_list_all_files:()=>pa,storage_make_dir:()=>Ta,storage_open_file_with_os:()=>Qp,storage_rename:()=>Ma});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>ga,procedures_callreturn:()=>ca,procedures_defnoreturn:()=>Ra,procedures_defreturn:()=>Ea,procedures_ifreturn:()=>Ca,procedures_return:()=>Sa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ya,tuple_create_with:()=>Aa,tuple_create_with_noreturn:()=>ba,tuple_create_with_text2:()=>La,tuple_create_with_text_return:()=>Na,tuple_del:()=>Fa,tuple_find:()=>Xa,tuple_getIndex:()=>Da,tuple_getSublist:()=>ya,tuple_get_random_item:()=>Ba,tuple_get_sublist:()=>Va,tuple_join:()=>Pa,tuple_length:()=>fa,tuple_max:()=>va,tuple_totuple:()=>Ga,tuple_trig:()=>xa});var S={};t.r(S),t.d(S,{set_add_discard:()=>Ja,set_clear:()=>Ha,set_create_with:()=>Ua,set_create_with_text_return:()=>Qa,set_length:()=>wa,set_operate:()=>Wa,set_operate_update:()=>Ka,set_pop:()=>ka,set_sub:()=>qa,set_toset:()=>ja,set_update:()=>za});var A={};t.r(A),t.d(A,{html_content:()=>eu,html_content_more:()=>iu,html_document:()=>Za,html_form:()=>su,html_head_body:()=>tu,html_style:()=>nu,html_style_content:()=>_u,html_text:()=>ou,html_title:()=>$a});var L={};t.r(L),t.d(L,{attribute_access:()=>Iu,function_call:()=>du,raw_block:()=>pu,raw_empty:()=>uu,raw_expression:()=>au,raw_table:()=>ru,type_check:()=>lu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Au,actuator_extern_get_led_state:()=>Lu,actuator_extern_led_bright:()=>Su,actuator_extern_led_brightness:()=>Nu,actuator_ms32006_dcmotor:()=>yu,actuator_ms32006_init:()=>xu,actuator_ms32006_stepper:()=>bu,actuator_neopixel_init:()=>Vu,actuator_neopixel_rgb:()=>Bu,actuator_neopixel_rgb_all:()=>Gu,actuator_neopixel_write:()=>Uu,actuator_use_uart_init:()=>wu,esp32_music_get_tempo_extern:()=>cu,esp32_music_pitch:()=>mu,esp32_music_pitch_init:()=>hu,esp32_music_pitch_with_time:()=>Ou,esp32_music_play_list:()=>Eu,esp32_music_reset_extern:()=>gu,esp32_music_set_tempo_extern:()=>Ru,esp32_music_stop:()=>Cu,mixbot_actuator_extern_get_addr:()=>or,mixbot_actuator_extern_set_addr:()=>pr,mixbot_addr_extern:()=>Ju,robot_led_extern:()=>ju,robot_led_extern_get_value:()=>Zu,robot_motor_extern:()=>qu,robot_motor_extern_get_speed:()=>zu,robot_servo_extern_absolute_run:()=>ir,robot_servo_extern_get_status:()=>$u,robot_servo_extern_relative_continue:()=>_r,robot_servo_extern_relative_origin:()=>nr,robot_servo_extern_relative_run:()=>sr,robot_servo_extern_stop:()=>er,robot_servo_extern_stop_mode:()=>tr,robot_traffic_light_extern:()=>Qu,servo_get_angle:()=>Yu,servo_get_speed:()=>Xu,servo_init:()=>Du,servo_move:()=>fu,servo_set_angle:()=>Pu,servo_set_speed:()=>vu,servo_speed_360:()=>Fu,syn6288_builtin_voice:()=>Wu,syn6288_get_voice:()=>Hu,syn6288_set_voice:()=>ku,syn6288_tts_play:()=>Ku});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Br,actuator_dc_motor_stop:()=>Gr,actuator_get_led_bright:()=>dr,actuator_get_led_state:()=>Ir,actuator_led_bright:()=>lr,actuator_led_brightness:()=>Tr,actuator_mixbot_buzzer_on_off:()=>Wr,actuator_mixgo_nova_mic_get:()=>Qr,actuator_mixgo_nova_mic_set:()=>zr,actuator_mixgo_nova_onboard_music_pitch:()=>il,actuator_mixgo_nova_onboard_music_stop:()=>nl,actuator_mixgo_nova_play_audio:()=>tl,actuator_mixgo_nova_play_online_audio:()=>el,actuator_mixgo_nova_record_audio:()=>$r,actuator_mixgo_nova_voice_get:()=>Zr,actuator_mixgo_nova_voice_set:()=>jr,actuator_mixgo_zero_led_color:()=>Mr,actuator_onboard_neopixel_rgb:()=>cr,actuator_onboard_neopixel_rgb_all:()=>gr,actuator_onboard_neopixel_rgb_show_all_chase:()=>Sr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Cr,actuator_onboard_neopixel_write:()=>Ar,actuator_rm_onboard_neopixel_rgb:()=>Lr,actuator_rm_onboard_neopixel_rgb_all:()=>Nr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Dr,actuator_stepper_keep:()=>br,actuator_stepper_stop:()=>Vr,analog_ble_keyboard_init:()=>hl,analog_ble_keyboard_input:()=>El,analog_ble_keyboard_send_battery:()=>cl,analog_ble_keyboard_str:()=>Rl,analog_ble_mouse_init:()=>gl,analog_ble_mouse_input:()=>Al,analog_ble_mouse_send_battery:()=>Ll,analog_keyboard_input:()=>pl,analog_keyboard_str:()=>Ml,analog_mouse_input:()=>Il,bitbot_motor:()=>qr,bitbot_move:()=>Kr,bitbot_stop:()=>Jr,ble_keyboard_connect:()=>Ol,ble_keyboard_get_mac:()=>ml,ble_mouse_connect:()=>Sl,ble_mouse_get_mac:()=>Cl,cc_number:()=>Rr,esp32_music_get_tempo:()=>Fr,esp32_music_reset:()=>Pr,esp32_music_set_tempo:()=>fr,esp32_onboard_music_pitch:()=>vr,esp32_onboard_music_pitch_with_time:()=>Yr,esp32_onboard_music_play_list:()=>xr,esp32_onboard_music_stop:()=>Xr,general_key:()=>ul,general_key_tuple:()=>rl,generalkey_container:()=>ll,generalkey_create_with_item:()=>dl,get_power_output:()=>_l,ledswitch:()=>rr,mixbot_motor:()=>Hr,mixbot_motor_status:()=>Ur,mixbot_move:()=>wr,mixbot_stop:()=>kr,mouse_key:()=>Tl,number:()=>ur,rm_actuator_get_led_bright:()=>mr,rm_actuator_get_led_state:()=>Or,rm_actuator_led_bright:()=>hr,rm_actuator_led_brightness:()=>Er,rm_motor:()=>yr,set_all_power_output:()=>ol,set_power_output:()=>sl,special_key:()=>al});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>od,ai_sensor_ailocal_class:()=>zl,ai_sensor_ailocal_class_result:()=>Ql,ai_sensor_ailocal_train:()=>ql,ai_sensor_asr_recognize:()=>ed,ai_sensor_audio_play:()=>Zl,ai_sensor_audio_record:()=>jl,ai_sensor_barcode:()=>Xl,ai_sensor_circle:()=>Gl,ai_sensor_classifier_faces:()=>_d,ai_sensor_color:()=>Hl,ai_sensor_color_chases:()=>Jl,ai_sensor_color_chases_result:()=>Kl,ai_sensor_config:()=>vl,ai_sensor_face:()=>sd,ai_sensor_find_20objects:()=>pd,ai_sensor_find_barcodes:()=>xl,ai_sensor_find_circles:()=>Ul,ai_sensor_find_colors:()=>Wl,ai_sensor_find_licenseplates:()=>nd,ai_sensor_find_lines:()=>Bl,ai_sensor_find_qrcodes:()=>Pl,ai_sensor_find_rects:()=>kl,ai_sensor_find_tags:()=>bl,ai_sensor_licenseplate:()=>id,ai_sensor_line:()=>Vl,ai_sensor_qrcode:()=>fl,ai_sensor_qrcode_lite:()=>Fl,ai_sensor_rect:()=>wl,ai_sensor_rgb:()=>Yl,ai_sensor_tag:()=>yl,ai_sensor_use_uart_init:()=>Dl,ai_sensor_yolo_recognize:()=>$l,ai_sensor_yolo_recognize_result:()=>td});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>rd,MICROPYTHON_AI_Speech_unit:()=>ud,MICROPYTHON_AI_client:()=>ad});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Ad,mpython_blynk_app_notify:()=>Od,mpython_blynk_email:()=>cd,mpython_blynk_get_timers:()=>gd,mpython_blynk_on_connected:()=>Md,mpython_blynk_on_disconnected:()=>Td,mpython_blynk_run:()=>md,mpython_blynk_sensor_data_to_app:()=>Sd,mpython_blynk_set_property:()=>Rd,mpython_blynk_setup:()=>Ld,mpython_blynk_stop_timers:()=>Ed,mpython_blynk_sync_virtual:()=>Id,mpython_blynk_terminal_widget_vpin:()=>dd,mpython_blynktimer:()=>Cd,mpython_blynktimer_run:()=>hd});var v={};t.r(v),t.d(v,{cc_g1_init:()=>Nd,cc_g1_read_bat:()=>Dd,cc_g1_read_joystick:()=>fd,cc_g1_read_key:()=>Fd,cc_g1_turnoff:()=>Pd});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>Gd,ce_go_get_led_bright:()=>xd,ce_go_get_led_state:()=>yd,ce_go_hall_attachInterrupt:()=>Ud,ce_go_hall_data:()=>kd,ce_go_hall_initialize:()=>wd,ce_go_led_bright:()=>Xd,ce_go_led_brightness:()=>bd,ce_go_light_number:()=>Yd,ce_go_pin_light:()=>qd,ce_go_pin_near:()=>Wd,ce_go_pin_near_line:()=>Hd,ce_go_pin_near_state_change:()=>Kd,ce_go_stepper_keep:()=>Vd,ce_go_stepper_stop:()=>Bd,sensor_mixgome_eulerangles:()=>Jd});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>FI,communicate_bluetooth_connect:()=>XI,communicate_bluetooth_disconnect:()=>xI,communicate_bluetooth_handle:()=>GI,communicate_bluetooth_is_connected:()=>bI,communicate_bluetooth_mac:()=>YI,communicate_bluetooth_peripheral_init:()=>PI,communicate_bluetooth_recv:()=>VI,communicate_bluetooth_recv_only:()=>BI,communicate_bluetooth_scan:()=>vI,communicate_bluetooth_send:()=>yI,communicate_espnow_init:()=>UI,communicate_espnow_init_new:()=>wI,communicate_i2c_available:()=>dI,communicate_i2c_init:()=>Zd,communicate_i2c_master_read:()=>lI,communicate_i2c_onboard:()=>Qd,communicate_i2c_read:()=>$d,communicate_i2c_scan:()=>eI,communicate_i2c_write:()=>tI,communicate_ir_recv_init:()=>RI,communicate_ir_send_init:()=>AI,communicate_ow_init:()=>TI,communicate_ow_read:()=>hI,communicate_ow_reset:()=>EI,communicate_ow_scan:()=>MI,communicate_ow_select:()=>OI,communicate_ow_write:()=>mI,communicate_spi_buffer:()=>sI,communicate_spi_init:()=>iI,communicate_spi_onboard:()=>jd,communicate_spi_read:()=>_I,communicate_spi_read_output:()=>oI,communicate_spi_readinto:()=>pI,communicate_spi_readinto_output:()=>aI,communicate_spi_set:()=>nI,communicate_spi_write:()=>uI,communicate_spi_write_readinto:()=>rI,espnow_radio_channel:()=>qI,espnow_radio_channel_new:()=>QI,espnow_radio_on_off:()=>jI,espnow_radio_rec:()=>$I,espnow_radio_recv:()=>eT,espnow_radio_recv_certain_msg:()=>iT,espnow_radio_recv_certain_msg_new:()=>sT,espnow_radio_recv_msg:()=>tT,espnow_radio_recv_new:()=>nT,espnow_radio_send:()=>ZI,espnow_radio_txpower:()=>zI,i2c_available:()=>LT,i2c_init:()=>dT,i2c_master_reader2:()=>AT,i2c_read:()=>IT,i2c_scan:()=>MT,i2c_slave_onreceive:()=>II,i2c_write:()=>TT,internal_variable:()=>cI,ir_recv_timeout:()=>SI,ir_transmit_busy:()=>fI,ir_transmit_conventional_data:()=>LI,ir_transmit_raw_code:()=>DI,ir_transmit_study_code:()=>NI,ir_whether_recv:()=>CI,lora_init:()=>_T,lora_packet:()=>oT,lora_recv:()=>aT,lora_send:()=>pT,network_espnow_info:()=>HI,network_espnow_mac:()=>kI,network_espnow_recv:()=>WI,network_espnow_recv_handle:()=>JI,network_espnow_send:()=>KI,recv_fun:()=>gI,spi_buffer:()=>OT,spi_init:()=>hT,spi_read:()=>ET,spi_read_output:()=>RT,spi_readinto:()=>cT,spi_readinto_output:()=>gT,spi_set:()=>mT,spi_write:()=>CT,spi_write_readinto:()=>ST,urequests_attribute:()=>rT,urequests_get:()=>uT,urequests_method:()=>lT});var x={};t.r(x),t.d(x,{display_animate:()=>iM,display_blink_rate:()=>ZT,display_circle:()=>nM,display_color_seclet:()=>MM,display_draw_4strings:()=>KT,display_fill:()=>eM,display_get_screen_image:()=>jT,display_help:()=>_M,display_image_size:()=>JT,display_lcd_use_i2c_init:()=>cM,display_line:()=>zT,display_line_arbitrarily:()=>QT,display_matrix_extern_bright_point:()=>VT,display_matrix_extern_bright_screen:()=>GT,display_matrix_extern_clear:()=>UT,display_matrix_extern_get_pixel:()=>bT,display_matrix_extern_get_screen_pixel:()=>BT,display_matrix_extern_image_builtins:()=>wT,display_matrix_extern_scroll_string:()=>vT,display_matrix_extern_scroll_string_delay:()=>YT,display_matrix_extern_shift:()=>yT,display_matrix_extern_show_frame_string:()=>XT,display_matrix_extern_show_frame_string_delay:()=>xT,display_matrix_extern_show_image:()=>FT,display_matrix_extern_show_image_or_string_delay:()=>PT,display_matrix_use_i2c_init:()=>fT,display_oled_drawPixel:()=>pM,display_oled_showBitmap:()=>oM,display_oled_use_i2c_init:()=>LM,display_onoff:()=>tM,display_rect:()=>qT,display_rgb_color:()=>$T,display_tm1650_power:()=>uM,display_tm1650_set_brightness:()=>dM,display_tm1650_show_dot:()=>lM,display_tm1650_show_num:()=>rM,display_tm_use_i2c_init:()=>aM,display_triangle:()=>sM,display_use_i2c_init:()=>WT,extern_oled_bright_point:()=>bM,extern_oled_clear:()=>VM,extern_oled_get_pixel:()=>yM,extern_oled_hvline:()=>GM,extern_oled_line:()=>UM,extern_oled_scroll_string:()=>PM,extern_oled_scroll_string_delay:()=>vM,extern_oled_shape_rect:()=>BM,extern_oled_shift:()=>xM,extern_oled_show_frame_string:()=>YM,extern_oled_show_frame_string_delay:()=>XM,extern_oled_show_image:()=>NM,extern_oled_show_image_or_string_delay:()=>FM,extern_oled_show_image_xy:()=>DM,extern_oled_show_string:()=>fM,lcd_backlight:()=>SM,lcd_clear:()=>AM,lcd_print_string:()=>CM,lcd_show_image_or_string_delay:()=>gM,matrix_extern_image_arithmetic:()=>kT,matrix_extern_image_invert:()=>HT,tft_fill:()=>EM,tft_line_arbitrarily:()=>RM,tft_scroll_string_delay:()=>mM,tft_show_frame_string_delay:()=>OM,tft_show_image_or_string_delay:()=>hM,tft_show_image_xy:()=>TM,tft_use_spi_init:()=>IM});var y={};t.r(y),t.d(y,{bitbot_display_image_create:()=>Lh,display_bright_point:()=>ih,display_bright_screen:()=>sh,display_clear:()=>_h,display_get_pixel:()=>eh,display_get_screen_pixel:()=>nh,display_image_builtins:()=>QM,display_image_builtins_all:()=>jM,display_image_create:()=>zM,display_scroll_string:()=>WM,display_scroll_string_delay:()=>KM,display_shift:()=>th,display_show_frame_string:()=>JM,display_show_frame_string_delay:()=>qM,display_show_image:()=>kM,display_show_image_or_string_delay:()=>HM,draw_pointer:()=>Qh,image_arithmetic:()=>ZM,image_invert:()=>$M,mixbot_display_bright_screen:()=>Sh,mixbot_display_get_ambientbright:()=>Ch,mixbot_display_get_screen_pixel:()=>gh,mixbot_display_image_create:()=>ch,mixbot_display_rotate:()=>Ah,mixgo_display_image_create_new:()=>ah,mixgome_display_font:()=>uh,mixgome_display_image_create:()=>oh,mixgomini_display_image_create:()=>ph,mpython_display_hvline:()=>Oh,mpython_display_line:()=>Eh,mpython_display_shape_rect:()=>mh,mpython_pbm_image:()=>Rh,onboard_oled_bright_point:()=>hh,onboard_oled_scroll_string_delay:()=>Th,onboard_oled_show_frame_string_delay:()=>Mh,onboard_oled_show_image:()=>rh,onboard_oled_show_image_or_string_delay:()=>Ih,onboard_oled_show_image_xy:()=>lh,onboard_oled_show_string:()=>dh,onboard_tft_bright_point:()=>Bh,onboard_tft_bright_screen:()=>wh,onboard_tft_clear:()=>Gh,onboard_tft_clock_clear:()=>qh,onboard_tft_clock_draw:()=>Jh,onboard_tft_clock_get_rtctime:()=>Wh,onboard_tft_clock_init:()=>Hh,onboard_tft_clock_set_time:()=>Kh,onboard_tft_display_hvline:()=>xh,onboard_tft_display_line:()=>yh,onboard_tft_display_shape_circle:()=>zh,onboard_tft_display_shape_rect:()=>Xh,onboard_tft_fill:()=>kh,onboard_tft_get_pixel:()=>Vh,onboard_tft_get_screen_pixel:()=>Uh,onboard_tft_scroll_string:()=>Fh,onboard_tft_scroll_string_delay:()=>Ph,onboard_tft_shift:()=>bh,onboard_tft_show_frame_string:()=>vh,onboard_tft_show_frame_string_delay:()=>Yh,onboard_tft_show_image:()=>Nh,onboard_tft_show_image_or_string_delay:()=>fh,onboard_tft_show_image_xy:()=>Dh});var b={};t.r(b),t.d(b,{factory_block:()=>pm,factory_block_return:()=>am,factory_block_return_with_textarea:()=>rm,factory_block_with_textarea:()=>um,factory_callMethod_noreturn:()=>_m,factory_callMethod_return:()=>om,factory_create_with_container:()=>em,factory_create_with_item:()=>im,factory_declare:()=>sm,factory_from_import:()=>Zh,factory_function_noreturn:()=>tm,factory_function_return:()=>nm,factory_import:()=>$h,folding_block:()=>lm});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>Ym,inout_analog_atten:()=>cm,inout_analog_read:()=>Rm,inout_analog_read_init:()=>Nm,inout_analog_write:()=>mm,inout_analog_write_init:()=>Lm,inout_analog_write_set:()=>Om,inout_analog_write_set_freq:()=>Fm,inout_digital_init:()=>Sm,inout_digital_read:()=>Mm,inout_digital_write:()=>Tm,inout_highlow:()=>Im,inout_pinMode:()=>fm,inout_pin_attachInterrupt:()=>Cm,inout_pin_pressed:()=>gm,inout_pin_pressed_init:()=>Dm,inout_pwm_analog_write:()=>hm,inout_pwm_analog_write_init:()=>Am,inout_pwm_analog_write_set_freq:()=>Em,pin_pressed:()=>vm,pin_pressed_init:()=>Pm});var B={};t.r(B),t.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>nO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>iO,IOT_EMQX_PING:()=>tO,IOT_FORMATTING:()=>Zm,IOT_FORMAT_STRING:()=>$m,IOT_MIXIO_NTP:()=>eO,IOT_MIXIO_PUBLISH:()=>Wm,IOT_MIXIO_SUBSCRIBE:()=>Km,iot_checkonenet:()=>IO,iot_client_onboard:()=>_O,iot_create_with_item:()=>km,iot_http_client:()=>oO,iot_http_data:()=>pO,iot_mixio_check:()=>zm,iot_mixio_connect:()=>Hm,iot_mixio_connect_only:()=>qm,iot_mixio_disconnect:()=>Jm,iot_mixio_format_msg:()=>jm,iot_mixio_format_topic:()=>Qm,iot_mixly_key:()=>sO,iot_mqtt_client:()=>aO,iot_mqtt_data:()=>uO,iot_onenet_check:()=>Vm,iot_onenet_connect:()=>ym,iot_onenet_disconnect:()=>bm,iot_onenet_publish:()=>Gm,iot_onenet_publish_dict:()=>Bm,iot_onenetconnect:()=>lO,iot_onenetdisconnect:()=>dO,iot_publish:()=>TO,iot_publish_container:()=>Um,iot_publish_item:()=>wm,iot_wifi_connect:()=>xm,iot_wificonnect:()=>rO});var G={};t.r(G),t.d(G,{network_ap_connect:()=>AO,network_connect:()=>RO,network_get_connect:()=>gO,network_get_wifi:()=>SO,network_init:()=>hO,network_is_active:()=>OO,network_open:()=>mO,network_scan:()=>EO,network_server:()=>LO,network_socket_accept:()=>PO,network_socket_bind:()=>DO,network_socket_close:()=>yO,network_socket_connect:()=>fO,network_socket_init:()=>NO,network_socket_listen:()=>FO,network_socket_receive:()=>vO,network_socket_receive_from:()=>XO,network_socket_send:()=>YO,network_socket_send_to:()=>xO,network_stop:()=>CO,network_wifi_connect:()=>cO,ntptime_address:()=>UO,ntptime_time:()=>GO,requests_attribute:()=>VO,requests_attribute2:()=>WO,requests_get:()=>bO,requests_get2:()=>kO,requests_method:()=>BO,requests_post:()=>HO});var U={};t.r(U),t.d(U,{HCSR04:()=>KE,PS2_Button:()=>QE,PS2_Buttons:()=>ZE,PS2_Buttons_new:()=>iR,PS2_State:()=>jE,PS2_init:()=>JE,PS2_init_new:()=>tR,PS2_stk:()=>$E,PS2_stk_new:()=>nR,PS2_vibration:()=>zE,PS2_vibration_new:()=>eR,esp32_s2_weather_init:()=>wE,esp32_s2_weather_rain:()=>HE,esp32_s2_weather_wd:()=>kE,esp32_s2_weather_ws:()=>WE,extern_rfid_read:()=>DE,extern_rfid_readcontent:()=>FE,extern_rfid_readid:()=>fE,extern_rfid_status:()=>YE,extern_rfid_write:()=>PE,extern_rfid_write_return:()=>vE,gnss_get_data:()=>pR,gnss_have_data:()=>oR,mixbot_sensor_extern_get_addr:()=>TR,mixbot_sensor_extern_set_addr:()=>MR,pm25_get_data:()=>_R,robot_button_extern_get_value:()=>aR,robot_color_extern_get_value:()=>IR,robot_infrared_extern_get_value:()=>rR,robot_infrared_extern_grey_get_value:()=>lR,robot_potentiometer_extern_get_value:()=>dR,robot_sonar_extern_get_value:()=>hR,robot_sonar_extern_led:()=>mR,robot_touch_extern_get_value:()=>uR,sensor_APDS9960_extern:()=>rE,sensor_DS18X20:()=>oE,sensor_LTR308_extern:()=>lE,sensor_LTR390UV_extern:()=>IE,sensor_MAX30102_extern:()=>uE,sensor_QMC5883L_extern:()=>OE,sensor_VL530LX_extern:()=>TE,sensor_adxl345_get_acceleration:()=>ZO,sensor_aht11_extern:()=>hE,sensor_bmp:()=>sE,sensor_compass_reset:()=>LE,sensor_dht11:()=>tE,sensor_hp203_extern:()=>mE,sensor_light_level:()=>$O,sensor_lm35:()=>pE,sensor_ltr381_extern:()=>dE,sensor_mixgo_extern_button_attachInterrupt:()=>QO,sensor_mixgo_extern_button_get_presses:()=>zO,sensor_mixgo_extern_button_is_pressed:()=>JO,sensor_mixgo_extern_button_was_pressed:()=>qO,sensor_mixgo_extern_light:()=>eE,sensor_mixgo_extern_pin_near:()=>nE,sensor_mixgo_extern_sound:()=>iE,sensor_mixgoce_hot_wheel_degrees:()=>UE,sensor_mixgoce_hot_wheel_is_touched:()=>GE,sensor_mpu9250_attachGestureInterrupt:()=>jO,sensor_mpu9250_calibrate_compass:()=>CE,sensor_mpu9250_field_strength:()=>AE,sensor_mpu9250_gesture:()=>EE,sensor_mpu9250_get_acceleration:()=>RE,sensor_mpu9250_get_gyro:()=>gE,sensor_mpu9250_get_magnetic:()=>cE,sensor_mpu9250_temperature:()=>SE,sensor_sht:()=>_E,sensor_shtc3_extern:()=>ME,sensor_use_i2c_init:()=>aE,sensor_use_spi_init:()=>NE,sensor_use_uart_init:()=>sR,sensor_weather_solo_init:()=>OR,sensor_weather_solo_rain:()=>cR,sensor_weather_solo_wd:()=>ER,sensor_weather_solo_ws:()=>RR,weather_data:()=>XE,weather_have_data:()=>xE,weather_set_label:()=>bE,weather_set_label_container:()=>VE,weather_set_label_item:()=>BE,weather_uart_mixio:()=>yE});var w={};t.r(w),t.d(w,{HCSR04:()=>VR,RTC_set_date:()=>bR,RTC_set_time:()=>yR,bitbot_als_num:()=>Hc,dht11:()=>jc,number1:()=>GR,number2:()=>UR,number3:()=>wR,number4:()=>kR,number5:()=>HR,number6:()=>WR,number7:()=>KR,onboard_RTC_get_time:()=>$R,onboard_RTC_get_time_str:()=>_c,onboard_RTC_get_timestamp:()=>tc,onboard_RTC_set_datetime:()=>nc,onboard_RTC_settime_string:()=>ic,onboard_RTC_timestamp_totuple:()=>ec,rfid_readcontent:()=>dc,rfid_readid:()=>lc,rfid_write:()=>Ic,rfid_write_return:()=>Tc,sensor_LTR308:()=>oc,sensor_aht11:()=>ac,sensor_bitbot_ALS:()=>kc,sensor_button_get_presses:()=>Jc,sensor_button_is_pressed:()=>Wc,sensor_button_was_pressed:()=>Kc,sensor_distance_hrsc04:()=>xR,sensor_eulerangles:()=>hc,sensor_field_strength:()=>Zc,sensor_get_acceleration:()=>Mc,sensor_get_temperature:()=>uc,sensor_hp203:()=>rc,sensor_light:()=>Qc,sensor_mixbot_get_gyro:()=>wc,sensor_mixbot_patrol_calibrate:()=>Bc,sensor_mixbot_patrol_value:()=>Gc,sensor_mixbot_temperature:()=>Uc,sensor_mixgo_LTR308:()=>ZR,sensor_mixgo_button_attachInterrupt:()=>LR,sensor_mixgo_button_get_presses:()=>AR,sensor_mixgo_button_is_pressed:()=>CR,sensor_mixgo_button_was_pressed:()=>SR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Nc,sensor_mixgo_cc_mmc5603_get_angle:()=>Lc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Ac,sensor_mixgo_light:()=>BR,sensor_mixgo_nova_LTR308:()=>jR,sensor_mixgo_nova_pin_near:()=>QR,sensor_mixgo_pin_near:()=>zR,sensor_mixgo_pin_near_double:()=>qR,sensor_mixgo_pin_near_single:()=>JR,sensor_mixgo_pin_pressed:()=>PR,sensor_mixgo_touch_slide:()=>XR,sensor_mixgocar42_button_attachInterrupt:()=>FR,sensor_mixgocar42_button_get_presses:()=>fR,sensor_mixgocar42_button_is_pressed:()=>NR,sensor_mixgocar42_button_was_pressed:()=>DR,sensor_mixgocar_battery_left:()=>Vc,sensor_mixgocar_pin_near:()=>yc,sensor_mixgocar_pin_near_line:()=>xc,sensor_mixgocar_pin_near_state_change:()=>bc,sensor_mixgoce_pin_pressed:()=>vR,sensor_mixgoce_temperature:()=>fc,sensor_mixgome_temperature:()=>Dc,sensor_mpython_pin_pressed:()=>YR,sensor_mpython_qmi8658_get_gyro:()=>Fc,sensor_mpython_qmi8658_temperature:()=>Pc,sensor_onboard_compass_reset:()=>Sc,sensor_onboard_mpu9250_calibrate_compass:()=>cc,sensor_onboard_mpu9250_field_strength:()=>Cc,sensor_onboard_mpu9250_gesture:()=>mc,sensor_onboard_mpu9250_get_acceleration:()=>Oc,sensor_onboard_mpu9250_get_gyro:()=>Rc,sensor_onboard_mpu9250_get_magnetic:()=>Ec,sensor_onboard_mpu9250_temperature:()=>gc,sensor_pin_near:()=>zc,sensor_pin_pressed:()=>qc,sensor_rm_acc:()=>Xc,sensor_rm_battery_left:()=>Yc,sensor_rm_pin_near_double:()=>vc,sensor_rtc_init:()=>sc,sensor_sound:()=>pc,sensor_temperature:()=>$c});var k={};t.r(k),t.d(k,{serial_any:()=>pg,serial_begin:()=>dg,serial_print:()=>ig,serial_print_byte:()=>eg,serial_print_hex:()=>sg,serial_println:()=>ng,serial_read_from_ai:()=>cg,serial_readline:()=>ag,serial_readstr:()=>og,serial_readstr_until:()=>ug,serial_receive_data_event:()=>_g,serial_send_to_ai:()=>Rg,serial_softserial:()=>lg,serial_softserial_new:()=>rg,system_input:()=>Ig,system_print:()=>Tg,system_print_container:()=>Og,system_print_end:()=>hg,system_print_inline:()=>Mg,system_print_item:()=>Eg,system_print_many:()=>mg});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>Ag,Timer_init:()=>Vg,base_delay:()=>Ug,controls_delay:()=>Sg,controls_delay_new:()=>Cg,controls_millis:()=>Ng,controls_uname:()=>fg,raw_block:()=>Dg,reset:()=>Lg,system_bitbot_shutdown:()=>bg,system_machine_reset:()=>yg,system_ticks_diff:()=>vg,system_timer:()=>Pg,system_timer_init:()=>Yg,system_wdt_feed:()=>xg,system_wdt_init:()=>Xg,time_ticks_diff:()=>Gg,timer:()=>Fg,timer2:()=>Bg});var W={};t.r(W),t.d(W,{Air_daily_content:()=>eC,Air_now_content:()=>qg,Geo_moon_content:()=>nC,Geo_sun_content:()=>iC,Life_suggestion_content:()=>Qg,Location_search_content:()=>Zg,Tide_daily_content:()=>jg,WEATHER_DAILY:()=>Hg,WEATHER_HOUR:()=>Wg,WEATHER_NOW:()=>kg,Weather_alarm_content:()=>zg,Weather_daily:()=>$g,Weather_daily_content:()=>tC,Weather_now:()=>Kg,Weather_now_content:()=>Jg});var K={};t.r(K),t.d(K,{actuator_extern_get_led_bright:()=>CC,actuator_extern_get_led_state:()=>SC,actuator_extern_led_bright:()=>gC,actuator_extern_led_brightness:()=>AC,actuator_ms32006_dcmotor:()=>lC,actuator_ms32006_init:()=>rC,actuator_ms32006_stepper:()=>dC,actuator_neopixel_init:()=>LC,actuator_neopixel_rgb:()=>fC,actuator_neopixel_rgb_all:()=>NC,actuator_neopixel_write:()=>DC,actuator_use_uart_init:()=>FC,esp32_music_get_tempo_extern:()=>OC,esp32_music_pitch:()=>TC,esp32_music_pitch_init:()=>IC,esp32_music_pitch_with_time:()=>MC,esp32_music_play_list:()=>EC,esp32_music_reset_extern:()=>RC,esp32_music_set_tempo_extern:()=>mC,esp32_music_stop:()=>hC,mixbot_actuator_extern_get_addr:()=>qC,mixbot_actuator_extern_set_addr:()=>zC,mixbot_addr_extern:()=>xC,robot_led_extern:()=>BC,robot_led_extern_get_value:()=>GC,robot_motor_extern:()=>yC,robot_motor_extern_get_speed:()=>bC,robot_servo_extern_absolute_run:()=>HC,robot_servo_extern_get_status:()=>UC,robot_servo_extern_relative_continue:()=>JC,robot_servo_extern_relative_origin:()=>WC,robot_servo_extern_relative_run:()=>KC,robot_servo_extern_stop:()=>kC,robot_servo_extern_stop_mode:()=>wC,robot_traffic_light_extern:()=>VC,servo_get_angle:()=>aC,servo_get_speed:()=>uC,servo_init:()=>sC,servo_move:()=>cC,servo_set_angle:()=>oC,servo_set_speed:()=>pC,servo_speed_360:()=>_C,syn6288_builtin_voice:()=>YC,syn6288_get_voice:()=>vC,syn6288_set_voice:()=>PC,syn6288_tts_play:()=>XC});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>CS,actuator_dc_motor_stop:()=>SS,actuator_get_led_bright:()=>oS,actuator_get_led_state:()=>pS,actuator_led_bright:()=>_S,actuator_led_brightness:()=>aS,actuator_mixbot_buzzer_on_off:()=>fS,actuator_mixgo_nova_mic_get:()=>XS,actuator_mixgo_nova_mic_set:()=>YS,actuator_mixgo_nova_onboard_music_pitch:()=>GS,actuator_mixgo_nova_onboard_music_stop:()=>US,actuator_mixgo_nova_play_audio:()=>VS,actuator_mixgo_nova_play_online_audio:()=>BS,actuator_mixgo_nova_record_audio:()=>bS,actuator_mixgo_nova_voice_get:()=>yS,actuator_mixgo_nova_voice_set:()=>xS,actuator_mixgo_zero_led_color:()=>uS,actuator_onboard_neopixel_rgb:()=>hS,actuator_onboard_neopixel_rgb_all:()=>mS,actuator_onboard_neopixel_rgb_show_all_chase:()=>OS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>ES,actuator_onboard_neopixel_write:()=>MS,actuator_stepper_keep:()=>cS,actuator_stepper_stop:()=>gS,analog_ble_keyboard_init:()=>ZS,analog_ble_keyboard_input:()=>eA,analog_ble_keyboard_send_battery:()=>nA,analog_ble_keyboard_str:()=>iA,analog_ble_mouse_init:()=>sA,analog_ble_mouse_input:()=>pA,analog_ble_mouse_send_battery:()=>aA,analog_keyboard_input:()=>WS,analog_keyboard_str:()=>QS,analog_mouse_input:()=>qS,bitbot_motor:()=>vS,bitbot_move:()=>FS,bitbot_stop:()=>PS,ble_keyboard_connect:()=>tA,ble_keyboard_get_mac:()=>$S,ble_mouse_connect:()=>oA,ble_mouse_get_mac:()=>_A,cc_number:()=>rS,esp32_music_get_tempo:()=>jC,esp32_music_reset:()=>iS,esp32_music_set_tempo:()=>QC,esp32_onboard_music_pitch:()=>ZC,esp32_onboard_music_pitch_with_time:()=>$C,esp32_onboard_music_play_list:()=>eS,esp32_onboard_music_stop:()=>tS,general_key:()=>JS,general_key_tuple:()=>jS,get_power_output:()=>kS,ledswitch:()=>sS,mixbot_motor:()=>DS,mixbot_motor_status:()=>AS,mixbot_move:()=>LS,mixbot_stop:()=>NS,mouse_key:()=>zS,number:()=>nS,rm_actuator_get_led_bright:()=>dS,rm_actuator_get_led_state:()=>IS,rm_actuator_led_bright:()=>lS,rm_actuator_led_brightness:()=>TS,rm_motor:()=>RS,set_all_power_output:()=>HS,set_power_output:()=>wS,special_key:()=>KS});var q={};t.r(q),t.d(q,{ai_sensor_20object:()=>UA,ai_sensor_ailocal_class:()=>FA,ai_sensor_ailocal_class_result:()=>PA,ai_sensor_ailocal_train:()=>fA,ai_sensor_asr_recognize:()=>yA,ai_sensor_audio_play:()=>YA,ai_sensor_audio_record:()=>vA,ai_sensor_barcode:()=>MA,ai_sensor_circle:()=>cA,ai_sensor_classifier_faces:()=>GA,ai_sensor_color:()=>AA,ai_sensor_color_chases:()=>DA,ai_sensor_color_chases_result:()=>NA,ai_sensor_config:()=>lA,ai_sensor_face:()=>BA,ai_sensor_find_20objects:()=>wA,ai_sensor_find_barcodes:()=>hA,ai_sensor_find_circles:()=>gA,ai_sensor_find_colors:()=>LA,ai_sensor_find_licenseplates:()=>VA,ai_sensor_find_lines:()=>RA,ai_sensor_find_qrcodes:()=>TA,ai_sensor_find_rects:()=>SA,ai_sensor_find_tags:()=>OA,ai_sensor_licenseplate:()=>bA,ai_sensor_line:()=>EA,ai_sensor_qrcode:()=>IA,ai_sensor_qrcode_lite:()=>rA,ai_sensor_rect:()=>CA,ai_sensor_rgb:()=>dA,ai_sensor_tag:()=>mA,ai_sensor_use_uart_init:()=>uA,ai_sensor_yolo_recognize:()=>XA,ai_sensor_yolo_recognize_result:()=>xA});var z={};t.r(z),t.d(z,{MICROPYTHON_AI_Speech_asr:()=>WA,MICROPYTHON_AI_Speech_unit:()=>HA,MICROPYTHON_AI_client:()=>kA});var Q={};t.r(Q),t.d(Q,{mpython_blynk_app_data:()=>nL,mpython_blynk_app_notify:()=>ZA,mpython_blynk_email:()=>sL,mpython_blynk_get_timers:()=>tL,mpython_blynk_on_connected:()=>zA,mpython_blynk_on_disconnected:()=>qA,mpython_blynk_run:()=>jA,mpython_blynk_sensor_data_to_app:()=>iL,mpython_blynk_set_property:()=>_L,mpython_blynk_setup:()=>oL,mpython_blynk_stop_timers:()=>$A,mpython_blynk_sync_virtual:()=>JA,mpython_blynk_terminal_widget_vpin:()=>KA,mpython_blynktimer:()=>eL,mpython_blynktimer_run:()=>QA});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>pL,cc_g1_read_joystick:()=>aL,cc_g1_read_key:()=>uL,cc_g1_turnoff:()=>rL});var Z={};t.r(Z),t.d(Z,{ce_go_dc_motor:()=>OL,ce_go_get_led_bright:()=>IL,ce_go_get_led_state:()=>TL,ce_go_hall_attachInterrupt:()=>EL,ce_go_hall_data:()=>cL,ce_go_hall_initialize:()=>RL,ce_go_led_bright:()=>dL,ce_go_led_brightness:()=>ML,ce_go_light_number:()=>lL,ce_go_pin_light:()=>LL,ce_go_pin_near:()=>CL,ce_go_pin_near_line:()=>gL,ce_go_pin_near_state_change:()=>SL,ce_go_stepper_keep:()=>hL,ce_go_stepper_stop:()=>mL,sensor_mixgome_eulerangles:()=>AL});var $={};t.r($),t.d($,{communicate_bluetooth_central_init:()=>pN,communicate_bluetooth_connect:()=>rN,communicate_bluetooth_disconnect:()=>lN,communicate_bluetooth_handle:()=>mN,communicate_bluetooth_is_connected:()=>IN,communicate_bluetooth_mac:()=>dN,communicate_bluetooth_peripheral_init:()=>aN,communicate_bluetooth_recv:()=>hN,communicate_bluetooth_recv_only:()=>MN,communicate_bluetooth_scan:()=>uN,communicate_bluetooth_send:()=>TN,communicate_espnow_init:()=>ON,communicate_espnow_init_new:()=>EN,communicate_i2c_available:()=>XL,communicate_i2c_init:()=>fL,communicate_i2c_master_read:()=>YL,communicate_i2c_onboard:()=>NL,communicate_i2c_read:()=>FL,communicate_i2c_scan:()=>vL,communicate_i2c_write:()=>PL,communicate_ir_recv_init:()=>jL,communicate_ir_send_init:()=>iN,communicate_ow_init:()=>WL,communicate_ow_read:()=>qL,communicate_ow_reset:()=>JL,communicate_ow_scan:()=>KL,communicate_ow_select:()=>QL,communicate_ow_write:()=>zL,communicate_spi_buffer:()=>VL,communicate_spi_init:()=>yL,communicate_spi_onboard:()=>DL,communicate_spi_read:()=>BL,communicate_spi_read_output:()=>GL,communicate_spi_readinto:()=>UL,communicate_spi_readinto_output:()=>wL,communicate_spi_set:()=>bL,communicate_spi_write:()=>kL,communicate_spi_write_readinto:()=>HL,espnow_radio_channel:()=>AN,espnow_radio_channel_new:()=>NN,espnow_radio_on_off:()=>DN,espnow_radio_rec:()=>FN,espnow_radio_recv:()=>vN,espnow_radio_recv_certain_msg:()=>YN,espnow_radio_recv_certain_msg_new:()=>xN,espnow_radio_recv_msg:()=>PN,espnow_radio_recv_new:()=>XN,espnow_radio_send:()=>fN,espnow_radio_txpower:()=>LN,i2c_slave_onreceive:()=>xL,internal_variable:()=>ZL,ir_recv_timeout:()=>eN,ir_transmit_busy:()=>oN,ir_transmit_conventional_data:()=>nN,ir_transmit_raw_code:()=>_N,ir_transmit_study_code:()=>sN,ir_whether_recv:()=>tN,lora_init:()=>yN,lora_packet:()=>bN,lora_recv:()=>BN,lora_send:()=>VN,network_espnow_info:()=>cN,network_espnow_mac:()=>RN,network_espnow_recv:()=>gN,network_espnow_recv_handle:()=>SN,network_espnow_send:()=>CN,recv_fun:()=>$L,urequests_attribute:()=>UN,urequests_get:()=>GN,urequests_method:()=>wN});var tt={};t.r(tt),t.d(tt,{display_animate:()=>ID,display_circle:()=>TD,display_color_seclet:()=>AD,display_draw_4strings:()=>oD,display_fill:()=>dD,display_lcd_use_i2c_init:()=>PD,display_line:()=>uD,display_line_arbitrarily:()=>pD,display_matrix_extern_bright_point:()=>$N,display_matrix_extern_bright_screen:()=>eD,display_matrix_extern_clear:()=>QN,display_matrix_extern_get_pixel:()=>ZN,display_matrix_extern_get_screen_pixel:()=>tD,display_matrix_extern_image_builtins:()=>iD,display_matrix_extern_scroll_string:()=>qN,display_matrix_extern_scroll_string_delay:()=>zN,display_matrix_extern_shift:()=>jN,display_matrix_extern_show_frame_string:()=>KN,display_matrix_extern_show_frame_string_delay:()=>JN,display_matrix_extern_show_image:()=>HN,display_matrix_extern_show_image_or_string_delay:()=>WN,display_matrix_use_i2c_init:()=>kN,display_oled_drawPixel:()=>mD,display_oled_showBitmap:()=>hD,display_oled_use_i2c_init:()=>yD,display_onoff:()=>rD,display_rect:()=>aD,display_tm1650_power:()=>ED,display_tm1650_set_brightness:()=>gD,display_tm1650_show_dot:()=>cD,display_tm1650_show_num:()=>RD,display_tm_use_i2c_init:()=>OD,display_triangle:()=>MD,display_use_i2c_init:()=>_D,extern_oled_bright_point:()=>qD,extern_oled_clear:()=>WD,extern_oled_get_pixel:()=>JD,extern_oled_hvline:()=>QD,extern_oled_line:()=>jD,extern_oled_scroll_string:()=>kD,extern_oled_scroll_string_delay:()=>HD,extern_oled_shape_rect:()=>zD,extern_oled_shift:()=>KD,extern_oled_show_frame_string:()=>UD,extern_oled_show_frame_string_delay:()=>wD,extern_oled_show_image:()=>bD,extern_oled_show_image_or_string_delay:()=>GD,extern_oled_show_image_xy:()=>VD,extern_oled_show_string:()=>BD,image_shift:()=>lD,lcd_backlight:()=>XD,lcd_clear:()=>xD,lcd_print_string:()=>YD,lcd_show_image_or_string_delay:()=>vD,matrix_extern_image_arithmetic:()=>nD,matrix_extern_image_invert:()=>sD,tft_fill:()=>fD,tft_line_arbitrarily:()=>FD,tft_scroll_string_delay:()=>DD,tft_show_frame_string_delay:()=>ND,tft_show_image_or_string_delay:()=>LD,tft_show_image_xy:()=>SD,tft_use_spi_init:()=>CD});var et={};t.r(et),t.d(et,{bitbot_display_image_create:()=>yf,display_bright_point:()=>If,display_bright_screen:()=>Mf,display_clear:()=>af,display_get_pixel:()=>df,display_get_screen_pixel:()=>Tf,display_image_builtins:()=>_f,display_image_builtins_all:()=>of,display_image_create:()=>pf,display_scroll_string:()=>nf,display_scroll_string_delay:()=>sf,display_shift:()=>lf,display_show_frame_string:()=>tf,display_show_frame_string_delay:()=>ef,display_show_image:()=>ZD,display_show_image_or_string_delay:()=>$D,draw_pointer:()=>oF,image_arithmetic:()=>uf,image_invert:()=>rf,mixbot_display_bright_screen:()=>Xf,mixbot_display_get_ambientbright:()=>Yf,mixbot_display_get_screen_pixel:()=>vf,mixbot_display_image_create:()=>Pf,mixbot_display_rotate:()=>xf,mixgo_display_image_create_new:()=>Ef,mixgome_display_font:()=>Of,mixgome_display_image_create:()=>hf,mixgomini_display_image_create:()=>mf,mpython_display_hvline:()=>ff,mpython_display_line:()=>Ff,mpython_display_shape_rect:()=>Df,mpython_pbm_image:()=>Rf,onboard_oled_bright_point:()=>Nf,onboard_oled_scroll_string_delay:()=>Lf,onboard_oled_show_frame_string_delay:()=>Af,onboard_oled_show_image:()=>cf,onboard_oled_show_image_or_string_delay:()=>Sf,onboard_oled_show_image_xy:()=>gf,onboard_oled_show_string:()=>Cf,onboard_tft_bright_point:()=>Qf,onboard_tft_bright_screen:()=>Zf,onboard_tft_clear:()=>Jf,onboard_tft_clock_clear:()=>sF,onboard_tft_clock_draw:()=>nF,onboard_tft_clock_get_rtctime:()=>eF,onboard_tft_clock_init:()=>tF,onboard_tft_clock_set_time:()=>iF,onboard_tft_display_hvline:()=>Wf,onboard_tft_display_line:()=>Kf,onboard_tft_display_shape_circle:()=>_F,onboard_tft_display_shape_rect:()=>Hf,onboard_tft_fill:()=>$f,onboard_tft_get_pixel:()=>zf,onboard_tft_get_screen_pixel:()=>jf,onboard_tft_scroll_string:()=>wf,onboard_tft_scroll_string_delay:()=>kf,onboard_tft_shift:()=>qf,onboard_tft_show_frame_string:()=>Gf,onboard_tft_show_frame_string_delay:()=>Uf,onboard_tft_show_image:()=>bf,onboard_tft_show_image_or_string_delay:()=>Bf,onboard_tft_show_image_xy:()=>Vf});var it={};t.r(it),t.d(it,{factory_block:()=>TF,factory_block_return:()=>MF,factory_block_return_with_textarea:()=>mF,factory_block_with_textarea:()=>hF,factory_callMethod_noreturn:()=>dF,factory_callMethod_return:()=>IF,factory_declare:()=>lF,factory_from_import:()=>pF,factory_function_noreturn:()=>uF,factory_function_return:()=>rF,factory_import:()=>aF,folding_block:()=>OF});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>YF,inout_analog_read:()=>LF,inout_analog_read_init:()=>vF,inout_analog_write:()=>CF,inout_analog_write_init:()=>PF,inout_analog_write_set:()=>SF,inout_digital_init:()=>fF,inout_digital_read:()=>cF,inout_digital_write:()=>RF,inout_highlow:()=>EF,inout_pin_attachInterrupt:()=>DF,inout_pin_pressed:()=>NF,inout_pin_pressed_init:()=>XF,inout_pwm_analog_write:()=>gF,inout_pwm_analog_write_init:()=>FF,inout_pwm_analog_write_set_freq:()=>AF});var st={};t.r(st),t.d(st,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>$F,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>jF,IOT_EMQX_PING:()=>tP,IOT_FORMATTING:()=>zF,IOT_FORMAT_STRING:()=>QF,IOT_MIXIO_NTP:()=>eP,IOT_MIXIO_PUBLISH:()=>wF,IOT_MIXIO_SUBSCRIBE:()=>kF,iot_client_onboard:()=>iP,iot_http_client:()=>nP,iot_http_data:()=>sP,iot_mixio_check:()=>KF,iot_mixio_connect:()=>UF,iot_mixio_connect_only:()=>WF,iot_mixio_disconnect:()=>HF,iot_mixio_format_msg:()=>qF,iot_mixio_format_topic:()=>JF,iot_mixly_key:()=>ZF,iot_mqtt_client:()=>_P,iot_mqtt_data:()=>oP,iot_onenet_check:()=>BF,iot_onenet_connect:()=>yF,iot_onenet_disconnect:()=>bF,iot_onenet_publish:()=>GF,iot_onenet_publish_dict:()=>VF,iot_wifi_connect:()=>xF});var _t={};t.r(_t),t.d(_t,{network_ap_connect:()=>MP,network_connect:()=>aP,network_get_connect:()=>rP,network_get_wifi:()=>TP,network_init:()=>pP,network_is_active:()=>IP,network_open:()=>dP,network_scan:()=>hP,network_server:()=>mP,network_socket_accept:()=>gP,network_socket_bind:()=>EP,network_socket_close:()=>NP,network_socket_connect:()=>RP,network_socket_init:()=>OP,network_socket_listen:()=>cP,network_socket_receive:()=>CP,network_socket_receive_from:()=>AP,network_socket_send:()=>SP,network_socket_send_to:()=>LP,network_stop:()=>lP,network_wifi_connect:()=>uP,ntptime_address:()=>vP,ntptime_time:()=>PP,requests_attribute:()=>fP,requests_attribute2:()=>XP,requests_get:()=>DP,requests_get2:()=>YP,requests_method:()=>FP,requests_post:()=>xP});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>Sv,PS2_Button:()=>Nv,PS2_Buttons:()=>Dv,PS2_Buttons_new:()=>yv,PS2_State:()=>fv,PS2_init:()=>Av,PS2_init_new:()=>Xv,PS2_stk:()=>Fv,PS2_stk_new:()=>bv,PS2_vibration:()=>Lv,PS2_vibration_new:()=>xv,RTC_get_time:()=>vv,RTC_set_date:()=>kP,RTC_set_datetime:()=>Pv,RTC_set_time:()=>wP,esp32_s2_weather_init:()=>Rv,esp32_s2_weather_rain:()=>gv,esp32_s2_weather_wd:()=>cv,esp32_s2_weather_ws:()=>Cv,extern_rfid_read:()=>av,extern_rfid_readcontent:()=>rv,extern_rfid_readid:()=>uv,extern_rfid_status:()=>Iv,extern_rfid_write:()=>lv,extern_rfid_write_return:()=>dv,gnss_get_data:()=>Gv,gnss_have_data:()=>Uv,mixbot_sensor_extern_get_addr:()=>Qv,mixbot_sensor_extern_set_addr:()=>jv,pm25_get_data:()=>Bv,robot_button_extern_get_value:()=>wv,robot_color_extern_get_value:()=>Jv,robot_infrared_extern_get_value:()=>Hv,robot_infrared_extern_grey_get_value:()=>Wv,robot_potentiometer_extern_get_value:()=>Kv,robot_sonar_extern_get_value:()=>qv,robot_sonar_extern_led:()=>zv,robot_touch_extern_get_value:()=>kv,sensor_APDS9960_extern:()=>ZP,sensor_DS18X20:()=>iY,sensor_LTR308_extern:()=>$P,sensor_LTR390UV_extern:()=>iv,sensor_MAX30102_extern:()=>jP,sensor_QMC5883L_extern:()=>nv,sensor_VL530LX_extern:()=>ov,sensor_aht11_extern:()=>_v,sensor_bmp:()=>qP,sensor_dht11:()=>Yv,sensor_distance_hrsc04:()=>UP,sensor_hp203_extern:()=>tv,sensor_ltr381_extern:()=>ev,sensor_mixgo_extern_button_attachInterrupt:()=>BP,sensor_mixgo_extern_button_get_presses:()=>VP,sensor_mixgo_extern_button_is_pressed:()=>yP,sensor_mixgo_extern_button_was_pressed:()=>bP,sensor_mixgo_extern_light:()=>HP,sensor_mixgo_extern_pin_near:()=>KP,sensor_mixgo_extern_sound:()=>WP,sensor_mixgoce_hot_wheel_degrees:()=>Ev,sensor_mixgoce_hot_wheel_is_touched:()=>Ov,sensor_mpu9250_attachGestureInterrupt:()=>GP,sensor_rtc_init:()=>JP,sensor_sht:()=>zP,sensor_shtc3_extern:()=>sv,sensor_use_i2c_init:()=>QP,sensor_use_spi_init:()=>pv,sensor_use_uart_init:()=>Vv,sensor_weather_solo_init:()=>Zv,sensor_weather_solo_rain:()=>eY,sensor_weather_solo_wd:()=>$v,sensor_weather_solo_ws:()=>tY,weather_data:()=>Tv,weather_have_data:()=>Mv,weather_set_label:()=>mv,weather_uart_mixio:()=>hv});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>lY,bitbot_als_num:()=>FX,dht11:()=>VX,number1:()=>dY,number2:()=>IY,number3:()=>TY,number4:()=>MY,number5:()=>hY,number6:()=>mY,number7:()=>OY,onboard_RTC_get_time:()=>pX,onboard_RTC_get_time_str:()=>rX,onboard_RTC_get_timestamp:()=>aX,onboard_RTC_set_datetime:()=>_X,onboard_RTC_settime_string:()=>oX,onboard_RTC_timestamp_totuple:()=>uX,rfid_readcontent:()=>YY,rfid_readid:()=>vY,rfid_write:()=>XY,rfid_write_return:()=>xY,sensor_LTR308:()=>NY,sensor_adxl345_get_acceleration:()=>HY,sensor_aht11:()=>FY,sensor_bitbot_ALS:()=>fX,sensor_button_get_presses:()=>YX,sensor_button_is_pressed:()=>PX,sensor_button_was_pressed:()=>vX,sensor_compass_reset:()=>QY,sensor_ds18x20:()=>AY,sensor_eulerangles:()=>bY,sensor_get_acceleration:()=>yY,sensor_get_temperature:()=>PY,sensor_hp203:()=>fY,sensor_light:()=>bX,sensor_lm35:()=>LY,sensor_mixbot_get_gyro:()=>DX,sensor_mixbot_patrol_calibrate:()=>AX,sensor_mixbot_patrol_value:()=>LX,sensor_mixbot_temperature:()=>NX,sensor_mixgo_LTR308:()=>CY,sensor_mixgo_button_attachInterrupt:()=>oY,sensor_mixgo_button_get_presses:()=>_Y,sensor_mixgo_button_is_pressed:()=>nY,sensor_mixgo_button_was_pressed:()=>sY,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>IX,sensor_mixgo_cc_mmc5603_get_angle:()=>dX,sensor_mixgo_cc_mmc5603_get_magnetic:()=>lX,sensor_mixgo_light:()=>yX,sensor_mixgo_nova_LTR308:()=>SY,sensor_mixgo_nova_pin_near:()=>gY,sensor_mixgo_pin_near:()=>cY,sensor_mixgo_pin_near_double:()=>RY,sensor_mixgo_pin_near_single:()=>EY,sensor_mixgo_pin_pressed:()=>wY,sensor_mixgo_touch_slide:()=>UY,sensor_mixgocar42_button_attachInterrupt:()=>rY,sensor_mixgocar42_button_get_presses:()=>uY,sensor_mixgocar42_button_is_pressed:()=>pY,sensor_mixgocar42_button_was_pressed:()=>aY,sensor_mixgocar_battery_left:()=>SX,sensor_mixgocar_pin_near:()=>gX,sensor_mixgocar_pin_near_line:()=>cX,sensor_mixgocar_pin_near_state_change:()=>CX,sensor_mixgoce_pin_pressed:()=>GY,sensor_mixgoce_temperature:()=>MX,sensor_mixgome_temperature:()=>TX,sensor_mpu9250_calibrate_compass:()=>JY,sensor_mpu9250_field_strength:()=>zY,sensor_mpu9250_gesture:()=>VY,sensor_mpu9250_get_acceleration:()=>BY,sensor_mpu9250_get_gyro:()=>KY,sensor_mpu9250_get_magnetic:()=>WY,sensor_mpu9250_temperature:()=>qY,sensor_mpython_pin_pressed:()=>kY,sensor_mpython_qmi8658_get_gyro:()=>hX,sensor_mpython_qmi8658_temperature:()=>mX,sensor_onboard_compass_reset:()=>sX,sensor_onboard_mpu9250_calibrate_compass:()=>eX,sensor_onboard_mpu9250_field_strength:()=>nX,sensor_onboard_mpu9250_gesture:()=>jY,sensor_onboard_mpu9250_get_acceleration:()=>ZY,sensor_onboard_mpu9250_get_gyro:()=>tX,sensor_onboard_mpu9250_get_magnetic:()=>$Y,sensor_onboard_mpu9250_temperature:()=>iX,sensor_pin_near:()=>xX,sensor_pin_pressed:()=>XX,sensor_rm_acc:()=>RX,sensor_rm_battery_left:()=>EX,sensor_rm_pin_near_double:()=>OX,sensor_sound:()=>DY});var at={};t.r(at),t.d(at,{serial_any:()=>kX,serial_print:()=>BX,serial_print_byte:()=>GX,serial_print_hex:()=>wX,serial_println:()=>UX,serial_read_from_ai:()=>tx,serial_readline:()=>WX,serial_readstr:()=>HX,serial_send_to_ai:()=>$X,serial_softserial:()=>KX,serial_softserial_new:()=>JX,system_input:()=>qX,system_print:()=>zX,system_print_end:()=>jX,system_print_inline:()=>QX,system_print_many:()=>ZX});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>dx,Timer_init:()=>Nx,base_delay:()=>Fx,controls_delay:()=>mx,controls_delay_new:()=>Ox,controls_end_program:()=>Tx,controls_millis:()=>Ix,controls_uname:()=>hx,reset:()=>Mx,system_bitbot_shutdown:()=>Lx,system_device_name:()=>rx,system_device_serial_number:()=>lx,system_event_bus_source:()=>ax,system_event_bus_value:()=>ux,system_machine_reset:()=>Ax,system_on_event:()=>_x,system_raise_event:()=>sx,system_reset:()=>ix,system_run_in_background:()=>ex,system_ticks_diff:()=>cx,system_timer:()=>Rx,system_timer_init:()=>gx,system_timestamp:()=>ox,system_value:()=>px,system_wait:()=>nx,system_wdt_feed:()=>Sx,system_wdt_init:()=>Cx,time_ticks_diff:()=>fx,timer:()=>Ex,timer2:()=>Dx});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>kx,Air_now_content:()=>yx,Geo_moon_content:()=>Wx,Geo_sun_content:()=>Hx,Life_suggestion_content:()=>Vx,Location_search_content:()=>Gx,Tide_daily_content:()=>Bx,WEATHER_DAILY:()=>vx,WEATHER_HOUR:()=>Yx,WEATHER_NOW:()=>Px,Weather_alarm_content:()=>bx,Weather_daily:()=>Ux,Weather_daily_content:()=>wx,Weather_now:()=>Xx,Weather_now_content:()=>xx});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>My,inout_analog_atten:()=>ny,inout_analog_read:()=>iy,inout_analog_read_init:()=>uy,inout_analog_write:()=>$x,inout_analog_write_init:()=>ay,inout_analog_write_set:()=>ty,inout_analog_write_set_freq:()=>dy,inout_digital_init:()=>oy,inout_digital_read:()=>jx,inout_digital_write:()=>Qx,inout_highlow:()=>zx,inout_pinMode:()=>ly,inout_pin_attachInterrupt:()=>_y,inout_pin_pressed:()=>sy,inout_pin_pressed_init:()=>ry,inout_pwm_analog_write:()=>Zx,inout_pwm_analog_write_init:()=>py,inout_pwm_analog_write_set_freq:()=>ey,pin_pressed:()=>Ty,pin_pressed_init:()=>Iy});var dt={};t.r(dt),t.d(dt,{mini_g2_aht11:()=>my,mini_g2_hp203:()=>Oy,mini_g2_rfid_readcontent:()=>cy,mini_g2_rfid_readid:()=>Ry,mini_g2_rfid_status:()=>Sy,mini_g2_rfid_write:()=>gy,mini_g2_rfid_write_outcome:()=>Cy,mini_g2_varistor:()=>Ey});var It={};t.r(It),t.d(It,{me_go_dc_motor:()=>Yy,me_go_get_led_bright:()=>Dy,me_go_get_led_state:()=>fy,me_go_hall_attachInterrupt:()=>Xy,me_go_hall_data:()=>yy,me_go_hall_initialize:()=>xy,me_go_led_bright:()=>Ny,me_go_led_brightness:()=>Fy,me_go_light_number:()=>Ly,me_go_pin_light:()=>Uy,me_go_pin_near:()=>Vy,me_go_pin_near_line:()=>by,me_go_pin_near_state_change:()=>By,me_go_stepper_keep:()=>Py,me_go_stepper_stop:()=>vy,sensor_mixgome_eulerangles:()=>Gy});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>Qy,analog_output:()=>Zy,espnow_channel:()=>Jy,haskylens_model:()=>qy,i2c_A_pin:()=>$y,i2c_B_pin:()=>tb,pins_analog:()=>_b,pins_analog_pin:()=>ob,pins_axis:()=>Cb,pins_brightness:()=>Sb,pins_builtinimg:()=>hb,pins_builtinimg_extern:()=>mb,pins_button:()=>ub,pins_buttonB:()=>rb,pins_dac:()=>pb,pins_dac_pin:()=>ab,pins_digital:()=>ky,pins_digital_dot:()=>vb,pins_digital_pin:()=>Hy,pins_exlcdh:()=>cb,pins_exlcdv:()=>gb,pins_imglist:()=>Ob,pins_input_pin:()=>Wy,pins_one_more:()=>Pb,pins_output_pin:()=>Ky,pins_playlist:()=>Eb,pins_playlist_extern:()=>Rb,pins_pwm:()=>lb,pins_pwm_pin:()=>db,pins_radio_datarate:()=>Fb,pins_radio_power:()=>fb,pins_serial:()=>Mb,pins_tone_notes:()=>Db,pins_touch:()=>Tb,pins_touch_pin:()=>Ib,pins_tts_bgmusic:()=>Nb,pins_tts_builtin_music:()=>Lb,pins_tts_voice:()=>Ab,pwm_input:()=>zy,pwm_output:()=>jy,spi_A_pin:()=>eb,spi_B_pin:()=>ib,spi_C_pin:()=>nb,spi_D_pin:()=>sb});var Mt={};t.r(Mt),t.d(Mt,{inout_analog_atten:()=>Jb,inout_analog_read:()=>Gb,inout_analog_read_init:()=>Kb,inout_analog_write:()=>bb,inout_analog_write_init:()=>Wb,inout_analog_write_set:()=>Vb,inout_digital_init:()=>kb,inout_digital_read:()=>xb,inout_digital_write:()=>Xb,inout_highlow:()=>Yb,inout_pin_attachInterrupt:()=>wb,inout_pin_pressed:()=>Ub,inout_pin_pressed_init:()=>qb,inout_pwm_analog_write:()=>yb,inout_pwm_analog_write_init:()=>Hb,inout_pwm_analog_write_set_freq:()=>Bb});var ht={};t.r(ht),t.d(ht,{mini_g2_aht11:()=>zb,mini_g2_hp203:()=>Qb,mini_g2_rfid_readcontent:()=>$b,mini_g2_rfid_readid:()=>Zb,mini_g2_rfid_status:()=>iV,mini_g2_rfid_write:()=>tV,mini_g2_rfid_write_outcome:()=>eV,mini_g2_varistor:()=>jb});var mt={};t.r(mt),t.d(mt,{me_go_dc_motor:()=>rV,me_go_get_led_bright:()=>_V,me_go_get_led_state:()=>oV,me_go_hall_attachInterrupt:()=>lV,me_go_hall_data:()=>IV,me_go_hall_initialize:()=>dV,me_go_led_bright:()=>sV,me_go_led_brightness:()=>pV,me_go_light_number:()=>nV,me_go_pin_light:()=>OV,me_go_pin_near:()=>MV,me_go_pin_near_line:()=>TV,me_go_pin_near_state_change:()=>hV,me_go_stepper_keep:()=>aV,me_go_stepper_stop:()=>uV,sensor_mixgome_eulerangles:()=>mV});var Ot={};t.r(Ot),t.d(Ot,{analog_input:()=>DV,analog_output:()=>FV,espnow_channel:()=>LV,haskylens_model:()=>NV,i2c_A_pin:()=>PV,i2c_B_pin:()=>vV,pins_analog:()=>VV,pins_analog_pin:()=>bV,pins_axis:()=>ZV,pins_brightness:()=>eB,pins_builtinimg:()=>JV,pins_builtinimg_extern:()=>qV,pins_button:()=>RV,pins_buttonB:()=>cV,pins_dac:()=>wV,pins_dac_pin:()=>UV,pins_digital:()=>EV,pins_digital_dot:()=>uB,pins_digital_pin:()=>gV,pins_exlcdh:()=>$V,pins_exlcdv:()=>tB,pins_imglist:()=>zV,pins_input_pin:()=>CV,pins_interrupt:()=>WV,pins_one_more:()=>aB,pins_output_pin:()=>SV,pins_playlist:()=>QV,pins_playlist_extern:()=>jV,pins_pwm:()=>GV,pins_pwm_input:()=>AV,pins_pwm_pin:()=>BV,pins_radio_datarate:()=>pB,pins_radio_power:()=>oB,pins_serial:()=>KV,pins_tone_notes:()=>_B,pins_touch:()=>HV,pins_touch_pin:()=>kV,pins_tts_bgmusic:()=>sB,pins_tts_builtin_music:()=>nB,pins_tts_voice:()=>iB,pwm_output:()=>fV,spi_A_pin:()=>YV,spi_B_pin:()=>XV,spi_C_pin:()=>xV,spi_D_pin:()=>yV});const Et=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; +(()=>{"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:()=>xt,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:()=>$t,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:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>Ht,datetime_fromtimestamp:()=>re,do_while:()=>_e,garbage_collection:()=>oe,get_mem_alloc:()=>pe,get_mem_free:()=>ae,get_unique_identifier:()=>ue});var n={};t.r(n),t.d(n,{base_map:()=>Pe,math_arithmetic:()=>Me,math_bit:()=>me,math_constant:()=>Ie,math_constant_mp:()=>Te,math_constrain:()=>Se,math_dec:()=>Ee,math_indexer_number:()=>Le,math_map:()=>Ae,math_max_min:()=>ce,math_number:()=>de,math_number_base_conversion:()=>ge,math_random:()=>Ce,math_random_seed:()=>Ne,math_round:()=>De,math_selfcalcu:()=>he,math_to_int:()=>Re,math_trig:()=>Oe,text_to_number:()=>fe,text_to_number_skulpt:()=>Fe,turn_to_int:()=>ve});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ve,char_to_ascii:()=>Be,number_to_text:()=>Ge,os_system:()=>li,text:()=>Xe,text_capital:()=>ze,text_center:()=>Qe,text_char:()=>ye,text_char_at:()=>ke,text_char_at2:()=>we,text_char_at3:()=>pi,text_compareTo:()=>oi,text_compare_to:()=>qe,text_create_with_container:()=>ni,text_create_with_item:()=>si,text_encode:()=>ui,text_equals_starts_ends:()=>Je,text_eval:()=>ri,text_find:()=>je,text_format:()=>ii,text_format_noreturn:()=>ai,text_join:()=>be,text_join_seq:()=>Ze,text_length:()=>Ue,text_random_char:()=>He,text_replace:()=>$e,text_split:()=>ti,text_strip:()=>ei,text_substring:()=>Ke,text_substring2:()=>We,text_substring3:()=>_i,text_textarea:()=>xe});var _={};t.r(_),t.d(_,{ENUMERATE:()=>Ji,enumerate:()=>qi,list_many_input:()=>Xi,list_tolist:()=>Vi,list_tolist2:()=>Ki,list_trig:()=>Pi,lists_2d_get_col_row_data:()=>hi,lists_2d_get_data_with_col_row:()=>Mi,lists_append_extend:()=>gi,lists_change_to:()=>Yi,lists_change_to_general:()=>yi,lists_clear:()=>Ni,lists_create_with:()=>mi,lists_create_with2:()=>Bi,lists_create_with_container:()=>Ei,lists_create_with_item:()=>Ri,lists_create_with_noreturn:()=>xi,lists_create_with_text:()=>Oi,lists_create_with_text2:()=>Gi,lists_del_general:()=>bi,lists_find:()=>Fi,lists_getIndex3:()=>Ui,lists_getSublist3:()=>wi,lists_get_index:()=>Ii,lists_get_random_item:()=>Ci,lists_get_random_sublist:()=>Si,lists_get_sublist:()=>Ti,lists_insert_value:()=>Ai,lists_insert_value2:()=>Hi,lists_pop:()=>fi,lists_remove_at:()=>Di,lists_remove_at2:()=>Wi,lists_reverse:()=>Li,lists_setIndex3:()=>ki,lists_set_index:()=>ci,lists_sort:()=>vi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>ln,dicts_add_or_change:()=>nn,dicts_clear:()=>on,dicts_create_with:()=>Qi,dicts_create_with_container:()=>ji,dicts_create_with_item:()=>Zi,dicts_create_with_noreturn:()=>Tn,dicts_deldict:()=>rn,dicts_delete:()=>sn,dicts_get:()=>tn,dicts_get_default:()=>en,dicts_items:()=>pn,dicts_keys:()=>$i,dicts_length:()=>un,dicts_pop:()=>dn,dicts_setdefault:()=>In,dicts_to_json:()=>hn,dicts_todict:()=>Mn,dicts_update:()=>_n,dicts_values:()=>an,json_to_dicts:()=>mn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Cn,logic_compare:()=>En,logic_compare_continous:()=>Rn,logic_is:()=>Nn,logic_is_in:()=>Ln,logic_negate:()=>gn,logic_null:()=>Sn,logic_operation:()=>cn,logic_tobool:()=>Dn,logic_true_or_false:()=>An});var a={};t.r(a),t.d(a,{sdcard_mount:()=>jn,sdcard_use_spi_init:()=>Qn,storage_can_write_ornot:()=>bn,storage_change_dir:()=>qn,storage_close_file:()=>Bn,storage_delete_file:()=>Un,storage_file_seek:()=>Hn,storage_file_tell:()=>kn,storage_file_write:()=>Yn,storage_fileopen:()=>Fn,storage_fileopen_new:()=>Pn,storage_fileopen_new_encoding:()=>vn,storage_get_a_line:()=>yn,storage_get_contents:()=>xn,storage_get_contents_without_para:()=>Xn,storage_get_current_dir:()=>Wn,storage_get_file_size:()=>wn,storage_get_filename:()=>Vn,storage_is_file:()=>zn,storage_list_all_files:()=>Gn,storage_make_dir:()=>Kn,storage_open_file_with_os:()=>fn,storage_rename:()=>Jn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ss,procedures_callreturn:()=>_s,procedures_defnoreturn:()=>ts,procedures_defreturn:()=>es,procedures_ifreturn:()=>os,procedures_mutatorarg:()=>ns,procedures_mutatorcontainer:()=>is,procedures_return:()=>ps});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Es,tuple_create_with:()=>us,tuple_create_with_container:()=>rs,tuple_create_with_item:()=>ls,tuple_create_with_noreturn:()=>Cs,tuple_create_with_text2:()=>ds,tuple_create_with_text_return:()=>Is,tuple_del:()=>hs,tuple_find:()=>Rs,tuple_getIndex:()=>Ts,tuple_getSublist:()=>gs,tuple_get_random_item:()=>As,tuple_get_sublist:()=>Ss,tuple_join:()=>ms,tuple_length:()=>Ms,tuple_max:()=>Os,tuple_totuple:()=>Ls,tuple_trig:()=>cs});var l={};t.r(l),t.d(l,{set_add_discard:()=>ys,set_clear:()=>Ys,set_create_with:()=>Ds,set_create_with_container:()=>fs,set_create_with_item:()=>Fs,set_create_with_text_return:()=>Bs,set_length:()=>Ps,set_operate:()=>Xs,set_operate_update:()=>xs,set_pop:()=>vs,set_sub:()=>bs,set_toset:()=>Gs,set_update:()=>Vs});var d={};t.r(d),t.d(d,{html_content:()=>Ws,html_content_more:()=>Ks,html_document:()=>ws,html_form:()=>qs,html_head_body:()=>Hs,html_style:()=>Js,html_style_color:()=>Qs,html_style_content:()=>zs,html_text:()=>js,html_title:()=>ks});var I={};t.r(I),t.d(I,{attribute_access:()=>l_,function_call:()=>a_,function_call_container:()=>u_,function_call_item:()=>r_,raw_block:()=>t_,raw_empty:()=>i_,raw_expression:()=>e_,raw_table:()=>$s,text_comment:()=>n_,text_print_multiple:()=>__,text_print_multiple_container:()=>o_,text_print_multiple_item:()=>p_,type_check:()=>s_});var T={};t.r(T),t.d(T,{controls_type:()=>h_,controls_typeLists:()=>m_,lists_zip:()=>O_,unpack_iterable_object:()=>E_,variables_change:()=>T_,variables_get:()=>d_,variables_global:()=>M_,variables_set:()=>I_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>f_,base_setup:()=>c_,controls_delay:()=>D_,controls_flow_statements:()=>N_,controls_for:()=>S_,controls_forEach:()=>X_,controls_for_range:()=>A_,controls_if:()=>g_,controls_interrupts:()=>v_,controls_lambda:()=>y_,controls_main:()=>R_,controls_millis:()=>F_,controls_nointerrupts:()=>Y_,controls_pass:()=>V_,controls_range:()=>x_,controls_repeat:()=>K_,controls_repeat_ext:()=>U_,controls_thread:()=>B_,controls_try_finally:()=>C_,controls_whileUntil:()=>L_,datetime_fromtimestamp:()=>J_,do_while:()=>G_,garbage_collection:()=>w_,get_mem_alloc:()=>k_,get_mem_free:()=>H_,get_unique_identifier:()=>W_,reset:()=>P_,time_sleep:()=>b_});var h={};t.r(h),t.d(h,{base_map:()=>Mo,math_arithmetic:()=>Z_,math_bit:()=>j_,math_constant:()=>z_,math_constant_mp:()=>Q_,math_constrain:()=>po,math_dec:()=>io,math_indexer_number:()=>ro,math_map:()=>oo,math_max_min:()=>so,math_number:()=>q_,math_number_base_conversion:()=>ao,math_random:()=>_o,math_random_seed:()=>uo,math_round:()=>lo,math_selfcalcu:()=>$_,math_single:()=>to,math_to_int:()=>no,math_trig:()=>eo,text_to_number:()=>Io,text_to_number_skulpt:()=>To,turn_to_int:()=>ho});var m={};t.r(m),t.d(m,{ascii_to_char:()=>co,char_to_ascii:()=>go,number_to_text:()=>Co,os_system:()=>Ko,text:()=>mo,text_capital:()=>vo,text_center:()=>Yo,text_char:()=>Eo,text_char_at:()=>Lo,text_char_at2:()=>Ao,text_char_at3:()=>ko,text_compareTo:()=>wo,text_compare_to:()=>fo,text_encode:()=>Ho,text_equals_starts_ends:()=>Do,text_eval:()=>Wo,text_find:()=>Xo,text_format:()=>Bo,text_format_noreturn:()=>Go,text_join:()=>Ro,text_join_seq:()=>xo,text_length:()=>So,text_random_char:()=>No,text_replace:()=>yo,text_split:()=>bo,text_strip:()=>Vo,text_substring:()=>Po,text_substring2:()=>Fo,text_substring3:()=>Uo,text_textarea:()=>Oo});var O={};t.r(O),t.d(O,{enumerate:()=>Ap,list_many_input:()=>dp,list_tolist:()=>Cp,list_tolist2:()=>Sp,list_trig:()=>up,lists_2d_get_col_row_data:()=>zo,lists_2d_get_data_with_col_row:()=>qo,lists_append_extend:()=>tp,lists_change_to:()=>lp,lists_change_to_general:()=>Tp,lists_clear:()=>_p,lists_create_with:()=>Qo,lists_create_with2:()=>hp,lists_create_with_noreturn:()=>Ip,lists_create_with_text:()=>jo,lists_create_with_text2:()=>mp,lists_del_general:()=>Mp,lists_find:()=>op,lists_getIndex3:()=>Op,lists_getSublist3:()=>Ep,lists_get_index:()=>Zo,lists_get_random_item:()=>ep,lists_get_random_sublist:()=>ip,lists_get_sublist:()=>Jo,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:()=>$o,lists_sort:()=>rp});var E={};t.r(E),t.d(E,{dicts_add_change_del:()=>Vp,dicts_add_or_change:()=>Fp,dicts_clear:()=>Yp,dicts_create_with:()=>Lp,dicts_create_with_noreturn:()=>Up,dicts_deldict:()=>bp,dicts_delete:()=>Pp,dicts_get:()=>Dp,dicts_get_default:()=>fp,dicts_items:()=>Xp,dicts_keys:()=>Np,dicts_length:()=>yp,dicts_pop:()=>Bp,dicts_setdefault:()=>Gp,dicts_to_json:()=>kp,dicts_todict:()=>wp,dicts_update:()=>vp,dicts_values:()=>xp,json_to_dicts:()=>Hp});var R={};t.r(R),t.d(R,{logic_boolean:()=>zp,logic_compare:()=>Wp,logic_compare_continous:()=>Kp,logic_is:()=>$p,logic_is_in:()=>Zp,logic_negate:()=>qp,logic_null:()=>Qp,logic_operation:()=>Jp,logic_tobool:()=>ta,logic_true_or_false:()=>jp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ca,sdcard_use_spi_init:()=>ga,storage_can_write_ornot:()=>ua,storage_change_dir:()=>ma,storage_close_file:()=>la,storage_delete_file:()=>Ia,storage_file_seek:()=>ha,storage_file_tell:()=>Ma,storage_file_write:()=>_a,storage_fileopen:()=>ia,storage_fileopen_new:()=>na,storage_fileopen_new_encoding:()=>sa,storage_get_a_line:()=>aa,storage_get_contents:()=>pa,storage_get_contents_without_para:()=>oa,storage_get_current_dir:()=>Oa,storage_get_file_size:()=>Ta,storage_get_filename:()=>ra,storage_is_file:()=>ca,storage_list_all_files:()=>da,storage_make_dir:()=>Ea,storage_open_file_with_os:()=>ea,storage_rename:()=>Ra});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Na,procedures_callreturn:()=>La,procedures_defnoreturn:()=>Aa,procedures_defreturn:()=>Sa,procedures_ifreturn:()=>Da,procedures_return:()=>fa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Va,tuple_create_with:()=>Fa,tuple_create_with_noreturn:()=>wa,tuple_create_with_text2:()=>Pa,tuple_create_with_text_return:()=>va,tuple_del:()=>xa,tuple_find:()=>Ba,tuple_getIndex:()=>Ya,tuple_getSublist:()=>Ua,tuple_get_random_item:()=>Ha,tuple_get_sublist:()=>ka,tuple_join:()=>ya,tuple_length:()=>Xa,tuple_max:()=>ba,tuple_totuple:()=>Wa,tuple_trig:()=>Ga});var S={};t.r(S),t.d(S,{set_add_discard:()=>Za,set_clear:()=>za,set_create_with:()=>Ka,set_create_with_text_return:()=>eu,set_length:()=>Ja,set_operate:()=>Qa,set_operate_update:()=>ja,set_pop:()=>qa,set_sub:()=>$a,set_toset:()=>iu,set_update:()=>tu});var A={};t.r(A),t.d(A,{html_content:()=>ou,html_content_more:()=>pu,html_document:()=>nu,html_form:()=>uu,html_head_body:()=>_u,html_style:()=>au,html_style_content:()=>ru,html_text:()=>lu,html_title:()=>su});var L={};t.r(L),t.d(L,{attribute_access:()=>Ou,function_call:()=>mu,raw_block:()=>du,raw_empty:()=>Tu,raw_expression:()=>Iu,raw_table:()=>Mu,type_check:()=>hu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Fu,actuator_extern_get_led_state:()=>Pu,actuator_extern_led_bright:()=>fu,actuator_extern_led_brightness:()=>vu,actuator_ms32006_dcmotor:()=>Uu,actuator_ms32006_init:()=>Gu,actuator_ms32006_stepper:()=>wu,actuator_neopixel_init:()=>ku,actuator_neopixel_rgb:()=>Hu,actuator_neopixel_rgb_all:()=>Wu,actuator_neopixel_write:()=>Ku,actuator_use_uart_init:()=>Ju,esp32_music_get_tempo_extern:()=>Lu,esp32_music_pitch:()=>gu,esp32_music_pitch_init:()=>cu,esp32_music_pitch_with_time:()=>Cu,esp32_music_play_list:()=>Su,esp32_music_reset_extern:()=>Nu,esp32_music_set_tempo_extern:()=>Au,esp32_music_stop:()=>Du,mixbot_actuator_extern_get_addr:()=>lr,mixbot_actuator_extern_set_addr:()=>dr,mixbot_addr_extern:()=>Zu,robot_led_extern:()=>ir,robot_led_extern_get_value:()=>nr,robot_motor_extern:()=>$u,robot_motor_extern_get_speed:()=>tr,robot_servo_extern_absolute_run:()=>pr,robot_servo_extern_get_status:()=>sr,robot_servo_extern_relative_continue:()=>rr,robot_servo_extern_relative_origin:()=>ar,robot_servo_extern_relative_run:()=>ur,robot_servo_extern_stop:()=>or,robot_servo_extern_stop_mode:()=>_r,robot_traffic_light_extern:()=>er,servo_get_angle:()=>Vu,servo_get_speed:()=>Bu,servo_init:()=>Yu,servo_move:()=>Xu,servo_set_angle:()=>yu,servo_set_speed:()=>bu,servo_speed_360:()=>xu,syn6288_builtin_voice:()=>Qu,syn6288_get_voice:()=>zu,syn6288_set_voice:()=>qu,syn6288_tts_play:()=>ju});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Hr,actuator_dc_motor_stop:()=>Wr,actuator_get_led_bright:()=>mr,actuator_get_led_state:()=>Or,actuator_led_bright:()=>hr,actuator_led_brightness:()=>Er,actuator_mixbot_buzzer_on_off:()=>Qr,actuator_mixgo_nova_mic_get:()=>el,actuator_mixgo_nova_mic_set:()=>tl,actuator_mixgo_nova_onboard_music_pitch:()=>pl,actuator_mixgo_nova_onboard_music_stop:()=>al,actuator_mixgo_nova_play_audio:()=>_l,actuator_mixgo_nova_play_online_audio:()=>ol,actuator_mixgo_nova_record_audio:()=>sl,actuator_mixgo_nova_voice_get:()=>nl,actuator_mixgo_nova_voice_set:()=>il,actuator_mixgo_zero_led_color:()=>Rr,actuator_onboard_neopixel_rgb:()=>Lr,actuator_onboard_neopixel_rgb_all:()=>Nr,actuator_onboard_neopixel_rgb_show_all_chase:()=>fr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Dr,actuator_onboard_neopixel_write:()=>Fr,actuator_rm_onboard_neopixel_rgb:()=>Pr,actuator_rm_onboard_neopixel_rgb_all:()=>vr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Yr,actuator_stepper_keep:()=>wr,actuator_stepper_stop:()=>kr,analog_ble_keyboard_init:()=>cl,analog_ble_keyboard_input:()=>Sl,analog_ble_keyboard_send_battery:()=>Ll,analog_ble_keyboard_str:()=>Al,analog_ble_mouse_init:()=>Nl,analog_ble_mouse_input:()=>Fl,analog_ble_mouse_send_battery:()=>Pl,analog_keyboard_input:()=>dl,analog_keyboard_str:()=>Rl,analog_mouse_input:()=>Ol,bitbot_motor:()=>$r,bitbot_move:()=>jr,bitbot_stop:()=>Zr,ble_keyboard_connect:()=>Cl,ble_keyboard_get_mac:()=>gl,ble_mouse_connect:()=>fl,ble_mouse_get_mac:()=>Dl,cc_number:()=>Ar,esp32_music_get_tempo:()=>xr,esp32_music_reset:()=>yr,esp32_music_set_tempo:()=>Xr,esp32_onboard_music_pitch:()=>br,esp32_onboard_music_pitch_with_time:()=>Vr,esp32_onboard_music_play_list:()=>Gr,esp32_onboard_music_stop:()=>Br,general_key:()=>Tl,general_key_tuple:()=>Ml,generalkey_container:()=>hl,generalkey_create_with_item:()=>ml,get_power_output:()=>rl,ledswitch:()=>Mr,mixbot_motor:()=>zr,mixbot_motor_status:()=>Kr,mixbot_move:()=>Jr,mixbot_stop:()=>qr,mouse_key:()=>El,number:()=>Tr,rm_actuator_get_led_bright:()=>gr,rm_actuator_get_led_state:()=>Cr,rm_actuator_led_bright:()=>cr,rm_actuator_led_brightness:()=>Sr,rm_motor:()=>Ur,set_all_power_output:()=>ll,set_power_output:()=>ul,special_key:()=>Il});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>ld,ai_sensor_ailocal_class:()=>td,ai_sensor_ailocal_class_result:()=>ed,ai_sensor_ailocal_train:()=>$l,ai_sensor_asr_recognize:()=>od,ai_sensor_audio_play:()=>nd,ai_sensor_audio_record:()=>id,ai_sensor_barcode:()=>Bl,ai_sensor_circle:()=>Wl,ai_sensor_classifier_faces:()=>rd,ai_sensor_color:()=>zl,ai_sensor_color_chases:()=>Zl,ai_sensor_color_chases_result:()=>jl,ai_sensor_config:()=>bl,ai_sensor_face:()=>ud,ai_sensor_find_20objects:()=>dd,ai_sensor_find_barcodes:()=>Gl,ai_sensor_find_circles:()=>Kl,ai_sensor_find_colors:()=>Ql,ai_sensor_find_licenseplates:()=>ad,ai_sensor_find_lines:()=>Hl,ai_sensor_find_qrcodes:()=>yl,ai_sensor_find_rects:()=>ql,ai_sensor_find_tags:()=>wl,ai_sensor_licenseplate:()=>pd,ai_sensor_line:()=>kl,ai_sensor_qrcode:()=>Xl,ai_sensor_qrcode_lite:()=>xl,ai_sensor_rect:()=>Jl,ai_sensor_rgb:()=>Vl,ai_sensor_tag:()=>Ul,ai_sensor_use_uart_init:()=>Yl,ai_sensor_yolo_recognize:()=>sd,ai_sensor_yolo_recognize_result:()=>_d});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>Md,MICROPYTHON_AI_Speech_unit:()=>Td,MICROPYTHON_AI_client:()=>Id});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Fd,mpython_blynk_app_notify:()=>Cd,mpython_blynk_email:()=>Ld,mpython_blynk_get_timers:()=>Nd,mpython_blynk_on_connected:()=>Rd,mpython_blynk_on_disconnected:()=>Ed,mpython_blynk_run:()=>gd,mpython_blynk_sensor_data_to_app:()=>fd,mpython_blynk_set_property:()=>Ad,mpython_blynk_setup:()=>Pd,mpython_blynk_stop_timers:()=>Sd,mpython_blynk_sync_virtual:()=>Od,mpython_blynk_terminal_widget_vpin:()=>md,mpython_blynktimer:()=>Dd,mpython_blynktimer_run:()=>cd});var v={};t.r(v),t.d(v,{cc_g1_init:()=>vd,cc_g1_read_bat:()=>Yd,cc_g1_read_joystick:()=>Xd,cc_g1_read_key:()=>xd,cc_g1_turnoff:()=>yd});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>Wd,ce_go_get_led_bright:()=>Gd,ce_go_get_led_state:()=>Ud,ce_go_hall_attachInterrupt:()=>Kd,ce_go_hall_data:()=>qd,ce_go_hall_initialize:()=>Jd,ce_go_led_bright:()=>Bd,ce_go_led_brightness:()=>wd,ce_go_light_number:()=>Vd,ce_go_pin_light:()=>$d,ce_go_pin_near:()=>Qd,ce_go_pin_near_line:()=>zd,ce_go_pin_near_state_change:()=>jd,ce_go_stepper_keep:()=>kd,ce_go_stepper_stop:()=>Hd,sensor_mixgome_eulerangles:()=>Zd});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>xI,communicate_bluetooth_connect:()=>BI,communicate_bluetooth_disconnect:()=>GI,communicate_bluetooth_handle:()=>WI,communicate_bluetooth_is_connected:()=>wI,communicate_bluetooth_mac:()=>VI,communicate_bluetooth_peripheral_init:()=>yI,communicate_bluetooth_recv:()=>kI,communicate_bluetooth_recv_only:()=>HI,communicate_bluetooth_scan:()=>bI,communicate_bluetooth_send:()=>UI,communicate_espnow_init:()=>KI,communicate_espnow_init_new:()=>JI,communicate_i2c_available:()=>mI,communicate_i2c_init:()=>nI,communicate_i2c_master_read:()=>hI,communicate_i2c_onboard:()=>eI,communicate_i2c_read:()=>sI,communicate_i2c_scan:()=>oI,communicate_i2c_write:()=>_I,communicate_ir_recv_init:()=>AI,communicate_ir_send_init:()=>FI,communicate_ow_init:()=>EI,communicate_ow_read:()=>cI,communicate_ow_reset:()=>SI,communicate_ow_scan:()=>RI,communicate_ow_select:()=>CI,communicate_ow_write:()=>gI,communicate_spi_buffer:()=>uI,communicate_spi_init:()=>pI,communicate_spi_onboard:()=>iI,communicate_spi_read:()=>rI,communicate_spi_read_output:()=>lI,communicate_spi_readinto:()=>dI,communicate_spi_readinto_output:()=>II,communicate_spi_set:()=>aI,communicate_spi_write:()=>TI,communicate_spi_write_readinto:()=>MI,espnow_radio_channel:()=>$I,espnow_radio_channel_new:()=>eT,espnow_radio_on_off:()=>iT,espnow_radio_rec:()=>sT,espnow_radio_recv:()=>oT,espnow_radio_recv_certain_msg:()=>pT,espnow_radio_recv_certain_msg_new:()=>uT,espnow_radio_recv_msg:()=>_T,espnow_radio_recv_new:()=>aT,espnow_radio_send:()=>nT,espnow_radio_txpower:()=>tT,i2c_available:()=>PT,i2c_init:()=>mT,i2c_master_reader2:()=>FT,i2c_read:()=>OT,i2c_scan:()=>RT,i2c_slave_onreceive:()=>OI,i2c_write:()=>ET,internal_variable:()=>LI,ir_recv_timeout:()=>fI,ir_transmit_busy:()=>XI,ir_transmit_conventional_data:()=>PI,ir_transmit_raw_code:()=>YI,ir_transmit_study_code:()=>vI,ir_whether_recv:()=>DI,lora_init:()=>rT,lora_packet:()=>lT,lora_recv:()=>IT,lora_send:()=>dT,network_espnow_info:()=>zI,network_espnow_mac:()=>qI,network_espnow_recv:()=>QI,network_espnow_recv_handle:()=>ZI,network_espnow_send:()=>jI,recv_fun:()=>NI,spi_buffer:()=>CT,spi_init:()=>cT,spi_read:()=>ST,spi_read_output:()=>AT,spi_readinto:()=>LT,spi_readinto_output:()=>NT,spi_set:()=>gT,spi_write:()=>DT,spi_write_readinto:()=>fT,urequests_attribute:()=>MT,urequests_get:()=>TT,urequests_method:()=>hT});var x={};t.r(x),t.d(x,{display_animate:()=>pM,display_blink_rate:()=>nM,display_circle:()=>aM,display_color_seclet:()=>RM,display_draw_4strings:()=>jT,display_fill:()=>oM,display_get_screen_image:()=>iM,display_help:()=>rM,display_image_size:()=>ZT,display_lcd_use_i2c_init:()=>LM,display_line:()=>tM,display_line_arbitrarily:()=>eM,display_matrix_extern_bright_point:()=>kT,display_matrix_extern_bright_screen:()=>WT,display_matrix_extern_clear:()=>KT,display_matrix_extern_get_pixel:()=>wT,display_matrix_extern_get_screen_pixel:()=>HT,display_matrix_extern_image_builtins:()=>JT,display_matrix_extern_scroll_string:()=>bT,display_matrix_extern_scroll_string_delay:()=>VT,display_matrix_extern_shift:()=>UT,display_matrix_extern_show_frame_string:()=>BT,display_matrix_extern_show_frame_string_delay:()=>GT,display_matrix_extern_show_image:()=>xT,display_matrix_extern_show_image_or_string_delay:()=>yT,display_matrix_use_i2c_init:()=>XT,display_oled_drawPixel:()=>dM,display_oled_showBitmap:()=>lM,display_oled_use_i2c_init:()=>PM,display_onoff:()=>_M,display_rect:()=>$T,display_rgb_color:()=>sM,display_tm1650_power:()=>TM,display_tm1650_set_brightness:()=>mM,display_tm1650_show_dot:()=>hM,display_tm1650_show_num:()=>MM,display_tm_use_i2c_init:()=>IM,display_triangle:()=>uM,display_use_i2c_init:()=>QT,extern_oled_bright_point:()=>wM,extern_oled_clear:()=>kM,extern_oled_get_pixel:()=>UM,extern_oled_hvline:()=>WM,extern_oled_line:()=>KM,extern_oled_scroll_string:()=>yM,extern_oled_scroll_string_delay:()=>bM,extern_oled_shape_rect:()=>HM,extern_oled_shift:()=>GM,extern_oled_show_frame_string:()=>VM,extern_oled_show_frame_string_delay:()=>BM,extern_oled_show_image:()=>vM,extern_oled_show_image_or_string_delay:()=>xM,extern_oled_show_image_xy:()=>YM,extern_oled_show_string:()=>XM,lcd_backlight:()=>fM,lcd_clear:()=>FM,lcd_print_string:()=>DM,lcd_show_image_or_string_delay:()=>NM,matrix_extern_image_arithmetic:()=>qT,matrix_extern_image_invert:()=>zT,tft_fill:()=>SM,tft_line_arbitrarily:()=>AM,tft_scroll_string_delay:()=>gM,tft_show_frame_string_delay:()=>CM,tft_show_image_or_string_delay:()=>cM,tft_show_image_xy:()=>EM,tft_use_spi_init:()=>OM});var y={};t.r(y),t.d(y,{bitbot_display_image_create:()=>Ph,display_bright_point:()=>ph,display_bright_screen:()=>uh,display_clear:()=>rh,display_get_pixel:()=>oh,display_get_screen_pixel:()=>ah,display_image_builtins:()=>eh,display_image_builtins_all:()=>ih,display_image_create:()=>th,display_scroll_string:()=>QM,display_scroll_string_delay:()=>jM,display_shift:()=>_h,display_show_frame_string:()=>ZM,display_show_frame_string_delay:()=>$M,display_show_image:()=>qM,display_show_image_or_string_delay:()=>zM,draw_pointer:()=>em,image_arithmetic:()=>nh,image_invert:()=>sh,mixbot_display_bright_screen:()=>fh,mixbot_display_get_ambientbright:()=>Dh,mixbot_display_get_screen_pixel:()=>Nh,mixbot_display_image_create:()=>Lh,mixbot_display_rotate:()=>Fh,mixgo_display_image_create_new:()=>Ih,mixgome_display_font:()=>Th,mixgome_display_image_create:()=>lh,mixgomini_display_image_create:()=>dh,mpython_display_hvline:()=>Ch,mpython_display_line:()=>Sh,mpython_display_shape_rect:()=>gh,mpython_pbm_image:()=>Ah,onboard_oled_bright_point:()=>ch,onboard_oled_scroll_string_delay:()=>Eh,onboard_oled_show_frame_string_delay:()=>Rh,onboard_oled_show_image:()=>Mh,onboard_oled_show_image_or_string_delay:()=>Oh,onboard_oled_show_image_xy:()=>hh,onboard_oled_show_string:()=>mh,onboard_tft_bright_point:()=>Hh,onboard_tft_bright_screen:()=>Jh,onboard_tft_clear:()=>Wh,onboard_tft_clock_clear:()=>$h,onboard_tft_clock_draw:()=>Zh,onboard_tft_clock_get_rtctime:()=>Qh,onboard_tft_clock_init:()=>zh,onboard_tft_clock_set_time:()=>jh,onboard_tft_display_hvline:()=>Gh,onboard_tft_display_line:()=>Uh,onboard_tft_display_shape_circle:()=>tm,onboard_tft_display_shape_rect:()=>Bh,onboard_tft_fill:()=>qh,onboard_tft_get_pixel:()=>kh,onboard_tft_get_screen_pixel:()=>Kh,onboard_tft_scroll_string:()=>xh,onboard_tft_scroll_string_delay:()=>yh,onboard_tft_shift:()=>wh,onboard_tft_show_frame_string:()=>bh,onboard_tft_show_frame_string_delay:()=>Vh,onboard_tft_show_image:()=>vh,onboard_tft_show_image_or_string_delay:()=>Xh,onboard_tft_show_image_xy:()=>Yh});var b={};t.r(b),t.d(b,{factory_block:()=>dm,factory_block_return:()=>Im,factory_block_return_with_textarea:()=>Mm,factory_block_with_textarea:()=>Tm,factory_callMethod_noreturn:()=>rm,factory_callMethod_return:()=>lm,factory_create_with_container:()=>om,factory_create_with_item:()=>pm,factory_declare:()=>um,factory_from_import:()=>nm,factory_function_noreturn:()=>_m,factory_function_return:()=>am,factory_import:()=>sm,folding_block:()=>hm});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>Vm,inout_analog_atten:()=>Lm,inout_analog_read:()=>Am,inout_analog_read_init:()=>vm,inout_analog_write:()=>gm,inout_analog_write_init:()=>Pm,inout_analog_write_set:()=>Cm,inout_analog_write_set_freq:()=>xm,inout_digital_init:()=>fm,inout_digital_read:()=>Rm,inout_digital_write:()=>Em,inout_highlow:()=>Om,inout_pinMode:()=>Xm,inout_pin_attachInterrupt:()=>Dm,inout_pin_pressed:()=>Nm,inout_pin_pressed_init:()=>Ym,inout_pwm_analog_write:()=>cm,inout_pwm_analog_write_init:()=>Fm,inout_pwm_analog_write_set_freq:()=>Sm,pin_pressed:()=>bm,pin_pressed_init:()=>ym});var B={};t.r(B),t.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>aO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>pO,IOT_EMQX_PING:()=>_O,IOT_FORMATTING:()=>nO,IOT_FORMAT_STRING:()=>sO,IOT_MIXIO_NTP:()=>oO,IOT_MIXIO_PUBLISH:()=>Qm,IOT_MIXIO_SUBSCRIBE:()=>jm,iot_checkonenet:()=>OO,iot_client_onboard:()=>rO,iot_create_with_item:()=>qm,iot_http_client:()=>lO,iot_http_data:()=>dO,iot_mixio_check:()=>tO,iot_mixio_connect:()=>zm,iot_mixio_connect_only:()=>$m,iot_mixio_disconnect:()=>Zm,iot_mixio_format_msg:()=>iO,iot_mixio_format_topic:()=>eO,iot_mixly_key:()=>uO,iot_mqtt_client:()=>IO,iot_mqtt_data:()=>TO,iot_onenet_check:()=>km,iot_onenet_connect:()=>Um,iot_onenet_disconnect:()=>wm,iot_onenet_publish:()=>Wm,iot_onenet_publish_dict:()=>Hm,iot_onenetconnect:()=>hO,iot_onenetdisconnect:()=>mO,iot_publish:()=>EO,iot_publish_container:()=>Km,iot_publish_item:()=>Jm,iot_wifi_connect:()=>Gm,iot_wificonnect:()=>MO});var G={};t.r(G),t.d(G,{network_ap_connect:()=>FO,network_connect:()=>AO,network_get_connect:()=>NO,network_get_wifi:()=>fO,network_init:()=>cO,network_is_active:()=>CO,network_open:()=>gO,network_scan:()=>SO,network_server:()=>PO,network_socket_accept:()=>yO,network_socket_bind:()=>YO,network_socket_close:()=>UO,network_socket_connect:()=>XO,network_socket_init:()=>vO,network_socket_listen:()=>xO,network_socket_receive:()=>bO,network_socket_receive_from:()=>BO,network_socket_send:()=>VO,network_socket_send_to:()=>GO,network_stop:()=>DO,network_wifi_connect:()=>LO,ntptime_address:()=>KO,ntptime_time:()=>WO,requests_attribute:()=>kO,requests_attribute2:()=>QO,requests_get:()=>wO,requests_get2:()=>qO,requests_method:()=>HO,requests_post:()=>zO});var U={};t.r(U),t.d(U,{HCSR04:()=>jE,PS2_Button:()=>eR,PS2_Buttons:()=>nR,PS2_Buttons_new:()=>pR,PS2_State:()=>iR,PS2_init:()=>ZE,PS2_init_new:()=>_R,PS2_stk:()=>sR,PS2_stk_new:()=>aR,PS2_vibration:()=>tR,PS2_vibration_new:()=>oR,esp32_s2_weather_init:()=>JE,esp32_s2_weather_rain:()=>zE,esp32_s2_weather_wd:()=>qE,esp32_s2_weather_ws:()=>QE,extern_rfid_read:()=>YE,extern_rfid_readcontent:()=>xE,extern_rfid_readid:()=>XE,extern_rfid_status:()=>VE,extern_rfid_write:()=>yE,extern_rfid_write_return:()=>bE,gnss_get_data:()=>dR,gnss_have_data:()=>lR,mixbot_sensor_extern_get_addr:()=>ER,mixbot_sensor_extern_set_addr:()=>RR,pm25_get_data:()=>rR,robot_button_extern_get_value:()=>IR,robot_color_extern_get_value:()=>OR,robot_infrared_extern_get_value:()=>MR,robot_infrared_extern_grey_get_value:()=>hR,robot_potentiometer_extern_get_value:()=>mR,robot_sonar_extern_get_value:()=>cR,robot_sonar_extern_led:()=>gR,robot_touch_extern_get_value:()=>TR,sensor_APDS9960_extern:()=>ME,sensor_DS18X20:()=>lE,sensor_LTR308_extern:()=>hE,sensor_LTR390UV_extern:()=>OE,sensor_MAX30102_extern:()=>TE,sensor_QMC5883L_extern:()=>CE,sensor_VL530LX_extern:()=>EE,sensor_adxl345_get_acceleration:()=>nE,sensor_aht11_extern:()=>cE,sensor_bmp:()=>uE,sensor_compass_reset:()=>PE,sensor_dht11:()=>_E,sensor_hp203_extern:()=>gE,sensor_light_level:()=>sE,sensor_lm35:()=>dE,sensor_ltr381_extern:()=>mE,sensor_mixgo_extern_button_attachInterrupt:()=>eE,sensor_mixgo_extern_button_get_presses:()=>tE,sensor_mixgo_extern_button_is_pressed:()=>ZO,sensor_mixgo_extern_button_was_pressed:()=>$O,sensor_mixgo_extern_light:()=>oE,sensor_mixgo_extern_pin_near:()=>aE,sensor_mixgo_extern_sound:()=>pE,sensor_mixgoce_hot_wheel_degrees:()=>KE,sensor_mixgoce_hot_wheel_is_touched:()=>WE,sensor_mpu9250_attachGestureInterrupt:()=>iE,sensor_mpu9250_calibrate_compass:()=>DE,sensor_mpu9250_field_strength:()=>FE,sensor_mpu9250_gesture:()=>SE,sensor_mpu9250_get_acceleration:()=>AE,sensor_mpu9250_get_gyro:()=>NE,sensor_mpu9250_get_magnetic:()=>LE,sensor_mpu9250_temperature:()=>fE,sensor_sht:()=>rE,sensor_shtc3_extern:()=>RE,sensor_use_i2c_init:()=>IE,sensor_use_spi_init:()=>vE,sensor_use_uart_init:()=>uR,sensor_weather_solo_init:()=>CR,sensor_weather_solo_rain:()=>LR,sensor_weather_solo_wd:()=>SR,sensor_weather_solo_ws:()=>AR,weather_data:()=>BE,weather_have_data:()=>GE,weather_set_label:()=>wE,weather_set_label_container:()=>kE,weather_set_label_item:()=>HE,weather_uart_mixio:()=>UE});var w={};t.r(w),t.d(w,{HCSR04:()=>kR,RTC_set_date:()=>wR,RTC_set_time:()=>UR,bitbot_als_num:()=>zc,dht11:()=>ig,number1:()=>WR,number2:()=>KR,number3:()=>JR,number4:()=>qR,number5:()=>zR,number6:()=>QR,number7:()=>jR,onboard_RTC_get_time:()=>sc,onboard_RTC_get_time_str:()=>rc,onboard_RTC_get_timestamp:()=>_c,onboard_RTC_set_datetime:()=>ac,onboard_RTC_settime_string:()=>pc,onboard_RTC_timestamp_totuple:()=>oc,rfid_readcontent:()=>mc,rfid_readid:()=>hc,rfid_write:()=>Oc,rfid_write_return:()=>Ec,sensor_LTR308:()=>lc,sensor_aht11:()=>Ic,sensor_bitbot_ALS:()=>qc,sensor_button_get_presses:()=>Zc,sensor_button_is_pressed:()=>Qc,sensor_button_was_pressed:()=>jc,sensor_distance_hrsc04:()=>GR,sensor_eulerangles:()=>cc,sensor_field_strength:()=>ng,sensor_get_acceleration:()=>Rc,sensor_get_temperature:()=>Tc,sensor_hp203:()=>Mc,sensor_light:()=>eg,sensor_mixbot_get_gyro:()=>Jc,sensor_mixbot_patrol_calibrate:()=>Hc,sensor_mixbot_patrol_value:()=>Wc,sensor_mixbot_temperature:()=>Kc,sensor_mixgo_LTR308:()=>nc,sensor_mixgo_button_attachInterrupt:()=>PR,sensor_mixgo_button_get_presses:()=>FR,sensor_mixgo_button_is_pressed:()=>DR,sensor_mixgo_button_was_pressed:()=>fR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>vc,sensor_mixgo_cc_mmc5603_get_angle:()=>Pc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Fc,sensor_mixgo_light:()=>HR,sensor_mixgo_nova_LTR308:()=>ic,sensor_mixgo_nova_pin_near:()=>ec,sensor_mixgo_pin_near:()=>tc,sensor_mixgo_pin_near_double:()=>$R,sensor_mixgo_pin_near_single:()=>ZR,sensor_mixgo_pin_pressed:()=>yR,sensor_mixgo_touch_slide:()=>BR,sensor_mixgocar42_button_attachInterrupt:()=>xR,sensor_mixgocar42_button_get_presses:()=>XR,sensor_mixgocar42_button_is_pressed:()=>vR,sensor_mixgocar42_button_was_pressed:()=>YR,sensor_mixgocar_battery_left:()=>kc,sensor_mixgocar_pin_near:()=>Uc,sensor_mixgocar_pin_near_line:()=>Gc,sensor_mixgocar_pin_near_state_change:()=>wc,sensor_mixgoce_pin_pressed:()=>bR,sensor_mixgoce_temperature:()=>Xc,sensor_mixgome_temperature:()=>Yc,sensor_mpython_pin_pressed:()=>VR,sensor_mpython_qmi8658_get_gyro:()=>xc,sensor_mpython_qmi8658_temperature:()=>yc,sensor_onboard_compass_reset:()=>fc,sensor_onboard_mpu9250_calibrate_compass:()=>Lc,sensor_onboard_mpu9250_field_strength:()=>Dc,sensor_onboard_mpu9250_gesture:()=>gc,sensor_onboard_mpu9250_get_acceleration:()=>Cc,sensor_onboard_mpu9250_get_gyro:()=>Ac,sensor_onboard_mpu9250_get_magnetic:()=>Sc,sensor_onboard_mpu9250_temperature:()=>Nc,sensor_pin_near:()=>tg,sensor_pin_pressed:()=>$c,sensor_rm_acc:()=>Bc,sensor_rm_battery_left:()=>Vc,sensor_rm_pin_near_double:()=>bc,sensor_rtc_init:()=>uc,sensor_sound:()=>dc,sensor_temperature:()=>sg});var k={};t.r(k),t.d(k,{serial_any:()=>dg,serial_begin:()=>mg,serial_print:()=>pg,serial_print_byte:()=>og,serial_print_hex:()=>ug,serial_println:()=>ag,serial_read_from_ai:()=>Lg,serial_readline:()=>Ig,serial_readstr:()=>lg,serial_readstr_until:()=>Tg,serial_receive_data_event:()=>rg,serial_send_to_ai:()=>Ag,serial_softserial:()=>hg,serial_softserial_new:()=>Mg,system_input:()=>Og,system_print:()=>Eg,system_print_container:()=>Cg,system_print_end:()=>cg,system_print_inline:()=>Rg,system_print_item:()=>Sg,system_print_many:()=>gg});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>Fg,Timer_init:()=>kg,base_delay:()=>Kg,controls_delay:()=>fg,controls_delay_new:()=>Dg,controls_millis:()=>vg,controls_uname:()=>Xg,raw_block:()=>Yg,reset:()=>Pg,system_bitbot_shutdown:()=>wg,system_machine_reset:()=>Ug,system_ticks_diff:()=>bg,system_timer:()=>yg,system_timer_init:()=>Vg,system_wdt_feed:()=>Gg,system_wdt_init:()=>Bg,time_ticks_diff:()=>Wg,timer:()=>xg,timer2:()=>Hg});var W={};t.r(W),t.d(W,{Air_daily_content:()=>oC,Air_now_content:()=>$g,Geo_moon_content:()=>aC,Geo_sun_content:()=>pC,Life_suggestion_content:()=>eC,Location_search_content:()=>nC,Tide_daily_content:()=>iC,WEATHER_DAILY:()=>zg,WEATHER_HOUR:()=>Qg,WEATHER_NOW:()=>qg,Weather_alarm_content:()=>tC,Weather_daily:()=>sC,Weather_daily_content:()=>_C,Weather_now:()=>jg,Weather_now_content:()=>Zg});var K={};t.r(K),t.d(K,{actuator_extern_get_led_bright:()=>DC,actuator_extern_get_led_state:()=>fC,actuator_extern_led_bright:()=>NC,actuator_extern_led_brightness:()=>FC,actuator_ms32006_dcmotor:()=>hC,actuator_ms32006_init:()=>MC,actuator_ms32006_stepper:()=>mC,actuator_neopixel_init:()=>PC,actuator_neopixel_rgb:()=>XC,actuator_neopixel_rgb_all:()=>vC,actuator_neopixel_write:()=>YC,actuator_use_uart_init:()=>xC,esp32_music_get_tempo_extern:()=>CC,esp32_music_pitch:()=>EC,esp32_music_pitch_init:()=>OC,esp32_music_pitch_with_time:()=>RC,esp32_music_play_list:()=>SC,esp32_music_reset_extern:()=>AC,esp32_music_set_tempo_extern:()=>gC,esp32_music_stop:()=>cC,mixbot_actuator_extern_get_addr:()=>$C,mixbot_actuator_extern_set_addr:()=>tS,mixbot_addr_extern:()=>GC,robot_led_extern:()=>HC,robot_led_extern_get_value:()=>WC,robot_motor_extern:()=>UC,robot_motor_extern_get_speed:()=>wC,robot_servo_extern_absolute_run:()=>zC,robot_servo_extern_get_status:()=>KC,robot_servo_extern_relative_continue:()=>ZC,robot_servo_extern_relative_origin:()=>QC,robot_servo_extern_relative_run:()=>jC,robot_servo_extern_stop:()=>qC,robot_servo_extern_stop_mode:()=>JC,robot_traffic_light_extern:()=>kC,servo_get_angle:()=>IC,servo_get_speed:()=>TC,servo_init:()=>uC,servo_move:()=>LC,servo_set_angle:()=>lC,servo_set_speed:()=>dC,servo_speed_360:()=>rC,syn6288_builtin_voice:()=>VC,syn6288_get_voice:()=>bC,syn6288_set_voice:()=>yC,syn6288_tts_play:()=>BC});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>DS,actuator_dc_motor_stop:()=>fS,actuator_get_led_bright:()=>lS,actuator_get_led_state:()=>dS,actuator_led_bright:()=>rS,actuator_led_brightness:()=>IS,actuator_mixbot_buzzer_on_off:()=>XS,actuator_mixgo_nova_mic_get:()=>BS,actuator_mixgo_nova_mic_set:()=>VS,actuator_mixgo_nova_onboard_music_pitch:()=>WS,actuator_mixgo_nova_onboard_music_stop:()=>KS,actuator_mixgo_nova_play_audio:()=>kS,actuator_mixgo_nova_play_online_audio:()=>HS,actuator_mixgo_nova_record_audio:()=>wS,actuator_mixgo_nova_voice_get:()=>US,actuator_mixgo_nova_voice_set:()=>GS,actuator_mixgo_zero_led_color:()=>TS,actuator_onboard_neopixel_rgb:()=>cS,actuator_onboard_neopixel_rgb_all:()=>gS,actuator_onboard_neopixel_rgb_show_all_chase:()=>CS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>SS,actuator_onboard_neopixel_write:()=>RS,actuator_stepper_keep:()=>LS,actuator_stepper_stop:()=>NS,analog_ble_keyboard_init:()=>nA,analog_ble_keyboard_input:()=>oA,analog_ble_keyboard_send_battery:()=>aA,analog_ble_keyboard_str:()=>pA,analog_ble_mouse_init:()=>uA,analog_ble_mouse_input:()=>dA,analog_ble_mouse_send_battery:()=>IA,analog_keyboard_input:()=>QS,analog_keyboard_str:()=>eA,analog_mouse_input:()=>$S,bitbot_motor:()=>bS,bitbot_move:()=>xS,bitbot_stop:()=>yS,ble_keyboard_connect:()=>_A,ble_keyboard_get_mac:()=>sA,ble_mouse_connect:()=>lA,ble_mouse_get_mac:()=>rA,cc_number:()=>MS,esp32_music_get_tempo:()=>iS,esp32_music_reset:()=>pS,esp32_music_set_tempo:()=>eS,esp32_onboard_music_pitch:()=>nS,esp32_onboard_music_pitch_with_time:()=>sS,esp32_onboard_music_play_list:()=>oS,esp32_onboard_music_stop:()=>_S,general_key:()=>ZS,general_key_tuple:()=>iA,get_power_output:()=>qS,ledswitch:()=>uS,mixbot_motor:()=>YS,mixbot_motor_status:()=>FS,mixbot_move:()=>PS,mixbot_stop:()=>vS,mouse_key:()=>tA,number:()=>aS,rm_actuator_get_led_bright:()=>mS,rm_actuator_get_led_state:()=>OS,rm_actuator_led_bright:()=>hS,rm_actuator_led_brightness:()=>ES,rm_motor:()=>AS,set_all_power_output:()=>zS,set_power_output:()=>JS,special_key:()=>jS});var q={};t.r(q),t.d(q,{ai_sensor_20object:()=>KA,ai_sensor_ailocal_class:()=>xA,ai_sensor_ailocal_class_result:()=>yA,ai_sensor_ailocal_train:()=>XA,ai_sensor_asr_recognize:()=>UA,ai_sensor_audio_play:()=>VA,ai_sensor_audio_record:()=>bA,ai_sensor_barcode:()=>RA,ai_sensor_circle:()=>LA,ai_sensor_classifier_faces:()=>WA,ai_sensor_color:()=>FA,ai_sensor_color_chases:()=>YA,ai_sensor_color_chases_result:()=>vA,ai_sensor_config:()=>hA,ai_sensor_face:()=>HA,ai_sensor_find_20objects:()=>JA,ai_sensor_find_barcodes:()=>cA,ai_sensor_find_circles:()=>NA,ai_sensor_find_colors:()=>PA,ai_sensor_find_licenseplates:()=>kA,ai_sensor_find_lines:()=>AA,ai_sensor_find_qrcodes:()=>EA,ai_sensor_find_rects:()=>fA,ai_sensor_find_tags:()=>CA,ai_sensor_licenseplate:()=>wA,ai_sensor_line:()=>SA,ai_sensor_qrcode:()=>OA,ai_sensor_qrcode_lite:()=>MA,ai_sensor_rect:()=>DA,ai_sensor_rgb:()=>mA,ai_sensor_tag:()=>gA,ai_sensor_use_uart_init:()=>TA,ai_sensor_yolo_recognize:()=>BA,ai_sensor_yolo_recognize_result:()=>GA});var z={};t.r(z),t.d(z,{MICROPYTHON_AI_Speech_asr:()=>QA,MICROPYTHON_AI_Speech_unit:()=>zA,MICROPYTHON_AI_client:()=>qA});var Q={};t.r(Q),t.d(Q,{mpython_blynk_app_data:()=>aL,mpython_blynk_app_notify:()=>nL,mpython_blynk_email:()=>uL,mpython_blynk_get_timers:()=>_L,mpython_blynk_on_connected:()=>tL,mpython_blynk_on_disconnected:()=>$A,mpython_blynk_run:()=>iL,mpython_blynk_sensor_data_to_app:()=>pL,mpython_blynk_set_property:()=>rL,mpython_blynk_setup:()=>lL,mpython_blynk_stop_timers:()=>sL,mpython_blynk_sync_virtual:()=>ZA,mpython_blynk_terminal_widget_vpin:()=>jA,mpython_blynktimer:()=>oL,mpython_blynktimer_run:()=>eL});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>dL,cc_g1_read_joystick:()=>IL,cc_g1_read_key:()=>TL,cc_g1_turnoff:()=>ML});var Z={};t.r(Z),t.d(Z,{ce_go_dc_motor:()=>CL,ce_go_get_led_bright:()=>OL,ce_go_get_led_state:()=>EL,ce_go_hall_attachInterrupt:()=>SL,ce_go_hall_data:()=>LL,ce_go_hall_initialize:()=>AL,ce_go_led_bright:()=>mL,ce_go_led_brightness:()=>RL,ce_go_light_number:()=>hL,ce_go_pin_light:()=>PL,ce_go_pin_near:()=>DL,ce_go_pin_near_line:()=>NL,ce_go_pin_near_state_change:()=>fL,ce_go_stepper_keep:()=>cL,ce_go_stepper_stop:()=>gL,sensor_mixgome_eulerangles:()=>FL});var $={};t.r($),t.d($,{communicate_bluetooth_central_init:()=>dN,communicate_bluetooth_connect:()=>MN,communicate_bluetooth_disconnect:()=>hN,communicate_bluetooth_handle:()=>gN,communicate_bluetooth_is_connected:()=>ON,communicate_bluetooth_mac:()=>mN,communicate_bluetooth_peripheral_init:()=>IN,communicate_bluetooth_recv:()=>cN,communicate_bluetooth_recv_only:()=>RN,communicate_bluetooth_scan:()=>TN,communicate_bluetooth_send:()=>EN,communicate_espnow_init:()=>CN,communicate_espnow_init_new:()=>SN,communicate_i2c_available:()=>BL,communicate_i2c_init:()=>XL,communicate_i2c_master_read:()=>VL,communicate_i2c_onboard:()=>vL,communicate_i2c_read:()=>xL,communicate_i2c_scan:()=>bL,communicate_i2c_write:()=>yL,communicate_ir_recv_init:()=>iN,communicate_ir_send_init:()=>pN,communicate_ow_init:()=>QL,communicate_ow_read:()=>$L,communicate_ow_reset:()=>ZL,communicate_ow_scan:()=>jL,communicate_ow_select:()=>eN,communicate_ow_write:()=>tN,communicate_spi_buffer:()=>kL,communicate_spi_init:()=>UL,communicate_spi_onboard:()=>YL,communicate_spi_read:()=>HL,communicate_spi_read_output:()=>WL,communicate_spi_readinto:()=>KL,communicate_spi_readinto_output:()=>JL,communicate_spi_set:()=>wL,communicate_spi_write:()=>qL,communicate_spi_write_readinto:()=>zL,espnow_radio_channel:()=>FN,espnow_radio_channel_new:()=>vN,espnow_radio_on_off:()=>YN,espnow_radio_rec:()=>xN,espnow_radio_recv:()=>bN,espnow_radio_recv_certain_msg:()=>VN,espnow_radio_recv_certain_msg_new:()=>GN,espnow_radio_recv_msg:()=>yN,espnow_radio_recv_new:()=>BN,espnow_radio_send:()=>XN,espnow_radio_txpower:()=>PN,i2c_slave_onreceive:()=>GL,internal_variable:()=>nN,ir_recv_timeout:()=>oN,ir_transmit_busy:()=>lN,ir_transmit_conventional_data:()=>aN,ir_transmit_raw_code:()=>rN,ir_transmit_study_code:()=>uN,ir_whether_recv:()=>_N,lora_init:()=>UN,lora_packet:()=>wN,lora_recv:()=>HN,lora_send:()=>kN,network_espnow_info:()=>LN,network_espnow_mac:()=>AN,network_espnow_recv:()=>NN,network_espnow_recv_handle:()=>fN,network_espnow_send:()=>DN,recv_fun:()=>sN,urequests_attribute:()=>KN,urequests_get:()=>WN,urequests_method:()=>JN});var tt={};t.r(tt),t.d(tt,{display_animate:()=>OD,display_circle:()=>ED,display_color_seclet:()=>FD,display_draw_4strings:()=>lD,display_fill:()=>mD,display_lcd_use_i2c_init:()=>yD,display_line:()=>TD,display_line_arbitrarily:()=>dD,display_matrix_extern_bright_point:()=>sD,display_matrix_extern_bright_screen:()=>oD,display_matrix_extern_clear:()=>eD,display_matrix_extern_get_pixel:()=>nD,display_matrix_extern_get_screen_pixel:()=>_D,display_matrix_extern_image_builtins:()=>pD,display_matrix_extern_scroll_string:()=>$N,display_matrix_extern_scroll_string_delay:()=>tD,display_matrix_extern_shift:()=>iD,display_matrix_extern_show_frame_string:()=>jN,display_matrix_extern_show_frame_string_delay:()=>ZN,display_matrix_extern_show_image:()=>zN,display_matrix_extern_show_image_or_string_delay:()=>QN,display_matrix_use_i2c_init:()=>qN,display_oled_drawPixel:()=>gD,display_oled_showBitmap:()=>cD,display_oled_use_i2c_init:()=>UD,display_onoff:()=>MD,display_rect:()=>ID,display_tm1650_power:()=>SD,display_tm1650_set_brightness:()=>ND,display_tm1650_show_dot:()=>LD,display_tm1650_show_num:()=>AD,display_tm_use_i2c_init:()=>CD,display_triangle:()=>RD,display_use_i2c_init:()=>rD,extern_oled_bright_point:()=>$D,extern_oled_clear:()=>QD,extern_oled_get_pixel:()=>ZD,extern_oled_hvline:()=>ef,extern_oled_line:()=>nf,extern_oled_scroll_string:()=>qD,extern_oled_scroll_string_delay:()=>zD,extern_oled_shape_rect:()=>tf,extern_oled_shift:()=>jD,extern_oled_show_frame_string:()=>KD,extern_oled_show_frame_string_delay:()=>JD,extern_oled_show_image:()=>wD,extern_oled_show_image_or_string_delay:()=>WD,extern_oled_show_image_xy:()=>kD,extern_oled_show_string:()=>HD,image_shift:()=>hD,lcd_backlight:()=>BD,lcd_clear:()=>GD,lcd_print_string:()=>VD,lcd_show_image_or_string_delay:()=>bD,matrix_extern_image_arithmetic:()=>aD,matrix_extern_image_invert:()=>uD,tft_fill:()=>XD,tft_line_arbitrarily:()=>xD,tft_scroll_string_delay:()=>YD,tft_show_frame_string_delay:()=>vD,tft_show_image_or_string_delay:()=>PD,tft_show_image_xy:()=>fD,tft_use_spi_init:()=>DD});var et={};t.r(et),t.d(et,{bitbot_display_image_create:()=>Uf,display_bright_point:()=>Of,display_bright_screen:()=>Rf,display_clear:()=>If,display_get_pixel:()=>mf,display_get_screen_pixel:()=>Ef,display_image_builtins:()=>rf,display_image_builtins_all:()=>lf,display_image_create:()=>df,display_scroll_string:()=>af,display_scroll_string_delay:()=>uf,display_shift:()=>hf,display_show_frame_string:()=>of,display_show_frame_string_delay:()=>pf,display_show_image:()=>sf,display_show_image_or_string_delay:()=>_f,draw_pointer:()=>lF,image_arithmetic:()=>Tf,image_invert:()=>Mf,mixbot_display_bright_screen:()=>Bf,mixbot_display_get_ambientbright:()=>Vf,mixbot_display_get_screen_pixel:()=>bf,mixbot_display_image_create:()=>yf,mixbot_display_rotate:()=>Gf,mixgo_display_image_create_new:()=>Sf,mixgome_display_font:()=>Cf,mixgome_display_image_create:()=>cf,mixgomini_display_image_create:()=>gf,mpython_display_hvline:()=>Xf,mpython_display_line:()=>xf,mpython_display_shape_rect:()=>Yf,mpython_pbm_image:()=>Af,onboard_oled_bright_point:()=>vf,onboard_oled_scroll_string_delay:()=>Pf,onboard_oled_show_frame_string_delay:()=>Ff,onboard_oled_show_image:()=>Lf,onboard_oled_show_image_or_string_delay:()=>ff,onboard_oled_show_image_xy:()=>Nf,onboard_oled_show_string:()=>Df,onboard_tft_bright_point:()=>eF,onboard_tft_bright_screen:()=>nF,onboard_tft_clear:()=>Zf,onboard_tft_clock_clear:()=>uF,onboard_tft_clock_draw:()=>aF,onboard_tft_clock_get_rtctime:()=>oF,onboard_tft_clock_init:()=>_F,onboard_tft_clock_set_time:()=>pF,onboard_tft_display_hvline:()=>Qf,onboard_tft_display_line:()=>jf,onboard_tft_display_shape_circle:()=>rF,onboard_tft_display_shape_rect:()=>zf,onboard_tft_fill:()=>sF,onboard_tft_get_pixel:()=>tF,onboard_tft_get_screen_pixel:()=>iF,onboard_tft_scroll_string:()=>Jf,onboard_tft_scroll_string_delay:()=>qf,onboard_tft_shift:()=>$f,onboard_tft_show_frame_string:()=>Wf,onboard_tft_show_frame_string_delay:()=>Kf,onboard_tft_show_image:()=>wf,onboard_tft_show_image_or_string_delay:()=>Hf,onboard_tft_show_image_xy:()=>kf});var it={};t.r(it),t.d(it,{factory_block:()=>EF,factory_block_return:()=>RF,factory_block_return_with_textarea:()=>gF,factory_block_with_textarea:()=>cF,factory_callMethod_noreturn:()=>mF,factory_callMethod_return:()=>OF,factory_declare:()=>hF,factory_from_import:()=>dF,factory_function_noreturn:()=>TF,factory_function_return:()=>MF,factory_import:()=>IF,folding_block:()=>CF});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>VF,inout_analog_read:()=>PF,inout_analog_read_init:()=>bF,inout_analog_write:()=>DF,inout_analog_write_init:()=>yF,inout_analog_write_set:()=>fF,inout_digital_init:()=>XF,inout_digital_read:()=>LF,inout_digital_write:()=>AF,inout_highlow:()=>SF,inout_pin_attachInterrupt:()=>YF,inout_pin_pressed:()=>vF,inout_pin_pressed_init:()=>BF,inout_pwm_analog_write:()=>NF,inout_pwm_analog_write_init:()=>xF,inout_pwm_analog_write_set_freq:()=>FF});var st={};t.r(st),t.d(st,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>sP,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>iP,IOT_EMQX_PING:()=>_P,IOT_FORMATTING:()=>tP,IOT_FORMAT_STRING:()=>eP,IOT_MIXIO_NTP:()=>oP,IOT_MIXIO_PUBLISH:()=>JF,IOT_MIXIO_SUBSCRIBE:()=>qF,iot_client_onboard:()=>pP,iot_http_client:()=>aP,iot_http_data:()=>uP,iot_mixio_check:()=>jF,iot_mixio_connect:()=>KF,iot_mixio_connect_only:()=>QF,iot_mixio_disconnect:()=>zF,iot_mixio_format_msg:()=>$F,iot_mixio_format_topic:()=>ZF,iot_mixly_key:()=>nP,iot_mqtt_client:()=>rP,iot_mqtt_data:()=>lP,iot_onenet_check:()=>HF,iot_onenet_connect:()=>UF,iot_onenet_disconnect:()=>wF,iot_onenet_publish:()=>WF,iot_onenet_publish_dict:()=>kF,iot_wifi_connect:()=>GF});var _t={};t.r(_t),t.d(_t,{network_ap_connect:()=>RP,network_connect:()=>IP,network_get_connect:()=>MP,network_get_wifi:()=>EP,network_init:()=>dP,network_is_active:()=>OP,network_open:()=>mP,network_scan:()=>cP,network_server:()=>gP,network_socket_accept:()=>NP,network_socket_bind:()=>SP,network_socket_close:()=>vP,network_socket_connect:()=>AP,network_socket_init:()=>CP,network_socket_listen:()=>LP,network_socket_receive:()=>DP,network_socket_receive_from:()=>FP,network_socket_send:()=>fP,network_socket_send_to:()=>PP,network_stop:()=>hP,network_wifi_connect:()=>TP,ntptime_address:()=>bP,ntptime_time:()=>yP,requests_attribute:()=>XP,requests_attribute2:()=>BP,requests_get:()=>YP,requests_get2:()=>VP,requests_method:()=>xP,requests_post:()=>GP});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>fv,PS2_Button:()=>vv,PS2_Buttons:()=>Yv,PS2_Buttons_new:()=>Uv,PS2_State:()=>Xv,PS2_init:()=>Fv,PS2_init_new:()=>Bv,PS2_stk:()=>xv,PS2_stk_new:()=>wv,PS2_vibration:()=>Pv,PS2_vibration_new:()=>Gv,RTC_get_time:()=>bv,RTC_set_date:()=>qP,RTC_set_datetime:()=>yv,RTC_set_time:()=>JP,esp32_s2_weather_init:()=>Av,esp32_s2_weather_rain:()=>Nv,esp32_s2_weather_wd:()=>Lv,esp32_s2_weather_ws:()=>Dv,extern_rfid_read:()=>Iv,extern_rfid_readcontent:()=>Mv,extern_rfid_readid:()=>Tv,extern_rfid_status:()=>Ov,extern_rfid_write:()=>hv,extern_rfid_write_return:()=>mv,gnss_get_data:()=>Wv,gnss_have_data:()=>Kv,mixbot_sensor_extern_get_addr:()=>eY,mixbot_sensor_extern_set_addr:()=>iY,pm25_get_data:()=>Hv,robot_button_extern_get_value:()=>Jv,robot_color_extern_get_value:()=>Zv,robot_infrared_extern_get_value:()=>zv,robot_infrared_extern_grey_get_value:()=>Qv,robot_potentiometer_extern_get_value:()=>jv,robot_sonar_extern_get_value:()=>$v,robot_sonar_extern_led:()=>tY,robot_touch_extern_get_value:()=>qv,sensor_APDS9960_extern:()=>nv,sensor_DS18X20:()=>pY,sensor_LTR308_extern:()=>sv,sensor_LTR390UV_extern:()=>pv,sensor_MAX30102_extern:()=>iv,sensor_QMC5883L_extern:()=>av,sensor_VL530LX_extern:()=>lv,sensor_aht11_extern:()=>rv,sensor_bmp:()=>$P,sensor_dht11:()=>Vv,sensor_distance_hrsc04:()=>KP,sensor_hp203_extern:()=>_v,sensor_ltr381_extern:()=>ov,sensor_mixgo_extern_button_attachInterrupt:()=>HP,sensor_mixgo_extern_button_get_presses:()=>kP,sensor_mixgo_extern_button_is_pressed:()=>UP,sensor_mixgo_extern_button_was_pressed:()=>wP,sensor_mixgo_extern_light:()=>zP,sensor_mixgo_extern_pin_near:()=>jP,sensor_mixgo_extern_sound:()=>QP,sensor_mixgoce_hot_wheel_degrees:()=>Sv,sensor_mixgoce_hot_wheel_is_touched:()=>Cv,sensor_mpu9250_attachGestureInterrupt:()=>WP,sensor_rtc_init:()=>ZP,sensor_sht:()=>tv,sensor_shtc3_extern:()=>uv,sensor_use_i2c_init:()=>ev,sensor_use_spi_init:()=>dv,sensor_use_uart_init:()=>kv,sensor_weather_solo_init:()=>nY,sensor_weather_solo_rain:()=>oY,sensor_weather_solo_wd:()=>sY,sensor_weather_solo_ws:()=>_Y,weather_data:()=>Ev,weather_have_data:()=>Rv,weather_set_label:()=>gv,weather_uart_mixio:()=>cv});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>hY,bitbot_als_num:()=>xX,dht11:()=>kX,number1:()=>mY,number2:()=>OY,number3:()=>EY,number4:()=>RY,number5:()=>cY,number6:()=>gY,number7:()=>CY,onboard_RTC_get_time:()=>dX,onboard_RTC_get_time_str:()=>MX,onboard_RTC_get_timestamp:()=>IX,onboard_RTC_set_datetime:()=>rX,onboard_RTC_settime_string:()=>lX,onboard_RTC_timestamp_totuple:()=>TX,rfid_readcontent:()=>VY,rfid_readid:()=>bY,rfid_write:()=>BY,rfid_write_return:()=>GY,sensor_LTR308:()=>vY,sensor_adxl345_get_acceleration:()=>zY,sensor_aht11:()=>xY,sensor_bitbot_ALS:()=>XX,sensor_button_get_presses:()=>VX,sensor_button_is_pressed:()=>yX,sensor_button_was_pressed:()=>bX,sensor_compass_reset:()=>eX,sensor_ds18x20:()=>FY,sensor_eulerangles:()=>wY,sensor_get_acceleration:()=>UY,sensor_get_temperature:()=>yY,sensor_hp203:()=>XY,sensor_light:()=>wX,sensor_lm35:()=>PY,sensor_mixbot_get_gyro:()=>YX,sensor_mixbot_patrol_calibrate:()=>FX,sensor_mixbot_patrol_value:()=>PX,sensor_mixbot_temperature:()=>vX,sensor_mixgo_LTR308:()=>DY,sensor_mixgo_button_attachInterrupt:()=>lY,sensor_mixgo_button_get_presses:()=>rY,sensor_mixgo_button_is_pressed:()=>aY,sensor_mixgo_button_was_pressed:()=>uY,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>OX,sensor_mixgo_cc_mmc5603_get_angle:()=>mX,sensor_mixgo_cc_mmc5603_get_magnetic:()=>hX,sensor_mixgo_light:()=>UX,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:()=>JY,sensor_mixgo_touch_slide:()=>KY,sensor_mixgocar42_button_attachInterrupt:()=>MY,sensor_mixgocar42_button_get_presses:()=>TY,sensor_mixgocar42_button_is_pressed:()=>dY,sensor_mixgocar42_button_was_pressed:()=>IY,sensor_mixgocar_battery_left:()=>fX,sensor_mixgocar_pin_near:()=>NX,sensor_mixgocar_pin_near_line:()=>LX,sensor_mixgocar_pin_near_state_change:()=>DX,sensor_mixgoce_pin_pressed:()=>WY,sensor_mixgoce_temperature:()=>RX,sensor_mixgome_temperature:()=>EX,sensor_mpu9250_calibrate_compass:()=>ZY,sensor_mpu9250_field_strength:()=>tX,sensor_mpu9250_gesture:()=>kY,sensor_mpu9250_get_acceleration:()=>HY,sensor_mpu9250_get_gyro:()=>jY,sensor_mpu9250_get_magnetic:()=>QY,sensor_mpu9250_temperature:()=>$Y,sensor_mpython_pin_pressed:()=>qY,sensor_mpython_qmi8658_get_gyro:()=>cX,sensor_mpython_qmi8658_temperature:()=>gX,sensor_onboard_compass_reset:()=>uX,sensor_onboard_mpu9250_calibrate_compass:()=>oX,sensor_onboard_mpu9250_field_strength:()=>aX,sensor_onboard_mpu9250_gesture:()=>iX,sensor_onboard_mpu9250_get_acceleration:()=>nX,sensor_onboard_mpu9250_get_gyro:()=>_X,sensor_onboard_mpu9250_get_magnetic:()=>sX,sensor_onboard_mpu9250_temperature:()=>pX,sensor_pin_near:()=>GX,sensor_pin_pressed:()=>BX,sensor_rm_acc:()=>AX,sensor_rm_battery_left:()=>SX,sensor_rm_pin_near_double:()=>CX,sensor_sound:()=>YY});var at={};t.r(at),t.d(at,{serial_any:()=>qX,serial_print:()=>HX,serial_print_byte:()=>WX,serial_print_hex:()=>JX,serial_println:()=>KX,serial_read_from_ai:()=>_x,serial_readline:()=>QX,serial_readstr:()=>zX,serial_send_to_ai:()=>sx,serial_softserial:()=>jX,serial_softserial_new:()=>ZX,system_input:()=>$X,system_print:()=>tx,system_print_end:()=>ix,system_print_inline:()=>ex,system_print_many:()=>nx});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>mx,Timer_init:()=>vx,base_delay:()=>xx,controls_delay:()=>gx,controls_delay_new:()=>Cx,controls_end_program:()=>Ex,controls_millis:()=>Ox,controls_uname:()=>cx,reset:()=>Rx,system_bitbot_shutdown:()=>Px,system_device_name:()=>Mx,system_device_serial_number:()=>hx,system_event_bus_source:()=>Ix,system_event_bus_value:()=>Tx,system_machine_reset:()=>Fx,system_on_event:()=>rx,system_raise_event:()=>ux,system_reset:()=>px,system_run_in_background:()=>ox,system_ticks_diff:()=>Lx,system_timer:()=>Ax,system_timer_init:()=>Nx,system_timestamp:()=>lx,system_value:()=>dx,system_wait:()=>ax,system_wdt_feed:()=>fx,system_wdt_init:()=>Dx,time_ticks_diff:()=>Xx,timer:()=>Sx,timer2:()=>Yx});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>qx,Air_now_content:()=>Ux,Geo_moon_content:()=>Qx,Geo_sun_content:()=>zx,Life_suggestion_content:()=>kx,Location_search_content:()=>Wx,Tide_daily_content:()=>Hx,WEATHER_DAILY:()=>bx,WEATHER_HOUR:()=>Vx,WEATHER_NOW:()=>yx,Weather_alarm_content:()=>wx,Weather_daily:()=>Kx,Weather_daily_content:()=>Jx,Weather_now:()=>Bx,Weather_now_content:()=>Gx});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>my,inout_analog_atten:()=>oy,inout_analog_read:()=>_y,inout_analog_read_init:()=>ly,inout_analog_write:()=>ny,inout_analog_write_init:()=>ry,inout_analog_write_set:()=>sy,inout_analog_write_set_freq:()=>Iy,inout_digital_init:()=>uy,inout_digital_read:()=>iy,inout_digital_write:()=>ey,inout_highlow:()=>ty,inout_pinMode:()=>Ty,inout_pin_attachInterrupt:()=>ay,inout_pin_pressed:()=>py,inout_pin_pressed_init:()=>dy,pin_pressed:()=>hy,pin_pressed_init:()=>My});var dt={};t.r(dt),t.d(dt,{mini_g2_aht11:()=>Ey,mini_g2_hp203:()=>Ry,mini_g2_rfid_readcontent:()=>Cy,mini_g2_rfid_readid:()=>gy,mini_g2_rfid_status:()=>Ly,mini_g2_rfid_write:()=>Sy,mini_g2_rfid_write_outcome:()=>Ay,mini_g2_varistor:()=>cy});var It={};t.r(It),t.d(It,{me_go_dc_motor:()=>xy,me_go_get_led_bright:()=>Fy,me_go_get_led_state:()=>Py,me_go_hall_attachInterrupt:()=>yy,me_go_hall_data:()=>Vy,me_go_hall_initialize:()=>by,me_go_led_bright:()=>fy,me_go_led_brightness:()=>vy,me_go_light_number:()=>Dy,me_go_pin_light:()=>ky,me_go_pin_near:()=>Gy,me_go_pin_near_line:()=>By,me_go_pin_near_state_change:()=>Uy,me_go_stepper_keep:()=>Yy,me_go_stepper_stop:()=>Xy,sensor_mixgome_eulerangles:()=>wy});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>Zy,analog_output:()=>tb,espnow_channel:()=>zy,haskylens_model:()=>Qy,i2c_A_pin:()=>eb,i2c_B_pin:()=>ib,pins_analog:()=>pb,pins_analog_pin:()=>ab,pins_axis:()=>Ab,pins_brightness:()=>Lb,pins_builtinimg:()=>Ob,pins_builtinimg_extern:()=>Eb,pins_button:()=>lb,pins_buttonB:()=>db,pins_dac:()=>ub,pins_dac_pin:()=>rb,pins_digital:()=>Wy,pins_digital_dot:()=>Xb,pins_digital_pin:()=>Ky,pins_exlcdh:()=>Cb,pins_exlcdv:()=>Sb,pins_imglist:()=>Rb,pins_input_pin:()=>Jy,pins_one_more:()=>Yb,pins_output_pin:()=>qy,pins_playlist:()=>cb,pins_playlist_extern:()=>gb,pins_pwm:()=>Ib,pins_pwm_pin:()=>Tb,pins_radio_datarate:()=>vb,pins_radio_power:()=>Pb,pins_serial:()=>mb,pins_tone_notes:()=>Fb,pins_touch:()=>hb,pins_touch_pin:()=>Mb,pins_tts_bgmusic:()=>fb,pins_tts_builtin_music:()=>Db,pins_tts_voice:()=>Nb,pwm_input:()=>jy,pwm_output:()=>$y,spi_A_pin:()=>nb,spi_B_pin:()=>sb,spi_C_pin:()=>_b,spi_D_pin:()=>ob});var Mt={};t.r(Mt),t.d(Mt,{inout_analog_atten:()=>Kb,inout_analog_read:()=>Gb,inout_analog_read_init:()=>Wb,inout_analog_write:()=>Vb,inout_analog_write_init:()=>Hb,inout_analog_write_set:()=>Bb,inout_digital_init:()=>kb,inout_digital_read:()=>bb,inout_digital_write:()=>yb,inout_highlow:()=>xb,inout_pin_attachInterrupt:()=>wb,inout_pin_pressed:()=>Ub,inout_pin_pressed_init:()=>Jb});var ht={};t.r(ht),t.d(ht,{mini_g2_aht11:()=>qb,mini_g2_hp203:()=>zb,mini_g2_rfid_readcontent:()=>Zb,mini_g2_rfid_readid:()=>jb,mini_g2_rfid_status:()=>eV,mini_g2_rfid_write:()=>$b,mini_g2_rfid_write_outcome:()=>tV,mini_g2_varistor:()=>Qb});var mt={};t.r(mt),t.d(mt,{me_go_dc_motor:()=>uV,me_go_get_led_bright:()=>sV,me_go_get_led_state:()=>_V,me_go_hall_attachInterrupt:()=>rV,me_go_hall_data:()=>dV,me_go_hall_initialize:()=>lV,me_go_led_bright:()=>nV,me_go_led_brightness:()=>oV,me_go_light_number:()=>iV,me_go_pin_light:()=>mV,me_go_pin_near:()=>TV,me_go_pin_near_line:()=>IV,me_go_pin_near_state_change:()=>MV,me_go_stepper_keep:()=>pV,me_go_stepper_stop:()=>aV,sensor_mixgome_eulerangles:()=>hV});var Ot={};t.r(Ot),t.d(Ot,{analog_input:()=>NV,analog_output:()=>fV,espnow_channel:()=>AV,haskylens_model:()=>LV,i2c_A_pin:()=>FV,i2c_B_pin:()=>PV,pins_analog:()=>bV,pins_analog_pin:()=>yV,pins_axis:()=>jV,pins_brightness:()=>tB,pins_builtinimg:()=>KV,pins_builtinimg_extern:()=>JV,pins_button:()=>EV,pins_buttonB:()=>RV,pins_dac:()=>UV,pins_dac_pin:()=>GV,pins_digital:()=>OV,pins_digital_dot:()=>aB,pins_digital_pin:()=>cV,pins_exlcdh:()=>ZV,pins_exlcdv:()=>$V,pins_imglist:()=>qV,pins_input_pin:()=>gV,pins_interrupt:()=>HV,pins_one_more:()=>pB,pins_output_pin:()=>CV,pins_playlist:()=>zV,pins_playlist_extern:()=>QV,pins_pwm:()=>BV,pins_pwm_input:()=>SV,pins_pwm_pin:()=>VV,pins_radio_datarate:()=>oB,pins_radio_power:()=>_B,pins_serial:()=>WV,pins_tone_notes:()=>sB,pins_touch:()=>kV,pins_touch_pin:()=>wV,pins_tts_bgmusic:()=>nB,pins_tts_builtin_music:()=>iB,pins_tts_voice:()=>eB,pwm_output:()=>DV,spi_A_pin:()=>vV,spi_B_pin:()=>YV,spi_C_pin:()=>XV,spi_D_pin:()=>xV});const Et=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 @@ -18,4 +18,4 @@ * 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(Et.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Et.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(Et.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Et.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(yt),this.appendValueInput("FROM").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.PYTHON_RANGE).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},kt={init:function(){this.setColour(yt),this.appendValueInput("LIST").setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Et.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ht={init:function(){this.setColour(yt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Et.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Et.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Et.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Et.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Et.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Et.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Et.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(Et.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(Et.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(yt);var t=new Et.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Et.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Et.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(Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Jt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Et.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Et.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Et.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Et.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Ht.OPERATORS=[[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const zt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Et.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},jt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Et.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(yt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},$t={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Et.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Et.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Et.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:yt,tooltip:Et.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Et.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(yt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Et.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},_e={init:function(){this.appendDummyInput().appendField(Et.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Et.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Et.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Et.FieldDropdown([[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(yt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},oe={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pe={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ue={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_GET_UNIQUE_IDEN)}},re=230;Et.FieldTextInput.math_number_validator=function(t){return String(t)},Et.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 Et.FieldTextInput("0",Et.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MATH_NUMBER_TOOLTIP)}},de={init:function(){this.setColour(re);this.appendDummyInput("").appendField(Et.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Et.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ie={init:function(){this.setColour(re);this.appendDummyInput("").appendField(Et.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Et.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Et.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 Et.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:Et.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Et.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Et.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 Et.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:Et.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Et.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Et.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 Et.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},me={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Et.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:Et.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Et.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Et.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Et.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Et.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Et.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Et.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Oe={init:function(){var t=[[Et.Msg.MATH_BIN,"bin"],[Et.Msg.MATH_OCT,"oct"],[Et.Msg.MATH_HEX,"hex"]];this.setColour(re),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Et.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Et.Msg.MATH_DEC_TOOLTIP_BIN,oct:Et.Msg.MATH_DEC_TOOLTIP_OCT,hex:Et.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Ee={init:function(){var t=[[Et.Msg.LANG_MATH_TO_ROUND,"round"],[Et.Msg.LANG_MATH_TO_CEIL,"ceil"],[Et.Msg.LANG_MATH_TO_FLOOR,"floor"],[Et.Msg.MATH_ABS,"fabs"],[Et.Msg.MATH_SQRT,"sqrt"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).appendField(new Et.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Et.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Et.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Et.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Et.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Et.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Et.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Re={init:function(){var t=[[Et.Msg.MIXLY_MAX,"max"],[Et.Msg.MIXLY_MIN,"min"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Et.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Et.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Et.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ce={init:function(){var t=[[Et.Msg.MATH_TWO,"two"],[Et.Msg.MATH_EIGHT,"eight"],[Et.Msg.MATH_TEN,"ten"],[Et.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(re),this.appendDummyInput("").appendField(Et.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Et.FieldDropdown(t),"OP").appendField(Et.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MATH_ZHW).appendField(new Et.FieldDropdown(t),"OP2").appendField(Et.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:Et.Msg.MATH_Before_two,eight:Et.Msg.MATH_Before_eight,ten:Et.Msg.MATH_Before_ten,sixteen:Et.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Et.Msg.MATH_Behind_two,eight:Et.Msg.MATH_Behind_eight,ten:Et.Msg.MATH_Behind_ten,sixteen:Et.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[Et.Msg.LANG_MATH_INT,"int"],[Et.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(re),this.setOutput(!0,Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Et.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Et.Msg.LANG_MATH_INT,float:Et.Msg.LANG_MATH_FLOAT_RANDOM};return Et.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ce={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Et.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Et.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Et.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Et.Msg.MATH_CONSTRAIN_TOOLTIP)}},Se={init:function(){this.setColour(re),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Et.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Et.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(new Et.FieldTextInput("0",Et.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Et.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(re),this.appendValueInput("NUM").setCheck(Number).appendField(Et.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.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(Et.Msg.MATH_ROUND).appendField(Et.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Et.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Et.Msg.MATH_ROUND_NEW_TOOLTIP)}},De={init:function(){var t=[[Et.Msg.MIXLY_TO_INT,"int"],[Et.Msg.MIXLY_TO_FLOAT,"float"],[Et.Msg.MIXLY_TO_BITES,"b"],[Et.Msg.LANG_MATH_BYTE+Et.Msg.MIXLY_TO_INT,"bti"]];this.setColour(re),this.appendValueInput("VAR").appendField(new Et.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Et.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Et.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Et.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},fe={init:function(){var t=[[Et.Msg.MIXLY_TO_INT,"int"],[Et.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(re),this.appendValueInput("VAR").appendField(new Et.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Et.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Et.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Fe=Se,Pe={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(Et.Msg.LANG_MATH_BYTE+Et.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ve=160,Ye={init:function(){this.setColour(ve),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Et.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Et.Msg.TEXT_TEXT_TOOLTIP)},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 Et.FieldImage(e,12,12,'"')}},Xe={init:function(){this.setColour(ve),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Et.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Et.Msg.TEXT_LINES_TOOLTIP)},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 Et.FieldImage(e,12,12,'"')}};Et.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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(ve),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Et.FieldTextInput("",Et.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Et.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Et.FieldImage(e,7,12,'"')}},ye={init:function(){this.setColour(ve),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Et.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},be={init:function(){this.setColour(ve),this.appendValueInput("VAR").setCheck(Number).appendField(Et.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ve={init:function(){this.setColour(ve),this.appendValueInput("VAR").setCheck(String).appendField(Et.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Be={init:function(){this.setColour(ve),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ge={init:function(){this.setColour(ve),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ue={init:function(){this.WHERE_OPTIONS=[[Et.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Et.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Et.Msg.TEXT_GET_INDEX_RANDOM+1+Et.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Et.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ve),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Et.Msg.LISTS_GET_INDEX_GET,"MODE"),Et.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Et.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=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Et.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Et.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Et.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Et.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Et.Msg.TEXT_GET_INDEX_RANDOM};return Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Et.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Et.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),Et.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Et.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Et.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"),Et.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},we={init:function(){this.setHelpUrl(Et.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ve),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Et.Msg.LISTS_GET_INDEX_GET+" "+Et.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Et.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_MICROBIT_TYPE_STRING+Et.Msg.LISTS_GET_INDEX_FROM_START+"n"+Et.Msg.TEXT_CHARAT2)}},ke={init:function(){this.setHelpUrl(Et.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ve),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Et.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Et.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},He={init:function(){this.WHERE_OPTIONS_1=[[Et.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Et.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Et.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Et.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Et.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Et.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Et.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ve),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Et.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(Et.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Et.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Et.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),Et.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Et.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Et.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(Et.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ve),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Et.Msg.LISTS_GET_INDEX_GET+" "+Et.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Et.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Et.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Et.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Ke={init:function(){var t=[[Et.Msg.MIXLY_EQUALS,"==="],[Et.Msg.MIXLY_STARTSWITH,"startswith"],[Et.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ve),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Et.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Je={init:function(){this.setColour(ve),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Et.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_COMPARETO_HELP)}},qe={init:function(){var t=[[Et.Msg.TEXT_UPPER,"upper"],[Et.Msg.TEXT_TITLE,"title"],[Et.Msg.TEXT_CAPITALIZE,"capitalize"],[Et.Msg.TEXT_SWAPCASE,"swapcase"],[Et.Msg.TEXT_LOWER,"lower"]];this.setColour(ve),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Et.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Et.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Et.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Et.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Et.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ze={init:function(){var t=[[Et.Msg.TEXT_LJUST,"ljust"],[Et.Msg.TEXT_CENTER,"center"],[Et.Msg.TEXT_RJUST,"rjust"]];this.setColour(ve),this.appendValueInput("VAR").appendField(new Et.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Et.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Et.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Qe={init:function(){this.setColour(ve),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Et.Msg.MIXLY_MID+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Et.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},je={init:function(){this.setColour(ve),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ze={init:function(){this.setColour(ve),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Et.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Et.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},$e={init:function(){this.setColour(ve),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Et.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Et.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ti={init:function(){var t=[[Et.Msg.TEXT_TRIM_BOTH,"strip"],[Et.Msg.TEXT_TRIM_LEFT,"lstrip"],[Et.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ve),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Et.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Et.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Et.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Et.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Et.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Et.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ei={init:function(){this.setColour(ve),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Et.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Et.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qi={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},zi={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(Et.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Qi={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_KEYS),this.setTooltip(Et.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},ji={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Et.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Et.Msg.DICTS_GET_TOOLTIP)}},Zi={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Et.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Et.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Et.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},$i={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Et.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},tn={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Et.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_DELETE_TOOLTIP)}},en={init:function(){this.setColour(Ki),this.appendValueInput("DICT2").setCheck("Dict").appendField(Et.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Et.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MID),this.setTooltip(Et.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_CLEAR),this.setTooltip(Et.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_ITEMS),this.setTooltip(Et.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},_n={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_VALUES),this.setTooltip(Et.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_LENGTH),this.setTooltip(Et.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},pn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_DELDICT),this.setTooltip(Et.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},an={init:function(){this.MODE=[[Et.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Et.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Et.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Et.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=Et.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Et.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Et.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 Et.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(Et.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Et.Msg.DICTS_ADD_VALUE),this.setTooltip(Et.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(Et.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Et.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_SETDEFAULT_TOOLTIP)}},ln={init:function(){this.setColour(Ki),this.appendDummyInput("").appendField(new Et.FieldLabel(Et.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 Et.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},dn={init:function(){this.setColour(Ki),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},In={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_TO_JSON),this.setTooltip(Et.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn={init:function(){this.setColour(Ki),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Et.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn=210,hn={init:function(){var t=Et.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 Et.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Et.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Et.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Et.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Et.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Et.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Et.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},mn={init:function(){var t=Et.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Et.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Et.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},On={init:function(){var t=[[Et.Msg.LOGIC_OPERATION_AND,"AND"],[Et.Msg.LOGIC_OPERATION_OR,"OR"],[Et.Msg.LOGIC_OPERATION_NOR,"NOR"],[Et.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 Et.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Et.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Et.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Et.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Et.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},En={init:function(){this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Et.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Et.Msg.LOGIC_NEGATE_TOOLTIP)}},Rn={init:function(){var t=[[Et.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Et.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Et.FieldDropdown(t),"BOOL"),this.setTooltip(Et.Msg.LOGIC_BOOLEAN_TOOLTIP)}},cn={init:function(){this.setColour(Mn),this.setOutput(!0),this.appendDummyInput().appendField(Et.Msg.LOGIC_NULL),this.setTooltip(Et.Msg.LOGIC_NULL_TOOLTIP)}},gn={init:function(){this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Et.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Et.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Cn={init:function(){var t=[[Et.Msg.TEXT_APPEND_TO,"in"],[Et.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Et.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Et.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.IN)}},Sn={init:function(){var t=[[Et.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Et.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},An={init:function(){this.setColour(Mn),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Ln={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Et.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(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Et.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=Et.Msg.MIXLY_USE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Et.Msg.MIXLY_BELONG;return i+{r:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Et.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=Et.Msg.MIXLY_USE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Et.Msg.MIXLY_BELONG,o=Et.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Et.Msg.MIXPY_TEXT_ENCODE).appendField(new Et.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=Et.Msg.MIXLY_USE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Et.Msg.MIXLY_BELONG,o=Et.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Fn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Et.Msg.MIXLY_MICROBIT_TYPE_STRING+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Et.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(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Et.Msg.MICROBIT_PYTHON_TYPE)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.HTML_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},xn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},bn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Et.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Vn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Et.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(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},kn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Et.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 Et.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Et.Msg.MIXLY_ESP32_SET+{mkdir:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Et.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.HTML_FILE,"isfile"],[Et.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 Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Jn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Et.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(Et.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Et.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},zn={};zn.NAME_TYPE=Et.PROCEDURE_CATEGORY_NAME,zn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(Et.Msg.MIXLY_AIP_ATTR).setAlign(Et.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hs={init:function(){this.setColour(Vs),this.appendDummyInput().appendField(Et.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ws={init:function(){this.setColour(Vs),this.appendDummyInput().appendField(Et.Msg.HTML_FORM_CONTENT).appendField(new Et.FieldDropdown([[Et.Msg.HTML_TEXT,"text"],[Et.Msg.HTML_EMAIL,"email"],[Et.Msg.HTML_NUMBER,"number"],[Et.Msg.HTML_PASSWORD,"password"],[Et.Msg.HTML_CHECKBOX,"checkbox"],[Et.Msg.HTML_RADIOBUTTON,"radiobutton"],[Et.Msg.HTML_BUTTON,"button"],[Et.Msg.HTML_COLOUR,"colour"],[Et.Msg.HTML_DATE,"date"],[Et.Msg.HTML_LOCALTIME,"local time"],[Et.Msg.HTML_FILE,"file"],[Et.Msg.HTML_HIDDEN,"hidden"],[Et.Msg.HTML_IMAGE,"image"],[Et.Msg.HTML_MONTH,"month"],[Et.Msg.HTML_RANGE,"range"],[Et.Msg.HTML_RESET,"reset"],[Et.Msg.HTML_SEARCH,"search"],[Et.Msg.HTML_SUBMIT,"submit"],[Et.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Et.Msg.HTML_TIME,"time"],[Et.Msg.HTML_URL,"url"],[Et.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Et.Msg.HTML_NAME).appendField(new Et.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Et.Msg.HTML_VALUE).appendField(new Et.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Et.Msg.MIXLY_AIP_ATTR).setAlign(Et.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(Vs),this.appendDummyInput().appendField(new Et.FieldTextInput("property"),"KEY").appendField(":").appendField(new Et.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Vs),this.appendDummyInput().appendField(new Et.FieldTextInput("property"),"KEY").appendField(":").appendField(new Et.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs={init:function(){this.setColour(Vs),this.appendDummyInput().appendField(Et.Msg.HTML_TEXT).appendField(new Et.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs=160,Qs={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Et.FieldTable(""),"TEXT")}},js={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Et.FieldMultilineInput(""),"TEXT")}},Zs={init:function(){this.setColour(zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Et.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},$s={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},t_={init:function(){this.setColour(zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Et.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},e_={init:function(){this.setColour(zs),this.appendValueInput("VALUE").appendField(Et.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},i_={init:function(){this.setColour(zs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Et.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Et.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=Et.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+")"},Et.isNumber(n)&&Et.isNumber(s)&&Et.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 wp=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]},kp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Hp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Wp=function(t,e){return["None",e.ORDER_ATOMIC]},Kp=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]},Jp=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]},qp=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]},zp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Qp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},jp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Zp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},$p=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ta=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ea=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ia=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]},na=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},_a=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},oa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},pa=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},aa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ua=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]},la=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"},Ia=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ma=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"},ha=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]},ma=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"},Oa=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"},Ea=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Et.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]},$a=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},tu=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"},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"},nu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},su=function(t,e){return'"},_u=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},ou=function(){return this.getFieldValue("TEXT")+"\n"},pu=function(t){return t.getFieldValue("TEXT")+"\n"},au=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},uu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},ru=function(){return""},lu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},du=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},Tu.scrubNakedValue=function(t){return t+"\n"},Tu.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},Tu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Tu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Et.utils.string.wrap(_,Tu.COMMENT_WRAP-3),n+=Tu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Mu="#74A55B",hu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_RGB_PIN_COUNT)}},mu={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Ou={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Eu={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Ru={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(Et.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Et.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Et.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},cu={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},gu={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_RESET)}},Cu={init:function(){this.setColour(Mu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Su={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Au={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Lu={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Nu={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Du={init:function(){this.setColour(Mu),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fu={init:function(){this.setColour(Mu),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_MOVE)}},Fu={init:function(){this.setColour(Mu),this.appendValueInput("VAR").appendField("360°"+Et.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SETTING+Et.Msg.blockpy_turtle_rotate+Et.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},Pu={init:function(){this.setColour(Mu),this.appendValueInput("PIN",Number).appendField("180°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_MOVE)}},vu={init:function(){this.setColour(Mu),this.appendValueInput("PIN",Number).appendField("360°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Yu={init:function(){this.setColour(Mu),this.appendValueInput("PIN",Number).appendField("180°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Xu={init:function(){this.setColour(Mu),this.appendValueInput("PIN",Number).appendField("360°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},xu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Et.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Et.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},yu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Et.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Et.Msg.MOTOR_N,"ms32006.MOT_N"],[Et.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},bu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Et.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Et.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},Vu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_RGB_PIN_COUNT)}},Bu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},Gu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Uu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_WRI)}},wu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new Et.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO+"SYN6288"+Et.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},ku={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Et.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Hu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Wu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Et.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(Et.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Ku={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(Et.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(Et.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(Et.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Ju={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},qu={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},zu={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_TRAFFIC_LIGHT).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LISTS_SET_INDEX_SET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ju={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_WHITE,"W"],[Et.Msg.COLOUR_RGB_RED,"R"],[Et.Msg.COLOUR_RGB_YELLOW,"Y"],[Et.Msg.COLOUR_RGB_GREEN,"G"],[Et.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_WHITE,"W"],[Et.Msg.COLOUR_RGB_RED,"R"],[Et.Msg.COLOUR_RGB_YELLOW,"Y"],[Et.Msg.COLOUR_RGB_GREEN,"G"],[Et.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},$u={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[Et.Msg.MIXLY_SPEED,"[1]"],[Et.Msg.MATH_SINGLE_OP_ABSOLUTE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[Et.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[Et.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[Et.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[Et.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[Et.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},er={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ir={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MATH_SINGLE_OP_ABSOLUTE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MODE).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPEED+Et.Msg.MIXLY_MODE,"0"],[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Et.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"0"],[Et.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[Et.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},nr={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sr={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField("("+Et.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MODE).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPEED+Et.Msg.MIXLY_MODE,"0"],[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Et.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},_r={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField("("+Et.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MODE).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPEED+Et.Msg.MIXLY_MODE,"0"],[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Et.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"0"],[Et.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},or={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MOTOR,"ext_motor"],[Et.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Et.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Et.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Et.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Et.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Et.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Et.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},pr={init:function(){this.setColour(Mu),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MOTOR,"ext_motor"],[Et.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Et.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Et.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Et.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Et.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Et.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Et.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ar="#6C9858",ur={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(new Et.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},rr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_ON,"1"],[Et.Msg.MIXLY_ESP32_OFF,"0"],[Et.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},lr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},dr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Ir={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Tr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_BUILDIN_LED+Et.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Mr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(Et.Msg.MIXLY_LCD_SETCOLOR).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LIGHT_RED,"1"],[Et.Msg.MIXLY_LIGHT_GREEN,"2"],[Et.Msg.MIXLY_LIGHT_BLUE,"3"],[Et.Msg.MIXLY_LIGHT_YELLOW,"4"],[Et.Msg.MIXLY_LIGHT_CYAN,"5"],[Et.Msg.MIXLY_LIGHT_PURPLE,"6"],[Et.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},hr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},mr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Or={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Er={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_BUILDIN_LED+Et.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Rr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(new Et.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},cr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.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(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},gr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Cr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.MIXLY_DURATION).appendField(Et.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Sr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Et.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.PYTHON_RANGE_STEP).appendField(Et.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Ar={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_WRI)}},Lr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.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(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Nr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Dr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Et.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.PYTHON_RANGE_STEP).appendField(Et.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},fr={init:function(){this.setColour(ar),this.appendValueInput("TICKS").setCheck(Number).appendField(Et.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Et.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Et.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Fr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Pr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_RESET)}},vr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Yr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Xr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xr={init:function(){this.setColour(ar),this.appendValueInput("LIST").appendField(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},yr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"CW"],[Et.Msg.ANTI_CLOCKWISE,"CCW"],[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(ar),this.appendDummyInput().appendField("MixGo Car").appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(ar),this.appendDummyInput("").appendField("MixGo Car").appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Br={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([[Et.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Et.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"CW"],[Et.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([[Et.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Et.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_STOP).appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ur={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},wr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Et.Msg.MIXLY_SPEED,"SPEED"],[Et.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},kr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Hr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(Et.Msg.MIXLY_MOTOR).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"1"],[Et.Msg.TEXT_TRIM_RIGHT,"2"],[Et.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Et.Msg.MIXLY_SPEED,"SPEED"],[Et.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Wr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[Et.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Kr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.BITBOT).appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.BITBOT).appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.BITBOT).appendField(Et.Msg.MIXLY_MOTOR).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"0"],[Et.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"CW"],[Et.Msg.ANTI_CLOCKWISE,"CCW"],[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zr={init:function(){this.setColour(ar),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},Qr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(ar),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_MIXBOT_BUZZER+Et.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},Zr={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_MIXBOT_BUZZER+Et.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(ar),this.appendValueInput("PATH").appendField(Et.Msg.MIXLY_RECORD_AUDIO).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(Et.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},tl={init:function(){this.setColour(ar),this.appendValueInput("PATH").appendField(Et.Msg.MIXLY_PLAY_AUDIO).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},el={init:function(){this.setColour(ar),this.appendValueInput("PATH").appendField(Et.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},il={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},nl={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sl={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.LISTS_SET_INDEX_SET+Et.Msg.ME_GO_MOTOR_EXTERN).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.blynk_IOT_IR_POWER+Et.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},_l={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.ME_GO_MOTOR_EXTERN).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.blynk_IOT_IR_POWER+Et.Msg.MIXLY_PINMODEOUT+Et.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},ol={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.LISTS_SET_INDEX_SET+Et.Msg.ME_GO_MOTOR_EXTERN).appendField(Et.Msg.MIXLY_ALL+Et.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(Et.ALIGN_RIGHT).appendField(Et.Msg.blynk_IOT_IR_POWER+Et.Msg.MIXLY_PINMODEOUT+Et.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},pl={init:function(){this.setColour(ar),this.appendDummyInput().appendField(Et.Msg.ANALOG+Et.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(Et.Msg.MIXLY_RELEASE).appendField(new Et.FieldDropdown([[Et.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Et.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.ANALOG+Et.Msg.MIXLY_KEYBOARD_INPUT)}},al={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SPECIAL_KEY).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[Et.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[Et.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[Et.Msg.MIXLY_SPECIAL_KEY1,"0x04"],[Et.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[Et.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[Et.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[Et.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[Et.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},ul={init:function(){this.setColour(ar),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GENERAL_KEY).appendField(new Et.FieldDropdown([[Et.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)}},rl={init:function(){this.setColour(ar),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new Et.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(Et.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;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Um={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},wm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},km={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Hm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Et.Msg.MIXLY_EMQX_SERVER).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Et.Msg.MIXLY_WIFI_USERNAME).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Et.Msg.MIXLY_IOT_PASSWORD).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Et.Msg.MIXLY_EMQX_PROJECT).setAlign(Et.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Et.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Et.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Et.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},Km={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Et.Msg.MIXLY_EMQX_SUBSCRIBE+Et.Msg.MIXLY_MICROBIT_MSG).appendField(Et.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Et.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},Jm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Et.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},jm={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Et.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Zm={init:function(){this.setColour(Xm),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},$m={init:function(){this.setColour(Xm),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},tO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},eO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO").appendField(Et.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Et.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},iO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Et.Msg.MIXLY_EMQX_SERVER).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+Et.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Et.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField(Et.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Et.Msg.MIXLY_EMQX_SERVER).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Et.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sO={init:function(){this.VISITOR_ID=Rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Xm),this.appendDummyInput("").appendField(new Et.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")}},_O={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MixIO").appendField(Et.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},oO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("HTTP"+Et.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Et.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Et.Msg.MIXLY_REQUESTS_GET).appendField(Et.Msg.MIXLY_GET_CURRENT_TIME).appendField(Et.Msg.MIXLY_OPEN_DEBUG).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("HTTP"+Et.Msg.MIXLY_Client).appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Et.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Et.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},aO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MQTT"+Et.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Et.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Et.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Et.Msg.MQTT_Topic).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Et.Msg.MIXLY_OPEN_DEBUG).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uO={init:function(){this.setColour(Xm),this.appendDummyInput().appendField("MQTT"+Et.Msg.MIXLY_Client).appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Et.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Et.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},rO=xm,lO=ym,dO=bm,IO=Vm,TO=Gm,MO=225,hO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Et.Msg.MIXLY_NETWORK_MODE).appendField(new Et.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},mO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Et.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Et.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=Et.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Et.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Et.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},OO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},EO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Et.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},RO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Et.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Et.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},cO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_WIFI_CONNECT+Et.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},gO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Et.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Et.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 Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Et.Msg.MIXLY_ESP32_NETWORK_IP,1:Et.Msg.MIXLY_ESP32_NETWORK_MASK,2:Et.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},CO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},SO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Et.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},AO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Et.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Et.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},LO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},NO={init:function(){this.setColour(MO),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Et.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 Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},DO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},fO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},FO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},PO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},vO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},YO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},XO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},xO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},yO={init:function(){this.setColour(MO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},bO={init:function(){this.setColour(MO),this.appendValueInput("DOMAIN").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Et.Msg.blockpy_REQUESTS_GET).appendField(new Et.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},VO={init:function(){this.appendValueInput("VAL");var t=[[Et.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]];this.setColour(MO),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:Et.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Et.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Et.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},BO={init:function(){this.appendValueInput("VAR").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(MO),this.appendDummyInput("").appendField(Et.Msg.blockpy_CONDUCT).appendField(new Et.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(Et.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:Et.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Et.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},GO={init:function(){this.setColour(MO),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Et.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},UO={init:function(){this.setColour(MO),this.appendDummyInput("").appendField(new Et.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)}},wO="#3288dd",kO={init:function(){this.setColour(wO),this.appendValueInput("URL").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Et.Msg.blockpy_CONDUCT).appendField(new Et.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Et.Msg.blockpy_REQUESTS).appendField(Et.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},HO={init:function(){this.setColour(wO),this.appendValueInput("URL").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Et.Msg.blockpy_CONDUCT).appendField(new Et.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Et.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Et.Msg.blockpy_REQUESTS+Et.Msg.OLED_STRING),this.appendDummyInput("").appendField(Et.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},WO={init:function(){this.appendValueInput("VAL");var t=[[Et.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Et.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(wO),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},KO="#A58C5B",JO={init:function(){this.setColour(KO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(Et.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SENOR_IS_PRESSED)}},qO={init:function(){this.setColour(KO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(Et.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SENOR_WAS_PRESSED)}},zO={init:function(){this.setColour(KO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Et.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_BUTTON+Et.Msg.MIXLY_GET_PRESSES)}},QO={init:function(){this.setColour(KO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Et.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Et.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},jO={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_shake,"shake"],[Et.Msg.MIXLY_UP,"up"],[Et.Msg.MIXLY_DOWN,"down"],[Et.Msg.MIXLY_LEFT,"left"],[Et.Msg.MIXLY_RIGHT,"right"],[Et.Msg.MIXLY_MICROBIT_face_up,"face up"],[Et.Msg.MIXLY_MICROBIT_face_down,"face down"],[Et.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Et.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Et.Msg.MSG.catSensor,s=Et.Msg.MIXLY_MICROBIT_JS_STATE,_=Et.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Et.Msg.MIXLY_MICROBIT_shake,up:Et.Msg.MIXLY_UP,down:Et.Msg.MIXLY_DOWN,left:Et.Msg.MIXLY_LEFT,right:Et.Msg.MIXLY_RIGHT,"face up":Et.Msg.MIXLY_MICROBIT_face_up,"face down":Et.Msg.MIXLY_MICROBIT_face_down,freefall:Et.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},ZO={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Et.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},$O={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},tE={init:function(){var t=[[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(KO),this.appendValueInput("PIN",Number).appendField(new Et.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Et.FieldDropdown(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))}},eE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},iE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},nE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"left"],[Et.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Et.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Et.Msg.MIXLY_ESP32_NEAR;return i+{left:Et.Msg.TEXT_TRIM_LEFT,right:Et.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},sE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Et.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()":Et.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Et.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},_E={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Et.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()":Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},oE={init:function(){this.setColour(KO),this.appendValueInput("PIN",Number).appendField("DS18X20 "+Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},pE={init:function(){this.setColour(KO),this.appendDummyInput("").appendField("LM35"+Et.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_LM35)}},aE={init:function(){this.setColour(KO),this.appendValueInput("I2CSUB").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Et.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},uE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[Et.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[Et.Msg.MIXLY_ESP32_MAX30102_IR+","+Et.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},rE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[Et.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[Et.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},dE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.HTML_COLOUR+Et.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GET+Et.Msg.HTML_COLOUR,"[2]"],[Et.Msg.MIXLY_GET+Et.Msg.MIXLY_IR_STRENGTH,"[1]"],[Et.Msg.MIXLY_GET+Et.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},IE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GET_ENV_LIGHT,"E"],[Et.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},TE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ME={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.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:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},hE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.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:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},mE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_Altitude+Et.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETPRESSURE,"pressure()"],[Et.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Et.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},OE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MIXGOPE_FIELD+Et.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[Et.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},EE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_shake,"shake"],[Et.Msg.MIXLY_UP,"up"],[Et.Msg.MIXLY_DOWN,"down"],[Et.Msg.MIXLY_LEFT,"left"],[Et.Msg.MIXLY_RIGHT,"right"],[Et.Msg.MIXLY_MICROBIT_face_up,"face up"],[Et.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Et.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Et.Msg.MSG.catSensor,s=Et.Msg.MIXLY_MICROBIT_JS_STATE,_=Et.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Et.Msg.MIXLY_MICROBIT_shake,up:Et.Msg.MIXLY_UP,down:Et.Msg.MIXLY_DOWN,left:Et.Msg.MIXLY_LEFT,right:Et.Msg.MIXLY_RIGHT,"face up":Et.Msg.MIXLY_MICROBIT_face_up,"face down":Et.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},RE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Et.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},cE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_GET+Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},gE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Et.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},CE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},SE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_GETTEMPERATUE)}},AE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Et.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 Et.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},LE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},NE={init:function(){this.setColour(KO),this.appendValueInput("SPISUB").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Et.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},DE={init:function(){this.setColour(KO),this.appendDummyInput().appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[Et.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fE={init:function(){this.setColour(KO),this.appendDummyInput().appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},FE={init:function(){this.setColour(KO),this.appendDummyInput().appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},PE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},vE={init:function(){this.setColour(KO),this.appendDummyInput().appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Et.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},YE={init:function(){this.setColour(KO),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RFID_SCAN_OK,"0"],[Et.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[Et.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},XE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.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)")}},xE={init:function(){this.setColour(KO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},yE={init:function(){this.setColour(KO),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)}},bE={init:function(){this.setColour(KO),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 Et.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_zero"].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},HN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},WN=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"},KN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},JN=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"},qN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},zN=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"},QN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},jN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},ZN=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]},$N=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"},tD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},eD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},iD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},nD=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]},sD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},_D=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"},oD=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"},pD=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"},aD=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"}},uD=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"},rD=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},lD=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]},dD=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"},ID=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},TD=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"}},MD=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"}},hD=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"},mD=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"},OD=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},ED=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},RD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},cD=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"},gD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},CD=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_zero"].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"},SD=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},AD=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]},LD=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},ND=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},DD=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},fD=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},FD=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},PD=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"},vD=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"},YD=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"},XD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},xD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},yD=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),_=Rt.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},bD=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"},VD=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"},BD=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"},GD=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"},UD=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"},wD=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"},kD=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"},HD=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"},WD=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"},KD=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"},JD=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]},qD=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"},zD=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"},QD=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"},jD=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"},ZD=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},$D=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},tf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},ef=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},nf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},sf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},_f=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]},of=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]},pf=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Bf=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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},Gf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Uf=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},wf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},kf=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},Hf=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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},Wf=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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},Kf=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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},Jf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},qf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},zf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},Qf=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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},jf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},Zf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},$f=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},tF=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},eF=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"},iF=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"},nF=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"},sF=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 _},_F=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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},oF=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},pF=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},aF=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},uF=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},ix=function(){return"control.reset()\n"},nx=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},sx=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"},_x=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"},ox=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},px=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},ax=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ux=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},rx=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},lx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},dx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Ix=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]}},Tx=function(){return"while True:\n pass\n"},Mx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},hx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},mx=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"}},Ox=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"}},Ex=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"},Rx=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"},cx=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]},gx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},Cx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},Sx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Ax=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Lx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},Nx=gx,Dx=Rx,fx=cx,Fx=mx,Px=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]},vx=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]},Yx=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]},Xx=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"},xx=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]},yx=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]},bx=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]},Vx=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]},Bx=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]},Gx=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]},Ux=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"},wx=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]},kx=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]},Hx=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]},Wx=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]},Kx={};Kx["MixGo MINI"]={description:"MicroPython[ESP32C3 MixGo MINI]",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"]]},Kx["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 Jx=Kx,qx=20,zx={init:function(){this.setColour(qx),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_HIGH,"HIGH"],[Et.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},Qx={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Et.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},jx={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},Zx={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField("PWM"+Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_TOOLTIP)}},$x={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField("DAC"+Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},ty={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_mSecond,"period"],[Et.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},ey={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField("PWM"+Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_FREQUENCY+Et.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},iy={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},ny={init:function(){this.setColour(qx),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_REF_VOLTAGE+Et.Msg.MIXLY_STAT).appendField(new Et.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(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},sy={init:function(){this.setColour(qx),this.appendValueInput("pin").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},_y={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Et.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Et.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},oy={init:function(){this.setColour(20),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROPYTHON_AS).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[Et.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[Et.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[Et.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},py={init:function(){this.setColour(qx),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("pwm#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("PWM"+Et.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["pwm#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},ay={init:function(){this.setColour(qx),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("dac#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+Et.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},uy={init:function(){this.setColour(qx),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("adc#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Et.Msg.MIXLY_Analog_PINMODEIN),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},ry={init:function(){this.setColour(qx),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("tc#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},ly=oy,dy=ey,Iy=ry,Ty=sy,My=_y,hy=40,my={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput("").appendField(t).appendField(Et.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.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:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},Oy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput("").appendField(t).appendField(Et.Msg.MIXLY_Altitude+Et.Msg.MSG.catSensor+" HP203X").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETPRESSURE,"pressure()"],[Et.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Et.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ey={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput().appendField(t).appendField(Et.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ry={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput().appendField(t).appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},cy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput().appendField(t).appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},gy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput().appendField(t).appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput().appendField(t).appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Et.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0)}},Sy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hy),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RFID_SCAN_OK,"True"],[Et.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Et.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ay=100,Ly={init:function(){this.setColour(Ay),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXGO_LEFT_FRONT+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[0]"],[Et.Msg.MIXGO_RIGHT_FRONT+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[1]"],[Et.Msg.MIXGO_LEFT_BACK+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[3]"],[Et.Msg.MIXGO_RIGHT_BACK+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[2]"],[Et.Msg.MIXGO_LEFT_FRONT+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[0]"],[Et.Msg.MIXGO_RIGHT_FRONT+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[1]"],[Et.Msg.MIXGO_LEFT_BACK+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[3]"],[Et.Msg.MIXGO_RIGHT_BACK+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[2]"],[Et.Msg.ME_GO_LIGHT_HEADLIGHT,"WLED"]]),"op"),this.setOutput(!0)}},Ny={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},Dy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},fy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Fy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_BUILDIN_LED+Et.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Py={init:function(){this.setColour(Ay),this.appendDummyInput().appendField("ME GO").appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField("ME GO").appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField("ME GO").appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([[Et.Msg.MIXLYCAR_WHEEL_LEFT,"0"],[Et.Msg.MIXLYCAR_WHEEL_RIGHT,"1"],[Et.Msg.ME_GO_MOTOR_EXTERN,"2"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.ROTATION_FORWARD,"CW"],[Et.Msg.ROTATION_BACKWARD,"CCW"],[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xy={init:function(){this.setColour(Ay),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_INTERRUPT).appendField(Et.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"A"],[Et.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendValueInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xy={init:function(){this.setColour(Ay),this.appendDummyInput("").appendField(Et.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"A"],[Et.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP),this.appendDummyInput("").appendField(new Et.FieldDropdown([["turns","turns"],["distance","distance"],["turns,distance","all"]]),"args"),this.appendValueInput("num").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yy={init:function(){this.setColour(Ay),this.appendDummyInput("").appendField(Et.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"A"],[Et.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("").appendField(new Et.FieldDropdown([["turns","turns"],["distance","distance"],["speed","speed"]]),"args"),this.setOutput(!0),this.setInputsInline(!0)}},by={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"[0]"],[Et.Msg.MIXGO_LEFT_MID,"[1]"],[Et.Msg.MIXGO_RIGHT_MID,"[2]"],[Et.Msg.TEXT_TRIM_RIGHT,"[3]"],[Et.Msg.MIXLY_ALL,""]]),"key").appendField(Et.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Et.Msg.MIXLY_ESP32_NEAR}))}},Vy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXGO_LEFT_FRONT,"[0]"],[Et.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Et.Msg.MIXGO_LEFT_BACK,"[3]"],[Et.Msg.MIXGO_RIGHT_BACK,"[2]"],[Et.Msg.MIXLY_ALL,""]]),"key").appendField(Et.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Et.Msg.MIXLY_ESP32_NEAR}))}},By={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ME_GO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[Et.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[Et.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"],[Et.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_ONLY,"LS"],[Et.Msg.ME_GO_SENSOR_MODE_OFF,"CL"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gy={init:function(){this.setColour(Ay),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GET_GESTURE).appendField(new Et.FieldDropdown([[Et.Msg.ME_GO_PITCH,"[0]"],[Et.Msg.ME_GO_ROLL,"[1]"],[Et.Msg.ME_GO_PITCH+", "+Et.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Uy={init:function(){this.setColour(Ay),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"[0]"],[Et.Msg.MIXGO_LEFT_MID,"[1]"],[Et.Msg.MIXGO_RIGHT_MID,"[2]"],[Et.Msg.TEXT_TRIM_RIGHT,"[3]"],[Et.Msg.MIXLY_ALL,""]]),"key").appendField(Et.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Et.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR}))}},wy=230,ky={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},Hy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},Wy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},Ky={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},Jy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},qy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},zy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Qy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},jy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},Zy={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},$y={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},tb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},eb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},sb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},_b={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},ob={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},pb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},ab={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},ub={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},rb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},lb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},db={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},Ib={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},Tb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},Mb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},hb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},mb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Ob={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},Eb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},Rb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},cb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},gb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},Cb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},Sb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Ab={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},Lb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},Nb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},Db={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},fb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},Fb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Pb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},vb={init:function(){this.setColour(wy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},Yb=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},Xb=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"},xb=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},yb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".duty("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},bb=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"},Vb=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"},Bb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".freq("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Gb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Ub=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},wb=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"},kb=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,Et.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},Hb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pwm#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("pwm#"==i?"pwm"+n:e.variableDB_.getName(i,Et.Variables.NAME_TYPE))+" = machine.PWM(machine.Pin("+n+"))\n"},Wb=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,Et.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},Kb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,Et.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},Jb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},qb=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,Et.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},zb=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]},Qb=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]},jb=function(t,e){e.definitions_.import_mini_g2="import mini_g2";return["mini_g2.varistor()",e.ORDER_ATOMIC]},Zb=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]},$b=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]},tV=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 _},eV=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]},iV=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]},nV=function(t,e){return e.definitions_.import_me_go_car="from me_go import car",["car."+this.getFieldValue("op"),e.ORDER_ATOMIC]},sV=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"},_V=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]},oV=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]},pV=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"},aV=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"},uV=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'")\n'},rV=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"},lV=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"},dV=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"},IV=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]},TV=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]},MV=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]},hV=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"},mV=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]},OV=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]},EV=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},RV=EV,cV=EV,gV=EV,CV=EV,SV=EV,AV=EV,LV=EV,NV=EV,DV=EV,fV=EV,FV=EV,PV=EV,vV=EV,YV=EV,XV=EV,xV=EV,yV=EV,bV=EV,VV=EV,BV=EV,GV=EV,UV=EV,wV=EV,kV=EV,HV=EV,WV=EV,KV=EV,JV=EV,qV=EV,zV=EV,QV=EV,jV=EV,ZV=EV,$V=EV,tB=EV,eB=EV,iB=EV,nB=EV,sB=EV,_B=EV,oB=EV,pB=EV,aB=EV,uB=EV;Object.assign(Et.Variables,gt),Object.assign(Et.Procedures,Qn),Et.Python=Tu,Et.generator=Tu,Rt.Profile.default={},Object.assign(Rt.Profile,Jx),Object.assign(Rt.Profile.default,Jx["MixGo CC"]),Object.assign(Et.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,v,Y,lt,dt,It,Tt),Object.assign(Et.Python.forBlock,T,M,h,m,O,E,R,c,g,C,S,A,L,nt,ut,at,$,st,rt,q,pt,ot,_t,z,J,K,et,tt,it,Q,j,Z,Mt,ht,mt,Ot)})(); \ No newline at end of file +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(Et.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Et.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(Et.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Et.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(yt),this.appendValueInput("FROM").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.PYTHON_RANGE).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},kt={init:function(){this.setColour(yt),this.appendValueInput("LIST").setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Et.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ht={init:function(){this.setColour(yt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Et.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Et.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Et.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Et.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Et.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Et.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Et.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(Et.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(Et.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Et.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(yt);var t=new Et.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Et.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Et.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(Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Jt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Et.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Et.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Et.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Et.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Ht.OPERATORS=[[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Et.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const zt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Et.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},jt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Et.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(yt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},$t={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Et.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Et.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Et.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:yt,tooltip:Et.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Et.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(yt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Et.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},_e={init:function(){this.appendDummyInput().appendField(Et.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Et.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Et.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Et.FieldDropdown([[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Et.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(yt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},oe={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pe={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ue={init:function(){this.setColour(yt),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_GET_UNIQUE_IDEN)}},re={init:function(){this.setColour(yt),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Et.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},le=230;Et.FieldTextInput.math_number_validator=function(t){return String(t)},Et.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 de={init:function(){this.setColour(le),this.appendDummyInput().appendField(new Et.FieldTextInput("0",Et.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MATH_NUMBER_TOOLTIP)}},Ie={init:function(){this.setColour(le);this.appendDummyInput("").appendField(Et.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Et.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Te={init:function(){this.setColour(le);this.appendDummyInput("").appendField(Et.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Et.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Et.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Me={init:function(){this.setColour(le),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.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:Et.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Et.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Et.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},he={init:function(){this.setColour(le),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.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:Et.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Et.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Et.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Et.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Et.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},me={init:function(){this.setColour(le),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Et.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Oe={init:function(){this.setColour(le),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Et.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:Et.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Et.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Et.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Et.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Et.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Et.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Et.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ee={init:function(){var t=[[Et.Msg.MATH_BIN,"bin"],[Et.Msg.MATH_OCT,"oct"],[Et.Msg.MATH_HEX,"hex"]];this.setColour(le),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Et.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Et.Msg.MATH_DEC_TOOLTIP_BIN,oct:Et.Msg.MATH_DEC_TOOLTIP_OCT,hex:Et.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Re={init:function(){var t=[[Et.Msg.LANG_MATH_TO_ROUND,"round"],[Et.Msg.LANG_MATH_TO_CEIL,"ceil"],[Et.Msg.LANG_MATH_TO_FLOOR,"floor"],[Et.Msg.MATH_ABS,"fabs"],[Et.Msg.MATH_SQRT,"sqrt"]];this.setColour(le),this.appendValueInput("A").setCheck(Number).appendField(new Et.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Et.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Et.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Et.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Et.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Et.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Et.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},ce={init:function(){var t=[[Et.Msg.MIXLY_MAX,"max"],[Et.Msg.MIXLY_MIN,"min"]];this.setColour(le),this.appendValueInput("A").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Et.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Et.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Et.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ge={init:function(){var t=[[Et.Msg.MATH_TWO,"two"],[Et.Msg.MATH_EIGHT,"eight"],[Et.Msg.MATH_TEN,"ten"],[Et.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(le),this.appendDummyInput("").appendField(Et.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Et.FieldDropdown(t),"OP").appendField(Et.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MATH_ZHW).appendField(new Et.FieldDropdown(t),"OP2").appendField(Et.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:Et.Msg.MATH_Before_two,eight:Et.Msg.MATH_Before_eight,ten:Et.Msg.MATH_Before_ten,sixteen:Et.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Et.Msg.MATH_Behind_two,eight:Et.Msg.MATH_Behind_eight,ten:Et.Msg.MATH_Behind_ten,sixteen:Et.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Ce={init:function(){var t=[[Et.Msg.LANG_MATH_INT,"int"],[Et.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(le),this.setOutput(!0,Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Et.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Et.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Et.Msg.LANG_MATH_INT,float:Et.Msg.LANG_MATH_FLOAT_RANDOM};return Et.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Se={init:function(){this.setColour(le),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Et.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Et.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Et.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Et.Msg.MATH_CONSTRAIN_TOOLTIP)}},Ae={init:function(){this.setColour(le),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Et.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Et.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Le={init:function(){this.setColour(le),this.appendDummyInput().appendField(new Et.FieldTextInput("0",Et.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Et.Msg.MATH_NUMBER_TOOLTIP)}},Ne={init:function(){this.setColour(le),this.appendValueInput("NUM").setCheck(Number).appendField(Et.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},De={init:function(){this.setColour(le),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Et.Msg.MATH_ROUND).appendField(Et.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Et.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Et.Msg.MATH_ROUND_NEW_TOOLTIP)}},fe={init:function(){var t=[[Et.Msg.MIXLY_TO_INT,"int"],[Et.Msg.MIXLY_TO_FLOAT,"float"],[Et.Msg.MIXLY_TO_BITES,"b"],[Et.Msg.LANG_MATH_BYTE+Et.Msg.MIXLY_TO_INT,"bti"]];this.setColour(le),this.appendValueInput("VAR").appendField(new Et.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Et.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Et.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Et.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Fe={init:function(){var t=[[Et.Msg.MIXLY_TO_INT,"int"],[Et.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(le),this.appendValueInput("VAR").appendField(new Et.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Et.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Et.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Pe=Ae,ve={init:function(){this.setColour(le),this.appendValueInput("VAR").appendField(Et.Msg.LANG_MATH_BYTE+Et.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Ye=160,Xe={init:function(){this.setColour(Ye),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Et.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Et.Msg.TEXT_TEXT_TOOLTIP)},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 Et.FieldImage(e,12,12,'"')}},xe={init:function(){this.setColour(Ye),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Et.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Et.Msg.TEXT_LINES_TOOLTIP)},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 Et.FieldImage(e,12,12,'"')}};Et.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ye={init:function(){this.setColour(Ye),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Et.FieldTextInput("",Et.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Et.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Et.FieldImage(e,7,12,'"')}},be={init:function(){this.setColour(Ye),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Et.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ve={init:function(){this.setColour(Ye),this.appendValueInput("VAR").setCheck(Number).appendField(Et.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Be={init:function(){this.setColour(Ye),this.appendValueInput("VAR").setCheck(String).appendField(Et.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ge={init:function(){this.setColour(Ye),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ue={init:function(){this.setColour(Ye),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},we={init:function(){this.WHERE_OPTIONS=[[Et.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Et.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Et.Msg.TEXT_GET_INDEX_RANDOM+1+Et.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Et.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Et.Msg.LISTS_GET_INDEX_GET,"MODE"),Et.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Et.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=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Et.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Et.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Et.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Et.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Et.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Et.Msg.TEXT_GET_INDEX_RANDOM};return Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Et.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Et.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),Et.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Et.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Et.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"),Et.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},ke={init:function(){this.setHelpUrl(Et.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Et.Msg.LISTS_GET_INDEX_GET+" "+Et.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Et.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_MICROBIT_TYPE_STRING+Et.Msg.LISTS_GET_INDEX_FROM_START+"n"+Et.Msg.TEXT_CHARAT2)}},He={init:function(){this.setHelpUrl(Et.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ye),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Et.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Et.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},We={init:function(){this.WHERE_OPTIONS_1=[[Et.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Et.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Et.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Et.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Et.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Et.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Et.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ye),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Et.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(Et.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Et.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Et.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),Et.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Et.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Et.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"))}},Ke={init:function(){this.setHelpUrl(Et.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Et.Msg.LISTS_GET_INDEX_GET+" "+Et.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Et.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Et.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Et.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Je={init:function(){var t=[[Et.Msg.MIXLY_EQUALS,"==="],[Et.Msg.MIXLY_STARTSWITH,"startswith"],[Et.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ye),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Et.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(Et.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_COMPARETO_HELP)}},ze={init:function(){var t=[[Et.Msg.TEXT_UPPER,"upper"],[Et.Msg.TEXT_TITLE,"title"],[Et.Msg.TEXT_CAPITALIZE,"capitalize"],[Et.Msg.TEXT_SWAPCASE,"swapcase"],[Et.Msg.TEXT_LOWER,"lower"]];this.setColour(Ye),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Et.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Et.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Et.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Et.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Et.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Qe={init:function(){var t=[[Et.Msg.TEXT_LJUST,"ljust"],[Et.Msg.TEXT_CENTER,"center"],[Et.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ye),this.appendValueInput("VAR").appendField(new Et.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Et.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Et.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},je={init:function(){this.setColour(Ye),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Et.Msg.MIXLY_MID+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Et.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ze={init:function(){this.setColour(Ye),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},$e={init:function(){this.setColour(Ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Et.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Et.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ti={init:function(){this.setColour(Ye),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Et.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Et.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Et.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ei={init:function(){var t=[[Et.Msg.TEXT_TRIM_BOTH,"strip"],[Et.Msg.TEXT_TRIM_LEFT,"lstrip"],[Et.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ye),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Et.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Et.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Et.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Et.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Et.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Et.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ii={init:function(){this.setColour(Ye),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Et.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Et.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ji={init:function(){this.setColour(zi),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Zi={init:function(){this.setColour(zi),this.appendDummyInput().appendField(Et.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},$i={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_KEYS),this.setTooltip(Et.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},tn={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Et.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Et.Msg.DICTS_GET_TOOLTIP)}},en={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Et.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Et.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Et.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},nn={init:function(){this.setColour(zi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Et.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},sn={init:function(){this.setColour(zi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Et.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_DELETE_TOOLTIP)}},_n={init:function(){this.setColour(zi),this.appendValueInput("DICT2").setCheck("Dict").appendField(Et.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Et.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MID),this.setTooltip(Et.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},on={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_CLEAR),this.setTooltip(Et.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pn={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_ITEMS),this.setTooltip(Et.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},an={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_VALUES),this.setTooltip(Et.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},un={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_LENGTH),this.setTooltip(Et.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},rn={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.DICT_DELDICT),this.setTooltip(Et.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ln={init:function(){this.MODE=[[Et.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Et.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Et.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Et.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=Et.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Et.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Et.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 Et.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")}},dn={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Et.Msg.DICTS_ADD_VALUE),this.setTooltip(Et.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},In={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Et.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Et.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Tn={init:function(){this.setColour(zi),this.appendDummyInput("").appendField(new Et.FieldLabel(Et.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 Et.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mn={init:function(){this.setColour(zi),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},hn={init:function(){this.setColour(zi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_TO_JSON),this.setTooltip(Et.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},mn={init:function(){this.setColour(zi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Et.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},On=210,En={init:function(){var t=Et.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(On),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Et.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Et.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Et.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Et.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Et.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Et.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Rn={init:function(){var t=Et.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Et.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(On),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Et.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},cn={init:function(){var t=[[Et.Msg.LOGIC_OPERATION_AND,"AND"],[Et.Msg.LOGIC_OPERATION_OR,"OR"],[Et.Msg.LOGIC_OPERATION_NOR,"NOR"],[Et.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(On),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Et.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Et.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Et.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Et.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Et.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},gn={init:function(){this.setColour(On),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Et.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Et.Msg.LOGIC_NEGATE_TOOLTIP)}},Cn={init:function(){var t=[[Et.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Et.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(On),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Et.FieldDropdown(t),"BOOL"),this.setTooltip(Et.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Sn={init:function(){this.setColour(On),this.setOutput(!0),this.appendDummyInput().appendField(Et.Msg.LOGIC_NULL),this.setTooltip(Et.Msg.LOGIC_NULL_TOOLTIP)}},An={init:function(){this.setColour(On),this.appendValueInput("A"),this.appendValueInput("B").appendField(Et.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Et.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Ln={init:function(){var t=[[Et.Msg.TEXT_APPEND_TO,"in"],[Et.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(On),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Et.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Et.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.IN)}},Nn={init:function(){var t=[[Et.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Et.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(On),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Et.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Dn={init:function(){this.setColour(On),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Et.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},fn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Et.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(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Et.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=Et.Msg.MIXLY_USE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Et.Msg.MIXLY_BELONG;return i+{r:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Et.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=Et.Msg.MIXLY_USE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Et.Msg.MIXLY_BELONG,o=Et.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},vn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Et.Msg.MIXPY_TEXT_ENCODE).appendField(new Et.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=Et.Msg.MIXLY_USE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Et.Msg.MIXLY_BELONG,o=Et.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Et.Msg.MIXLY_MICROBIT_TYPE_STRING+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Et.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(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Et.Msg.MICROBIT_PYTHON_TYPE)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.HTML_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Gn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Et.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Un={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Et.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(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Kn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Et.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 Et.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Et.Msg.MIXLY_ESP32_SET+{mkdir:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Et.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.HTML_FILE,"isfile"],[Et.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 Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Et.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Qn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Et.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},jn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Et.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Zn={};Zn.NAME_TYPE=Et.PROCEDURE_CATEGORY_NAME,Zn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(Et.Msg.MIXLY_AIP_ATTR).setAlign(Et.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Us),this.appendDummyInput().appendField(Et.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},qs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(Et.Msg.HTML_FORM_CONTENT).appendField(new Et.FieldDropdown([[Et.Msg.HTML_TEXT,"text"],[Et.Msg.HTML_EMAIL,"email"],[Et.Msg.HTML_NUMBER,"number"],[Et.Msg.HTML_PASSWORD,"password"],[Et.Msg.HTML_CHECKBOX,"checkbox"],[Et.Msg.HTML_RADIOBUTTON,"radiobutton"],[Et.Msg.HTML_BUTTON,"button"],[Et.Msg.HTML_COLOUR,"colour"],[Et.Msg.HTML_DATE,"date"],[Et.Msg.HTML_LOCALTIME,"local time"],[Et.Msg.HTML_FILE,"file"],[Et.Msg.HTML_HIDDEN,"hidden"],[Et.Msg.HTML_IMAGE,"image"],[Et.Msg.HTML_MONTH,"month"],[Et.Msg.HTML_RANGE,"range"],[Et.Msg.HTML_RESET,"reset"],[Et.Msg.HTML_SEARCH,"search"],[Et.Msg.HTML_SUBMIT,"submit"],[Et.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Et.Msg.HTML_TIME,"time"],[Et.Msg.HTML_URL,"url"],[Et.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Et.Msg.HTML_NAME).appendField(new Et.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Et.Msg.HTML_VALUE).appendField(new Et.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Et.Msg.MIXLY_AIP_ATTR).setAlign(Et.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(new Et.FieldTextInput("property"),"KEY").appendField(":").appendField(new Et.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(new Et.FieldTextInput("property"),"KEY").appendField(":").appendField(new Et.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},js={init:function(){this.setColour(Us),this.appendDummyInput().appendField(Et.Msg.HTML_TEXT).appendField(new Et.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs=160,$s={init:function(){this.setColour(Zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Et.FieldTable(""),"TEXT")}},t_={init:function(){this.setColour(Zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Et.FieldMultilineInput(""),"TEXT")}},e_={init:function(){this.setColour(Zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Et.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},i_={init:function(){this.setColour(Zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},n_={init:function(){this.setColour(Zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Et.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},s_={init:function(){this.setColour(Zs),this.appendValueInput("VALUE").appendField(Et.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},__={init:function(){this.setColour(Zs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Et.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Et.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=Et.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+")"},Et.isNumber(n)&&Et.isNumber(s)&&Et.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 Jp=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]},qp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},zp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Qp=function(t,e){return["None",e.ORDER_ATOMIC]},jp=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]},Zp=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]},$p=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]},ta=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},ea=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"},na=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},sa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},_a=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]},pa=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]},aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ua=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},la=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]},Ia=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ta=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ma=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ha=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"},ma=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Oa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ea=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"},ca=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]},ga=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"},Ca=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"},Sa=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Et.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]},su=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},_u=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"},pu=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]},uu=function(t,e){return'"},ru=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},lu=function(){return this.getFieldValue("TEXT")+"\n"},du=function(t){return t.getFieldValue("TEXT")+"\n"},Iu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Tu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Mu=function(){return""},hu=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_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},Eu.scrubNakedValue=function(t){return t+"\n"},Eu.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},Eu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Eu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Et.utils.string.wrap(_,Eu.COMMENT_WRAP-3),n+=Eu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Ru="#74A55B",cu={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_RGB_PIN_COUNT)}},gu={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Cu={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Su={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Au={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(Et.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Et.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Et.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Lu={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Nu={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_RESET)}},Du={init:function(){this.setColour(Ru),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fu={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Fu={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Pu={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},vu={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Yu={init:function(){this.setColour(Ru),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xu={init:function(){this.setColour(Ru),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_MOVE)}},xu={init:function(){this.setColour(Ru),this.appendValueInput("VAR").appendField("360°"+Et.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SETTING+Et.Msg.blockpy_turtle_rotate+Et.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},yu={init:function(){this.setColour(Ru),this.appendValueInput("PIN",Number).appendField("180°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_MOVE)}},bu={init:function(){this.setColour(Ru),this.appendValueInput("PIN",Number).appendField("360°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Vu={init:function(){this.setColour(Ru),this.appendValueInput("PIN",Number).appendField("180°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bu={init:function(){this.setColour(Ru),this.appendValueInput("PIN",Number).appendField("360°"+Et.Msg.MIXLY_SERVO).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Gu={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Et.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Et.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},Uu={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Et.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Et.Msg.MOTOR_N,"ms32006.MOT_N"],[Et.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},wu={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Et.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Et.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},ku={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_RGB_PIN_COUNT)}},Hu={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},Wu={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Ku={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_WRI)}},Ju={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new Et.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO+"SYN6288"+Et.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},qu={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Et.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},zu={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Qu={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Et.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(Et.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},ju={init:function(){this.setColour(Ru),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(Et.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(Et.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(Et.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Zu={init:function(){this.setColour(Ru),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},$u={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},tr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},er={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_TRAFFIC_LIGHT).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.LISTS_SET_INDEX_SET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[Et.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ir={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_WHITE,"W"],[Et.Msg.COLOUR_RGB_RED,"R"],[Et.Msg.COLOUR_RGB_YELLOW,"Y"],[Et.Msg.COLOUR_RGB_GREEN,"G"],[Et.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},nr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_WHITE,"W"],[Et.Msg.COLOUR_RGB_RED,"R"],[Et.Msg.COLOUR_RGB_YELLOW,"Y"],[Et.Msg.COLOUR_RGB_GREEN,"G"],[Et.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},sr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[Et.Msg.MIXLY_SPEED,"[1]"],[Et.Msg.MATH_SINGLE_OP_ABSOLUTE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[Et.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[Et.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[Et.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},_r={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[Et.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[Et.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},or={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},pr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MATH_SINGLE_OP_ABSOLUTE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MODE).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPEED+Et.Msg.MIXLY_MODE,"0"],[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Et.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"0"],[Et.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[Et.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},ar={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ur={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField("("+Et.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MODE).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPEED+Et.Msg.MIXLY_MODE,"0"],[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Et.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},rr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.ME_GO_MOTOR_EXTERN+Et.Msg.MIXLY_SERVO_MOTOR).appendField(Et.Msg.MIXLY_RELATIVE+Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Et.Msg.MSG.run).appendField("("+Et.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LEFT,"0"],[Et.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MODE).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPEED+Et.Msg.MIXLY_MODE,"0"],[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Et.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Et.inputs.Align.RIGHT).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"0"],[Et.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},lr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MOTOR,"ext_motor"],[Et.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Et.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Et.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Et.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Et.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Et.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Et.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},dr={init:function(){this.setColour(Ru),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(Et.Msg.ME_GO_MOTOR_EXTERN).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MOTOR,"ext_motor"],[Et.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Et.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Et.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Et.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Et.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Et.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Et.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ir="#6C9858",Tr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(new Et.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Mr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_ON,"1"],[Et.Msg.MIXLY_ESP32_OFF,"0"],[Et.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},hr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},mr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Or={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Er={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_BUILDIN_LED+Et.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Rr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Et.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(Et.Msg.MIXLY_LCD_SETCOLOR).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_LIGHT_RED,"1"],[Et.Msg.MIXLY_LIGHT_GREEN,"2"],[Et.Msg.MIXLY_LIGHT_BLUE,"3"],[Et.Msg.MIXLY_LIGHT_YELLOW,"4"],[Et.Msg.MIXLY_LIGHT_CYAN,"5"],[Et.Msg.MIXLY_LIGHT_PURPLE,"6"],[Et.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},cr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},gr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Cr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Sr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING).appendField(Et.Msg.MIXLY_BUILDIN_LED).appendField(new Et.FieldDropdown([[Et.Msg.COLOUR_RGB_RED,"r"],[Et.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_BUILDIN_LED+Et.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Ar={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(new Et.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Lr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.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(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Nr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Dr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.MIXLY_DURATION).appendField(Et.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},fr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Et.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.PYTHON_RANGE_STEP).appendField(Et.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Fr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_WRI)}},Pr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.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(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Et.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},vr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Et.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Yr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Et.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.PYTHON_RANGE_STEP).appendField(Et.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Xr={init:function(){this.setColour(Ir),this.appendValueInput("TICKS").setCheck(Number).appendField(Et.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Et.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Et.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},xr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},yr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_RESET)}},br={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Vr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Et.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Br={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gr={init:function(){this.setColour(Ir),this.appendValueInput("LIST").appendField(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Ur={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"CW"],[Et.Msg.ANTI_CLOCKWISE,"CCW"],[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField("MixGo Car").appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},kr={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField("MixGo Car").appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Hr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([[Et.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Et.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"CW"],[Et.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([[Et.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Et.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_STOP).appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Kr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Jr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Et.Msg.MIXLY_SPEED,"SPEED"],[Et.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},qr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXBOT).appendField(Et.Msg.MIXLY_MOTOR).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"1"],[Et.Msg.TEXT_TRIM_RIGHT,"2"],[Et.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Et.Msg.MIXLY_SPEED,"SPEED"],[Et.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Qr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[Et.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},jr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.BITBOT).appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zr={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.BITBOT).appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$r={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.BITBOT).appendField(Et.Msg.MIXLY_MOTOR).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"0"],[Et.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.CLOCKWISE,"CW"],[Et.Msg.ANTI_CLOCKWISE,"CCW"],[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tl={init:function(){this.setColour(Ir),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},el={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},il={init:function(){this.setColour(Ir),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_MIXBOT_BUZZER+Et.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},nl={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.MIXLY_MIXBOT_BUZZER+Et.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},sl={init:function(){this.setColour(Ir),this.appendValueInput("PATH").appendField(Et.Msg.MIXLY_RECORD_AUDIO).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(Et.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_l={init:function(){this.setColour(Ir),this.appendValueInput("PATH").appendField(Et.Msg.MIXLY_PLAY_AUDIO).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ol={init:function(){this.setColour(Ir),this.appendValueInput("PATH").appendField(Et.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},pl={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Et.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},al={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ul={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.LISTS_SET_INDEX_SET+Et.Msg.ME_GO_MOTOR_EXTERN).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.blynk_IOT_IR_POWER+Et.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},rl={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET+Et.Msg.ME_GO_MOTOR_EXTERN).appendField(Et.Msg.PIN_NUMBERING).appendField(new Et.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.blynk_IOT_IR_POWER+Et.Msg.MIXLY_PINMODEOUT+Et.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},ll={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.LISTS_SET_INDEX_SET+Et.Msg.ME_GO_MOTOR_EXTERN).appendField(Et.Msg.MIXLY_ALL+Et.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(Et.ALIGN_RIGHT).appendField(Et.Msg.blynk_IOT_IR_POWER+Et.Msg.MIXLY_PINMODEOUT+Et.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},dl={init:function(){this.setColour(Ir),this.appendDummyInput().appendField(Et.Msg.ANALOG+Et.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(Et.Msg.MIXLY_RELEASE).appendField(new Et.FieldDropdown([[Et.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Et.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.ANALOG+Et.Msg.MIXLY_KEYBOARD_INPUT)}},Il={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SPECIAL_KEY).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[Et.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[Et.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[Et.Msg.MIXLY_SPECIAL_KEY1,"0x04"],[Et.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[Et.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[Et.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[Et.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[Et.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Tl={init:function(){this.setColour(Ir),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GENERAL_KEY).appendField(new Et.FieldDropdown([[Et.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)}},Ml={init:function(){this.setColour(Ir),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new Et.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(Et.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;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Km={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Jm={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},qm={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},zm={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Et.Msg.MIXLY_EMQX_SERVER).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Et.Msg.MIXLY_WIFI_USERNAME).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Et.Msg.MIXLY_IOT_PASSWORD).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Et.Msg.MIXLY_EMQX_PROJECT).setAlign(Et.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qm={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Et.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Et.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Et.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},jm={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Et.Msg.MIXLY_EMQX_SUBSCRIBE+Et.Msg.MIXLY_MICROBIT_MSG).appendField(Et.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Et.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},Zm={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$m={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Et.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},iO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Et.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},nO={init:function(){this.setColour(Bm),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},sO={init:function(){this.setColour(Bm),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},_O={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},oO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO").appendField(Et.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Et.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},pO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Et.Msg.MIXLY_EMQX_SERVER).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+Et.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Et.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},aO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField(Et.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Et.Msg.MIXLY_EMQX_SERVER).setAlign(Et.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Et.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uO={init:function(){this.VISITOR_ID=Rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Bm),this.appendDummyInput("").appendField(new Et.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")}},rO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MixIO").appendField(Et.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},lO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("HTTP"+Et.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Et.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Et.Msg.MIXLY_REQUESTS_GET).appendField(Et.Msg.MIXLY_GET_CURRENT_TIME).appendField(Et.Msg.MIXLY_OPEN_DEBUG).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("HTTP"+Et.Msg.MIXLY_Client).appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Et.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Et.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},IO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MQTT"+Et.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Et.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Et.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Et.Msg.MQTT_Topic).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Et.Msg.MIXLY_OPEN_DEBUG).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Et.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},TO={init:function(){this.setColour(Bm),this.appendDummyInput().appendField("MQTT"+Et.Msg.MIXLY_Client).appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Et.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Et.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},MO=Gm,hO=Um,mO=wm,OO=km,EO=Wm,RO=225,cO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Et.Msg.MIXLY_NETWORK_MODE).appendField(new Et.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},gO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Et.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Et.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=Et.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Et.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Et.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},CO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},SO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Et.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},AO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Et.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Et.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},LO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_NETWORK_WIFI_CONNECT+Et.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},NO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Et.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Et.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 Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Et.Msg.MIXLY_ESP32_NETWORK_IP,1:Et.Msg.MIXLY_ESP32_NETWORK_MASK,2:Et.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},DO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},fO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Et.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},FO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Et.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Et.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},PO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},vO={init:function(){this.setColour(RO),this.appendValueInput("VAR").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Et.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 Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},YO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},XO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},xO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},yO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},bO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},VO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},BO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},GO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},UO={init:function(){this.setColour(RO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},wO={init:function(){this.setColour(RO),this.appendValueInput("DOMAIN").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Et.Msg.blockpy_REQUESTS_GET).appendField(new Et.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},kO={init:function(){this.appendValueInput("VAL");var t=[[Et.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]];this.setColour(RO),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:Et.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Et.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Et.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},HO={init:function(){this.appendValueInput("VAR").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(RO),this.appendDummyInput("").appendField(Et.Msg.blockpy_CONDUCT).appendField(new Et.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(Et.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:Et.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Et.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},WO={init:function(){this.setColour(RO),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Et.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},KO={init:function(){this.setColour(RO),this.appendDummyInput("").appendField(new Et.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)}},JO="#3288dd",qO={init:function(){this.setColour(JO),this.appendValueInput("URL").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Et.Msg.blockpy_CONDUCT).appendField(new Et.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Et.Msg.blockpy_REQUESTS).appendField(Et.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},zO={init:function(){this.setColour(JO),this.appendValueInput("URL").appendField(Et.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Et.Msg.blockpy_CONDUCT).appendField(new Et.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Et.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Et.Msg.blockpy_REQUESTS+Et.Msg.OLED_STRING),this.appendDummyInput("").appendField(Et.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},QO={init:function(){this.appendValueInput("VAL");var t=[[Et.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Et.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Et.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(JO),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},jO="#A58C5B",ZO={init:function(){this.setColour(jO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(Et.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SENOR_IS_PRESSED)}},$O={init:function(){this.setColour(jO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(Et.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SENOR_WAS_PRESSED)}},tE={init:function(){this.setColour(jO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Et.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.PROCEDURES_DEFRETURN_RETURN+Et.Msg.MIXLY_BUTTON+Et.Msg.MIXLY_GET_PRESSES)}},eE={init:function(){this.setColour(jO),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_BUTTON).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Et.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Et.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},iE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_shake,"shake"],[Et.Msg.MIXLY_UP,"up"],[Et.Msg.MIXLY_DOWN,"down"],[Et.Msg.MIXLY_LEFT,"left"],[Et.Msg.MIXLY_RIGHT,"right"],[Et.Msg.MIXLY_MICROBIT_face_up,"face up"],[Et.Msg.MIXLY_MICROBIT_face_down,"face down"],[Et.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Et.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Et.Msg.MSG.catSensor,s=Et.Msg.MIXLY_MICROBIT_JS_STATE,_=Et.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Et.Msg.MIXLY_MICROBIT_shake,up:Et.Msg.MIXLY_UP,down:Et.Msg.MIXLY_DOWN,left:Et.Msg.MIXLY_LEFT,right:Et.Msg.MIXLY_RIGHT,"face up":Et.Msg.MIXLY_MICROBIT_face_up,"face down":Et.Msg.MIXLY_MICROBIT_face_down,freefall:Et.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},nE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Et.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},sE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},_E={init:function(){var t=[[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(jO),this.appendValueInput("PIN",Number).appendField(new Et.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Et.FieldDropdown(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Et.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))}},oE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},pE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},aE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"left"],[Et.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Et.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Et.Msg.MIXLY_ESP32_NEAR;return i+{left:Et.Msg.TEXT_TRIM_LEFT,right:Et.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},uE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Et.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()":Et.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Et.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},rE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Et.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()":Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},lE={init:function(){this.setColour(jO),this.appendValueInput("PIN",Number).appendField("DS18X20 "+Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},dE={init:function(){this.setColour(jO),this.appendDummyInput("").appendField("LM35"+Et.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_TOOLTIP_LM35)}},IE={init:function(){this.setColour(jO),this.appendValueInput("I2CSUB").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Et.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},TE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[Et.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[Et.Msg.MIXLY_ESP32_MAX30102_IR+","+Et.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ME={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[Et.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[Et.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},hE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},mE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.HTML_COLOUR+Et.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GET+Et.Msg.HTML_COLOUR,"[2]"],[Et.Msg.MIXLY_GET+Et.Msg.MIXLY_IR_STRENGTH,"[1]"],[Et.Msg.MIXLY_GET+Et.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},OE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GET_ENV_LIGHT,"E"],[Et.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},EE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},RE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.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:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},cE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.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:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},gE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_Altitude+Et.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETPRESSURE,"pressure()"],[Et.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Et.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},CE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MIXGOPE_FIELD+Et.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[Et.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},SE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_shake,"shake"],[Et.Msg.MIXLY_UP,"up"],[Et.Msg.MIXLY_DOWN,"down"],[Et.Msg.MIXLY_LEFT,"left"],[Et.Msg.MIXLY_RIGHT,"right"],[Et.Msg.MIXLY_MICROBIT_face_up,"face up"],[Et.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Et.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Et.Msg.MSG.catSensor,s=Et.Msg.MIXLY_MICROBIT_JS_STATE,_=Et.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Et.Msg.MIXLY_MICROBIT_shake,up:Et.Msg.MIXLY_UP,down:Et.Msg.MIXLY_DOWN,left:Et.Msg.MIXLY_LEFT,right:Et.Msg.MIXLY_RIGHT,"face up":Et.Msg.MIXLY_MICROBIT_face_up,"face down":Et.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},AE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Et.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},LE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_GET+Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},NE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Et.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Et.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=Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Et.Msg.MIXLY_MICROBIT_Direction,s=Et.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Et.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},DE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},fE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_GETTEMPERATUE)}},FE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Et.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 Et.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Et.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Et.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},PE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},vE={init:function(){this.setColour(jO),this.appendValueInput("SPISUB").appendField(Et.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Et.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP+Et.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Et.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},YE={init:function(){this.setColour(jO),this.appendDummyInput().appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[Et.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},XE={init:function(){this.setColour(jO),this.appendDummyInput().appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},xE={init:function(){this.setColour(jO),this.appendDummyInput().appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},yE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},bE={init:function(){this.setColour(jO),this.appendDummyInput().appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Et.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},VE={init:function(){this.setColour(jO),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RFID_SCAN_OK,"0"],[Et.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[Et.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},BE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Et.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)")}},GE={init:function(){this.setColour(jO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},UE={init:function(){this.setColour(jO),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)}},wE={init:function(){this.setColour(jO),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 Et.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_zero"].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},zN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},QN=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"},jN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},ZN=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"},$N=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tD=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"},eD=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},iD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},nD=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]},sD=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"},_D=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},oD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},pD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},aD=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]},uD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},rD=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"},lD=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"},dD=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"},ID=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"}},TD=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"},MD=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},hD=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]},mD=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"},OD=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},ED=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"}},RD=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"}},cD=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"},gD=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"},CD=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},SD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},AD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},LD=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"},ND=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},DD=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_zero"].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"},fD=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},FD=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]},PD=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},vD=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},YD=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},XD=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},xD=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},yD=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"},bD=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"},VD=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"},BD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},GD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},UD=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),_=Rt.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},wD=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"},kD=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"},HD=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"},WD=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"},KD=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"},JD=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"},qD=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"},zD=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"},QD=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"},jD=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"},ZD=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]},$D=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"},tf=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"},ef=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"},nf=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"},sf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_f=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},of=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},pf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},af=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},uf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},rf=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]},lf=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]},df=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Hf=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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},Wf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Kf=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},Jf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},qf=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},zf=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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},Qf=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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},jf=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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},Zf=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},$f=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},tF=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},eF=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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},iF=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},nF=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},sF=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},_F=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},oF=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"},pF=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"},aF=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"},uF=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 _},rF=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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},lF=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},dF=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},IF=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},TF=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},px=function(){return"control.reset()\n"},ax=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},ux=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"},rx=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"},lx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},dx=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},Ix=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Tx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Mx=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},hx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},mx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Ox=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]}},Ex=function(){return"while True:\n pass\n"},Rx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},cx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},gx=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"}},Cx=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"}},Sx=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"},Ax=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"},Lx=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]},Nx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},Dx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},fx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Fx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Px=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},vx=Nx,Yx=Ax,Xx=Lx,xx=gx,yx=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]},bx=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]},Vx=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]},Bx=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"},Gx=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]},Ux=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]},wx=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]},kx=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]},Hx=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]},Wx=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]},Kx=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"},Jx=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]},qx=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]},zx=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]},Qx=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]},jx={};jx["MixGo MINI"]={description:"MicroPython[ESP32C3 MixGo MINI]",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"]]},jx["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 Zx=jx,$x=20,ty={init:function(){this.setColour($x),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_HIGH,"HIGH"],[Et.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},ey={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Et.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},iy={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},ny={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField("DAC"+Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},sy={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_mSecond,"period"],[Et.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},_y={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},oy={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_REF_VOLTAGE+Et.Msg.MIXLY_STAT).appendField(new Et.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(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},py={init:function(){this.setColour($x),this.appendValueInput("pin").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Et.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Et.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},ay={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MODE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Et.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Et.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},uy={init:function(){this.setColour(20),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROPYTHON_AS).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[Et.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[Et.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[Et.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},ry={init:function(){this.setColour($x),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("dac#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+Et.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},ly={init:function(){this.setColour($x),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("adc#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Et.Msg.MIXLY_Analog_PINMODEIN),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},dy={init:function(){this.setColour($x),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP).appendField(new Et.FieldTextInput("tc#"),"PIN_OBJ").appendField(Et.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(Et.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.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){Et.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},Iy={init:function(){this.setColour($x),this.appendValueInput("PIN",Number).appendField("PWM"+Et.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Et.Msg.MIXLY_FREQUENCY+Et.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Et.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},Ty=uy,My=dy,hy=py,my=ay,Oy=40,Ey={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput("").appendField(t).appendField(Et.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Et.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:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Et.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},Ry={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput("").appendField(t).appendField(Et.Msg.MIXLY_Altitude+Et.Msg.MSG.catSensor+" HP203X").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_GETPRESSURE,"pressure()"],[Et.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Et.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput().appendField(t).appendField(Et.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},gy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput().appendField(t).appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Et.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput().appendField(t).appendField("RFID"+Et.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},Sy={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput().appendField(t).appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ay={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput().appendField(t).appendField(Et.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Et.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Et.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Et.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0)}},Ly={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Oy),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_RFID_SCAN_OK,"True"],[Et.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Et.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ny=100,Dy={init:function(){this.setColour(Ny),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.MIXGO_LEFT_FRONT+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[0]"],[Et.Msg.MIXGO_RIGHT_FRONT+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[1]"],[Et.Msg.MIXGO_LEFT_BACK+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[3]"],[Et.Msg.MIXGO_RIGHT_BACK+Et.Msg.COLOUR_RGB_GREEN+Et.Msg.MIXLY_EXTERN_LED,"GLED[2]"],[Et.Msg.MIXGO_LEFT_FRONT+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[0]"],[Et.Msg.MIXGO_RIGHT_FRONT+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[1]"],[Et.Msg.MIXGO_LEFT_BACK+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[3]"],[Et.Msg.MIXGO_RIGHT_BACK+Et.Msg.COLOUR_RGB_RED+Et.Msg.MIXLY_EXTERN_LED,"RLED[2]"],[Et.Msg.ME_GO_LIGHT_HEADLIGHT,"WLED"]]),"op"),this.setOutput(!0)}},fy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_SETONOFF)}},Fy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},Py={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Et.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_ESP32_LED_GETONOFF)}},vy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Et.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Et.Msg.MIXLY_SETTING+Et.Msg.MIXLY_BUILDIN_LED+Et.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Yy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField("ME GO").appendField(new Et.FieldDropdown([[Et.Msg.blockpy_forward,"F"],[Et.Msg.blockpy_backward,"B"],[Et.Msg.blockpy_left,"L"],[Et.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField("ME GO").appendField(new Et.FieldDropdown([[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField("ME GO").appendField(Et.Msg.MOTOR_DC).appendField(new Et.FieldDropdown([[Et.Msg.MIXLYCAR_WHEEL_LEFT,"0"],[Et.Msg.MIXLYCAR_WHEEL_RIGHT,"1"],[Et.Msg.ME_GO_MOTOR_EXTERN,"2"]]),"wheel"),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_Direction).appendField(new Et.FieldDropdown([[Et.Msg.ROTATION_FORWARD,"CW"],[Et.Msg.ROTATION_BACKWARD,"CCW"],[Et.Msg.MOTOR_P,"P"],[Et.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Et.inputs.Align.RIGHT).appendField(Et.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yy={init:function(){this.setColour(Ny),this.appendDummyInput("").appendField(Et.Msg.MIXLY_ESP32_INTERRUPT).appendField(Et.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"A"],[Et.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendValueInput("DO").appendField(Et.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},by={init:function(){this.setColour(Ny),this.appendDummyInput("").appendField(Et.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"A"],[Et.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_SETUP),this.appendDummyInput("").appendField(new Et.FieldDropdown([["turns","turns"],["distance","distance"],["turns,distance","all"]]),"args"),this.appendValueInput("num").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Vy={init:function(){this.setColour(Ny),this.appendDummyInput("").appendField(Et.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"A"],[Et.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("").appendField(new Et.FieldDropdown([["turns","turns"],["distance","distance"],["speed","speed"]]),"args"),this.setOutput(!0),this.setInputsInline(!0)}},By={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"[0]"],[Et.Msg.MIXGO_LEFT_MID,"[1]"],[Et.Msg.MIXGO_RIGHT_MID,"[2]"],[Et.Msg.TEXT_TRIM_RIGHT,"[3]"],[Et.Msg.MIXLY_ALL,""]]),"key").appendField(Et.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Et.Msg.MIXLY_ESP32_NEAR}))}},Gy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.MIXGO_LEFT_FRONT,"[0]"],[Et.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Et.Msg.MIXGO_LEFT_BACK,"[3]"],[Et.Msg.MIXGO_RIGHT_BACK,"[2]"],[Et.Msg.MIXLY_ALL,""]]),"key").appendField(Et.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Et.Msg.MIXLY_ESP32_NEAR}))}},Uy={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new Et.FieldDropdown([[Et.Msg.MIXLY_ME_GO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[Et.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[Et.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"],[Et.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_ONLY,"LS"],[Et.Msg.ME_GO_SENSOR_MODE_OFF,"CL"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wy={init:function(){this.setColour(Ny),this.appendDummyInput("").appendField(Et.Msg.MIXLY_GET_GESTURE).appendField(new Et.FieldDropdown([[Et.Msg.ME_GO_PITCH,"[0]"],[Et.Msg.ME_GO_ROLL,"[1]"],[Et.Msg.ME_GO_PITCH+", "+Et.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},ky={init:function(){this.setColour(Ny),this.appendDummyInput().appendField(Et.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Et.FieldDropdown([[Et.Msg.TEXT_TRIM_LEFT,"[0]"],[Et.Msg.MIXGO_LEFT_MID,"[1]"],[Et.Msg.MIXGO_RIGHT_MID,"[2]"],[Et.Msg.TEXT_TRIM_RIGHT,"[3]"],[Et.Msg.MIXLY_ALL,""]]),"key").appendField(Et.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Et.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Et.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR}))}},Hy=230,Wy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},Ky={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},Jy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},qy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},zy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},Qy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},jy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Zy={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},$y={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},tb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},eb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},sb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},_b={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},ob={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},pb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},ab={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},ub={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},rb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},lb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},db={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},Ib={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},Tb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},Mb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},hb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},mb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},Ob={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Eb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Rb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},cb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},gb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},Cb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},Sb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},Ab={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},Lb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Nb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},Db={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},fb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},Fb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},Pb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},vb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Yb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},Xb={init:function(){this.setColour(Hy),this.appendDummyInput("").appendField(new Et.FieldDropdown(Rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},xb=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},yb=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"},bb=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Vb=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"},Bb=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"},Gb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Ub=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},wb=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"},kb=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,Et.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},Hb=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,Et.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},Wb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,Et.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},Kb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},Jb=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,Et.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},qb=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]},zb=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]},Qb=function(t,e){e.definitions_.import_mini_g2="import mini_g2";return["mini_g2.varistor()",e.ORDER_ATOMIC]},jb=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]},Zb=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]},$b=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 _},tV=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]},eV=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]},iV=function(t,e){return e.definitions_.import_me_go_car="from me_go import car",["car."+this.getFieldValue("op"),e.ORDER_ATOMIC]},nV=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"},sV=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]},_V=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]},oV=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"},pV=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"},aV=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'")\n'},uV=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"},rV=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"},lV=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"},dV=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]},IV=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]},TV=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]},MV=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"},hV=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]},mV=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]},OV=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},EV=OV,RV=OV,cV=OV,gV=OV,CV=OV,SV=OV,AV=OV,LV=OV,NV=OV,DV=OV,fV=OV,FV=OV,PV=OV,vV=OV,YV=OV,XV=OV,xV=OV,yV=OV,bV=OV,VV=OV,BV=OV,GV=OV,UV=OV,wV=OV,kV=OV,HV=OV,WV=OV,KV=OV,JV=OV,qV=OV,zV=OV,QV=OV,jV=OV,ZV=OV,$V=OV,tB=OV,eB=OV,iB=OV,nB=OV,sB=OV,_B=OV,oB=OV,pB=OV,aB=OV;Object.assign(Et.Variables,gt),Object.assign(Et.Procedures,$n),Et.Python=Eu,Et.generator=Eu,Rt.Profile.default={},Object.assign(Rt.Profile,Zx),Object.assign(Rt.Profile.default,Zx["MixGo CC"]),Object.assign(Et.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,v,Y,lt,dt,It,Tt),Object.assign(Et.Python.forBlock,T,M,h,m,O,E,R,c,g,C,S,A,L,nt,ut,at,$,st,rt,q,pt,ot,_t,z,J,K,et,tt,it,Q,j,Z,Mt,ht,mt,Ot)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32c3/main.bundle.js b/boards/default/micropython_esp32c3/main.bundle.js index ec82bd43..9ed4031c 100644 --- a/boards/default/micropython_esp32c3/main.bundle.js +++ b/boards/default/micropython_esp32c3/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>bt,controls_delay:()=>yt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>Zt,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:()=>$t,controls_thread:()=>ie,controls_try:()=>zt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,do_while:()=>ne,garbage_collection:()=>se,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>ae});var n={};t.r(n),t.d(n,{base_map:()=>De,math_arithmetic:()=>de,math_bit:()=>Te,math_constant:()=>re,math_constant_mp:()=>le,math_constrain:()=>ce,math_dec:()=>he,math_indexer_number:()=>Ce,math_map:()=>ge,math_max_min:()=>Ee,math_number:()=>ue,math_number_base_conversion:()=>Oe,math_random:()=>Re,math_random_seed:()=>Se,math_round:()=>Ae,math_selfcalcu:()=>Ie,math_to_int:()=>me,math_trig:()=>Me,text_to_number:()=>Le,text_to_number_skulpt:()=>Ne,turn_to_int:()=>fe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>xe,char_to_ascii:()=>be,number_to_text:()=>ye,os_system:()=>pi,text:()=>Pe,text_capital:()=>Ke,text_center:()=>Je,text_char:()=>Ye,text_char_at:()=>Ge,text_char_at2:()=>Be,text_char_at3:()=>si,text_compareTo:()=>ni,text_compare_to:()=>We,text_create_with_container:()=>ti,text_create_with_item:()=>ei,text_encode:()=>oi,text_equals_starts_ends:()=>He,text_eval:()=>ai,text_find:()=>Qe,text_format:()=>$e,text_format_noreturn:()=>_i,text_join:()=>Xe,text_join_seq:()=>qe,text_length:()=>Ve,text_random_char:()=>Ue,text_replace:()=>ze,text_split:()=>je,text_strip:()=>Ze,text_substring:()=>ke,text_substring2:()=>we,text_substring3:()=>ii,text_textarea:()=>ve});var _={};t.r(_),t.d(_,{list_many_input:()=>Pi,list_tolist:()=>xi,list_tolist2:()=>ki,list_trig:()=>Di,lists_2d_get_col_row_data:()=>Ii,lists_2d_get_data_with_col_row:()=>di,lists_append_extend:()=>Oi,lists_change_to:()=>Fi,lists_change_to_general:()=>Yi,lists_clear:()=>Si,lists_create_with:()=>Ti,lists_create_with2:()=>bi,lists_create_with_container:()=>hi,lists_create_with_item:()=>mi,lists_create_with_noreturn:()=>vi,lists_create_with_text:()=>Mi,lists_create_with_text2:()=>yi,lists_del_general:()=>Xi,lists_find:()=>Ni,lists_getIndex3:()=>Vi,lists_getSublist3:()=>Bi,lists_get_index:()=>ri,lists_get_random_item:()=>Ri,lists_get_random_sublist:()=>ci,lists_get_sublist:()=>li,lists_insert_value:()=>gi,lists_insert_value2:()=>Ui,lists_pop:()=>Li,lists_remove_at:()=>Ai,lists_remove_at2:()=>wi,lists_reverse:()=>Ci,lists_setIndex3:()=>Gi,lists_set_index:()=>Ei,lists_sort:()=>fi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>on,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:()=>_n,dicts_delete:()=>Zi,dicts_get:()=>qi,dicts_get_default:()=>zi,dicts_items:()=>en,dicts_keys:()=>Qi,dicts_length:()=>sn,dicts_pop:()=>an,dicts_setdefault:()=>pn,dicts_to_json:()=>ln,dicts_todict:()=>rn,dicts_update:()=>$i,dicts_values:()=>nn,json_to_dicts:()=>dn});var a={};t.r(a),t.d(a,{logic_boolean:()=>En,logic_compare:()=>Tn,logic_compare_continous:()=>Mn,logic_is:()=>gn,logic_is_in:()=>cn,logic_negate:()=>mn,logic_null:()=>On,logic_operation:()=>hn,logic_tobool:()=>Cn,logic_true_or_false:()=>Rn});var p={};t.r(p),t.d(p,{sdcard_mount:()=>Kn,sdcard_use_spi_init:()=>Wn,storage_can_write_ornot:()=>vn,storage_change_dir:()=>kn,storage_close_file:()=>Xn,storage_delete_file:()=>bn,storage_file_seek:()=>Bn,storage_file_tell:()=>Vn,storage_file_write:()=>Dn,storage_fileopen:()=>An,storage_fileopen_new:()=>Ln,storage_fileopen_new_encoding:()=>Nn,storage_get_a_line:()=>Pn,storage_get_contents:()=>Fn,storage_get_contents_without_para:()=>fn,storage_get_current_dir:()=>Gn,storage_get_file_size:()=>yn,storage_get_filename:()=>Yn,storage_is_file:()=>Hn,storage_list_all_files:()=>xn,storage_make_dir:()=>Un,storage_open_file_with_os:()=>Sn,storage_rename:()=>wn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>$n,procedures_callreturn:()=>ts,procedures_defnoreturn:()=>qn,procedures_defreturn:()=>zn,procedures_ifreturn:()=>es,procedures_mutatorarg:()=>Zn,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:()=>_s,tuple_create_with_item:()=>os,tuple_create_with_noreturn:()=>Es,tuple_create_with_text2:()=>as,tuple_create_with_text_return:()=>ps,tuple_del:()=>ls,tuple_find:()=>Ms,tuple_getIndex:()=>us,tuple_getSublist:()=>ms,tuple_get_random_item:()=>Rs,tuple_get_sublist:()=>Os,tuple_join:()=>ds,tuple_length:()=>rs,tuple_max:()=>Is,tuple_totuple:()=>cs,tuple_trig:()=>hs});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ps,set_clear:()=>Ds,set_create_with:()=>Cs,set_create_with_container:()=>Ss,set_create_with_item:()=>As,set_create_with_text_return:()=>Xs,set_length:()=>Ls,set_operate:()=>fs,set_operate_update:()=>Fs,set_pop:()=>Ns,set_sub:()=>vs,set_toset:()=>xs,set_update:()=>Ys});var d={};t.r(d),t.d(d,{html_content:()=>Gs,html_content_more:()=>Us,html_document:()=>ys,html_form:()=>ks,html_head_body:()=>Bs,html_style:()=>ws,html_style_color:()=>Ws,html_style_content:()=>Hs,html_text:()=>Ks,html_title:()=>Vs});var I={};t.r(I),t.d(I,{attribute_access:()=>o_,function_call:()=>n_,function_call_container:()=>s_,function_call_item:()=>__,raw_block:()=>qs,raw_empty:()=>js,raw_expression:()=>zs,raw_table:()=>Qs,text_comment:()=>Zs,text_print_multiple:()=>t_,text_print_multiple_container:()=>e_,text_print_multiple_item:()=>i_,type_check:()=>$s});var T={};t.r(T),t.d(T,{controls_type:()=>l_,controls_typeLists:()=>d_,lists_zip:()=>I_,unpack_iterable_object:()=>T_,variables_change:()=>u_,variables_get:()=>a_,variables_global:()=>r_,variables_set:()=>p_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>S_,base_setup:()=>h_,controls_delay:()=>C_,controls_flow_statements:()=>g_,controls_for:()=>O_,controls_forEach:()=>f_,controls_for_range:()=>R_,controls_if:()=>m_,controls_interrupts:()=>N_,controls_lambda:()=>P_,controls_main:()=>M_,controls_millis:()=>A_,controls_nointerrupts:()=>D_,controls_pass:()=>Y_,controls_range:()=>F_,controls_repeat:()=>U_,controls_repeat_ext:()=>b_,controls_thread:()=>X_,controls_try_finally:()=>E_,controls_whileUntil:()=>c_,do_while:()=>x_,garbage_collection:()=>y_,get_mem_alloc:()=>V_,get_mem_free:()=>B_,get_unique_identifier:()=>G_,reset:()=>L_,time_sleep:()=>v_});var h={};t.r(h),t.d(h,{base_map:()=>po,math_arithmetic:()=>K_,math_bit:()=>W_,math_constant:()=>k_,math_constant_mp:()=>H_,math_constrain:()=>eo,math_dec:()=>z_,math_indexer_number:()=>so,math_map:()=>to,math_max_min:()=>Z_,math_number:()=>w_,math_number_base_conversion:()=>io,math_random:()=>$_,math_random_seed:()=>no,math_round:()=>_o,math_selfcalcu:()=>J_,math_single:()=>Q_,math_to_int:()=>j_,math_trig:()=>q_,text_to_number:()=>oo,text_to_number_skulpt:()=>ao,turn_to_int:()=>uo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Mo,char_to_ascii:()=>ho,number_to_text:()=>mo,os_system:()=>Go,text:()=>ro,text_capital:()=>Lo,text_center:()=>No,text_char:()=>Io,text_char_at:()=>Ro,text_char_at2:()=>Oo,text_char_at3:()=>yo,text_compareTo:()=>bo,text_compare_to:()=>Co,text_encode:()=>Vo,text_equals_starts_ends:()=>go,text_eval:()=>Bo,text_find:()=>Do,text_format:()=>Yo,text_format_noreturn:()=>Xo,text_join:()=>To,text_join_seq:()=>fo,text_length:()=>Eo,text_random_char:()=>co,text_replace:()=>Fo,text_split:()=>Po,text_strip:()=>vo,text_substring:()=>Ao,text_substring2:()=>So,text_substring3:()=>xo,text_textarea:()=>lo});var E={};t.r(E),t.d(E,{list_many_input:()=>oa,list_tolist:()=>ma,list_tolist2:()=>Ea,list_trig:()=>na,lists_2d_get_col_row_data:()=>ko,lists_2d_get_data_with_col_row:()=>wo,lists_append_extend:()=>Qo,lists_change_to:()=>_a,lists_change_to_general:()=>pa,lists_clear:()=>$o,lists_create_with:()=>Ho,lists_create_with2:()=>ra,lists_create_with_noreturn:()=>aa,lists_create_with_text:()=>Wo,lists_create_with_text2:()=>la,lists_del_general:()=>ua,lists_find:()=>ta,lists_getIndex3:()=>da,lists_getSublist3:()=>Ia,lists_get_index:()=>Ko,lists_get_random_item:()=>qo,lists_get_random_sublist:()=>zo,lists_get_sublist:()=>Uo,lists_insert_value:()=>jo,lists_insert_value2:()=>Ma,lists_pop:()=>ia,lists_remove_at:()=>ea,lists_remove_at2:()=>ha,lists_reverse:()=>Zo,lists_setIndex3:()=>Ta,lists_set_index:()=>Jo,lists_sort:()=>sa});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Pa,dicts_add_or_change:()=>Ca,dicts_clear:()=>La,dicts_create_with:()=>Oa,dicts_create_with_noreturn:()=>Xa,dicts_deldict:()=>Fa,dicts_delete:()=>Sa,dicts_get:()=>ca,dicts_get_default:()=>ga,dicts_items:()=>Na,dicts_keys:()=>Ra,dicts_length:()=>fa,dicts_pop:()=>va,dicts_setdefault:()=>Ya,dicts_to_json:()=>ba,dicts_todict:()=>xa,dicts_update:()=>Aa,dicts_values:()=>Da,json_to_dicts:()=>ya});var R={};t.r(R),t.d(R,{logic_boolean:()=>wa,logic_compare:()=>Va,logic_compare_continous:()=>Ba,logic_is:()=>Ka,logic_is_in:()=>Wa,logic_negate:()=>Ua,logic_null:()=>ka,logic_operation:()=>Ga,logic_tobool:()=>Ja,logic_true_or_false:()=>Ha});var c={};t.r(c),t.d(c,{sdcard_mount:()=>hp,sdcard_use_spi_init:()=>Mp,storage_can_write_ornot:()=>ip,storage_change_dir:()=>rp,storage_close_file:()=>sp,storage_delete_file:()=>op,storage_file_seek:()=>up,storage_file_tell:()=>pp,storage_file_write:()=>Za,storage_fileopen:()=>qa,storage_fileopen_new:()=>za,storage_fileopen_new_encoding:()=>ja,storage_get_a_line:()=>ep,storage_get_contents:()=>tp,storage_get_contents_without_para:()=>$a,storage_get_current_dir:()=>lp,storage_get_file_size:()=>ap,storage_get_filename:()=>np,storage_is_file:()=>Tp,storage_list_all_files:()=>_p,storage_make_dir:()=>dp,storage_open_file_with_os:()=>Qa,storage_rename:()=>Ip});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Rp,procedures_callreturn:()=>Op,procedures_defnoreturn:()=>Ep,procedures_defreturn:()=>mp,procedures_ifreturn:()=>cp,procedures_return:()=>gp});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Pp,tuple_create_with:()=>Cp,tuple_create_with_noreturn:()=>xp,tuple_create_with_text2:()=>Sp,tuple_create_with_text_return:()=>Ap,tuple_del:()=>Dp,tuple_find:()=>vp,tuple_getIndex:()=>Lp,tuple_getSublist:()=>Xp,tuple_get_random_item:()=>yp,tuple_get_sublist:()=>bp,tuple_join:()=>fp,tuple_length:()=>Np,tuple_max:()=>Fp,tuple_totuple:()=>Vp,tuple_trig:()=>Yp});var S={};t.r(S),t.d(S,{set_add_discard:()=>Wp,set_clear:()=>wp,set_create_with:()=>Bp,set_create_with_text_return:()=>Qp,set_length:()=>Gp,set_operate:()=>kp,set_operate_update:()=>Hp,set_pop:()=>Up,set_sub:()=>Kp,set_toset:()=>qp,set_update:()=>Jp});var A={};t.r(A),t.d(A,{html_content:()=>$p,html_content_more:()=>tu,html_document:()=>zp,html_form:()=>iu,html_head_body:()=>Zp,html_style:()=>eu,html_style_content:()=>nu,html_text:()=>su,html_title:()=>jp});var L={};t.r(L),t.d(L,{attribute_access:()=>lu,function_call:()=>ru,raw_block:()=>_u,raw_empty:()=>au,raw_expression:()=>ou,raw_table:()=>pu,type_check:()=>uu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Cu,actuator_extern_get_led_state:()=>Su,actuator_extern_led_bright:()=>gu,actuator_extern_led_brightness:()=>Au,actuator_ms32006_dcmotor:()=>Xu,actuator_ms32006_init:()=>Yu,actuator_ms32006_stepper:()=>xu,actuator_neopixel_init:()=>bu,actuator_neopixel_rgb:()=>yu,actuator_neopixel_rgb_all:()=>Vu,actuator_neopixel_write:()=>Bu,actuator_use_uart_init:()=>Gu,esp32_music_get_tempo_extern:()=>Ou,esp32_music_pitch:()=>Mu,esp32_music_pitch_init:()=>Tu,esp32_music_pitch_with_time:()=>hu,esp32_music_play_list:()=>mu,esp32_music_reset_extern:()=>Ru,esp32_music_set_tempo_extern:()=>Eu,esp32_music_stop:()=>cu,mixbot_actuator_extern_get_addr:()=>sr,mixbot_actuator_extern_set_addr:()=>_r,mixbot_addr_extern:()=>Wu,robot_led_extern:()=>qu,robot_led_extern_get_value:()=>zu,robot_motor_extern:()=>Ku,robot_motor_extern_get_speed:()=>Ju,robot_servo_extern_absolute_run:()=>tr,robot_servo_extern_get_status:()=>ju,robot_servo_extern_relative_continue:()=>nr,robot_servo_extern_relative_origin:()=>er,robot_servo_extern_relative_run:()=>ir,robot_servo_extern_stop:()=>$u,robot_servo_extern_stop_mode:()=>Zu,robot_traffic_light_extern:()=>Qu,servo_get_angle:()=>Pu,servo_get_speed:()=>vu,servo_init:()=>Lu,servo_move:()=>Nu,servo_set_angle:()=>fu,servo_set_speed:()=>Fu,servo_speed_360:()=>Du,syn6288_builtin_voice:()=>ku,syn6288_get_voice:()=>wu,syn6288_set_voice:()=>Uu,syn6288_tts_play:()=>Hu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>yr,actuator_dc_motor_stop:()=>Vr,actuator_get_led_bright:()=>rr,actuator_get_led_state:()=>lr,actuator_led_bright:()=>ur,actuator_led_brightness:()=>dr,actuator_mixbot_buzzer_on_off:()=>kr,actuator_mixgo_nova_mic_get:()=>Qr,actuator_mixgo_nova_mic_set:()=>Jr,actuator_mixgo_nova_onboard_music_pitch:()=>tl,actuator_mixgo_nova_onboard_music_stop:()=>el,actuator_mixgo_nova_play_audio:()=>Zr,actuator_mixgo_nova_play_online_audio:()=>$r,actuator_mixgo_nova_record_audio:()=>jr,actuator_mixgo_nova_voice_get:()=>zr,actuator_mixgo_nova_voice_set:()=>qr,actuator_mixgo_zero_led_color:()=>Ir,actuator_onboard_neopixel_rgb:()=>Or,actuator_onboard_neopixel_rgb_all:()=>Rr,actuator_onboard_neopixel_rgb_show_all_chase:()=>gr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>cr,actuator_onboard_neopixel_write:()=>Cr,actuator_rm_onboard_neopixel_rgb:()=>Sr,actuator_rm_onboard_neopixel_rgb_all:()=>Ar,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Lr,actuator_stepper_keep:()=>xr,actuator_stepper_stop:()=>br,analog_ble_keyboard_init:()=>Tl,analog_ble_keyboard_input:()=>ml,analog_ble_keyboard_send_battery:()=>Ol,analog_ble_keyboard_str:()=>El,analog_ble_mouse_init:()=>Rl,analog_ble_mouse_input:()=>Cl,analog_ble_mouse_send_battery:()=>Sl,analog_keyboard_input:()=>_l,analog_keyboard_str:()=>Il,analog_mouse_input:()=>ll,bitbot_motor:()=>Kr,bitbot_move:()=>Hr,bitbot_stop:()=>Wr,ble_keyboard_connect:()=>hl,ble_keyboard_get_mac:()=>Ml,ble_mouse_connect:()=>gl,ble_mouse_get_mac:()=>cl,cc_number:()=>Er,esp32_music_get_tempo:()=>Dr,esp32_music_reset:()=>fr,esp32_music_set_tempo:()=>Nr,esp32_onboard_music_pitch:()=>Fr,esp32_onboard_music_pitch_with_time:()=>Pr,esp32_onboard_music_play_list:()=>Yr,esp32_onboard_music_stop:()=>vr,general_key:()=>al,general_key_tuple:()=>pl,generalkey_container:()=>ul,generalkey_create_with_item:()=>rl,get_power_output:()=>nl,ledswitch:()=>pr,mixbot_motor:()=>wr,mixbot_motor_status:()=>Br,mixbot_move:()=>Gr,mixbot_stop:()=>Ur,mouse_key:()=>dl,number:()=>ar,rm_actuator_get_led_bright:()=>Mr,rm_actuator_get_led_state:()=>hr,rm_actuator_led_bright:()=>Tr,rm_actuator_led_brightness:()=>mr,rm_motor:()=>Xr,set_all_power_output:()=>sl,set_power_output:()=>il,special_key:()=>ol});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>sd,ai_sensor_ailocal_class:()=>Jl,ai_sensor_ailocal_class_result:()=>Ql,ai_sensor_ailocal_train:()=>Kl,ai_sensor_asr_recognize:()=>$l,ai_sensor_audio_play:()=>zl,ai_sensor_audio_record:()=>ql,ai_sensor_barcode:()=>vl,ai_sensor_circle:()=>Vl,ai_sensor_classifier_faces:()=>nd,ai_sensor_color:()=>wl,ai_sensor_color_chases:()=>Wl,ai_sensor_color_chases_result:()=>Hl,ai_sensor_config:()=>Fl,ai_sensor_face:()=>id,ai_sensor_find_20objects:()=>_d,ai_sensor_find_barcodes:()=>Yl,ai_sensor_find_circles:()=>Bl,ai_sensor_find_colors:()=>kl,ai_sensor_find_licenseplates:()=>ed,ai_sensor_find_lines:()=>yl,ai_sensor_find_qrcodes:()=>fl,ai_sensor_find_rects:()=>Ul,ai_sensor_find_tags:()=>xl,ai_sensor_licenseplate:()=>td,ai_sensor_line:()=>bl,ai_sensor_qrcode:()=>Nl,ai_sensor_qrcode_lite:()=>Dl,ai_sensor_rect:()=>Gl,ai_sensor_rgb:()=>Pl,ai_sensor_tag:()=>Xl,ai_sensor_use_uart_init:()=>Ll,ai_sensor_yolo_recognize:()=>jl,ai_sensor_yolo_recognize_result:()=>Zl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>pd,MICROPYTHON_AI_Speech_unit:()=>ad,MICROPYTHON_AI_client:()=>od});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Cd,mpython_blynk_app_notify:()=>hd,mpython_blynk_email:()=>Od,mpython_blynk_get_timers:()=>Rd,mpython_blynk_on_connected:()=>Id,mpython_blynk_on_disconnected:()=>dd,mpython_blynk_run:()=>Md,mpython_blynk_sensor_data_to_app:()=>gd,mpython_blynk_set_property:()=>Ed,mpython_blynk_setup:()=>Sd,mpython_blynk_stop_timers:()=>md,mpython_blynk_sync_virtual:()=>ld,mpython_blynk_terminal_widget_vpin:()=>rd,mpython_blynktimer:()=>cd,mpython_blynktimer_run:()=>Td});var v={};t.r(v),t.d(v,{cc_g1_init:()=>Ad,cc_g1_read_bat:()=>Ld,cc_g1_read_joystick:()=>Nd,cc_g1_read_key:()=>Dd,cc_g1_turnoff:()=>fd});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>Vd,ce_go_get_led_bright:()=>Yd,ce_go_get_led_state:()=>Xd,ce_go_hall_attachInterrupt:()=>Bd,ce_go_hall_data:()=>Ud,ce_go_hall_initialize:()=>Gd,ce_go_led_bright:()=>vd,ce_go_led_brightness:()=>xd,ce_go_light_number:()=>Pd,ce_go_pin_light:()=>Kd,ce_go_pin_near:()=>kd,ce_go_pin_near_line:()=>wd,ce_go_pin_near_state_change:()=>Hd,ce_go_stepper_keep:()=>bd,ce_go_stepper_stop:()=>yd,sensor_mixgome_eulerangles:()=>Wd});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>DI,communicate_bluetooth_connect:()=>vI,communicate_bluetooth_disconnect:()=>YI,communicate_bluetooth_handle:()=>VI,communicate_bluetooth_is_connected:()=>xI,communicate_bluetooth_mac:()=>PI,communicate_bluetooth_peripheral_init:()=>fI,communicate_bluetooth_recv:()=>bI,communicate_bluetooth_recv_only:()=>yI,communicate_bluetooth_scan:()=>FI,communicate_bluetooth_send:()=>XI,communicate_espnow_init:()=>BI,communicate_espnow_init_new:()=>GI,communicate_i2c_available:()=>rI,communicate_i2c_init:()=>zd,communicate_i2c_master_read:()=>uI,communicate_i2c_onboard:()=>Qd,communicate_i2c_read:()=>jd,communicate_i2c_scan:()=>$d,communicate_i2c_write:()=>Zd,communicate_ir_recv_init:()=>EI,communicate_ir_send_init:()=>CI,communicate_ow_init:()=>dI,communicate_ow_read:()=>TI,communicate_ow_reset:()=>mI,communicate_ow_scan:()=>II,communicate_ow_select:()=>hI,communicate_ow_write:()=>MI,communicate_spi_buffer:()=>iI,communicate_spi_init:()=>tI,communicate_spi_onboard:()=>qd,communicate_spi_read:()=>nI,communicate_spi_read_output:()=>sI,communicate_spi_readinto:()=>_I,communicate_spi_readinto_output:()=>oI,communicate_spi_set:()=>eI,communicate_spi_write:()=>aI,communicate_spi_write_readinto:()=>pI,espnow_radio_channel:()=>KI,espnow_radio_channel_new:()=>QI,espnow_radio_on_off:()=>qI,espnow_radio_rec:()=>jI,espnow_radio_recv:()=>$I,espnow_radio_recv_certain_msg:()=>tT,espnow_radio_recv_certain_msg_new:()=>iT,espnow_radio_recv_msg:()=>ZI,espnow_radio_recv_new:()=>eT,espnow_radio_send:()=>zI,espnow_radio_txpower:()=>JI,i2c_available:()=>ST,i2c_init:()=>rT,i2c_master_reader2:()=>CT,i2c_read:()=>lT,i2c_scan:()=>IT,i2c_slave_onreceive:()=>lI,i2c_write:()=>dT,internal_variable:()=>OI,ir_recv_timeout:()=>gI,ir_transmit_busy:()=>NI,ir_transmit_conventional_data:()=>SI,ir_transmit_raw_code:()=>LI,ir_transmit_study_code:()=>AI,ir_whether_recv:()=>cI,lora_init:()=>nT,lora_packet:()=>sT,lora_recv:()=>oT,lora_send:()=>_T,network_espnow_info:()=>wI,network_espnow_mac:()=>UI,network_espnow_recv:()=>kI,network_espnow_recv_handle:()=>WI,network_espnow_send:()=>HI,recv_fun:()=>RI,spi_buffer:()=>hT,spi_init:()=>TT,spi_read:()=>mT,spi_read_output:()=>ET,spi_readinto:()=>OT,spi_readinto_output:()=>RT,spi_set:()=>MT,spi_write:()=>cT,spi_write_readinto:()=>gT,urequests_attribute:()=>pT,urequests_get:()=>aT,urequests_method:()=>uT});var x={};t.r(x),t.d(x,{display_animate:()=>tM,display_blink_rate:()=>zT,display_circle:()=>eM,display_color_seclet:()=>IM,display_draw_4strings:()=>HT,display_fill:()=>$T,display_get_screen_image:()=>qT,display_help:()=>nM,display_image_size:()=>WT,display_lcd_use_i2c_init:()=>OM,display_line:()=>JT,display_line_arbitrarily:()=>QT,display_matrix_extern_bright_point:()=>bT,display_matrix_extern_bright_screen:()=>VT,display_matrix_extern_clear:()=>BT,display_matrix_extern_get_pixel:()=>xT,display_matrix_extern_get_screen_pixel:()=>yT,display_matrix_extern_image_builtins:()=>GT,display_matrix_extern_scroll_string:()=>FT,display_matrix_extern_scroll_string_delay:()=>PT,display_matrix_extern_shift:()=>XT,display_matrix_extern_show_frame_string:()=>vT,display_matrix_extern_show_frame_string_delay:()=>YT,display_matrix_extern_show_image:()=>DT,display_matrix_extern_show_image_or_string_delay:()=>fT,display_matrix_use_i2c_init:()=>NT,display_oled_drawPixel:()=>_M,display_oled_showBitmap:()=>sM,display_oled_use_i2c_init:()=>SM,display_onoff:()=>ZT,display_rect:()=>KT,display_rgb_color:()=>jT,display_tm1650_power:()=>aM,display_tm1650_set_brightness:()=>rM,display_tm1650_show_dot:()=>uM,display_tm1650_show_num:()=>pM,display_tm_use_i2c_init:()=>oM,display_triangle:()=>iM,display_use_i2c_init:()=>kT,extern_oled_bright_point:()=>xM,extern_oled_clear:()=>bM,extern_oled_get_pixel:()=>XM,extern_oled_hvline:()=>VM,extern_oled_line:()=>BM,extern_oled_scroll_string:()=>fM,extern_oled_scroll_string_delay:()=>FM,extern_oled_shape_rect:()=>yM,extern_oled_shift:()=>YM,extern_oled_show_frame_string:()=>PM,extern_oled_show_frame_string_delay:()=>vM,extern_oled_show_image:()=>AM,extern_oled_show_image_or_string_delay:()=>DM,extern_oled_show_image_xy:()=>LM,extern_oled_show_string:()=>NM,lcd_backlight:()=>gM,lcd_clear:()=>CM,lcd_print_string:()=>cM,lcd_show_image_or_string_delay:()=>RM,matrix_extern_image_arithmetic:()=>UT,matrix_extern_image_invert:()=>wT,tft_fill:()=>mM,tft_line_arbitrarily:()=>EM,tft_scroll_string_delay:()=>MM,tft_show_frame_string_delay:()=>hM,tft_show_image_or_string_delay:()=>TM,tft_show_image_xy:()=>dM,tft_use_spi_init:()=>lM});var b={};t.r(b),t.d(b,{bitbot_display_image_create:()=>Sh,display_bright_point:()=>th,display_bright_screen:()=>ih,display_clear:()=>nh,display_get_pixel:()=>$M,display_get_screen_pixel:()=>eh,display_image_builtins:()=>QM,display_image_builtins_all:()=>qM,display_image_create:()=>JM,display_scroll_string:()=>kM,display_scroll_string_delay:()=>HM,display_shift:()=>ZM,display_show_frame_string:()=>WM,display_show_frame_string_delay:()=>KM,display_show_image:()=>UM,display_show_image_or_string_delay:()=>wM,draw_pointer:()=>Qh,image_arithmetic:()=>zM,image_invert:()=>jM,mixbot_display_bright_screen:()=>gh,mixbot_display_get_ambientbright:()=>ch,mixbot_display_get_screen_pixel:()=>Rh,mixbot_display_image_create:()=>Oh,mixbot_display_rotate:()=>Ch,mixgo_display_image_create_new:()=>oh,mixgome_display_font:()=>ah,mixgome_display_image_create:()=>sh,mixgomini_display_image_create:()=>_h,mpython_display_hvline:()=>hh,mpython_display_line:()=>mh,mpython_display_shape_rect:()=>Mh,mpython_pbm_image:()=>Eh,onboard_oled_bright_point:()=>Th,onboard_oled_scroll_string_delay:()=>dh,onboard_oled_show_frame_string_delay:()=>Ih,onboard_oled_show_image:()=>ph,onboard_oled_show_image_or_string_delay:()=>lh,onboard_oled_show_image_xy:()=>uh,onboard_oled_show_string:()=>rh,onboard_tft_bright_point:()=>yh,onboard_tft_bright_screen:()=>Gh,onboard_tft_clear:()=>Vh,onboard_tft_clock_clear:()=>Kh,onboard_tft_clock_draw:()=>Wh,onboard_tft_clock_get_rtctime:()=>kh,onboard_tft_clock_init:()=>wh,onboard_tft_clock_set_time:()=>Hh,onboard_tft_display_hvline:()=>Yh,onboard_tft_display_line:()=>Xh,onboard_tft_display_shape_circle:()=>Jh,onboard_tft_display_shape_rect:()=>vh,onboard_tft_fill:()=>Uh,onboard_tft_get_pixel:()=>bh,onboard_tft_get_screen_pixel:()=>Bh,onboard_tft_scroll_string:()=>Dh,onboard_tft_scroll_string_delay:()=>fh,onboard_tft_shift:()=>xh,onboard_tft_show_frame_string:()=>Fh,onboard_tft_show_frame_string_delay:()=>Ph,onboard_tft_show_image:()=>Ah,onboard_tft_show_image_or_string_delay:()=>Nh,onboard_tft_show_image_xy:()=>Lh});var y={};t.r(y),t.d(y,{factory_block:()=>_m,factory_block_return:()=>om,factory_block_return_with_textarea:()=>pm,factory_block_with_textarea:()=>am,factory_callMethod_noreturn:()=>nm,factory_callMethod_return:()=>sm,factory_create_with_container:()=>$h,factory_create_with_item:()=>tm,factory_declare:()=>im,factory_from_import:()=>zh,factory_function_noreturn:()=>Zh,factory_function_return:()=>em,factory_import:()=>jh,folding_block:()=>um});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>Pm,inout_analog_atten:()=>Om,inout_analog_read:()=>Em,inout_analog_read_init:()=>Am,inout_analog_write:()=>Mm,inout_analog_write_init:()=>Sm,inout_analog_write_set:()=>hm,inout_analog_write_set_freq:()=>Dm,inout_digital_init:()=>gm,inout_digital_read:()=>Im,inout_digital_write:()=>dm,inout_highlow:()=>lm,inout_pinMode:()=>Nm,inout_pin_attachInterrupt:()=>cm,inout_pin_pressed:()=>Rm,inout_pin_pressed_init:()=>Lm,inout_pwm_analog_write:()=>Tm,inout_pwm_analog_write_init:()=>Cm,inout_pwm_analog_write_set_freq:()=>mm,pin_pressed:()=>Fm,pin_pressed_init:()=>fm});var B={};t.r(B),t.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>eE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>tE,IOT_EMQX_PING:()=>Zm,IOT_FORMATTING:()=>zm,IOT_FORMAT_STRING:()=>jm,IOT_MIXIO_NTP:()=>$m,IOT_MIXIO_PUBLISH:()=>km,IOT_MIXIO_SUBSCRIBE:()=>Hm,iot_checkonenet:()=>lE,iot_client_onboard:()=>nE,iot_create_with_item:()=>Um,iot_http_client:()=>sE,iot_http_data:()=>_E,iot_mixio_check:()=>Jm,iot_mixio_connect:()=>wm,iot_mixio_connect_only:()=>Km,iot_mixio_disconnect:()=>Wm,iot_mixio_format_msg:()=>qm,iot_mixio_format_topic:()=>Qm,iot_mixly_key:()=>iE,iot_mqtt_client:()=>oE,iot_mqtt_data:()=>aE,iot_onenet_check:()=>bm,iot_onenet_connect:()=>Xm,iot_onenet_disconnect:()=>xm,iot_onenet_publish:()=>Vm,iot_onenet_publish_dict:()=>ym,iot_onenetconnect:()=>uE,iot_onenetdisconnect:()=>rE,iot_publish:()=>dE,iot_publish_container:()=>Bm,iot_publish_item:()=>Gm,iot_wifi_connect:()=>Ym,iot_wificonnect:()=>pE});var G={};t.r(G),t.d(G,{network_ap_connect:()=>CE,network_connect:()=>EE,network_get_connect:()=>RE,network_get_wifi:()=>gE,network_init:()=>TE,network_is_active:()=>hE,network_open:()=>ME,network_scan:()=>mE,network_server:()=>SE,network_socket_accept:()=>fE,network_socket_bind:()=>LE,network_socket_close:()=>XE,network_socket_connect:()=>NE,network_socket_init:()=>AE,network_socket_listen:()=>DE,network_socket_receive:()=>FE,network_socket_receive_from:()=>vE,network_socket_send:()=>PE,network_socket_send_to:()=>YE,network_stop:()=>cE,network_wifi_connect:()=>OE,ntptime_address:()=>BE,ntptime_time:()=>VE,requests_attribute:()=>bE,requests_attribute2:()=>kE,requests_get:()=>xE,requests_get2:()=>UE,requests_method:()=>yE,requests_post:()=>wE});var U={};t.r(U),t.d(U,{HCSR04:()=>HO,PS2_Button:()=>QO,PS2_Buttons:()=>zO,PS2_Buttons_new:()=>tR,PS2_State:()=>qO,PS2_init:()=>WO,PS2_init_new:()=>ZO,PS2_stk:()=>jO,PS2_stk_new:()=>eR,PS2_vibration:()=>JO,PS2_vibration_new:()=>$O,esp32_s2_weather_init:()=>GO,esp32_s2_weather_rain:()=>wO,esp32_s2_weather_wd:()=>UO,esp32_s2_weather_ws:()=>kO,extern_rfid_read:()=>LO,extern_rfid_readcontent:()=>DO,extern_rfid_readid:()=>NO,extern_rfid_status:()=>PO,extern_rfid_write:()=>fO,extern_rfid_write_return:()=>FO,gnss_get_data:()=>_R,gnss_have_data:()=>sR,mixbot_sensor_extern_get_addr:()=>dR,mixbot_sensor_extern_set_addr:()=>IR,pm25_get_data:()=>nR,robot_button_extern_get_value:()=>oR,robot_color_extern_get_value:()=>lR,robot_infrared_extern_get_value:()=>pR,robot_infrared_extern_grey_get_value:()=>uR,robot_potentiometer_extern_get_value:()=>rR,robot_sonar_extern_get_value:()=>TR,robot_sonar_extern_led:()=>MR,robot_touch_extern_get_value:()=>aR,sensor_APDS9960_extern:()=>pO,sensor_DS18X20:()=>sO,sensor_LTR308_extern:()=>uO,sensor_LTR390UV_extern:()=>lO,sensor_MAX30102_extern:()=>aO,sensor_QMC5883L_extern:()=>hO,sensor_VL530LX_extern:()=>dO,sensor_adxl345_get_acceleration:()=>zE,sensor_aht11_extern:()=>TO,sensor_bmp:()=>iO,sensor_compass_reset:()=>SO,sensor_dht11:()=>ZE,sensor_hp203_extern:()=>MO,sensor_light_level:()=>jE,sensor_lm35:()=>_O,sensor_ltr381_extern:()=>rO,sensor_mixgo_extern_button_attachInterrupt:()=>QE,sensor_mixgo_extern_button_get_presses:()=>JE,sensor_mixgo_extern_button_is_pressed:()=>WE,sensor_mixgo_extern_button_was_pressed:()=>KE,sensor_mixgo_extern_light:()=>$E,sensor_mixgo_extern_pin_near:()=>eO,sensor_mixgo_extern_sound:()=>tO,sensor_mixgoce_hot_wheel_degrees:()=>BO,sensor_mixgoce_hot_wheel_is_touched:()=>VO,sensor_mpu9250_attachGestureInterrupt:()=>qE,sensor_mpu9250_calibrate_compass:()=>cO,sensor_mpu9250_field_strength:()=>CO,sensor_mpu9250_gesture:()=>mO,sensor_mpu9250_get_acceleration:()=>EO,sensor_mpu9250_get_gyro:()=>RO,sensor_mpu9250_get_magnetic:()=>OO,sensor_mpu9250_temperature:()=>gO,sensor_sht:()=>nO,sensor_shtc3_extern:()=>IO,sensor_use_i2c_init:()=>oO,sensor_use_spi_init:()=>AO,sensor_use_uart_init:()=>iR,sensor_weather_solo_init:()=>hR,sensor_weather_solo_rain:()=>OR,sensor_weather_solo_wd:()=>mR,sensor_weather_solo_ws:()=>ER,weather_data:()=>vO,weather_have_data:()=>YO,weather_set_label:()=>xO,weather_set_label_container:()=>bO,weather_set_label_item:()=>yO,weather_uart_mixio:()=>XO});var w={};t.r(w),t.d(w,{HCSR04:()=>bR,RTC_set_date:()=>xR,RTC_set_time:()=>XR,bitbot_als_num:()=>wc,dht11:()=>qc,number1:()=>VR,number2:()=>BR,number3:()=>GR,number4:()=>UR,number5:()=>wR,number6:()=>kR,number7:()=>HR,onboard_RTC_get_time:()=>jR,onboard_RTC_get_time_str:()=>nc,onboard_RTC_get_timestamp:()=>ZR,onboard_RTC_set_datetime:()=>ec,onboard_RTC_settime_string:()=>tc,onboard_RTC_timestamp_totuple:()=>$R,rfid_readcontent:()=>rc,rfid_readid:()=>uc,rfid_write:()=>lc,rfid_write_return:()=>dc,sensor_LTR308:()=>sc,sensor_aht11:()=>oc,sensor_bitbot_ALS:()=>Uc,sensor_button_get_presses:()=>Wc,sensor_button_is_pressed:()=>kc,sensor_button_was_pressed:()=>Hc,sensor_distance_hrsc04:()=>YR,sensor_eulerangles:()=>Tc,sensor_field_strength:()=>zc,sensor_get_acceleration:()=>Ic,sensor_get_temperature:()=>ac,sensor_hp203:()=>pc,sensor_light:()=>Qc,sensor_mixbot_get_gyro:()=>Gc,sensor_mixbot_patrol_calibrate:()=>yc,sensor_mixbot_patrol_value:()=>Vc,sensor_mixbot_temperature:()=>Bc,sensor_mixgo_LTR308:()=>zR,sensor_mixgo_button_attachInterrupt:()=>SR,sensor_mixgo_button_get_presses:()=>CR,sensor_mixgo_button_is_pressed:()=>cR,sensor_mixgo_button_was_pressed:()=>gR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Ac,sensor_mixgo_cc_mmc5603_get_angle:()=>Sc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Cc,sensor_mixgo_light:()=>yR,sensor_mixgo_nova_LTR308:()=>qR,sensor_mixgo_nova_pin_near:()=>QR,sensor_mixgo_pin_near:()=>JR,sensor_mixgo_pin_near_double:()=>KR,sensor_mixgo_pin_near_single:()=>WR,sensor_mixgo_pin_pressed:()=>fR,sensor_mixgo_touch_slide:()=>vR,sensor_mixgocar42_button_attachInterrupt:()=>DR,sensor_mixgocar42_button_get_presses:()=>NR,sensor_mixgocar42_button_is_pressed:()=>AR,sensor_mixgocar42_button_was_pressed:()=>LR,sensor_mixgocar_battery_left:()=>bc,sensor_mixgocar_pin_near:()=>Xc,sensor_mixgocar_pin_near_line:()=>Yc,sensor_mixgocar_pin_near_state_change:()=>xc,sensor_mixgoce_pin_pressed:()=>FR,sensor_mixgoce_temperature:()=>Nc,sensor_mixgome_temperature:()=>Lc,sensor_mpython_pin_pressed:()=>PR,sensor_mpython_qmi8658_get_gyro:()=>Dc,sensor_mpython_qmi8658_temperature:()=>fc,sensor_onboard_compass_reset:()=>gc,sensor_onboard_mpu9250_calibrate_compass:()=>Oc,sensor_onboard_mpu9250_field_strength:()=>cc,sensor_onboard_mpu9250_gesture:()=>Mc,sensor_onboard_mpu9250_get_acceleration:()=>hc,sensor_onboard_mpu9250_get_gyro:()=>Ec,sensor_onboard_mpu9250_get_magnetic:()=>mc,sensor_onboard_mpu9250_temperature:()=>Rc,sensor_pin_near:()=>Jc,sensor_pin_pressed:()=>Kc,sensor_rm_acc:()=>vc,sensor_rm_battery_left:()=>Pc,sensor_rm_pin_near_double:()=>Fc,sensor_rtc_init:()=>ic,sensor_sound:()=>_c,sensor_temperature:()=>jc});var k={};t.r(k),t.d(k,{serial_any:()=>_g,serial_begin:()=>rg,serial_print:()=>tg,serial_print_byte:()=>$c,serial_print_hex:()=>ig,serial_println:()=>eg,serial_read_from_ai:()=>Og,serial_readline:()=>og,serial_readstr:()=>sg,serial_readstr_until:()=>ag,serial_receive_data_event:()=>ng,serial_send_to_ai:()=>Eg,serial_softserial:()=>ug,serial_softserial_new:()=>pg,system_input:()=>lg,system_print:()=>dg,system_print_container:()=>hg,system_print_end:()=>Tg,system_print_inline:()=>Ig,system_print_item:()=>mg,system_print_many:()=>Mg});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>Cg,Timer_init:()=>bg,base_delay:()=>Bg,controls_delay:()=>gg,controls_delay_new:()=>cg,controls_millis:()=>Ag,controls_uname:()=>Ng,raw_block:()=>Lg,reset:()=>Sg,system_bitbot_shutdown:()=>xg,system_machine_reset:()=>Xg,system_ticks_diff:()=>Fg,system_timer:()=>fg,system_timer_init:()=>Pg,system_wdt_feed:()=>Yg,system_wdt_init:()=>vg,time_ticks_diff:()=>Vg,timer:()=>Dg,timer2:()=>yg});var W={};t.r(W),t.d(W,{Air_daily_content:()=>$g,Air_now_content:()=>Kg,Geo_moon_content:()=>eC,Geo_sun_content:()=>tC,Life_suggestion_content:()=>Qg,Location_search_content:()=>zg,Tide_daily_content:()=>qg,WEATHER_DAILY:()=>wg,WEATHER_HOUR:()=>kg,WEATHER_NOW:()=>Ug,Weather_alarm_content:()=>Jg,Weather_daily:()=>jg,Weather_daily_content:()=>Zg,Weather_now:()=>Hg,Weather_now_content:()=>Wg});var K={};t.r(K),t.d(K,{actuator_extern_get_led_bright:()=>cC,actuator_extern_get_led_state:()=>gC,actuator_extern_led_bright:()=>RC,actuator_extern_led_brightness:()=>CC,actuator_ms32006_dcmotor:()=>uC,actuator_ms32006_init:()=>pC,actuator_ms32006_stepper:()=>rC,actuator_neopixel_init:()=>SC,actuator_neopixel_rgb:()=>NC,actuator_neopixel_rgb_all:()=>AC,actuator_neopixel_write:()=>LC,actuator_use_uart_init:()=>DC,esp32_music_get_tempo_extern:()=>hC,esp32_music_pitch:()=>dC,esp32_music_pitch_init:()=>lC,esp32_music_pitch_with_time:()=>IC,esp32_music_play_list:()=>mC,esp32_music_reset_extern:()=>EC,esp32_music_set_tempo_extern:()=>MC,esp32_music_stop:()=>TC,mixbot_actuator_extern_get_addr:()=>KC,mixbot_actuator_extern_set_addr:()=>JC,mixbot_addr_extern:()=>YC,robot_led_extern:()=>yC,robot_led_extern_get_value:()=>VC,robot_motor_extern:()=>XC,robot_motor_extern_get_speed:()=>xC,robot_servo_extern_absolute_run:()=>wC,robot_servo_extern_get_status:()=>BC,robot_servo_extern_relative_continue:()=>WC,robot_servo_extern_relative_origin:()=>kC,robot_servo_extern_relative_run:()=>HC,robot_servo_extern_stop:()=>UC,robot_servo_extern_stop_mode:()=>GC,robot_traffic_light_extern:()=>bC,servo_get_angle:()=>oC,servo_get_speed:()=>aC,servo_init:()=>iC,servo_move:()=>OC,servo_set_angle:()=>sC,servo_set_speed:()=>_C,servo_speed_360:()=>nC,syn6288_builtin_voice:()=>PC,syn6288_get_voice:()=>FC,syn6288_set_voice:()=>fC,syn6288_tts_play:()=>vC});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>cS,actuator_dc_motor_stop:()=>gS,actuator_get_led_bright:()=>sS,actuator_get_led_state:()=>_S,actuator_led_bright:()=>nS,actuator_led_brightness:()=>oS,actuator_mixbot_buzzer_on_off:()=>NS,actuator_mixgo_nova_mic_get:()=>vS,actuator_mixgo_nova_mic_set:()=>PS,actuator_mixgo_nova_onboard_music_pitch:()=>VS,actuator_mixgo_nova_onboard_music_stop:()=>BS,actuator_mixgo_nova_play_audio:()=>bS,actuator_mixgo_nova_play_online_audio:()=>yS,actuator_mixgo_nova_record_audio:()=>xS,actuator_mixgo_nova_voice_get:()=>XS,actuator_mixgo_nova_voice_set:()=>YS,actuator_mixgo_zero_led_color:()=>aS,actuator_onboard_neopixel_rgb:()=>TS,actuator_onboard_neopixel_rgb_all:()=>MS,actuator_onboard_neopixel_rgb_show_all_chase:()=>hS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>mS,actuator_onboard_neopixel_write:()=>IS,actuator_stepper_keep:()=>OS,actuator_stepper_stop:()=>RS,analog_ble_keyboard_init:()=>zS,analog_ble_keyboard_input:()=>$S,analog_ble_keyboard_send_battery:()=>eA,analog_ble_keyboard_str:()=>tA,analog_ble_mouse_init:()=>iA,analog_ble_mouse_input:()=>_A,analog_ble_mouse_send_battery:()=>oA,analog_keyboard_input:()=>kS,analog_keyboard_str:()=>QS,analog_mouse_input:()=>KS,bitbot_motor:()=>FS,bitbot_move:()=>DS,bitbot_stop:()=>fS,ble_keyboard_connect:()=>ZS,ble_keyboard_get_mac:()=>jS,ble_mouse_connect:()=>sA,ble_mouse_get_mac:()=>nA,cc_number:()=>pS,esp32_music_get_tempo:()=>qC,esp32_music_reset:()=>tS,esp32_music_set_tempo:()=>QC,esp32_onboard_music_pitch:()=>zC,esp32_onboard_music_pitch_with_time:()=>jC,esp32_onboard_music_play_list:()=>$C,esp32_onboard_music_stop:()=>ZC,general_key:()=>WS,general_key_tuple:()=>qS,get_power_output:()=>US,ledswitch:()=>iS,mixbot_motor:()=>LS,mixbot_motor_status:()=>CS,mixbot_move:()=>SS,mixbot_stop:()=>AS,mouse_key:()=>JS,number:()=>eS,rm_actuator_get_led_bright:()=>rS,rm_actuator_get_led_state:()=>lS,rm_actuator_led_bright:()=>uS,rm_actuator_led_brightness:()=>dS,rm_motor:()=>ES,set_all_power_output:()=>wS,set_power_output:()=>GS,special_key:()=>HS});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>BA,ai_sensor_ailocal_class:()=>DA,ai_sensor_ailocal_class_result:()=>fA,ai_sensor_ailocal_train:()=>NA,ai_sensor_asr_recognize:()=>XA,ai_sensor_audio_play:()=>PA,ai_sensor_audio_record:()=>FA,ai_sensor_barcode:()=>IA,ai_sensor_circle:()=>OA,ai_sensor_classifier_faces:()=>VA,ai_sensor_color:()=>CA,ai_sensor_color_chases:()=>LA,ai_sensor_color_chases_result:()=>AA,ai_sensor_config:()=>uA,ai_sensor_face:()=>yA,ai_sensor_find_20objects:()=>GA,ai_sensor_find_barcodes:()=>TA,ai_sensor_find_circles:()=>RA,ai_sensor_find_colors:()=>SA,ai_sensor_find_licenseplates:()=>bA,ai_sensor_find_lines:()=>EA,ai_sensor_find_qrcodes:()=>dA,ai_sensor_find_rects:()=>gA,ai_sensor_find_tags:()=>hA,ai_sensor_licenseplate:()=>xA,ai_sensor_line:()=>mA,ai_sensor_qrcode:()=>lA,ai_sensor_qrcode_lite:()=>pA,ai_sensor_rect:()=>cA,ai_sensor_rgb:()=>rA,ai_sensor_tag:()=>MA,ai_sensor_use_uart_init:()=>aA,ai_sensor_yolo_recognize:()=>vA,ai_sensor_yolo_recognize_result:()=>YA});var q={};t.r(q),t.d(q,{MICROPYTHON_AI_Speech_asr:()=>kA,MICROPYTHON_AI_Speech_unit:()=>wA,MICROPYTHON_AI_client:()=>UA});var z={};t.r(z),t.d(z,{mpython_blynk_app_data:()=>eL,mpython_blynk_app_notify:()=>zA,mpython_blynk_email:()=>iL,mpython_blynk_get_timers:()=>ZA,mpython_blynk_on_connected:()=>JA,mpython_blynk_on_disconnected:()=>KA,mpython_blynk_run:()=>qA,mpython_blynk_sensor_data_to_app:()=>tL,mpython_blynk_set_property:()=>nL,mpython_blynk_setup:()=>sL,mpython_blynk_stop_timers:()=>jA,mpython_blynk_sync_virtual:()=>WA,mpython_blynk_terminal_widget_vpin:()=>HA,mpython_blynktimer:()=>$A,mpython_blynktimer_run:()=>QA});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>_L,cc_g1_read_joystick:()=>oL,cc_g1_read_key:()=>aL,cc_g1_turnoff:()=>pL});var Z={};t.r(Z),t.d(Z,{ce_go_dc_motor:()=>hL,ce_go_get_led_bright:()=>lL,ce_go_get_led_state:()=>dL,ce_go_hall_attachInterrupt:()=>mL,ce_go_hall_data:()=>OL,ce_go_hall_initialize:()=>EL,ce_go_led_bright:()=>rL,ce_go_led_brightness:()=>IL,ce_go_light_number:()=>uL,ce_go_pin_light:()=>SL,ce_go_pin_near:()=>cL,ce_go_pin_near_line:()=>RL,ce_go_pin_near_state_change:()=>gL,ce_go_stepper_keep:()=>TL,ce_go_stepper_stop:()=>ML,sensor_mixgome_eulerangles:()=>CL});var $={};t.r($),t.d($,{communicate_bluetooth_central_init:()=>_N,communicate_bluetooth_connect:()=>pN,communicate_bluetooth_disconnect:()=>uN,communicate_bluetooth_handle:()=>MN,communicate_bluetooth_is_connected:()=>lN,communicate_bluetooth_mac:()=>rN,communicate_bluetooth_peripheral_init:()=>oN,communicate_bluetooth_recv:()=>TN,communicate_bluetooth_recv_only:()=>IN,communicate_bluetooth_scan:()=>aN,communicate_bluetooth_send:()=>dN,communicate_espnow_init:()=>hN,communicate_espnow_init_new:()=>mN,communicate_i2c_available:()=>vL,communicate_i2c_init:()=>NL,communicate_i2c_master_read:()=>PL,communicate_i2c_onboard:()=>AL,communicate_i2c_read:()=>DL,communicate_i2c_scan:()=>FL,communicate_i2c_write:()=>fL,communicate_ir_recv_init:()=>qL,communicate_ir_send_init:()=>tN,communicate_ow_init:()=>kL,communicate_ow_read:()=>KL,communicate_ow_reset:()=>WL,communicate_ow_scan:()=>HL,communicate_ow_select:()=>QL,communicate_ow_write:()=>JL,communicate_spi_buffer:()=>bL,communicate_spi_init:()=>XL,communicate_spi_onboard:()=>LL,communicate_spi_read:()=>yL,communicate_spi_read_output:()=>VL,communicate_spi_readinto:()=>BL,communicate_spi_readinto_output:()=>GL,communicate_spi_set:()=>xL,communicate_spi_write:()=>UL,communicate_spi_write_readinto:()=>wL,espnow_radio_channel:()=>CN,espnow_radio_channel_new:()=>AN,espnow_radio_on_off:()=>LN,espnow_radio_rec:()=>DN,espnow_radio_recv:()=>FN,espnow_radio_recv_certain_msg:()=>PN,espnow_radio_recv_certain_msg_new:()=>YN,espnow_radio_recv_msg:()=>fN,espnow_radio_recv_new:()=>vN,espnow_radio_send:()=>NN,espnow_radio_txpower:()=>SN,i2c_slave_onreceive:()=>YL,internal_variable:()=>zL,ir_recv_timeout:()=>$L,ir_transmit_busy:()=>sN,ir_transmit_conventional_data:()=>eN,ir_transmit_raw_code:()=>nN,ir_transmit_study_code:()=>iN,ir_whether_recv:()=>ZL,lora_init:()=>XN,lora_packet:()=>xN,lora_recv:()=>yN,lora_send:()=>bN,network_espnow_info:()=>ON,network_espnow_mac:()=>EN,network_espnow_recv:()=>RN,network_espnow_recv_handle:()=>gN,network_espnow_send:()=>cN,recv_fun:()=>jL,urequests_attribute:()=>BN,urequests_get:()=>VN,urequests_method:()=>GN});var tt={};t.r(tt),t.d(tt,{display_animate:()=>lD,display_circle:()=>dD,display_color_seclet:()=>CD,display_draw_4strings:()=>sD,display_fill:()=>rD,display_lcd_use_i2c_init:()=>fD,display_line:()=>aD,display_line_arbitrarily:()=>_D,display_matrix_extern_bright_point:()=>jN,display_matrix_extern_bright_screen:()=>$N,display_matrix_extern_clear:()=>QN,display_matrix_extern_get_pixel:()=>zN,display_matrix_extern_get_screen_pixel:()=>ZN,display_matrix_extern_image_builtins:()=>tD,display_matrix_extern_scroll_string:()=>KN,display_matrix_extern_scroll_string_delay:()=>JN,display_matrix_extern_shift:()=>qN,display_matrix_extern_show_frame_string:()=>HN,display_matrix_extern_show_frame_string_delay:()=>WN,display_matrix_extern_show_image:()=>wN,display_matrix_extern_show_image_or_string_delay:()=>kN,display_matrix_use_i2c_init:()=>UN,display_oled_drawPixel:()=>MD,display_oled_showBitmap:()=>TD,display_oled_use_i2c_init:()=>XD,display_onoff:()=>pD,display_rect:()=>oD,display_tm1650_power:()=>mD,display_tm1650_set_brightness:()=>RD,display_tm1650_show_dot:()=>OD,display_tm1650_show_num:()=>ED,display_tm_use_i2c_init:()=>hD,display_triangle:()=>ID,display_use_i2c_init:()=>nD,extern_oled_bright_point:()=>KD,extern_oled_clear:()=>kD,extern_oled_get_pixel:()=>WD,extern_oled_hvline:()=>QD,extern_oled_line:()=>qD,extern_oled_scroll_string:()=>UD,extern_oled_scroll_string_delay:()=>wD,extern_oled_shape_rect:()=>JD,extern_oled_shift:()=>HD,extern_oled_show_frame_string:()=>BD,extern_oled_show_frame_string_delay:()=>GD,extern_oled_show_image:()=>xD,extern_oled_show_image_or_string_delay:()=>VD,extern_oled_show_image_xy:()=>bD,extern_oled_show_string:()=>yD,image_shift:()=>uD,lcd_backlight:()=>vD,lcd_clear:()=>YD,lcd_print_string:()=>PD,lcd_show_image_or_string_delay:()=>FD,matrix_extern_image_arithmetic:()=>eD,matrix_extern_image_invert:()=>iD,tft_fill:()=>ND,tft_line_arbitrarily:()=>DD,tft_scroll_string_delay:()=>LD,tft_show_frame_string_delay:()=>AD,tft_show_image_or_string_delay:()=>SD,tft_show_image_xy:()=>gD,tft_use_spi_init:()=>cD});var et={};t.r(et),t.d(et,{bitbot_display_image_create:()=>Xf,display_bright_point:()=>lf,display_bright_screen:()=>If,display_clear:()=>of,display_get_pixel:()=>rf,display_get_screen_pixel:()=>df,display_image_builtins:()=>nf,display_image_builtins_all:()=>sf,display_image_create:()=>_f,display_scroll_string:()=>tf,display_scroll_string_delay:()=>ef,display_shift:()=>uf,display_show_frame_string:()=>ZD,display_show_frame_string_delay:()=>$D,display_show_image:()=>zD,display_show_image_or_string_delay:()=>jD,draw_pointer:()=>sF,image_arithmetic:()=>af,image_invert:()=>pf,mixbot_display_bright_screen:()=>vf,mixbot_display_get_ambientbright:()=>Pf,mixbot_display_get_screen_pixel:()=>Ff,mixbot_display_image_create:()=>ff,mixbot_display_rotate:()=>Yf,mixgo_display_image_create_new:()=>mf,mixgome_display_font:()=>hf,mixgome_display_image_create:()=>Tf,mixgomini_display_image_create:()=>Mf,mpython_display_hvline:()=>Nf,mpython_display_line:()=>Df,mpython_display_shape_rect:()=>Lf,mpython_pbm_image:()=>Ef,onboard_oled_bright_point:()=>Af,onboard_oled_scroll_string_delay:()=>Sf,onboard_oled_show_frame_string_delay:()=>Cf,onboard_oled_show_image:()=>Of,onboard_oled_show_image_or_string_delay:()=>gf,onboard_oled_show_image_xy:()=>Rf,onboard_oled_show_string:()=>cf,onboard_tft_bright_point:()=>Qf,onboard_tft_bright_screen:()=>zf,onboard_tft_clear:()=>Wf,onboard_tft_clock_clear:()=>iF,onboard_tft_clock_draw:()=>eF,onboard_tft_clock_get_rtctime:()=>$f,onboard_tft_clock_init:()=>Zf,onboard_tft_clock_set_time:()=>tF,onboard_tft_display_hvline:()=>kf,onboard_tft_display_line:()=>Hf,onboard_tft_display_shape_circle:()=>nF,onboard_tft_display_shape_rect:()=>wf,onboard_tft_fill:()=>jf,onboard_tft_get_pixel:()=>Jf,onboard_tft_get_screen_pixel:()=>qf,onboard_tft_scroll_string:()=>Gf,onboard_tft_scroll_string_delay:()=>Uf,onboard_tft_shift:()=>Kf,onboard_tft_show_frame_string:()=>Vf,onboard_tft_show_frame_string_delay:()=>Bf,onboard_tft_show_image:()=>xf,onboard_tft_show_image_or_string_delay:()=>yf,onboard_tft_show_image_xy:()=>bf});var it={};t.r(it),t.d(it,{factory_block:()=>dF,factory_block_return:()=>IF,factory_block_return_with_textarea:()=>MF,factory_block_with_textarea:()=>TF,factory_callMethod_noreturn:()=>rF,factory_callMethod_return:()=>lF,factory_declare:()=>uF,factory_from_import:()=>_F,factory_function_noreturn:()=>aF,factory_function_return:()=>pF,factory_import:()=>oF,folding_block:()=>hF});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>PF,inout_analog_read:()=>SF,inout_analog_read_init:()=>FF,inout_analog_write:()=>cF,inout_analog_write_init:()=>fF,inout_analog_write_set:()=>gF,inout_digital_init:()=>NF,inout_digital_read:()=>OF,inout_digital_write:()=>EF,inout_highlow:()=>mF,inout_pin_attachInterrupt:()=>LF,inout_pin_pressed:()=>AF,inout_pin_pressed_init:()=>vF,inout_pwm_analog_write:()=>RF,inout_pwm_analog_write_init:()=>DF,inout_pwm_analog_write_set_freq:()=>CF});var st={};t.r(st),t.d(st,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>jF,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>qF,IOT_EMQX_PING:()=>ZF,IOT_FORMATTING:()=>JF,IOT_FORMAT_STRING:()=>QF,IOT_MIXIO_NTP:()=>$F,IOT_MIXIO_PUBLISH:()=>GF,IOT_MIXIO_SUBSCRIBE:()=>UF,iot_client_onboard:()=>tP,iot_http_client:()=>eP,iot_http_data:()=>iP,iot_mixio_check:()=>HF,iot_mixio_connect:()=>BF,iot_mixio_connect_only:()=>kF,iot_mixio_disconnect:()=>wF,iot_mixio_format_msg:()=>KF,iot_mixio_format_topic:()=>WF,iot_mixly_key:()=>zF,iot_mqtt_client:()=>nP,iot_mqtt_data:()=>sP,iot_onenet_check:()=>yF,iot_onenet_connect:()=>XF,iot_onenet_disconnect:()=>xF,iot_onenet_publish:()=>VF,iot_onenet_publish_dict:()=>bF,iot_wifi_connect:()=>YF});var _t={};t.r(_t),t.d(_t,{network_ap_connect:()=>IP,network_connect:()=>oP,network_get_connect:()=>pP,network_get_wifi:()=>dP,network_init:()=>_P,network_is_active:()=>lP,network_open:()=>rP,network_scan:()=>TP,network_server:()=>MP,network_socket_accept:()=>RP,network_socket_bind:()=>mP,network_socket_close:()=>AP,network_socket_connect:()=>EP,network_socket_init:()=>hP,network_socket_listen:()=>OP,network_socket_receive:()=>cP,network_socket_receive_from:()=>CP,network_socket_send:()=>gP,network_socket_send_to:()=>SP,network_stop:()=>uP,network_wifi_connect:()=>aP,ntptime_address:()=>FP,ntptime_time:()=>fP,requests_attribute:()=>NP,requests_attribute2:()=>vP,requests_get:()=>LP,requests_get2:()=>PP,requests_method:()=>DP,requests_post:()=>YP});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>gv,PS2_Button:()=>Av,PS2_Buttons:()=>Lv,PS2_Buttons_new:()=>Xv,PS2_State:()=>Nv,PS2_init:()=>Cv,PS2_init_new:()=>vv,PS2_stk:()=>Dv,PS2_stk_new:()=>xv,PS2_vibration:()=>Sv,PS2_vibration_new:()=>Yv,RTC_get_time:()=>Fv,RTC_set_date:()=>UP,RTC_set_datetime:()=>fv,RTC_set_time:()=>GP,esp32_s2_weather_init:()=>Ev,esp32_s2_weather_rain:()=>Rv,esp32_s2_weather_wd:()=>Ov,esp32_s2_weather_ws:()=>cv,extern_rfid_read:()=>ov,extern_rfid_readcontent:()=>pv,extern_rfid_readid:()=>av,extern_rfid_status:()=>lv,extern_rfid_write:()=>uv,extern_rfid_write_return:()=>rv,gnss_get_data:()=>Vv,gnss_have_data:()=>Bv,mixbot_sensor_extern_get_addr:()=>Qv,mixbot_sensor_extern_set_addr:()=>qv,pm25_get_data:()=>yv,robot_button_extern_get_value:()=>Gv,robot_color_extern_get_value:()=>Wv,robot_infrared_extern_get_value:()=>wv,robot_infrared_extern_grey_get_value:()=>kv,robot_potentiometer_extern_get_value:()=>Hv,robot_sonar_extern_get_value:()=>Kv,robot_sonar_extern_led:()=>Jv,robot_touch_extern_get_value:()=>Uv,sensor_APDS9960_extern:()=>zP,sensor_DS18X20:()=>tY,sensor_LTR308_extern:()=>jP,sensor_LTR390UV_extern:()=>tv,sensor_MAX30102_extern:()=>qP,sensor_QMC5883L_extern:()=>ev,sensor_VL530LX_extern:()=>sv,sensor_aht11_extern:()=>nv,sensor_bmp:()=>KP,sensor_dht11:()=>Pv,sensor_distance_hrsc04:()=>BP,sensor_hp203_extern:()=>ZP,sensor_ltr381_extern:()=>$P,sensor_mixgo_extern_button_attachInterrupt:()=>yP,sensor_mixgo_extern_button_get_presses:()=>bP,sensor_mixgo_extern_button_is_pressed:()=>XP,sensor_mixgo_extern_button_was_pressed:()=>xP,sensor_mixgo_extern_light:()=>wP,sensor_mixgo_extern_pin_near:()=>HP,sensor_mixgo_extern_sound:()=>kP,sensor_mixgoce_hot_wheel_degrees:()=>mv,sensor_mixgoce_hot_wheel_is_touched:()=>hv,sensor_mpu9250_attachGestureInterrupt:()=>VP,sensor_rtc_init:()=>WP,sensor_sht:()=>JP,sensor_shtc3_extern:()=>iv,sensor_use_i2c_init:()=>QP,sensor_use_spi_init:()=>_v,sensor_use_uart_init:()=>bv,sensor_weather_solo_init:()=>zv,sensor_weather_solo_rain:()=>$v,sensor_weather_solo_wd:()=>jv,sensor_weather_solo_ws:()=>Zv,weather_data:()=>dv,weather_have_data:()=>Iv,weather_set_label:()=>Mv,weather_uart_mixio:()=>Tv});var at={};t.r(at),t.d(at,{HCSR04:()=>uY,bitbot_als_num:()=>DX,dht11:()=>bX,number1:()=>rY,number2:()=>lY,number3:()=>dY,number4:()=>IY,number5:()=>TY,number6:()=>MY,number7:()=>hY,onboard_RTC_get_time:()=>_X,onboard_RTC_get_time_str:()=>pX,onboard_RTC_get_timestamp:()=>oX,onboard_RTC_set_datetime:()=>nX,onboard_RTC_settime_string:()=>sX,onboard_RTC_timestamp_totuple:()=>aX,rfid_readcontent:()=>PY,rfid_readid:()=>FY,rfid_write:()=>vY,rfid_write_return:()=>YY,sensor_LTR308:()=>AY,sensor_adxl345_get_acceleration:()=>wY,sensor_aht11:()=>DY,sensor_bitbot_ALS:()=>NX,sensor_button_get_presses:()=>PX,sensor_button_is_pressed:()=>fX,sensor_button_was_pressed:()=>FX,sensor_compass_reset:()=>QY,sensor_ds18x20:()=>CY,sensor_eulerangles:()=>xY,sensor_get_acceleration:()=>XY,sensor_get_temperature:()=>fY,sensor_hp203:()=>NY,sensor_light:()=>xX,sensor_lm35:()=>SY,sensor_mixbot_get_gyro:()=>LX,sensor_mixbot_patrol_calibrate:()=>CX,sensor_mixbot_patrol_value:()=>SX,sensor_mixbot_temperature:()=>AX,sensor_mixgo_LTR308:()=>cY,sensor_mixgo_button_attachInterrupt:()=>sY,sensor_mixgo_button_get_presses:()=>nY,sensor_mixgo_button_is_pressed:()=>eY,sensor_mixgo_button_was_pressed:()=>iY,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>lX,sensor_mixgo_cc_mmc5603_get_angle:()=>rX,sensor_mixgo_cc_mmc5603_get_magnetic:()=>uX,sensor_mixgo_light:()=>XX,sensor_mixgo_nova_LTR308:()=>gY,sensor_mixgo_nova_pin_near:()=>RY,sensor_mixgo_pin_near:()=>OY,sensor_mixgo_pin_near_double:()=>EY,sensor_mixgo_pin_near_single:()=>mY,sensor_mixgo_pin_pressed:()=>GY,sensor_mixgo_touch_slide:()=>BY,sensor_mixgocar42_button_attachInterrupt:()=>pY,sensor_mixgocar42_button_get_presses:()=>aY,sensor_mixgocar42_button_is_pressed:()=>_Y,sensor_mixgocar42_button_was_pressed:()=>oY,sensor_mixgocar_battery_left:()=>gX,sensor_mixgocar_pin_near:()=>RX,sensor_mixgocar_pin_near_line:()=>OX,sensor_mixgocar_pin_near_state_change:()=>cX,sensor_mixgoce_pin_pressed:()=>VY,sensor_mixgoce_temperature:()=>IX,sensor_mixgome_temperature:()=>dX,sensor_mpu9250_calibrate_compass:()=>WY,sensor_mpu9250_field_strength:()=>JY,sensor_mpu9250_gesture:()=>bY,sensor_mpu9250_get_acceleration:()=>yY,sensor_mpu9250_get_gyro:()=>HY,sensor_mpu9250_get_magnetic:()=>kY,sensor_mpu9250_temperature:()=>KY,sensor_mpython_pin_pressed:()=>UY,sensor_mpython_qmi8658_get_gyro:()=>TX,sensor_mpython_qmi8658_temperature:()=>MX,sensor_onboard_compass_reset:()=>iX,sensor_onboard_mpu9250_calibrate_compass:()=>$Y,sensor_onboard_mpu9250_field_strength:()=>eX,sensor_onboard_mpu9250_gesture:()=>qY,sensor_onboard_mpu9250_get_acceleration:()=>zY,sensor_onboard_mpu9250_get_gyro:()=>ZY,sensor_onboard_mpu9250_get_magnetic:()=>jY,sensor_onboard_mpu9250_temperature:()=>tX,sensor_pin_near:()=>YX,sensor_pin_pressed:()=>vX,sensor_rm_acc:()=>EX,sensor_rm_battery_left:()=>mX,sensor_rm_pin_near_double:()=>hX,sensor_sound:()=>LY});var pt={};t.r(pt),t.d(pt,{serial_any:()=>UX,serial_print:()=>yX,serial_print_byte:()=>VX,serial_print_hex:()=>GX,serial_println:()=>BX,serial_read_from_ai:()=>ZX,serial_readline:()=>kX,serial_readstr:()=>wX,serial_send_to_ai:()=>jX,serial_softserial:()=>HX,serial_softserial_new:()=>WX,system_input:()=>KX,system_print:()=>JX,system_print_end:()=>qX,system_print_inline:()=>QX,system_print_many:()=>zX});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>rx,Timer_init:()=>Ax,base_delay:()=>Dx,controls_delay:()=>Mx,controls_delay_new:()=>hx,controls_end_program:()=>dx,controls_millis:()=>lx,controls_uname:()=>Tx,reset:()=>Ix,system_bitbot_shutdown:()=>Sx,system_device_name:()=>px,system_device_serial_number:()=>ux,system_event_bus_source:()=>ox,system_event_bus_value:()=>ax,system_machine_reset:()=>Cx,system_on_event:()=>nx,system_raise_event:()=>ix,system_reset:()=>tx,system_run_in_background:()=>$X,system_ticks_diff:()=>Ox,system_timer:()=>Ex,system_timer_init:()=>Rx,system_timestamp:()=>sx,system_value:()=>_x,system_wait:()=>ex,system_wdt_feed:()=>gx,system_wdt_init:()=>cx,time_ticks_diff:()=>Nx,timer:()=>mx,timer2:()=>Lx});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>Ux,Air_now_content:()=>Xx,Geo_moon_content:()=>kx,Geo_sun_content:()=>wx,Life_suggestion_content:()=>bx,Location_search_content:()=>Vx,Tide_daily_content:()=>yx,WEATHER_DAILY:()=>Fx,WEATHER_HOUR:()=>Px,WEATHER_NOW:()=>fx,Weather_alarm_content:()=>xx,Weather_daily:()=>Bx,Weather_daily_content:()=>Gx,Weather_now:()=>vx,Weather_now_content:()=>Yx});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>Ib,inout_analog_atten:()=>eb,inout_analog_read:()=>tb,inout_analog_read_init:()=>ab,inout_analog_write:()=>jx,inout_analog_write_init:()=>ob,inout_analog_write_set:()=>Zx,inout_analog_write_set_freq:()=>rb,inout_digital_init:()=>sb,inout_digital_read:()=>qx,inout_digital_write:()=>Qx,inout_highlow:()=>Jx,inout_pinMode:()=>ub,inout_pin_attachInterrupt:()=>nb,inout_pin_pressed:()=>ib,inout_pin_pressed_init:()=>pb,inout_pwm_analog_write:()=>zx,inout_pwm_analog_write_init:()=>_b,inout_pwm_analog_write_set_freq:()=>$x,pin_pressed:()=>db,pin_pressed_init:()=>lb});var dt={};t.r(dt),t.d(dt,{me_g1_aht11:()=>Mb,me_g1_hp203:()=>hb,me_g1_rfid_readcontent:()=>Ob,me_g1_rfid_readid:()=>Eb,me_g1_rfid_status:()=>gb,me_g1_rfid_write:()=>Rb,me_g1_rfid_write_outcome:()=>cb,me_g1_varistor:()=>mb});var It={};t.r(It),t.d(It,{analog_input:()=>Pb,analog_output:()=>Yb,espnow_channel:()=>Db,haskylens_model:()=>fb,i2c_A_pin:()=>Xb,i2c_B_pin:()=>xb,pins_analog:()=>Gb,pins_analog_pin:()=>Ub,pins_axis:()=>sy,pins_brightness:()=>_y,pins_builtinimg:()=>jb,pins_builtinimg_extern:()=>Zb,pins_button:()=>Hb,pins_buttonB:()=>Wb,pins_dac:()=>wb,pins_dac_pin:()=>kb,pins_digital:()=>Sb,pins_digital_dot:()=>Iy,pins_digital_pin:()=>Ab,pins_exlcdh:()=>iy,pins_exlcdv:()=>ny,pins_imglist:()=>$b,pins_input_pin:()=>Lb,pins_one_more:()=>dy,pins_output_pin:()=>Nb,pins_playlist:()=>ty,pins_playlist_extern:()=>ey,pins_pwm:()=>Kb,pins_pwm_pin:()=>Jb,pins_radio_datarate:()=>ly,pins_radio_power:()=>ry,pins_serial:()=>zb,pins_tone_notes:()=>uy,pins_touch:()=>qb,pins_touch_pin:()=>Qb,pins_tts_bgmusic:()=>py,pins_tts_builtin_music:()=>ay,pins_tts_voice:()=>oy,pwm_input:()=>Fb,pwm_output:()=>vb,spi_A_pin:()=>bb,spi_B_pin:()=>yb,spi_C_pin:()=>Vb,spi_D_pin:()=>Bb});var Tt={};t.r(Tt),t.d(Tt,{inout_analog_atten:()=>Dy,inout_analog_read:()=>cy,inout_analog_read_init:()=>Ny,inout_analog_write:()=>Ey,inout_analog_write_init:()=>Ly,inout_analog_write_set:()=>Oy,inout_digital_init:()=>Sy,inout_digital_read:()=>hy,inout_digital_write:()=>My,inout_highlow:()=>Ty,inout_pin_attachInterrupt:()=>Cy,inout_pin_pressed:()=>gy,inout_pin_pressed_init:()=>fy,inout_pwm_analog_write:()=>my,inout_pwm_analog_write_init:()=>Ay,inout_pwm_analog_write_set_freq:()=>Ry});var Mt={};t.r(Mt),t.d(Mt,{me_g1_aht11:()=>Fy,me_g1_hp203:()=>Py,me_g1_rfid_readcontent:()=>Xy,me_g1_rfid_readid:()=>Yy,me_g1_rfid_status:()=>yy,me_g1_rfid_write:()=>xy,me_g1_rfid_write_outcome:()=>by,me_g1_varistor:()=>vy});var ht={};t.r(ht),t.d(ht,{analog_input:()=>Jy,analog_output:()=>qy,espnow_channel:()=>Wy,haskylens_model:()=>Ky,i2c_A_pin:()=>zy,i2c_B_pin:()=>jy,pins_analog:()=>nV,pins_analog_pin:()=>iV,pins_axis:()=>mV,pins_brightness:()=>RV,pins_builtinimg:()=>dV,pins_builtinimg_extern:()=>IV,pins_button:()=>By,pins_buttonB:()=>Gy,pins_dac:()=>aV,pins_dac_pin:()=>oV,pins_digital:()=>Vy,pins_digital_dot:()=>DV,pins_digital_pin:()=>Uy,pins_exlcdh:()=>EV,pins_exlcdv:()=>OV,pins_imglist:()=>TV,pins_input_pin:()=>wy,pins_interrupt:()=>rV,pins_one_more:()=>NV,pins_output_pin:()=>ky,pins_playlist:()=>MV,pins_playlist_extern:()=>hV,pins_pwm:()=>_V,pins_pwm_input:()=>Hy,pins_pwm_pin:()=>sV,pins_radio_datarate:()=>LV,pins_radio_power:()=>AV,pins_serial:()=>lV,pins_tone_notes:()=>SV,pins_touch:()=>uV,pins_touch_pin:()=>pV,pins_tts_bgmusic:()=>CV,pins_tts_builtin_music:()=>gV,pins_tts_voice:()=>cV,pwm_output:()=>Qy,spi_A_pin:()=>Zy,spi_B_pin:()=>$y,spi_C_pin:()=>tV,spi_D_pin:()=>eV});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; +(()=>{"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:()=>bt,controls_delay:()=>yt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>Zt,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:()=>$t,controls_thread:()=>ie,controls_try:()=>zt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>pe,do_while:()=>ne,garbage_collection:()=>se,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>ae});var n={};t.r(n),t.d(n,{base_map:()=>fe,math_arithmetic:()=>Ie,math_bit:()=>Me,math_constant:()=>le,math_constant_mp:()=>de,math_constrain:()=>ge,math_dec:()=>me,math_indexer_number:()=>Se,math_map:()=>Ce,math_max_min:()=>Oe,math_number:()=>re,math_number_base_conversion:()=>Re,math_random:()=>ce,math_random_seed:()=>Ae,math_round:()=>Le,math_selfcalcu:()=>Te,math_to_int:()=>Ee,math_trig:()=>he,text_to_number:()=>Ne,text_to_number_skulpt:()=>De,turn_to_int:()=>Fe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>be,char_to_ascii:()=>ye,number_to_text:()=>Ve,os_system:()=>ui,text:()=>ve,text_capital:()=>Je,text_center:()=>Qe,text_char:()=>Xe,text_char_at:()=>Ue,text_char_at2:()=>Ge,text_char_at3:()=>_i,text_compareTo:()=>si,text_compare_to:()=>Ke,text_create_with_container:()=>ei,text_create_with_item:()=>ii,text_encode:()=>ai,text_equals_starts_ends:()=>We,text_eval:()=>pi,text_find:()=>qe,text_format:()=>ti,text_format_noreturn:()=>oi,text_join:()=>xe,text_join_seq:()=>ze,text_length:()=>Be,text_random_char:()=>we,text_replace:()=>je,text_split:()=>Ze,text_strip:()=>$e,text_substring:()=>He,text_substring2:()=>ke,text_substring3:()=>ni,text_textarea:()=>Ye});var _={};t.r(_),t.d(_,{ENUMERATE:()=>Wi,enumerate:()=>Ki,list_many_input:()=>vi,list_tolist:()=>bi,list_tolist2:()=>Hi,list_trig:()=>fi,lists_2d_get_col_row_data:()=>Ti,lists_2d_get_data_with_col_row:()=>Ii,lists_append_extend:()=>Ri,lists_change_to:()=>Pi,lists_change_to_general:()=>Xi,lists_clear:()=>Ai,lists_create_with:()=>Mi,lists_create_with2:()=>yi,lists_create_with_container:()=>mi,lists_create_with_item:()=>Ei,lists_create_with_noreturn:()=>Yi,lists_create_with_text:()=>hi,lists_create_with_text2:()=>Vi,lists_del_general:()=>xi,lists_find:()=>Di,lists_getIndex3:()=>Bi,lists_getSublist3:()=>Gi,lists_get_index:()=>li,lists_get_random_item:()=>ci,lists_get_random_sublist:()=>gi,lists_get_sublist:()=>di,lists_insert_value:()=>Ci,lists_insert_value2:()=>wi,lists_pop:()=>Ni,lists_remove_at:()=>Li,lists_remove_at2:()=>ki,lists_reverse:()=>Si,lists_setIndex3:()=>Ui,lists_set_index:()=>Oi,lists_sort:()=>Fi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>un,dicts_add_or_change:()=>tn,dicts_clear:()=>sn,dicts_create_with:()=>Qi,dicts_create_with_container:()=>qi,dicts_create_with_item:()=>zi,dicts_create_with_noreturn:()=>dn,dicts_deldict:()=>pn,dicts_delete:()=>en,dicts_get:()=>Zi,dicts_get_default:()=>$i,dicts_items:()=>_n,dicts_keys:()=>ji,dicts_length:()=>an,dicts_pop:()=>rn,dicts_setdefault:()=>ln,dicts_to_json:()=>Tn,dicts_todict:()=>In,dicts_update:()=>nn,dicts_values:()=>on,json_to_dicts:()=>Mn});var a={};t.r(a),t.d(a,{logic_boolean:()=>cn,logic_compare:()=>mn,logic_compare_continous:()=>En,logic_is:()=>An,logic_is_in:()=>Sn,logic_negate:()=>Rn,logic_null:()=>gn,logic_operation:()=>On,logic_tobool:()=>Ln,logic_true_or_false:()=>Cn});var p={};t.r(p),t.d(p,{sdcard_mount:()=>qn,sdcard_use_spi_init:()=>Qn,storage_can_write_ornot:()=>xn,storage_change_dir:()=>Kn,storage_close_file:()=>yn,storage_delete_file:()=>Bn,storage_file_seek:()=>wn,storage_file_tell:()=>Un,storage_file_write:()=>Pn,storage_fileopen:()=>Dn,storage_fileopen_new:()=>fn,storage_fileopen_new_encoding:()=>Fn,storage_get_a_line:()=>Xn,storage_get_contents:()=>Yn,storage_get_contents_without_para:()=>vn,storage_get_current_dir:()=>kn,storage_get_file_size:()=>Gn,storage_get_filename:()=>bn,storage_is_file:()=>Jn,storage_list_all_files:()=>Vn,storage_make_dir:()=>Hn,storage_open_file_with_os:()=>Nn,storage_rename:()=>Wn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>is,procedures_callreturn:()=>ns,procedures_defnoreturn:()=>Zn,procedures_defreturn:()=>$n,procedures_ifreturn:()=>ss,procedures_mutatorarg:()=>es,procedures_mutatorcontainer:()=>ts,procedures_return:()=>_s});var r={};t.r(r),t.d(r,{tuple_change_to:()=>ms,tuple_create_with:()=>as,tuple_create_with_container:()=>ps,tuple_create_with_item:()=>us,tuple_create_with_noreturn:()=>cs,tuple_create_with_text2:()=>rs,tuple_create_with_text_return:()=>ls,tuple_del:()=>Ts,tuple_find:()=>Es,tuple_getIndex:()=>ds,tuple_getSublist:()=>Rs,tuple_get_random_item:()=>Cs,tuple_get_sublist:()=>gs,tuple_join:()=>Ms,tuple_length:()=>Is,tuple_max:()=>hs,tuple_totuple:()=>Ss,tuple_trig:()=>Os});var l={};t.r(l),t.d(l,{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 d={};t.r(d),t.d(d,{html_content:()=>ks,html_content_more:()=>Hs,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:()=>u_,function_call:()=>o_,function_call_container:()=>a_,function_call_item:()=>p_,raw_block:()=>Zs,raw_empty:()=>t_,raw_expression:()=>$s,raw_table:()=>js,text_comment:()=>e_,text_print_multiple:()=>n_,text_print_multiple_container:()=>s_,text_print_multiple_item:()=>__,type_check:()=>i_});var T={};t.r(T),t.d(T,{controls_type:()=>T_,controls_typeLists:()=>M_,lists_zip:()=>h_,unpack_iterable_object:()=>m_,variables_change:()=>d_,variables_get:()=>r_,variables_global:()=>I_,variables_set:()=>l_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>N_,base_setup:()=>O_,controls_delay:()=>L_,controls_flow_statements:()=>A_,controls_for:()=>g_,controls_forEach:()=>v_,controls_for_range:()=>C_,controls_if:()=>R_,controls_interrupts:()=>F_,controls_lambda:()=>X_,controls_main:()=>E_,controls_millis:()=>D_,controls_nointerrupts:()=>P_,controls_pass:()=>b_,controls_range:()=>Y_,controls_repeat:()=>H_,controls_repeat_ext:()=>B_,controls_thread:()=>y_,controls_try_finally:()=>c_,controls_whileUntil:()=>S_,datetime_fromtimestamp:()=>W_,do_while:()=>V_,garbage_collection:()=>G_,get_mem_alloc:()=>U_,get_mem_free:()=>w_,get_unique_identifier:()=>k_,reset:()=>f_,time_sleep:()=>x_});var h={};t.r(h),t.d(h,{base_map:()=>Io,math_arithmetic:()=>z_,math_bit:()=>q_,math_constant:()=>J_,math_constant_mp:()=>Q_,math_constrain:()=>_o,math_dec:()=>to,math_indexer_number:()=>po,math_map:()=>so,math_max_min:()=>io,math_number:()=>K_,math_number_base_conversion:()=>oo,math_random:()=>no,math_random_seed:()=>ao,math_round:()=>uo,math_selfcalcu:()=>j_,math_single:()=>Z_,math_to_int:()=>eo,math_trig:()=>$_,text_to_number:()=>ro,text_to_number_skulpt:()=>lo,turn_to_int:()=>To});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Oo,char_to_ascii:()=>Ro,number_to_text:()=>co,os_system:()=>Ho,text:()=>Mo,text_capital:()=>Fo,text_center:()=>Po,text_char:()=>mo,text_char_at:()=>So,text_char_at2:()=>Co,text_char_at3:()=>Uo,text_compareTo:()=>Go,text_compare_to:()=>No,text_encode:()=>wo,text_equals_starts_ends:()=>Lo,text_eval:()=>ko,text_find:()=>vo,text_format:()=>yo,text_format_noreturn:()=>Vo,text_join:()=>Eo,text_join_seq:()=>Yo,text_length:()=>go,text_random_char:()=>Ao,text_replace:()=>Xo,text_split:()=>xo,text_strip:()=>bo,text_substring:()=>fo,text_substring2:()=>Do,text_substring3:()=>Bo,text_textarea:()=>ho});var E={};t.r(E),t.d(E,{enumerate:()=>Ca,list_many_input:()=>ra,list_tolist:()=>ca,list_tolist2:()=>ga,list_trig:()=>aa,lists_2d_get_col_row_data:()=>Jo,lists_2d_get_data_with_col_row:()=>Ko,lists_append_extend:()=>Zo,lists_change_to:()=>ua,lists_change_to_general:()=>da,lists_clear:()=>na,lists_create_with:()=>Qo,lists_create_with2:()=>Ta,lists_create_with_noreturn:()=>la,lists_create_with_text:()=>qo,lists_create_with_text2:()=>Ma,lists_del_general:()=>Ia,lists_find:()=>sa,lists_getIndex3:()=>ha,lists_getSublist3:()=>ma,lists_get_index:()=>zo,lists_get_random_item:()=>$o,lists_get_random_sublist:()=>ta,lists_get_sublist:()=>Wo,lists_insert_value:()=>ea,lists_insert_value2:()=>Oa,lists_pop:()=>oa,lists_remove_at:()=>_a,lists_remove_at2:()=>Ra,lists_reverse:()=>ia,lists_setIndex3:()=>Ea,lists_set_index:()=>jo,lists_sort:()=>pa});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>ba,dicts_add_or_change:()=>Da,dicts_clear:()=>Pa,dicts_create_with:()=>Sa,dicts_create_with_noreturn:()=>Ba,dicts_deldict:()=>xa,dicts_delete:()=>fa,dicts_get:()=>La,dicts_get_default:()=>Na,dicts_items:()=>va,dicts_keys:()=>Aa,dicts_length:()=>Xa,dicts_pop:()=>ya,dicts_setdefault:()=>Va,dicts_to_json:()=>Ua,dicts_todict:()=>Ga,dicts_update:()=>Fa,dicts_values:()=>Ya,json_to_dicts:()=>wa});var R={};t.r(R),t.d(R,{logic_boolean:()=>Ja,logic_compare:()=>ka,logic_compare_continous:()=>Ha,logic_is:()=>ja,logic_is_in:()=>za,logic_negate:()=>Ka,logic_null:()=>Qa,logic_operation:()=>Wa,logic_tobool:()=>Za,logic_true_or_false:()=>qa});var c={};t.r(c),t.d(c,{sdcard_mount:()=>cp,sdcard_use_spi_init:()=>Rp,storage_can_write_ornot:()=>ap,storage_change_dir:()=>Mp,storage_close_file:()=>up,storage_delete_file:()=>lp,storage_file_seek:()=>Tp,storage_file_tell:()=>Ip,storage_file_write:()=>np,storage_fileopen:()=>tp,storage_fileopen_new:()=>ep,storage_fileopen_new_encoding:()=>ip,storage_get_a_line:()=>op,storage_get_contents:()=>_p,storage_get_contents_without_para:()=>sp,storage_get_current_dir:()=>hp,storage_get_file_size:()=>dp,storage_get_filename:()=>pp,storage_is_file:()=>Op,storage_list_all_files:()=>rp,storage_make_dir:()=>mp,storage_open_file_with_os:()=>$a,storage_rename:()=>Ep});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ap,procedures_callreturn:()=>Sp,procedures_defnoreturn:()=>Cp,procedures_defreturn:()=>gp,procedures_ifreturn:()=>Lp,procedures_return:()=>Np});var C={};t.r(C),t.d(C,{tuple_change_to:()=>bp,tuple_create_with:()=>Dp,tuple_create_with_noreturn:()=>Gp,tuple_create_with_text2:()=>fp,tuple_create_with_text_return:()=>Fp,tuple_del:()=>Yp,tuple_find:()=>yp,tuple_getIndex:()=>Pp,tuple_getSublist:()=>Bp,tuple_get_random_item:()=>wp,tuple_get_sublist:()=>Up,tuple_join:()=>Xp,tuple_length:()=>vp,tuple_max:()=>xp,tuple_totuple:()=>kp,tuple_trig:()=>Vp});var S={};t.r(S),t.d(S,{set_add_discard:()=>zp,set_clear:()=>Jp,set_create_with:()=>Hp,set_create_with_text_return:()=>$p,set_length:()=>Wp,set_operate:()=>Qp,set_operate_update:()=>qp,set_pop:()=>Kp,set_sub:()=>jp,set_toset:()=>tu,set_update:()=>Zp});var A={};t.r(A),t.d(A,{html_content:()=>su,html_content_more:()=>_u,html_document:()=>eu,html_form:()=>au,html_head_body:()=>nu,html_style:()=>ou,html_style_content:()=>pu,html_text:()=>uu,html_title:()=>iu});var L={};t.r(L),t.d(L,{attribute_access:()=>hu,function_call:()=>Mu,raw_block:()=>ru,raw_empty:()=>du,raw_expression:()=>lu,raw_table:()=>Iu,type_check:()=>Tu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Du,actuator_extern_get_led_state:()=>fu,actuator_extern_led_bright:()=>Nu,actuator_extern_led_brightness:()=>Fu,actuator_ms32006_dcmotor:()=>Bu,actuator_ms32006_init:()=>Vu,actuator_ms32006_stepper:()=>Gu,actuator_neopixel_init:()=>Uu,actuator_neopixel_rgb:()=>wu,actuator_neopixel_rgb_all:()=>ku,actuator_neopixel_write:()=>Hu,actuator_use_uart_init:()=>Wu,esp32_music_get_tempo_extern:()=>Su,esp32_music_pitch:()=>Ru,esp32_music_pitch_init:()=>Ou,esp32_music_pitch_with_time:()=>cu,esp32_music_play_list:()=>gu,esp32_music_reset_extern:()=>Au,esp32_music_set_tempo_extern:()=>Cu,esp32_music_stop:()=>Lu,mixbot_actuator_extern_get_addr:()=>ur,mixbot_actuator_extern_set_addr:()=>rr,mixbot_addr_extern:()=>zu,robot_led_extern:()=>tr,robot_led_extern_get_value:()=>er,robot_motor_extern:()=>ju,robot_motor_extern_get_speed:()=>Zu,robot_servo_extern_absolute_run:()=>_r,robot_servo_extern_get_status:()=>ir,robot_servo_extern_relative_continue:()=>pr,robot_servo_extern_relative_origin:()=>or,robot_servo_extern_relative_run:()=>ar,robot_servo_extern_stop:()=>sr,robot_servo_extern_stop_mode:()=>nr,robot_traffic_light_extern:()=>$u,servo_get_angle:()=>bu,servo_get_speed:()=>yu,servo_init:()=>Pu,servo_move:()=>vu,servo_set_angle:()=>Xu,servo_set_speed:()=>xu,servo_speed_360:()=>Yu,syn6288_builtin_voice:()=>Qu,syn6288_get_voice:()=>Ju,syn6288_set_voice:()=>Ku,syn6288_tts_play:()=>qu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>wr,actuator_dc_motor_stop:()=>kr,actuator_get_led_bright:()=>Mr,actuator_get_led_state:()=>hr,actuator_led_bright:()=>Tr,actuator_led_brightness:()=>mr,actuator_mixbot_buzzer_on_off:()=>Qr,actuator_mixgo_nova_mic_get:()=>$r,actuator_mixgo_nova_mic_set:()=>Zr,actuator_mixgo_nova_onboard_music_pitch:()=>_l,actuator_mixgo_nova_onboard_music_stop:()=>ol,actuator_mixgo_nova_play_audio:()=>nl,actuator_mixgo_nova_play_online_audio:()=>sl,actuator_mixgo_nova_record_audio:()=>il,actuator_mixgo_nova_voice_get:()=>el,actuator_mixgo_nova_voice_set:()=>tl,actuator_mixgo_zero_led_color:()=>Er,actuator_onboard_neopixel_rgb:()=>Sr,actuator_onboard_neopixel_rgb_all:()=>Ar,actuator_onboard_neopixel_rgb_show_all_chase:()=>Nr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Lr,actuator_onboard_neopixel_write:()=>Dr,actuator_rm_onboard_neopixel_rgb:()=>fr,actuator_rm_onboard_neopixel_rgb_all:()=>Fr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Pr,actuator_stepper_keep:()=>Gr,actuator_stepper_stop:()=>Ur,analog_ble_keyboard_init:()=>Ol,analog_ble_keyboard_input:()=>gl,analog_ble_keyboard_send_battery:()=>Sl,analog_ble_keyboard_str:()=>Cl,analog_ble_mouse_init:()=>Al,analog_ble_mouse_input:()=>Dl,analog_ble_mouse_send_battery:()=>fl,analog_keyboard_input:()=>rl,analog_keyboard_str:()=>El,analog_mouse_input:()=>hl,bitbot_motor:()=>jr,bitbot_move:()=>qr,bitbot_stop:()=>zr,ble_keyboard_connect:()=>cl,ble_keyboard_get_mac:()=>Rl,ble_mouse_connect:()=>Nl,ble_mouse_get_mac:()=>Ll,cc_number:()=>Cr,esp32_music_get_tempo:()=>Yr,esp32_music_reset:()=>Xr,esp32_music_set_tempo:()=>vr,esp32_onboard_music_pitch:()=>xr,esp32_onboard_music_pitch_with_time:()=>br,esp32_onboard_music_play_list:()=>Vr,esp32_onboard_music_stop:()=>yr,general_key:()=>dl,general_key_tuple:()=>Il,generalkey_container:()=>Tl,generalkey_create_with_item:()=>Ml,get_power_output:()=>pl,ledswitch:()=>Ir,mixbot_motor:()=>Jr,mixbot_motor_status:()=>Hr,mixbot_move:()=>Wr,mixbot_stop:()=>Kr,mouse_key:()=>ml,number:()=>dr,rm_actuator_get_led_bright:()=>Rr,rm_actuator_get_led_state:()=>cr,rm_actuator_led_bright:()=>Or,rm_actuator_led_brightness:()=>gr,rm_motor:()=>Br,set_all_power_output:()=>ul,set_power_output:()=>al,special_key:()=>ll});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>ud,ai_sensor_ailocal_class:()=>Zl,ai_sensor_ailocal_class_result:()=>$l,ai_sensor_ailocal_train:()=>jl,ai_sensor_asr_recognize:()=>sd,ai_sensor_audio_play:()=>ed,ai_sensor_audio_record:()=>td,ai_sensor_barcode:()=>yl,ai_sensor_circle:()=>kl,ai_sensor_classifier_faces:()=>pd,ai_sensor_color:()=>Jl,ai_sensor_color_chases:()=>zl,ai_sensor_color_chases_result:()=>ql,ai_sensor_config:()=>xl,ai_sensor_face:()=>ad,ai_sensor_find_20objects:()=>rd,ai_sensor_find_barcodes:()=>Vl,ai_sensor_find_circles:()=>Hl,ai_sensor_find_colors:()=>Ql,ai_sensor_find_licenseplates:()=>od,ai_sensor_find_lines:()=>wl,ai_sensor_find_qrcodes:()=>Xl,ai_sensor_find_rects:()=>Kl,ai_sensor_find_tags:()=>Gl,ai_sensor_licenseplate:()=>_d,ai_sensor_line:()=>Ul,ai_sensor_qrcode:()=>vl,ai_sensor_qrcode_lite:()=>Yl,ai_sensor_rect:()=>Wl,ai_sensor_rgb:()=>bl,ai_sensor_tag:()=>Bl,ai_sensor_use_uart_init:()=>Pl,ai_sensor_yolo_recognize:()=>id,ai_sensor_yolo_recognize_result:()=>nd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>Id,MICROPYTHON_AI_Speech_unit:()=>dd,MICROPYTHON_AI_client:()=>ld});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Dd,mpython_blynk_app_notify:()=>cd,mpython_blynk_email:()=>Sd,mpython_blynk_get_timers:()=>Ad,mpython_blynk_on_connected:()=>Ed,mpython_blynk_on_disconnected:()=>md,mpython_blynk_run:()=>Rd,mpython_blynk_sensor_data_to_app:()=>Nd,mpython_blynk_set_property:()=>Cd,mpython_blynk_setup:()=>fd,mpython_blynk_stop_timers:()=>gd,mpython_blynk_sync_virtual:()=>hd,mpython_blynk_terminal_widget_vpin:()=>Md,mpython_blynktimer:()=>Ld,mpython_blynktimer_run:()=>Od});var v={};t.r(v),t.d(v,{cc_g1_init:()=>Fd,cc_g1_read_bat:()=>Pd,cc_g1_read_joystick:()=>vd,cc_g1_read_key:()=>Yd,cc_g1_turnoff:()=>Xd});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>kd,ce_go_get_led_bright:()=>Vd,ce_go_get_led_state:()=>Bd,ce_go_hall_attachInterrupt:()=>Hd,ce_go_hall_data:()=>Kd,ce_go_hall_initialize:()=>Wd,ce_go_led_bright:()=>yd,ce_go_led_brightness:()=>Gd,ce_go_light_number:()=>bd,ce_go_pin_light:()=>jd,ce_go_pin_near:()=>Qd,ce_go_pin_near_line:()=>Jd,ce_go_pin_near_state_change:()=>qd,ce_go_stepper_keep:()=>Ud,ce_go_stepper_stop:()=>wd,sensor_mixgome_eulerangles:()=>zd});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>YI,communicate_bluetooth_connect:()=>yI,communicate_bluetooth_disconnect:()=>VI,communicate_bluetooth_handle:()=>kI,communicate_bluetooth_is_connected:()=>GI,communicate_bluetooth_mac:()=>bI,communicate_bluetooth_peripheral_init:()=>XI,communicate_bluetooth_recv:()=>UI,communicate_bluetooth_recv_only:()=>wI,communicate_bluetooth_scan:()=>xI,communicate_bluetooth_send:()=>BI,communicate_espnow_init:()=>HI,communicate_espnow_init_new:()=>WI,communicate_i2c_available:()=>MI,communicate_i2c_init:()=>eI,communicate_i2c_master_read:()=>TI,communicate_i2c_onboard:()=>$d,communicate_i2c_read:()=>iI,communicate_i2c_scan:()=>sI,communicate_i2c_write:()=>nI,communicate_ir_recv_init:()=>CI,communicate_ir_send_init:()=>DI,communicate_ow_init:()=>mI,communicate_ow_read:()=>OI,communicate_ow_reset:()=>gI,communicate_ow_scan:()=>EI,communicate_ow_select:()=>cI,communicate_ow_write:()=>RI,communicate_spi_buffer:()=>aI,communicate_spi_init:()=>_I,communicate_spi_onboard:()=>tI,communicate_spi_read:()=>pI,communicate_spi_read_output:()=>uI,communicate_spi_readinto:()=>rI,communicate_spi_readinto_output:()=>lI,communicate_spi_set:()=>oI,communicate_spi_write:()=>dI,communicate_spi_write_readinto:()=>II,espnow_radio_channel:()=>jI,espnow_radio_channel_new:()=>$I,espnow_radio_on_off:()=>tT,espnow_radio_rec:()=>iT,espnow_radio_recv:()=>sT,espnow_radio_recv_certain_msg:()=>_T,espnow_radio_recv_certain_msg_new:()=>aT,espnow_radio_recv_msg:()=>nT,espnow_radio_recv_new:()=>oT,espnow_radio_send:()=>eT,espnow_radio_txpower:()=>ZI,i2c_available:()=>fT,i2c_init:()=>MT,i2c_master_reader2:()=>DT,i2c_read:()=>hT,i2c_scan:()=>ET,i2c_slave_onreceive:()=>hI,i2c_write:()=>mT,internal_variable:()=>SI,ir_recv_timeout:()=>NI,ir_transmit_busy:()=>vI,ir_transmit_conventional_data:()=>fI,ir_transmit_raw_code:()=>PI,ir_transmit_study_code:()=>FI,ir_whether_recv:()=>LI,lora_init:()=>pT,lora_packet:()=>uT,lora_recv:()=>lT,lora_send:()=>rT,network_espnow_info:()=>JI,network_espnow_mac:()=>KI,network_espnow_recv:()=>QI,network_espnow_recv_handle:()=>zI,network_espnow_send:()=>qI,recv_fun:()=>AI,spi_buffer:()=>cT,spi_init:()=>OT,spi_read:()=>gT,spi_read_output:()=>CT,spi_readinto:()=>ST,spi_readinto_output:()=>AT,spi_set:()=>RT,spi_write:()=>LT,spi_write_readinto:()=>NT,urequests_attribute:()=>IT,urequests_get:()=>dT,urequests_method:()=>TT});var x={};t.r(x),t.d(x,{display_animate:()=>_M,display_blink_rate:()=>eM,display_circle:()=>oM,display_color_seclet:()=>EM,display_draw_4strings:()=>qT,display_fill:()=>sM,display_get_screen_image:()=>tM,display_help:()=>pM,display_image_size:()=>zT,display_lcd_use_i2c_init:()=>SM,display_line:()=>ZT,display_line_arbitrarily:()=>$T,display_matrix_extern_bright_point:()=>UT,display_matrix_extern_bright_screen:()=>kT,display_matrix_extern_clear:()=>HT,display_matrix_extern_get_pixel:()=>GT,display_matrix_extern_get_screen_pixel:()=>wT,display_matrix_extern_image_builtins:()=>WT,display_matrix_extern_scroll_string:()=>xT,display_matrix_extern_scroll_string_delay:()=>bT,display_matrix_extern_shift:()=>BT,display_matrix_extern_show_frame_string:()=>yT,display_matrix_extern_show_frame_string_delay:()=>VT,display_matrix_extern_show_image:()=>YT,display_matrix_extern_show_image_or_string_delay:()=>XT,display_matrix_use_i2c_init:()=>vT,display_oled_drawPixel:()=>rM,display_oled_showBitmap:()=>uM,display_oled_use_i2c_init:()=>fM,display_onoff:()=>nM,display_rect:()=>jT,display_rgb_color:()=>iM,display_tm1650_power:()=>dM,display_tm1650_set_brightness:()=>MM,display_tm1650_show_dot:()=>TM,display_tm1650_show_num:()=>IM,display_tm_use_i2c_init:()=>lM,display_triangle:()=>aM,display_use_i2c_init:()=>QT,extern_oled_bright_point:()=>GM,extern_oled_clear:()=>UM,extern_oled_get_pixel:()=>BM,extern_oled_hvline:()=>kM,extern_oled_line:()=>HM,extern_oled_scroll_string:()=>XM,extern_oled_scroll_string_delay:()=>xM,extern_oled_shape_rect:()=>wM,extern_oled_shift:()=>VM,extern_oled_show_frame_string:()=>bM,extern_oled_show_frame_string_delay:()=>yM,extern_oled_show_image:()=>FM,extern_oled_show_image_or_string_delay:()=>YM,extern_oled_show_image_xy:()=>PM,extern_oled_show_string:()=>vM,lcd_backlight:()=>NM,lcd_clear:()=>DM,lcd_print_string:()=>LM,lcd_show_image_or_string_delay:()=>AM,matrix_extern_image_arithmetic:()=>KT,matrix_extern_image_invert:()=>JT,tft_fill:()=>gM,tft_line_arbitrarily:()=>CM,tft_scroll_string_delay:()=>RM,tft_show_frame_string_delay:()=>cM,tft_show_image_or_string_delay:()=>OM,tft_show_image_xy:()=>mM,tft_use_spi_init:()=>hM});var b={};t.r(b),t.d(b,{bitbot_display_image_create:()=>fh,display_bright_point:()=>_h,display_bright_screen:()=>ah,display_clear:()=>ph,display_get_pixel:()=>sh,display_get_screen_pixel:()=>oh,display_image_builtins:()=>$M,display_image_builtins_all:()=>th,display_image_create:()=>ZM,display_scroll_string:()=>QM,display_scroll_string_delay:()=>qM,display_shift:()=>nh,display_show_frame_string:()=>zM,display_show_frame_string_delay:()=>jM,display_show_image:()=>KM,display_show_image_or_string_delay:()=>JM,draw_pointer:()=>$h,image_arithmetic:()=>eh,image_invert:()=>ih,mixbot_display_bright_screen:()=>Nh,mixbot_display_get_ambientbright:()=>Lh,mixbot_display_get_screen_pixel:()=>Ah,mixbot_display_image_create:()=>Sh,mixbot_display_rotate:()=>Dh,mixgo_display_image_create_new:()=>lh,mixgome_display_font:()=>dh,mixgome_display_image_create:()=>uh,mixgomini_display_image_create:()=>rh,mpython_display_hvline:()=>ch,mpython_display_line:()=>gh,mpython_display_shape_rect:()=>Rh,mpython_pbm_image:()=>Ch,onboard_oled_bright_point:()=>Oh,onboard_oled_scroll_string_delay:()=>mh,onboard_oled_show_frame_string_delay:()=>Eh,onboard_oled_show_image:()=>Ih,onboard_oled_show_image_or_string_delay:()=>hh,onboard_oled_show_image_xy:()=>Th,onboard_oled_show_string:()=>Mh,onboard_tft_bright_point:()=>wh,onboard_tft_bright_screen:()=>Wh,onboard_tft_clear:()=>kh,onboard_tft_clock_clear:()=>jh,onboard_tft_clock_draw:()=>zh,onboard_tft_clock_get_rtctime:()=>Qh,onboard_tft_clock_init:()=>Jh,onboard_tft_clock_set_time:()=>qh,onboard_tft_display_hvline:()=>Vh,onboard_tft_display_line:()=>Bh,onboard_tft_display_shape_circle:()=>Zh,onboard_tft_display_shape_rect:()=>yh,onboard_tft_fill:()=>Kh,onboard_tft_get_pixel:()=>Uh,onboard_tft_get_screen_pixel:()=>Hh,onboard_tft_scroll_string:()=>Yh,onboard_tft_scroll_string_delay:()=>Xh,onboard_tft_shift:()=>Gh,onboard_tft_show_frame_string:()=>xh,onboard_tft_show_frame_string_delay:()=>bh,onboard_tft_show_image:()=>Fh,onboard_tft_show_image_or_string_delay:()=>vh,onboard_tft_show_image_xy:()=>Ph});var y={};t.r(y),t.d(y,{factory_block:()=>rm,factory_block_return:()=>lm,factory_block_return_with_textarea:()=>Im,factory_block_with_textarea:()=>dm,factory_callMethod_noreturn:()=>pm,factory_callMethod_return:()=>um,factory_create_with_container:()=>sm,factory_create_with_item:()=>_m,factory_declare:()=>am,factory_from_import:()=>em,factory_function_noreturn:()=>nm,factory_function_return:()=>om,factory_import:()=>im,folding_block:()=>Tm});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>bm,inout_analog_atten:()=>Sm,inout_analog_read:()=>Cm,inout_analog_read_init:()=>Fm,inout_analog_write:()=>Rm,inout_analog_write_init:()=>fm,inout_analog_write_set:()=>cm,inout_analog_write_set_freq:()=>Ym,inout_digital_init:()=>Nm,inout_digital_read:()=>Em,inout_digital_write:()=>mm,inout_highlow:()=>hm,inout_pinMode:()=>vm,inout_pin_attachInterrupt:()=>Lm,inout_pin_pressed:()=>Am,inout_pin_pressed_init:()=>Pm,inout_pwm_analog_write:()=>Om,inout_pwm_analog_write_init:()=>Dm,inout_pwm_analog_write_set_freq:()=>gm,pin_pressed:()=>xm,pin_pressed_init:()=>Xm});var B={};t.r(B),t.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>oE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>_E,IOT_EMQX_PING:()=>nE,IOT_FORMATTING:()=>eE,IOT_FORMAT_STRING:()=>iE,IOT_MIXIO_NTP:()=>sE,IOT_MIXIO_PUBLISH:()=>Qm,IOT_MIXIO_SUBSCRIBE:()=>qm,iot_checkonenet:()=>hE,iot_client_onboard:()=>pE,iot_create_with_item:()=>Km,iot_http_client:()=>uE,iot_http_data:()=>rE,iot_mixio_check:()=>Zm,iot_mixio_connect:()=>Jm,iot_mixio_connect_only:()=>jm,iot_mixio_disconnect:()=>zm,iot_mixio_format_msg:()=>tE,iot_mixio_format_topic:()=>$m,iot_mixly_key:()=>aE,iot_mqtt_client:()=>lE,iot_mqtt_data:()=>dE,iot_onenet_check:()=>Um,iot_onenet_connect:()=>Bm,iot_onenet_disconnect:()=>Gm,iot_onenet_publish:()=>km,iot_onenet_publish_dict:()=>wm,iot_onenetconnect:()=>TE,iot_onenetdisconnect:()=>ME,iot_publish:()=>mE,iot_publish_container:()=>Hm,iot_publish_item:()=>Wm,iot_wifi_connect:()=>Vm,iot_wificonnect:()=>IE});var G={};t.r(G),t.d(G,{network_ap_connect:()=>DE,network_connect:()=>CE,network_get_connect:()=>AE,network_get_wifi:()=>NE,network_init:()=>OE,network_is_active:()=>cE,network_open:()=>RE,network_scan:()=>gE,network_server:()=>fE,network_socket_accept:()=>XE,network_socket_bind:()=>PE,network_socket_close:()=>BE,network_socket_connect:()=>vE,network_socket_init:()=>FE,network_socket_listen:()=>YE,network_socket_receive:()=>xE,network_socket_receive_from:()=>yE,network_socket_send:()=>bE,network_socket_send_to:()=>VE,network_stop:()=>LE,network_wifi_connect:()=>SE,ntptime_address:()=>HE,ntptime_time:()=>kE,requests_attribute:()=>UE,requests_attribute2:()=>QE,requests_get:()=>GE,requests_get2:()=>KE,requests_method:()=>wE,requests_post:()=>JE});var U={};t.r(U),t.d(U,{HCSR04:()=>qO,PS2_Button:()=>$O,PS2_Buttons:()=>eR,PS2_Buttons_new:()=>_R,PS2_State:()=>tR,PS2_init:()=>zO,PS2_init_new:()=>nR,PS2_stk:()=>iR,PS2_stk_new:()=>oR,PS2_vibration:()=>ZO,PS2_vibration_new:()=>sR,esp32_s2_weather_init:()=>WO,esp32_s2_weather_rain:()=>JO,esp32_s2_weather_wd:()=>KO,esp32_s2_weather_ws:()=>QO,extern_rfid_read:()=>PO,extern_rfid_readcontent:()=>YO,extern_rfid_readid:()=>vO,extern_rfid_status:()=>bO,extern_rfid_write:()=>XO,extern_rfid_write_return:()=>xO,gnss_get_data:()=>rR,gnss_have_data:()=>uR,mixbot_sensor_extern_get_addr:()=>mR,mixbot_sensor_extern_set_addr:()=>ER,pm25_get_data:()=>pR,robot_button_extern_get_value:()=>lR,robot_color_extern_get_value:()=>hR,robot_infrared_extern_get_value:()=>IR,robot_infrared_extern_grey_get_value:()=>TR,robot_potentiometer_extern_get_value:()=>MR,robot_sonar_extern_get_value:()=>OR,robot_sonar_extern_led:()=>RR,robot_touch_extern_get_value:()=>dR,sensor_APDS9960_extern:()=>IO,sensor_DS18X20:()=>uO,sensor_LTR308_extern:()=>TO,sensor_LTR390UV_extern:()=>hO,sensor_MAX30102_extern:()=>dO,sensor_QMC5883L_extern:()=>cO,sensor_VL530LX_extern:()=>mO,sensor_adxl345_get_acceleration:()=>eO,sensor_aht11_extern:()=>OO,sensor_bmp:()=>aO,sensor_compass_reset:()=>fO,sensor_dht11:()=>nO,sensor_hp203_extern:()=>RO,sensor_light_level:()=>iO,sensor_lm35:()=>rO,sensor_ltr381_extern:()=>MO,sensor_mixgo_extern_button_attachInterrupt:()=>$E,sensor_mixgo_extern_button_get_presses:()=>ZE,sensor_mixgo_extern_button_is_pressed:()=>zE,sensor_mixgo_extern_button_was_pressed:()=>jE,sensor_mixgo_extern_light:()=>sO,sensor_mixgo_extern_pin_near:()=>oO,sensor_mixgo_extern_sound:()=>_O,sensor_mixgoce_hot_wheel_degrees:()=>HO,sensor_mixgoce_hot_wheel_is_touched:()=>kO,sensor_mpu9250_attachGestureInterrupt:()=>tO,sensor_mpu9250_calibrate_compass:()=>LO,sensor_mpu9250_field_strength:()=>DO,sensor_mpu9250_gesture:()=>gO,sensor_mpu9250_get_acceleration:()=>CO,sensor_mpu9250_get_gyro:()=>AO,sensor_mpu9250_get_magnetic:()=>SO,sensor_mpu9250_temperature:()=>NO,sensor_sht:()=>pO,sensor_shtc3_extern:()=>EO,sensor_use_i2c_init:()=>lO,sensor_use_spi_init:()=>FO,sensor_use_uart_init:()=>aR,sensor_weather_solo_init:()=>cR,sensor_weather_solo_rain:()=>SR,sensor_weather_solo_wd:()=>gR,sensor_weather_solo_ws:()=>CR,weather_data:()=>yO,weather_have_data:()=>VO,weather_set_label:()=>GO,weather_set_label_container:()=>UO,weather_set_label_item:()=>wO,weather_uart_mixio:()=>BO});var w={};t.r(w),t.d(w,{HCSR04:()=>UR,RTC_set_date:()=>GR,RTC_set_time:()=>BR,bitbot_als_num:()=>Jc,dht11:()=>tg,number1:()=>kR,number2:()=>HR,number3:()=>WR,number4:()=>KR,number5:()=>JR,number6:()=>QR,number7:()=>qR,onboard_RTC_get_time:()=>ic,onboard_RTC_get_time_str:()=>pc,onboard_RTC_get_timestamp:()=>nc,onboard_RTC_set_datetime:()=>oc,onboard_RTC_settime_string:()=>_c,onboard_RTC_timestamp_totuple:()=>sc,rfid_readcontent:()=>Mc,rfid_readid:()=>Tc,rfid_write:()=>hc,rfid_write_return:()=>mc,sensor_LTR308:()=>uc,sensor_aht11:()=>lc,sensor_bitbot_ALS:()=>Kc,sensor_button_get_presses:()=>zc,sensor_button_is_pressed:()=>Qc,sensor_button_was_pressed:()=>qc,sensor_distance_hrsc04:()=>VR,sensor_eulerangles:()=>Oc,sensor_field_strength:()=>eg,sensor_get_acceleration:()=>Ec,sensor_get_temperature:()=>dc,sensor_hp203:()=>Ic,sensor_light:()=>$c,sensor_mixbot_get_gyro:()=>Wc,sensor_mixbot_patrol_calibrate:()=>wc,sensor_mixbot_patrol_value:()=>kc,sensor_mixbot_temperature:()=>Hc,sensor_mixgo_LTR308:()=>ec,sensor_mixgo_button_attachInterrupt:()=>fR,sensor_mixgo_button_get_presses:()=>DR,sensor_mixgo_button_is_pressed:()=>LR,sensor_mixgo_button_was_pressed:()=>NR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Fc,sensor_mixgo_cc_mmc5603_get_angle:()=>fc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Dc,sensor_mixgo_light:()=>wR,sensor_mixgo_nova_LTR308:()=>tc,sensor_mixgo_nova_pin_near:()=>$R,sensor_mixgo_pin_near:()=>ZR,sensor_mixgo_pin_near_double:()=>jR,sensor_mixgo_pin_near_single:()=>zR,sensor_mixgo_pin_pressed:()=>XR,sensor_mixgo_touch_slide:()=>yR,sensor_mixgocar42_button_attachInterrupt:()=>YR,sensor_mixgocar42_button_get_presses:()=>vR,sensor_mixgocar42_button_is_pressed:()=>FR,sensor_mixgocar42_button_was_pressed:()=>PR,sensor_mixgocar_battery_left:()=>Uc,sensor_mixgocar_pin_near:()=>Bc,sensor_mixgocar_pin_near_line:()=>Vc,sensor_mixgocar_pin_near_state_change:()=>Gc,sensor_mixgoce_pin_pressed:()=>xR,sensor_mixgoce_temperature:()=>vc,sensor_mixgome_temperature:()=>Pc,sensor_mpython_pin_pressed:()=>bR,sensor_mpython_qmi8658_get_gyro:()=>Yc,sensor_mpython_qmi8658_temperature:()=>Xc,sensor_onboard_compass_reset:()=>Nc,sensor_onboard_mpu9250_calibrate_compass:()=>Sc,sensor_onboard_mpu9250_field_strength:()=>Lc,sensor_onboard_mpu9250_gesture:()=>Rc,sensor_onboard_mpu9250_get_acceleration:()=>cc,sensor_onboard_mpu9250_get_gyro:()=>Cc,sensor_onboard_mpu9250_get_magnetic:()=>gc,sensor_onboard_mpu9250_temperature:()=>Ac,sensor_pin_near:()=>Zc,sensor_pin_pressed:()=>jc,sensor_rm_acc:()=>yc,sensor_rm_battery_left:()=>bc,sensor_rm_pin_near_double:()=>xc,sensor_rtc_init:()=>ac,sensor_sound:()=>rc,sensor_temperature:()=>ig});var k={};t.r(k),t.d(k,{serial_any:()=>rg,serial_begin:()=>Mg,serial_print:()=>_g,serial_print_byte:()=>sg,serial_print_hex:()=>ag,serial_println:()=>og,serial_read_from_ai:()=>Sg,serial_readline:()=>lg,serial_readstr:()=>ug,serial_readstr_until:()=>dg,serial_receive_data_event:()=>pg,serial_send_to_ai:()=>Cg,serial_softserial:()=>Tg,serial_softserial_new:()=>Ig,system_input:()=>hg,system_print:()=>mg,system_print_container:()=>cg,system_print_end:()=>Og,system_print_inline:()=>Eg,system_print_item:()=>gg,system_print_many:()=>Rg});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>Dg,Timer_init:()=>Ug,base_delay:()=>Hg,controls_delay:()=>Ng,controls_delay_new:()=>Lg,controls_millis:()=>Fg,controls_uname:()=>vg,raw_block:()=>Pg,reset:()=>fg,system_bitbot_shutdown:()=>Gg,system_machine_reset:()=>Bg,system_ticks_diff:()=>xg,system_timer:()=>Xg,system_timer_init:()=>bg,system_wdt_feed:()=>Vg,system_wdt_init:()=>yg,time_ticks_diff:()=>kg,timer:()=>Yg,timer2:()=>wg});var W={};t.r(W),t.d(W,{Air_daily_content:()=>sC,Air_now_content:()=>jg,Geo_moon_content:()=>oC,Geo_sun_content:()=>_C,Life_suggestion_content:()=>$g,Location_search_content:()=>eC,Tide_daily_content:()=>tC,WEATHER_DAILY:()=>Jg,WEATHER_HOUR:()=>Qg,WEATHER_NOW:()=>Kg,Weather_alarm_content:()=>Zg,Weather_daily:()=>iC,Weather_daily_content:()=>nC,Weather_now:()=>qg,Weather_now_content:()=>zg});var K={};t.r(K),t.d(K,{actuator_extern_get_led_bright:()=>LC,actuator_extern_get_led_state:()=>NC,actuator_extern_led_bright:()=>AC,actuator_extern_led_brightness:()=>DC,actuator_ms32006_dcmotor:()=>TC,actuator_ms32006_init:()=>IC,actuator_ms32006_stepper:()=>MC,actuator_neopixel_init:()=>fC,actuator_neopixel_rgb:()=>vC,actuator_neopixel_rgb_all:()=>FC,actuator_neopixel_write:()=>PC,actuator_use_uart_init:()=>YC,esp32_music_get_tempo_extern:()=>cC,esp32_music_pitch:()=>mC,esp32_music_pitch_init:()=>hC,esp32_music_pitch_with_time:()=>EC,esp32_music_play_list:()=>gC,esp32_music_reset_extern:()=>CC,esp32_music_set_tempo_extern:()=>RC,esp32_music_stop:()=>OC,mixbot_actuator_extern_get_addr:()=>jC,mixbot_actuator_extern_set_addr:()=>ZC,mixbot_addr_extern:()=>VC,robot_led_extern:()=>wC,robot_led_extern_get_value:()=>kC,robot_motor_extern:()=>BC,robot_motor_extern_get_speed:()=>GC,robot_servo_extern_absolute_run:()=>JC,robot_servo_extern_get_status:()=>HC,robot_servo_extern_relative_continue:()=>zC,robot_servo_extern_relative_origin:()=>QC,robot_servo_extern_relative_run:()=>qC,robot_servo_extern_stop:()=>KC,robot_servo_extern_stop_mode:()=>WC,robot_traffic_light_extern:()=>UC,servo_get_angle:()=>lC,servo_get_speed:()=>dC,servo_init:()=>aC,servo_move:()=>SC,servo_set_angle:()=>uC,servo_set_speed:()=>rC,servo_speed_360:()=>pC,syn6288_builtin_voice:()=>bC,syn6288_get_voice:()=>xC,syn6288_set_voice:()=>XC,syn6288_tts_play:()=>yC});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>LS,actuator_dc_motor_stop:()=>NS,actuator_get_led_bright:()=>uS,actuator_get_led_state:()=>rS,actuator_led_bright:()=>pS,actuator_led_brightness:()=>lS,actuator_mixbot_buzzer_on_off:()=>vS,actuator_mixgo_nova_mic_get:()=>yS,actuator_mixgo_nova_mic_set:()=>bS,actuator_mixgo_nova_onboard_music_pitch:()=>kS,actuator_mixgo_nova_onboard_music_stop:()=>HS,actuator_mixgo_nova_play_audio:()=>US,actuator_mixgo_nova_play_online_audio:()=>wS,actuator_mixgo_nova_record_audio:()=>GS,actuator_mixgo_nova_voice_get:()=>BS,actuator_mixgo_nova_voice_set:()=>VS,actuator_mixgo_zero_led_color:()=>dS,actuator_onboard_neopixel_rgb:()=>OS,actuator_onboard_neopixel_rgb_all:()=>RS,actuator_onboard_neopixel_rgb_show_all_chase:()=>cS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>gS,actuator_onboard_neopixel_write:()=>ES,actuator_stepper_keep:()=>SS,actuator_stepper_stop:()=>AS,analog_ble_keyboard_init:()=>eA,analog_ble_keyboard_input:()=>sA,analog_ble_keyboard_send_battery:()=>oA,analog_ble_keyboard_str:()=>_A,analog_ble_mouse_init:()=>aA,analog_ble_mouse_input:()=>rA,analog_ble_mouse_send_battery:()=>lA,analog_keyboard_input:()=>QS,analog_keyboard_str:()=>$S,analog_mouse_input:()=>jS,bitbot_motor:()=>xS,bitbot_move:()=>YS,bitbot_stop:()=>XS,ble_keyboard_connect:()=>nA,ble_keyboard_get_mac:()=>iA,ble_mouse_connect:()=>uA,ble_mouse_get_mac:()=>pA,cc_number:()=>IS,esp32_music_get_tempo:()=>tS,esp32_music_reset:()=>_S,esp32_music_set_tempo:()=>$C,esp32_onboard_music_pitch:()=>eS,esp32_onboard_music_pitch_with_time:()=>iS,esp32_onboard_music_play_list:()=>sS,esp32_onboard_music_stop:()=>nS,general_key:()=>zS,general_key_tuple:()=>tA,get_power_output:()=>KS,ledswitch:()=>aS,mixbot_motor:()=>PS,mixbot_motor_status:()=>DS,mixbot_move:()=>fS,mixbot_stop:()=>FS,mouse_key:()=>ZS,number:()=>oS,rm_actuator_get_led_bright:()=>MS,rm_actuator_get_led_state:()=>hS,rm_actuator_led_bright:()=>TS,rm_actuator_led_brightness:()=>mS,rm_motor:()=>CS,set_all_power_output:()=>JS,set_power_output:()=>WS,special_key:()=>qS});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>HA,ai_sensor_ailocal_class:()=>YA,ai_sensor_ailocal_class_result:()=>XA,ai_sensor_ailocal_train:()=>vA,ai_sensor_asr_recognize:()=>BA,ai_sensor_audio_play:()=>bA,ai_sensor_audio_record:()=>xA,ai_sensor_barcode:()=>EA,ai_sensor_circle:()=>SA,ai_sensor_classifier_faces:()=>kA,ai_sensor_color:()=>DA,ai_sensor_color_chases:()=>PA,ai_sensor_color_chases_result:()=>FA,ai_sensor_config:()=>TA,ai_sensor_face:()=>wA,ai_sensor_find_20objects:()=>WA,ai_sensor_find_barcodes:()=>OA,ai_sensor_find_circles:()=>AA,ai_sensor_find_colors:()=>fA,ai_sensor_find_licenseplates:()=>UA,ai_sensor_find_lines:()=>CA,ai_sensor_find_qrcodes:()=>mA,ai_sensor_find_rects:()=>NA,ai_sensor_find_tags:()=>cA,ai_sensor_licenseplate:()=>GA,ai_sensor_line:()=>gA,ai_sensor_qrcode:()=>hA,ai_sensor_qrcode_lite:()=>IA,ai_sensor_rect:()=>LA,ai_sensor_rgb:()=>MA,ai_sensor_tag:()=>RA,ai_sensor_use_uart_init:()=>dA,ai_sensor_yolo_recognize:()=>yA,ai_sensor_yolo_recognize_result:()=>VA});var q={};t.r(q),t.d(q,{MICROPYTHON_AI_Speech_asr:()=>QA,MICROPYTHON_AI_Speech_unit:()=>JA,MICROPYTHON_AI_client:()=>KA});var z={};t.r(z),t.d(z,{mpython_blynk_app_data:()=>oL,mpython_blynk_app_notify:()=>eL,mpython_blynk_email:()=>aL,mpython_blynk_get_timers:()=>nL,mpython_blynk_on_connected:()=>ZA,mpython_blynk_on_disconnected:()=>jA,mpython_blynk_run:()=>tL,mpython_blynk_sensor_data_to_app:()=>_L,mpython_blynk_set_property:()=>pL,mpython_blynk_setup:()=>uL,mpython_blynk_stop_timers:()=>iL,mpython_blynk_sync_virtual:()=>zA,mpython_blynk_terminal_widget_vpin:()=>qA,mpython_blynktimer:()=>sL,mpython_blynktimer_run:()=>$A});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>rL,cc_g1_read_joystick:()=>lL,cc_g1_read_key:()=>dL,cc_g1_turnoff:()=>IL});var Z={};t.r(Z),t.d(Z,{ce_go_dc_motor:()=>cL,ce_go_get_led_bright:()=>hL,ce_go_get_led_state:()=>mL,ce_go_hall_attachInterrupt:()=>gL,ce_go_hall_data:()=>SL,ce_go_hall_initialize:()=>CL,ce_go_led_bright:()=>ML,ce_go_led_brightness:()=>EL,ce_go_light_number:()=>TL,ce_go_pin_light:()=>fL,ce_go_pin_near:()=>LL,ce_go_pin_near_line:()=>AL,ce_go_pin_near_state_change:()=>NL,ce_go_stepper_keep:()=>OL,ce_go_stepper_stop:()=>RL,sensor_mixgome_eulerangles:()=>DL});var $={};t.r($),t.d($,{communicate_bluetooth_central_init:()=>rN,communicate_bluetooth_connect:()=>IN,communicate_bluetooth_disconnect:()=>TN,communicate_bluetooth_handle:()=>RN,communicate_bluetooth_is_connected:()=>hN,communicate_bluetooth_mac:()=>MN,communicate_bluetooth_peripheral_init:()=>lN,communicate_bluetooth_recv:()=>ON,communicate_bluetooth_recv_only:()=>EN,communicate_bluetooth_scan:()=>dN,communicate_bluetooth_send:()=>mN,communicate_espnow_init:()=>cN,communicate_espnow_init_new:()=>gN,communicate_i2c_available:()=>yL,communicate_i2c_init:()=>vL,communicate_i2c_master_read:()=>bL,communicate_i2c_onboard:()=>FL,communicate_i2c_read:()=>YL,communicate_i2c_scan:()=>xL,communicate_i2c_write:()=>XL,communicate_ir_recv_init:()=>tN,communicate_ir_send_init:()=>_N,communicate_ow_init:()=>QL,communicate_ow_read:()=>jL,communicate_ow_reset:()=>zL,communicate_ow_scan:()=>qL,communicate_ow_select:()=>$L,communicate_ow_write:()=>ZL,communicate_spi_buffer:()=>UL,communicate_spi_init:()=>BL,communicate_spi_onboard:()=>PL,communicate_spi_read:()=>wL,communicate_spi_read_output:()=>kL,communicate_spi_readinto:()=>HL,communicate_spi_readinto_output:()=>WL,communicate_spi_set:()=>GL,communicate_spi_write:()=>KL,communicate_spi_write_readinto:()=>JL,espnow_radio_channel:()=>DN,espnow_radio_channel_new:()=>FN,espnow_radio_on_off:()=>PN,espnow_radio_rec:()=>YN,espnow_radio_recv:()=>xN,espnow_radio_recv_certain_msg:()=>bN,espnow_radio_recv_certain_msg_new:()=>VN,espnow_radio_recv_msg:()=>XN,espnow_radio_recv_new:()=>yN,espnow_radio_send:()=>vN,espnow_radio_txpower:()=>fN,i2c_slave_onreceive:()=>VL,internal_variable:()=>eN,ir_recv_timeout:()=>sN,ir_transmit_busy:()=>uN,ir_transmit_conventional_data:()=>oN,ir_transmit_raw_code:()=>pN,ir_transmit_study_code:()=>aN,ir_whether_recv:()=>nN,lora_init:()=>BN,lora_packet:()=>GN,lora_recv:()=>wN,lora_send:()=>UN,network_espnow_info:()=>SN,network_espnow_mac:()=>CN,network_espnow_recv:()=>AN,network_espnow_recv_handle:()=>NN,network_espnow_send:()=>LN,recv_fun:()=>iN,urequests_attribute:()=>HN,urequests_get:()=>kN,urequests_method:()=>WN});var tt={};t.r(tt),t.d(tt,{display_animate:()=>hD,display_circle:()=>mD,display_color_seclet:()=>DD,display_draw_4strings:()=>uD,display_fill:()=>MD,display_lcd_use_i2c_init:()=>XD,display_line:()=>dD,display_line_arbitrarily:()=>rD,display_matrix_extern_bright_point:()=>iD,display_matrix_extern_bright_screen:()=>sD,display_matrix_extern_clear:()=>$N,display_matrix_extern_get_pixel:()=>eD,display_matrix_extern_get_screen_pixel:()=>nD,display_matrix_extern_image_builtins:()=>_D,display_matrix_extern_scroll_string:()=>jN,display_matrix_extern_scroll_string_delay:()=>ZN,display_matrix_extern_shift:()=>tD,display_matrix_extern_show_frame_string:()=>qN,display_matrix_extern_show_frame_string_delay:()=>zN,display_matrix_extern_show_image:()=>JN,display_matrix_extern_show_image_or_string_delay:()=>QN,display_matrix_use_i2c_init:()=>KN,display_oled_drawPixel:()=>RD,display_oled_showBitmap:()=>OD,display_oled_use_i2c_init:()=>BD,display_onoff:()=>ID,display_rect:()=>lD,display_tm1650_power:()=>gD,display_tm1650_set_brightness:()=>AD,display_tm1650_show_dot:()=>SD,display_tm1650_show_num:()=>CD,display_tm_use_i2c_init:()=>cD,display_triangle:()=>ED,display_use_i2c_init:()=>pD,extern_oled_bright_point:()=>jD,extern_oled_clear:()=>QD,extern_oled_get_pixel:()=>zD,extern_oled_hvline:()=>$D,extern_oled_line:()=>tf,extern_oled_scroll_string:()=>KD,extern_oled_scroll_string_delay:()=>JD,extern_oled_shape_rect:()=>ZD,extern_oled_shift:()=>qD,extern_oled_show_frame_string:()=>HD,extern_oled_show_frame_string_delay:()=>WD,extern_oled_show_image:()=>GD,extern_oled_show_image_or_string_delay:()=>kD,extern_oled_show_image_xy:()=>UD,extern_oled_show_string:()=>wD,image_shift:()=>TD,lcd_backlight:()=>yD,lcd_clear:()=>VD,lcd_print_string:()=>bD,lcd_show_image_or_string_delay:()=>xD,matrix_extern_image_arithmetic:()=>oD,matrix_extern_image_invert:()=>aD,tft_fill:()=>vD,tft_line_arbitrarily:()=>YD,tft_scroll_string_delay:()=>PD,tft_show_frame_string_delay:()=>FD,tft_show_image_or_string_delay:()=>fD,tft_show_image_xy:()=>ND,tft_use_spi_init:()=>LD});var et={};t.r(et),t.d(et,{bitbot_display_image_create:()=>Bf,display_bright_point:()=>hf,display_bright_screen:()=>Ef,display_clear:()=>lf,display_get_pixel:()=>Mf,display_get_screen_pixel:()=>mf,display_image_builtins:()=>pf,display_image_builtins_all:()=>uf,display_image_create:()=>rf,display_scroll_string:()=>of,display_scroll_string_delay:()=>af,display_shift:()=>Tf,display_show_frame_string:()=>sf,display_show_frame_string_delay:()=>_f,display_show_image:()=>ef,display_show_image_or_string_delay:()=>nf,draw_pointer:()=>uF,image_arithmetic:()=>df,image_invert:()=>If,mixbot_display_bright_screen:()=>yf,mixbot_display_get_ambientbright:()=>bf,mixbot_display_get_screen_pixel:()=>xf,mixbot_display_image_create:()=>Xf,mixbot_display_rotate:()=>Vf,mixgo_display_image_create_new:()=>gf,mixgome_display_font:()=>cf,mixgome_display_image_create:()=>Of,mixgomini_display_image_create:()=>Rf,mpython_display_hvline:()=>vf,mpython_display_line:()=>Yf,mpython_display_shape_rect:()=>Pf,mpython_pbm_image:()=>Cf,onboard_oled_bright_point:()=>Ff,onboard_oled_scroll_string_delay:()=>ff,onboard_oled_show_frame_string_delay:()=>Df,onboard_oled_show_image:()=>Sf,onboard_oled_show_image_or_string_delay:()=>Nf,onboard_oled_show_image_xy:()=>Af,onboard_oled_show_string:()=>Lf,onboard_tft_bright_point:()=>$f,onboard_tft_bright_screen:()=>eF,onboard_tft_clear:()=>zf,onboard_tft_clock_clear:()=>aF,onboard_tft_clock_draw:()=>oF,onboard_tft_clock_get_rtctime:()=>sF,onboard_tft_clock_init:()=>nF,onboard_tft_clock_set_time:()=>_F,onboard_tft_display_hvline:()=>Qf,onboard_tft_display_line:()=>qf,onboard_tft_display_shape_circle:()=>pF,onboard_tft_display_shape_rect:()=>Jf,onboard_tft_fill:()=>iF,onboard_tft_get_pixel:()=>Zf,onboard_tft_get_screen_pixel:()=>tF,onboard_tft_scroll_string:()=>Wf,onboard_tft_scroll_string_delay:()=>Kf,onboard_tft_shift:()=>jf,onboard_tft_show_frame_string:()=>kf,onboard_tft_show_frame_string_delay:()=>Hf,onboard_tft_show_image:()=>Gf,onboard_tft_show_image_or_string_delay:()=>wf,onboard_tft_show_image_xy:()=>Uf});var it={};t.r(it),t.d(it,{factory_block:()=>mF,factory_block_return:()=>EF,factory_block_return_with_textarea:()=>RF,factory_block_with_textarea:()=>OF,factory_callMethod_noreturn:()=>MF,factory_callMethod_return:()=>hF,factory_declare:()=>TF,factory_from_import:()=>rF,factory_function_noreturn:()=>dF,factory_function_return:()=>IF,factory_import:()=>lF,folding_block:()=>cF});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>bF,inout_analog_read:()=>fF,inout_analog_read_init:()=>xF,inout_analog_write:()=>LF,inout_analog_write_init:()=>XF,inout_analog_write_set:()=>NF,inout_digital_init:()=>vF,inout_digital_read:()=>SF,inout_digital_write:()=>CF,inout_highlow:()=>gF,inout_pin_attachInterrupt:()=>PF,inout_pin_pressed:()=>FF,inout_pin_pressed_init:()=>yF,inout_pwm_analog_write:()=>AF,inout_pwm_analog_write_init:()=>YF,inout_pwm_analog_write_set_freq:()=>DF});var st={};t.r(st),t.d(st,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>iP,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>tP,IOT_EMQX_PING:()=>nP,IOT_FORMATTING:()=>ZF,IOT_FORMAT_STRING:()=>$F,IOT_MIXIO_NTP:()=>sP,IOT_MIXIO_PUBLISH:()=>WF,IOT_MIXIO_SUBSCRIBE:()=>KF,iot_client_onboard:()=>_P,iot_http_client:()=>oP,iot_http_data:()=>aP,iot_mixio_check:()=>qF,iot_mixio_connect:()=>HF,iot_mixio_connect_only:()=>QF,iot_mixio_disconnect:()=>JF,iot_mixio_format_msg:()=>jF,iot_mixio_format_topic:()=>zF,iot_mixly_key:()=>eP,iot_mqtt_client:()=>pP,iot_mqtt_data:()=>uP,iot_onenet_check:()=>wF,iot_onenet_connect:()=>BF,iot_onenet_disconnect:()=>GF,iot_onenet_publish:()=>kF,iot_onenet_publish_dict:()=>UF,iot_wifi_connect:()=>VF});var _t={};t.r(_t),t.d(_t,{network_ap_connect:()=>EP,network_connect:()=>lP,network_get_connect:()=>IP,network_get_wifi:()=>mP,network_init:()=>rP,network_is_active:()=>hP,network_open:()=>MP,network_scan:()=>OP,network_server:()=>RP,network_socket_accept:()=>AP,network_socket_bind:()=>gP,network_socket_close:()=>FP,network_socket_connect:()=>CP,network_socket_init:()=>cP,network_socket_listen:()=>SP,network_socket_receive:()=>LP,network_socket_receive_from:()=>DP,network_socket_send:()=>NP,network_socket_send_to:()=>fP,network_stop:()=>TP,network_wifi_connect:()=>dP,ntptime_address:()=>xP,ntptime_time:()=>XP,requests_attribute:()=>vP,requests_attribute2:()=>yP,requests_get:()=>PP,requests_get2:()=>bP,requests_method:()=>YP,requests_post:()=>VP});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>Nv,PS2_Button:()=>Fv,PS2_Buttons:()=>Pv,PS2_Buttons_new:()=>Bv,PS2_State:()=>vv,PS2_init:()=>Dv,PS2_init_new:()=>yv,PS2_stk:()=>Yv,PS2_stk_new:()=>Gv,PS2_vibration:()=>fv,PS2_vibration_new:()=>Vv,RTC_get_time:()=>xv,RTC_set_date:()=>KP,RTC_set_datetime:()=>Xv,RTC_set_time:()=>WP,esp32_s2_weather_init:()=>Cv,esp32_s2_weather_rain:()=>Av,esp32_s2_weather_wd:()=>Sv,esp32_s2_weather_ws:()=>Lv,extern_rfid_read:()=>lv,extern_rfid_readcontent:()=>Iv,extern_rfid_readid:()=>dv,extern_rfid_status:()=>hv,extern_rfid_write:()=>Tv,extern_rfid_write_return:()=>Mv,gnss_get_data:()=>kv,gnss_have_data:()=>Hv,mixbot_sensor_extern_get_addr:()=>$v,mixbot_sensor_extern_set_addr:()=>tY,pm25_get_data:()=>wv,robot_button_extern_get_value:()=>Wv,robot_color_extern_get_value:()=>zv,robot_infrared_extern_get_value:()=>Jv,robot_infrared_extern_grey_get_value:()=>Qv,robot_potentiometer_extern_get_value:()=>qv,robot_sonar_extern_get_value:()=>jv,robot_sonar_extern_led:()=>Zv,robot_touch_extern_get_value:()=>Kv,sensor_APDS9960_extern:()=>ev,sensor_DS18X20:()=>_Y,sensor_LTR308_extern:()=>iv,sensor_LTR390UV_extern:()=>_v,sensor_MAX30102_extern:()=>tv,sensor_QMC5883L_extern:()=>ov,sensor_VL530LX_extern:()=>uv,sensor_aht11_extern:()=>pv,sensor_bmp:()=>jP,sensor_dht11:()=>bv,sensor_distance_hrsc04:()=>HP,sensor_hp203_extern:()=>nv,sensor_ltr381_extern:()=>sv,sensor_mixgo_extern_button_attachInterrupt:()=>wP,sensor_mixgo_extern_button_get_presses:()=>UP,sensor_mixgo_extern_button_is_pressed:()=>BP,sensor_mixgo_extern_button_was_pressed:()=>GP,sensor_mixgo_extern_light:()=>JP,sensor_mixgo_extern_pin_near:()=>qP,sensor_mixgo_extern_sound:()=>QP,sensor_mixgoce_hot_wheel_degrees:()=>gv,sensor_mixgoce_hot_wheel_is_touched:()=>cv,sensor_mpu9250_attachGestureInterrupt:()=>kP,sensor_rtc_init:()=>zP,sensor_sht:()=>ZP,sensor_shtc3_extern:()=>av,sensor_use_i2c_init:()=>$P,sensor_use_spi_init:()=>rv,sensor_use_uart_init:()=>Uv,sensor_weather_solo_init:()=>eY,sensor_weather_solo_rain:()=>sY,sensor_weather_solo_wd:()=>iY,sensor_weather_solo_ws:()=>nY,weather_data:()=>mv,weather_have_data:()=>Ev,weather_set_label:()=>Rv,weather_uart_mixio:()=>Ov});var at={};t.r(at),t.d(at,{HCSR04:()=>TY,bitbot_als_num:()=>YX,dht11:()=>UX,number1:()=>MY,number2:()=>hY,number3:()=>mY,number4:()=>EY,number5:()=>OY,number6:()=>RY,number7:()=>cY,onboard_RTC_get_time:()=>rX,onboard_RTC_get_time_str:()=>IX,onboard_RTC_get_timestamp:()=>lX,onboard_RTC_set_datetime:()=>pX,onboard_RTC_settime_string:()=>uX,onboard_RTC_timestamp_totuple:()=>dX,rfid_readcontent:()=>bY,rfid_readid:()=>xY,rfid_write:()=>yY,rfid_write_return:()=>VY,sensor_LTR308:()=>FY,sensor_adxl345_get_acceleration:()=>JY,sensor_aht11:()=>YY,sensor_bitbot_ALS:()=>vX,sensor_button_get_presses:()=>bX,sensor_button_is_pressed:()=>XX,sensor_button_was_pressed:()=>xX,sensor_compass_reset:()=>$Y,sensor_ds18x20:()=>DY,sensor_eulerangles:()=>GY,sensor_get_acceleration:()=>BY,sensor_get_temperature:()=>XY,sensor_hp203:()=>vY,sensor_light:()=>GX,sensor_lm35:()=>fY,sensor_mixbot_get_gyro:()=>PX,sensor_mixbot_patrol_calibrate:()=>DX,sensor_mixbot_patrol_value:()=>fX,sensor_mixbot_temperature:()=>FX,sensor_mixgo_LTR308:()=>LY,sensor_mixgo_button_attachInterrupt:()=>uY,sensor_mixgo_button_get_presses:()=>pY,sensor_mixgo_button_is_pressed:()=>oY,sensor_mixgo_button_was_pressed:()=>aY,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>hX,sensor_mixgo_cc_mmc5603_get_angle:()=>MX,sensor_mixgo_cc_mmc5603_get_magnetic:()=>TX,sensor_mixgo_light:()=>BX,sensor_mixgo_nova_LTR308:()=>NY,sensor_mixgo_nova_pin_near:()=>AY,sensor_mixgo_pin_near:()=>SY,sensor_mixgo_pin_near_double:()=>CY,sensor_mixgo_pin_near_single:()=>gY,sensor_mixgo_pin_pressed:()=>WY,sensor_mixgo_touch_slide:()=>HY,sensor_mixgocar42_button_attachInterrupt:()=>IY,sensor_mixgocar42_button_get_presses:()=>dY,sensor_mixgocar42_button_is_pressed:()=>rY,sensor_mixgocar42_button_was_pressed:()=>lY,sensor_mixgocar_battery_left:()=>NX,sensor_mixgocar_pin_near:()=>AX,sensor_mixgocar_pin_near_line:()=>SX,sensor_mixgocar_pin_near_state_change:()=>LX,sensor_mixgoce_pin_pressed:()=>kY,sensor_mixgoce_temperature:()=>EX,sensor_mixgome_temperature:()=>mX,sensor_mpu9250_calibrate_compass:()=>zY,sensor_mpu9250_field_strength:()=>ZY,sensor_mpu9250_gesture:()=>UY,sensor_mpu9250_get_acceleration:()=>wY,sensor_mpu9250_get_gyro:()=>qY,sensor_mpu9250_get_magnetic:()=>QY,sensor_mpu9250_temperature:()=>jY,sensor_mpython_pin_pressed:()=>KY,sensor_mpython_qmi8658_get_gyro:()=>OX,sensor_mpython_qmi8658_temperature:()=>RX,sensor_onboard_compass_reset:()=>aX,sensor_onboard_mpu9250_calibrate_compass:()=>sX,sensor_onboard_mpu9250_field_strength:()=>oX,sensor_onboard_mpu9250_gesture:()=>tX,sensor_onboard_mpu9250_get_acceleration:()=>eX,sensor_onboard_mpu9250_get_gyro:()=>nX,sensor_onboard_mpu9250_get_magnetic:()=>iX,sensor_onboard_mpu9250_temperature:()=>_X,sensor_pin_near:()=>VX,sensor_pin_pressed:()=>yX,sensor_rm_acc:()=>CX,sensor_rm_battery_left:()=>gX,sensor_rm_pin_near_double:()=>cX,sensor_sound:()=>PY});var pt={};t.r(pt),t.d(pt,{serial_any:()=>KX,serial_print:()=>wX,serial_print_byte:()=>kX,serial_print_hex:()=>WX,serial_println:()=>HX,serial_read_from_ai:()=>nx,serial_readline:()=>QX,serial_readstr:()=>JX,serial_send_to_ai:()=>ix,serial_softserial:()=>qX,serial_softserial_new:()=>zX,system_input:()=>jX,system_print:()=>ZX,system_print_end:()=>tx,system_print_inline:()=>$X,system_print_many:()=>ex});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>Mx,Timer_init:()=>Fx,base_delay:()=>Yx,controls_delay:()=>Rx,controls_delay_new:()=>cx,controls_end_program:()=>mx,controls_millis:()=>hx,controls_uname:()=>Ox,reset:()=>Ex,system_bitbot_shutdown:()=>fx,system_device_name:()=>Ix,system_device_serial_number:()=>Tx,system_event_bus_source:()=>lx,system_event_bus_value:()=>dx,system_machine_reset:()=>Dx,system_on_event:()=>px,system_raise_event:()=>ax,system_reset:()=>_x,system_run_in_background:()=>sx,system_ticks_diff:()=>Sx,system_timer:()=>Cx,system_timer_init:()=>Ax,system_timestamp:()=>ux,system_value:()=>rx,system_wait:()=>ox,system_wdt_feed:()=>Nx,system_wdt_init:()=>Lx,time_ticks_diff:()=>vx,timer:()=>gx,timer2:()=>Px});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>Kx,Air_now_content:()=>Bx,Geo_moon_content:()=>Qx,Geo_sun_content:()=>Jx,Life_suggestion_content:()=>Ux,Location_search_content:()=>kx,Tide_daily_content:()=>wx,WEATHER_DAILY:()=>xx,WEATHER_HOUR:()=>bx,WEATHER_NOW:()=>Xx,Weather_alarm_content:()=>Gx,Weather_daily:()=>Hx,Weather_daily_content:()=>Wx,Weather_now:()=>yx,Weather_now_content:()=>Vx});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>Mb,inout_analog_atten:()=>sb,inout_analog_read:()=>nb,inout_analog_read_init:()=>ub,inout_analog_write:()=>eb,inout_analog_write_init:()=>pb,inout_analog_write_set:()=>ib,inout_analog_write_set_freq:()=>lb,inout_digital_init:()=>ab,inout_digital_read:()=>tb,inout_digital_write:()=>$x,inout_highlow:()=>Zx,inout_pinMode:()=>db,inout_pin_attachInterrupt:()=>ob,inout_pin_pressed:()=>_b,inout_pin_pressed_init:()=>rb,pin_pressed:()=>Tb,pin_pressed_init:()=>Ib});var dt={};t.r(dt),t.d(dt,{me_g1_aht11:()=>mb,me_g1_hp203:()=>Eb,me_g1_rfid_readcontent:()=>cb,me_g1_rfid_readid:()=>Rb,me_g1_rfid_status:()=>Sb,me_g1_rfid_write:()=>gb,me_g1_rfid_write_outcome:()=>Cb,me_g1_varistor:()=>Ob});var It={};t.r(It),t.d(It,{analog_input:()=>Yb,analog_output:()=>xb,espnow_channel:()=>Fb,haskylens_model:()=>Pb,i2c_A_pin:()=>bb,i2c_B_pin:()=>yb,pins_analog:()=>wb,pins_analog_pin:()=>kb,pins_axis:()=>oy,pins_brightness:()=>ay,pins_builtinimg:()=>$b,pins_builtinimg_extern:()=>ty,pins_button:()=>Kb,pins_buttonB:()=>Jb,pins_dac:()=>Hb,pins_dac_pin:()=>Wb,pins_digital:()=>Lb,pins_digital_dot:()=>My,pins_digital_pin:()=>Nb,pins_exlcdh:()=>sy,pins_exlcdv:()=>_y,pins_imglist:()=>ey,pins_input_pin:()=>Db,pins_one_more:()=>Ty,pins_output_pin:()=>fb,pins_playlist:()=>iy,pins_playlist_extern:()=>ny,pins_pwm:()=>Qb,pins_pwm_pin:()=>qb,pins_radio_datarate:()=>Iy,pins_radio_power:()=>dy,pins_serial:()=>Zb,pins_tone_notes:()=>ly,pins_touch:()=>jb,pins_touch_pin:()=>zb,pins_tts_bgmusic:()=>ry,pins_tts_builtin_music:()=>uy,pins_tts_voice:()=>py,pwm_input:()=>vb,pwm_output:()=>Xb,spi_A_pin:()=>Vb,spi_B_pin:()=>Bb,spi_C_pin:()=>Gb,spi_D_pin:()=>Ub});var Tt={};t.r(Tt),t.d(Tt,{inout_analog_atten:()=>Ny,inout_analog_read:()=>cy,inout_analog_read_init:()=>Ly,inout_analog_write:()=>Oy,inout_analog_write_init:()=>Ay,inout_analog_write_set:()=>Ry,inout_digital_init:()=>Sy,inout_digital_read:()=>Ey,inout_digital_write:()=>my,inout_highlow:()=>hy,inout_pin_attachInterrupt:()=>Cy,inout_pin_pressed:()=>gy,inout_pin_pressed_init:()=>Dy});var Mt={};t.r(Mt),t.d(Mt,{me_g1_aht11:()=>fy,me_g1_hp203:()=>Fy,me_g1_rfid_readcontent:()=>Yy,me_g1_rfid_readid:()=>vy,me_g1_rfid_status:()=>by,me_g1_rfid_write:()=>Xy,me_g1_rfid_write_outcome:()=>xy,me_g1_varistor:()=>Py});var ht={};t.r(ht),t.d(ht,{analog_input:()=>Ky,analog_output:()=>Qy,espnow_channel:()=>Hy,haskylens_model:()=>Wy,i2c_A_pin:()=>qy,i2c_B_pin:()=>zy,pins_analog:()=>iV,pins_analog_pin:()=>eV,pins_axis:()=>hV,pins_brightness:()=>OV,pins_builtinimg:()=>lV,pins_builtinimg_extern:()=>dV,pins_button:()=>Vy,pins_buttonB:()=>By,pins_dac:()=>oV,pins_dac_pin:()=>_V,pins_digital:()=>yy,pins_digital_dot:()=>NV,pins_digital_pin:()=>Gy,pins_exlcdh:()=>mV,pins_exlcdv:()=>EV,pins_imglist:()=>IV,pins_input_pin:()=>Uy,pins_interrupt:()=>uV,pins_one_more:()=>LV,pins_output_pin:()=>wy,pins_playlist:()=>TV,pins_playlist_extern:()=>MV,pins_pwm:()=>sV,pins_pwm_input:()=>ky,pins_pwm_pin:()=>nV,pins_radio_datarate:()=>AV,pins_radio_power:()=>SV,pins_serial:()=>rV,pins_tone_notes:()=>CV,pins_touch:()=>pV,pins_touch_pin:()=>aV,pins_tts_bgmusic:()=>gV,pins_tts_builtin_music:()=>cV,pins_tts_voice:()=>RV,pwm_output:()=>Jy,spi_A_pin:()=>jy,spi_B_pin:()=>Zy,spi_C_pin:()=>$y,spi_D_pin:()=>tV});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 @@ -18,4 +18,4 @@ * 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)}},Zt={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)}},$t={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)}},ae={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)}},pe=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 ue={init:function(){this.setColour(pe),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},re={init:function(){this.setColour(pe);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]}))}},le={init:function(){this.setColour(pe);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]}))}},de={init:function(){this.setColour(pe),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]}))}},Ie={init:function(){this.setColour(pe),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]}))}},Te={init:function(){this.setColour(pe),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(pe),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]}))}},he={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(pe),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]}))}},me={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(pe),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]}))}},Ee={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(pe),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]}))}},Oe={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(pe),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]}))}},Re={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(pe),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(pe),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)}},ge={init:function(){this.setColour(pe),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)}},Ce={init:function(){this.setColour(pe),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)}},Se={init:function(){this.setColour(pe),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)}},Ae={init:function(){this.setColour(pe),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)}},Le={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(pe),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]}))}},Ne={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(pe),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]}))}},De=ge,fe={init:function(){this.setColour(pe),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)}},Fe=160,Pe={init:function(){this.setColour(Fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_TEXT_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}},ve={init:function(){this.setColour(Fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_LINES_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}};mt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 Ye={init:function(){this.setColour(Fe),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,'"')}},Xe={init:function(){this.setColour(Fe),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)}},xe={init:function(){this.setColour(Fe),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},be={init:function(){this.setColour(Fe),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},ye={init:function(){this.setColour(Fe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ve={init:function(){this.setColour(Fe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Be={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(Fe),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)}},Ge={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Fe),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)}},Ue={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},we={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(Fe),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"))}},ke={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Fe),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)}},He={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},We={init:function(){this.setColour(Fe),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)}},Ke={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(Fe),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]}))}},Je={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Fe),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)}},Qe={init:function(){this.setColour(Fe),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)}},qe={init:function(){this.setColour(Fe),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)}},ze={init:function(){this.setColour(Fe),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)}},je={init:function(){this.setColour(Fe),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)}},Ze={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Fe),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]}))}},$e={init:function(){this.setColour(Fe),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")}},Ki={init:function(){this.setColour(Hi),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ji={init:function(){this.setColour(Hi),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}},Qi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},qi={init:function(){this.setColour(Hi),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)}},zi={init:function(){this.setColour(Hi),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)}},ji={init:function(){this.setColour(Hi),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)}},Zi={init:function(){this.setColour(Hi),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)}},$i={init:function(){this.setColour(Hi),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)}},tn={init:function(){this.setColour(Hi),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)}},en={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},nn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},_n={init:function(){this.setColour(Hi),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)}},on={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(Hi),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")}},an={init:function(){this.setColour(Hi),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)}},pn={init:function(){this.setColour(Hi),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)}},un={init:function(){this.setColour(Hi),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")}},rn={init:function(){this.setColour(Hi),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},ln={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},dn={init:function(){this.setColour(Hi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},In=210,Tn={init:function(){var t=mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(In),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]}},Mn={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(In),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)}},hn={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(In),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]}))}},mn={init:function(){this.setColour(In),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},En={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(In),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},On={init:function(){this.setColour(In),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Rn={init:function(){this.setColour(In),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)}},cn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(In),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)}},gn={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(In),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)}},Cn={init:function(){this.setColour(In),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Sn={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)}},An={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")}},Ln={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}))}},Nn={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}))}},Dn={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)}},fn={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)}},Fn={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}))}},Pn={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)}},vn={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)}},Yn={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)}},Xn={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)}},xn={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 bn={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)}},yn={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)}},Vn={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)}},Bn={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}))}},Gn={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)}},Un={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]}))}},wn={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)}},kn={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)}},Hn={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]}))}},Wn={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)}},Kn={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()}},Jn={};Jn.NAME_TYPE=mt.PROCEDURE_CATEGORY_NAME,Jn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},ws={init:function(){this.setColour(bs),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ks={init:function(){this.setColour(bs),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)}},Hs={init:function(){this.setColour(bs),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(bs),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(bs),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js=160,Qs={init:function(){this.setColour(Js),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new mt.FieldTable(""),"TEXT")}},qs={init:function(){this.setColour(Js),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},zs={init:function(){this.setColour(Js),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},js={init:function(){this.setColour(Js),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Zs={init:function(){this.setColour(Js),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},$s={init:function(){this.setColour(Js),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},t_={init:function(){this.setColour(Js),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 "+p()+"("+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 Ga=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]},Ua=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},wa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},ka=function(t,e){return["None",e.ORDER_ATOMIC]},Ha=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]},Wa=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]},Ka=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){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Qa=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},qa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},za=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ja=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Za=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},$a=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},tp=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]},ep=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ip=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},np=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},sp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},_p=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},op=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ap=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},up=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"},rp=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},lp=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},dp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ip=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"},Tp=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]},Mp=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"},hp=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"},mp=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]},jp=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Zp=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},$p=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},tu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},eu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},iu=function(t,e){return'"},nu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},su=function(){return this.getFieldValue("TEXT")+"\n"},_u=function(t){return t.getFieldValue("TEXT")+"\n"},ou=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},au=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},pu=function(){return""},uu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},ru=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},du.scrubNakedValue=function(t){return t+"\n"},du.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},du.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},du.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,du.COMMENT_WRAP-3),n+=du.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+a+" + "+s+")":s<0?"int("+a+" - "+-s+")":"int("+a+")",n&&(a="-"+a)),a};const Iu="#74A55B",Tu={init:function(){this.setColour(Iu),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)}},Mu={init:function(){this.setColour(Iu),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)}},hu={init:function(){this.setColour(Iu),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)}},mu={init:function(){this.setColour(Iu),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)}},Eu={init:function(){this.setColour(Iu),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)}},Ou={init:function(){this.setColour(Iu),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)}},Ru={init:function(){this.setColour(Iu),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)}},cu={init:function(){this.setColour(Iu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gu={init:function(){this.setColour(Iu),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)}},Cu={init:function(){this.setColour(Iu),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)}},Su={init:function(){this.setColour(Iu),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)}},Au={init:function(){this.setColour(Iu),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)}},Lu={init:function(){this.setColour(Iu),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)}},Nu={init:function(){this.setColour(Iu),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)}},Du={init:function(){this.setColour(Iu),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)}},fu={init:function(){this.setColour(Iu),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)}},Fu={init:function(){this.setColour(Iu),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)}},Pu={init:function(){this.setColour(Iu),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)}},vu={init:function(){this.setColour(Iu),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)}},Yu={init:function(){this.setColour(Iu),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通信")}},Xu={init:function(){this.setColour(Iu),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)")}},xu={init:function(){this.setColour(Iu),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)")}},bu={init:function(){this.setColour(Iu),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)}},yu={init:function(){this.setColour(Iu),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)}},Vu={init:function(){this.setColour(Iu),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)}},Bu={init:function(){this.setColour(Iu),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)}},Gu={init:function(){this.setColour(Iu),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+"SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Uu={init:function(){this.setColour(Iu),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)}},wu={init:function(){this.setColour(Iu),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)}},ku={init:function(){this.setColour(Iu),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)}},Hu={init:function(){this.setColour(Iu),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)}},Wu={init:function(){this.setColour(Iu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Ku={init:function(){this.setColour(Iu),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)}},Ju={init:function(){this.setColour(Iu),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)}},Qu={init:function(){this.setColour(Iu),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)}},qu={init:function(){this.setColour(Iu),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)}},zu={init:function(){this.setColour(Iu),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)}},ju={init:function(){this.setColour(Iu),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)}},Zu={init:function(){this.setColour(Iu),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)}},$u={init:function(){this.setColour(Iu),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)}},tr={init:function(){this.setColour(Iu),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)}},er={init:function(){this.setColour(Iu),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)}},ir={init:function(){this.setColour(Iu),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)}},nr={init:function(){this.setColour(Iu),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)}},sr={init:function(){this.setColour(Iu),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)}},_r={init:function(){this.setColour(Iu),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)}},or="#6C9858",ar={init:function(){this.setColour(or),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},pr={init:function(){this.setColour(or),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)}},ur={init:function(){this.setColour(or),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)}},rr={init:function(){this.setColour(or),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)}},lr={init:function(){this.setColour(or),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)}},dr={init:function(){this.setColour(or),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%)")}},Ir={init:function(){this.setColour(or),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()}},Tr={init:function(){this.setColour(or),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)}},Mr={init:function(){this.setColour(or),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)}},hr={init:function(){this.setColour(or),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)}},mr={init:function(){this.setColour(or),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)")}},Er={init:function(){this.setColour(or),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Or={init:function(){this.setColour(or),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)}}},Rr={init:function(){this.setColour(or),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)}},cr={init:function(){this.setColour(or),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("")}},gr={init:function(){this.setColour(or),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("")}},Cr={init:function(){this.setColour(or),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)}},Sr={init:function(){this.setColour(or),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)}}},Ar={init:function(){this.setColour(or),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)}},Lr={init:function(){this.setColour(or),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("")}},Nr={init:function(){this.setColour(or),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)}},Dr={init:function(){this.setColour(or),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)}},fr={init:function(){this.setColour(or),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)}},Fr={init:function(){this.setColour(or),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)}},Pr={init:function(){this.setColour(or),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)}},vr={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yr={init:function(){this.setColour(or),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)}},Xr={init:function(){this.setColour(or),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)}},xr={init:function(){this.setColour(or),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)}},br={init:function(){this.setColour(or),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("")}},yr={init:function(){this.setColour(or),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)}},Vr={init:function(){this.setColour(or),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)}},Br={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Gr={init:function(){this.setColour(or),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)}},Ur={init:function(){this.setColour(or),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)}},wr={init:function(){this.setColour(or),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)}},kr={init:function(){this.setColour(or),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)}},Hr={init:function(){this.setColour(or),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)}},Wr={init:function(){this.setColour(or),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)}},Kr={init:function(){this.setColour(or),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)}},Jr={init:function(){this.setColour(or),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)}},Qr={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},qr={init:function(){this.setColour(or),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)}},zr={init:function(){this.setColour(or),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)}},jr={init:function(){this.setColour(or),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)}},Zr={init:function(){this.setColour(or),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)}},$r={init:function(){this.setColour(or),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},tl={init:function(){this.setColour(or),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)}},el={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},il={init:function(){this.setColour(or),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"]]),"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()}},nl={init:function(){this.setColour(or),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)}},sl={init:function(){this.setColour(or),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)}},_l={init:function(){this.setColour(or),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)}},ol={init:function(){this.setColour(or),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_KEY1,"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)}},al={init:function(){this.setColour(or),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)}},pl={init:function(){this.setColour(or),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;ne?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")}},Bm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Gm={init:function(){this.setColour(vm),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}},Um={init:function(){this.setColour(vm),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}},wm={init:function(){this.setColour(vm),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)}},km={init:function(){this.setColour(vm),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)}},Hm={init:function(){this.setColour(vm),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)}},Wm={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Km={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jm={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},qm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},zm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},jm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Zm={init:function(){this.setColour(vm),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)}},$m={init:function(){this.setColour(vm),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)}},tE={init:function(){this.setColour(vm),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)}},eE={init:function(){this.setColour(vm),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)}},iE={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(vm),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")}},nE={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},sE={init:function(){this.setColour(vm),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)}},_E={init:function(){this.setColour(vm),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)}},oE={init:function(){this.setColour(vm),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)}},aE={init:function(){this.setColour(vm),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)}},pE=Ym,uE=Xm,rE=xm,lE=bm,dE=Vm,IE=225,TE={init:function(){this.setColour(IE),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)}},ME={init:function(){this.setColour(IE),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}))}},hE={init:function(){this.setColour(IE),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)}},mE={init:function(){this.setColour(IE),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}))}},EE={init:function(){this.setColour(IE),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)}},OE={init:function(){this.setColour(IE),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)}},RE={init:function(){this.setColour(IE),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]}))}},cE={init:function(){this.setColour(IE),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)}},gE={init:function(){this.setColour(IE),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)}},CE={init:function(){this.setColour(IE),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)}},SE={init:function(){this.setColour(IE),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)}},AE={init:function(){this.setColour(IE),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]}))}},LE={init:function(){this.setColour(IE),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)}},NE={init:function(){this.setColour(IE),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)}},DE={init:function(){this.setColour(IE),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)}},fE={init:function(){this.setColour(IE),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)}},FE={init:function(){this.setColour(IE),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)}},PE={init:function(){this.setColour(IE),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)}},vE={init:function(){this.setColour(IE),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)}},YE={init:function(){this.setColour(IE),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)}},XE={init:function(){this.setColour(IE),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)}},xE={init:function(){this.setColour(IE),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")}},bE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(IE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},yE={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(IE),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},VE={init:function(){this.setColour(IE),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)}},BE={init:function(){this.setColour(IE),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)}},GE="#3288dd",UE={init:function(){this.setColour(GE),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("")}},wE={init:function(){this.setColour(GE),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("")}},kE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(GE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},HE="#A58C5B",WE={init:function(){this.setColour(HE),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)}},KE={init:function(){this.setColour(HE),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)}},JE={init:function(){this.setColour(HE),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)}},QE={init:function(){this.setColour(HE),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)}},qE={init:function(){this.setColour(HE),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]+_}))}},zE={init:function(){this.setColour(HE),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}))}},jE={init:function(){this.setColour(HE),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)}},ZE={init:function(){var t=[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(HE),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},$E={init:function(){this.setColour(HE),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)}},tO={init:function(){this.setColour(HE),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)}},eO={init:function(){this.setColour(HE),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}))}},iO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("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]}))}},nO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("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]}))}},sO={init:function(){this.setColour(HE),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)}},_O={init:function(){this.setColour(HE),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)}},oO={init:function(){this.setColour(HE),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},aO={init:function(){this.setColour(HE),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)}},pO={init:function(){this.setColour(HE),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)}},uO={init:function(){this.setColour(HE),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},rO={init:function(){this.setColour(HE),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)}},lO={init:function(){this.setColour(HE),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)}},dO={init:function(){this.setColour(HE),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)}},IO={init:function(){this.setColour(HE),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]}))}},TO={init:function(){this.setColour(HE),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]}))}},MO={init:function(){this.setColour(HE),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)}},hO={init:function(){this.setColour(HE),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)}},mO={init:function(){this.setColour(HE),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]+_}))}},EO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("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}))}},OO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("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}))}},RO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("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}))}},cO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("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)}},gO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},CO={init:function(){this.setColour(HE),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]}))}},SO={init:function(){this.setColour(HE),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)}},AO={init:function(){this.setColour(HE),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")}},LO={init:function(){this.setColour(HE),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)}},NO={init:function(){this.setColour(HE),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)}},DO={init:function(){this.setColour(HE),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)}},fO={init:function(){this.setColour(HE),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)}},FO={init:function(){this.setColour(HE),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)}},PO={init:function(){this.setColour(HE),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)}},vO={init:function(){this.setColour(HE),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)")}},YO={init:function(){this.setColour(HE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},XO={init:function(){this.setColour(HE),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)}},xO={init:function(){this.setColour(HE),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_zero"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+",font_address="+a+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},wN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},kN=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"},HN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},WN=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"},KN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},JN=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"},QN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},qN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},zN=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]},jN=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"},ZN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},$N=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},tD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},eD=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]},iD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},nD=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"},sD=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"},_D=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"},oD=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),a="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(a){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+","+p+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+","+p+")\n"}},aD=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"},pD=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},uD=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]},rD=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"},lD=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},dD=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",a=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+a+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+a+")\n"}},ID=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),a=e.valueToCode(this,"x2",e.ORDER_ATOMIC),p=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+", "+a+", "+p+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+a+", "+p+", "+r+")\n"}},TD=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"},MD=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"},hD=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},mD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},ED=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},OD=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"},RD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},cD=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_zero"].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),a=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="+a+",cs_pin="+o+",rotation="+this.getFieldValue("rotate")+",font_address="+n+")\n"},gD=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p=i+".image("+n+",x = "+s+",y = "+_+",size = "+o+",color="+a+")\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".image("+n+",x = "+s+",y = "+_+",size = "+o+",color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},CD=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]},SD=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==p.slice(0,2))var r=i+".shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+u+",color="+p+")\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=i+".shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+u+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},AD=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 a=i+".frame("+n+",size = "+s+",delay = "+_+",color="+o+")\n";else{const t=o.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".frame("+n+",size = "+s+",delay = "+_+",color=0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\n"}return a},LD=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var u=i+".scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color="+p+")\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=i+".scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},ND=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},DD=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p=i+".line("+n+", "+s+", "+_+", "+o+", color="+a+")\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},fD=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"},FD=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"},PD=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"},vD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},YD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},XD=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),_=Et.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},xD=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"},bD=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"},yD=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"},VD=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"},BD=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"},GD=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"},UD=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"},wD=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"},kD=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"},HD=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"},WD=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]},KD=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"},JD=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),a=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+a+")\n"+i+".show()\n"},QD=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"},qD=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"},zD=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},jD=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},ZD=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},$D=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},tf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},ef=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},nf=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]},sf=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]},_f=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,a=0;for(let n=0;n<32;n++)n<8?a=7-n:n<16?a=23-n:n<24?a=39-n:n<32&&(a=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-a);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},yf=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=this.getFieldValue("center"),u=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+p+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+p+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},Vf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Bf=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 a="onboard_tft.frame("+n+",size = "+s+",delay = "+_+",color="+o+")\n";else{const t=o.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.frame("+n+",size = "+s+",delay = "+_+",color=0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\n"}return a},Gf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Uf=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var u="onboard_tft.scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color="+p+")\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.scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},wf=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape");if("0x"==a.slice(0,2))var u="onboard_tft."+p+"("+n+", "+s+", "+_+", "+o+", "+a+")\nonboard_tft.show()\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."+p+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},kf=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),a=t.getFieldValue("dir_h_v");if("0x"==o.slice(0,2))var p="onboard_tft."+("0"==a?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft."+("0"==a?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return p},Hf=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+a+")\nonboard_tft.show()\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return p},Wf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},Kf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},Jf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},Qf=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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\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");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},qf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},zf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},jf=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},Zf=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p=o+"=Clock("+n+","+s+","+_+","+a+")\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=o+"=Clock("+n+","+s+","+_+",0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},$f=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"},tF=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"},eF=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"},iF=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 _},nF=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),a=t.getFieldValue("shape");if("0x"==o.slice(0,2))var p="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+a+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+a+")\nonboard_tft.show()\n"}return p},sF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},_F=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},oF=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},aF=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},tx=function(){return"control.reset()\n"},ex=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},ix=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"},nx=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"},sx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},_x=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},ox=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ax=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},px=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},ux=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},rx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},lx=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]}},dx=function(){return"while True:\n pass\n"},Ix=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},Tx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},Mx=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"}},hx=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"}},mx=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"},Ex=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"},Ox=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]},Rx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},cx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},gx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Cx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Sx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},Ax=Rx,Lx=Ex,Nx=Ox,Dx=Mx,fx=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]},Fx=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]},Px=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]},vx=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"},Yx=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]},Xx=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]},xx=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]},bx=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]},yx=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]},Vx=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]},Bx=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"},Gx=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]},Ux=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]},wx=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]},kx=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]},Hx={};Hx["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"]]},Hx["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"]]},Hx["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"]]},Hx["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 Wx=Hx,Kx=20,Jx={init:function(){this.setColour(Kx),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)}},Qx={init:function(){this.setColour(Kx),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)}},qx={init:function(){this.setColour(Kx),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)}},zx={init:function(){this.setColour(Kx),this.appendValueInput("PIN",Number).appendField("PWM"+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_PWM_ANALOG_WRITE_TOOLTIP)}},jx={init:function(){this.setColour(Kx),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)}},Zx={init:function(){this.setColour(Kx),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)}},$x={init:function(){this.setColour(Kx),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)}},tb={init:function(){this.setColour(Kx),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},eb={init:function(){this.setColour(Kx),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)}},ib={init:function(){this.setColour(Kx),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)}},nb={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)}},sb={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")}},_b={init:function(){this.setColour(Kx),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("pwm#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("PWM"+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_PWM_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["pwm#"==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")}},ob={init:function(){this.setColour(Kx),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")}},ab={init:function(){this.setColour(Kx),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("adc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_Analog_PINMODEIN),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_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==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")}},pb={init:function(){this.setColour(Kx),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")}},ub=sb,rb=$x,lb=pb,db=ib,Ib=nb,Tb=40,Mb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),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]}))}},hb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),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)}},mb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},Eb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),this.appendDummyInput().appendField(t).appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ob={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),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.setOutput(!0,Number),this.setInputsInline(!0)}},Rb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),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.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},cb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),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.setInputsInline(!0),this.setOutput(!0)}},gb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(Tb),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.setOutput(!0,Number),this.setInputsInline(!0)}},Cb=230,Sb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},Ab={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},Lb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},Nb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},Db={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},fb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},Fb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Pb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},vb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},Yb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},Xb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},xb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},bb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},yb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},Vb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Bb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},Gb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},Ub={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},wb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},kb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Hb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Wb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},Kb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},Jb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},Qb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},qb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},zb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},jb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Zb={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},$b={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},ty={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},ey={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},iy={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},ny={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},sy={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},_y={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},oy={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},ay={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},py={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},uy={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},ry={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},ly={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},dy={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},Iy={init:function(){this.setColour(Cb),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},Ty=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},My=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"},hy=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},my=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".duty("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Ey=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"},Oy=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"},Ry=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".freq("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},cy=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},gy=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Cy=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"},Sy=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"},Ay=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pwm#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("pwm#"==i?"pwm"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.PWM(machine.Pin("+n+"))\n"},Ly=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"},Ny=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},Dy=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},fy=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"},Fy=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]},Py=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]},vy=function(t,e){e.definitions_.import_me_g1="import me_g1";return["me_g1.varistor()",e.ORDER_ATOMIC]},Yy=function(t,e){e.definitions_.import_me_g1="import me_g1";return['me_g1.ext_rc522.read_card(0, x="id")',e.ORDER_ATOMIC]},Xy=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]},xy=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"},by=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]},yy=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]},Vy=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},By=Vy,Gy=Vy,Uy=Vy,wy=Vy,ky=Vy,Hy=Vy,Wy=Vy,Ky=Vy,Jy=Vy,Qy=Vy,qy=Vy,zy=Vy,jy=Vy,Zy=Vy,$y=Vy,tV=Vy,eV=Vy,iV=Vy,nV=Vy,sV=Vy,_V=Vy,oV=Vy,aV=Vy,pV=Vy,uV=Vy,rV=Vy,lV=Vy,dV=Vy,IV=Vy,TV=Vy,MV=Vy,hV=Vy,mV=Vy,EV=Vy,OV=Vy,RV=Vy,cV=Vy,gV=Vy,CV=Vy,SV=Vy,AV=Vy,LV=Vy,NV=Vy,DV=Vy;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,Qn),mt.Python=du,mt.generator=du,Et.Profile.default={},Object.assign(Et.Profile,Wx),Object.assign(Et.Profile.default,Wx["MixGo CC"]),Object.assign(mt.Blocks,e,i,n,s,_,o,a,p,u,r,l,d,I,V,H,k,X,B,W,f,w,U,G,F,D,N,b,x,y,P,v,Y,lt,dt,It),Object.assign(mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,nt,ut,pt,$,st,rt,Q,at,ot,_t,q,J,K,et,tt,it,z,j,Z,Tt,Mt,ht)})(); \ No newline at end of file +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)}},Zt={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)}},$t={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)}},ae={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)}},pe={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=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 re={init:function(){this.setColour(ue),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},le={init:function(){this.setColour(ue);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]}))}},de={init:function(){this.setColour(ue);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]}))}},Ie={init:function(){this.setColour(ue),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]}))}},Te={init:function(){this.setColour(ue),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]}))}},Me={init:function(){this.setColour(ue),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},he={init:function(){this.setColour(ue),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]}))}},me={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(ue),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]}))}},Ee={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(ue),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]}))}},Oe={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(ue),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]}))}},Re={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(ue),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]}))}},ce={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ue),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]}))}},ge={init:function(){this.setColour(ue),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)}},Ce={init:function(){this.setColour(ue),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)}},Se={init:function(){this.setColour(ue),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)}},Ae={init:function(){this.setColour(ue),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)}},Le={init:function(){this.setColour(ue),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)}},Ne={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(ue),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]}))}},De={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ue),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=Ce,Fe={init:function(){this.setColour(ue),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)}},Pe=160,ve={init:function(){this.setColour(Pe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_TEXT_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}},Ye={init:function(){this.setColour(Pe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_LINES_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}};mt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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(Pe),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,'"')}},xe={init:function(){this.setColour(Pe),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)}},be={init:function(){this.setColour(Pe),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ye={init:function(){this.setColour(Pe),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ve={init:function(){this.setColour(Pe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Be={init:function(){this.setColour(Pe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ge={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(Pe),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)}},Ue={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Pe),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)}},we={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Pe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ke={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(Pe),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"))}},He={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pe),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)}},We={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Pe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ke={init:function(){this.setColour(Pe),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(Pe),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]}))}},Qe={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Pe),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)}},qe={init:function(){this.setColour(Pe),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)}},ze={init:function(){this.setColour(Pe),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)}},je={init:function(){this.setColour(Pe),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)}},Ze={init:function(){this.setColour(Pe),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)}},$e={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Pe),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]}))}},ti={init:function(){this.setColour(Pe),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")}},qi={init:function(){this.setColour(Ji),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},zi={init:function(){this.setColour(Ji),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}},ji={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Zi={init:function(){this.setColour(Ji),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)}},$i={init:function(){this.setColour(Ji),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)}},tn={init:function(){this.setColour(Ji),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)}},en={init:function(){this.setColour(Ji),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)}},nn={init:function(){this.setColour(Ji),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)}},sn={init:function(){this.setColour(Ji),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)}},_n={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},an={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},pn={init:function(){this.setColour(Ji),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)}},un={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(Ji),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")}},rn={init:function(){this.setColour(Ji),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)}},ln={init:function(){this.setColour(Ji),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)}},dn={init:function(){this.setColour(Ji),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")}},In={init:function(){this.setColour(Ji),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Tn={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn={init:function(){this.setColour(Ji),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},hn=210,mn={init:function(){var t=mt.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 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]}},En={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(hn),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)}},On={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(hn),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]}))}},Rn={init:function(){this.setColour(hn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},cn={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(hn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},gn={init:function(){this.setColour(hn),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Cn={init:function(){this.setColour(hn),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)}},Sn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(hn),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)}},An={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(hn),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)}},Ln={init:function(){this.setColour(hn),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Nn={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)}},Dn={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")}},fn={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}))}},Fn={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}))}},Pn={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)}},vn={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)}},Yn={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}))}},Xn={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)}},xn={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)}},bn={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)}},yn={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)}},Vn={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 Bn={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)}},Gn={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)}},Un={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)}},wn={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}))}},kn={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)}},Hn={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]}))}},Wn={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)}},Kn={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)}},Jn={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]}))}},Qn={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)}},qn={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()}},zn={};zn.NAME_TYPE=mt.PROCEDURE_CATEGORY_NAME,zn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},Ws={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ks={init:function(){this.setColour(Bs),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)}},Js={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.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 mt.FieldTable(""),"TEXT")}},Zs={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},$s={init:function(){this.setColour(zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},t_={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},e_={init:function(){this.setColour(zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},i_={init:function(){this.setColour(zs),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},n_={init:function(){this.setColour(zs),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 "+p()+"("+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 Wa=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]},Ka=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Ja=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Qa=function(t,e){return["None",e.ORDER_ATOMIC]},qa=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]},za=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]},$a=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},tp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ep=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ip=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},np=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},sp=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},_p=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]},op=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ap=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},pp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},up=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},rp=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},lp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},dp=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ip=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Tp=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"},Mp=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},hp=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},mp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ep=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"},Op=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]},Rp=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"},cp=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"},gp=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]},iu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},nu=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},su=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},_u=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},ou=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},au=function(t,e){return'"},pu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},uu=function(){return this.getFieldValue("TEXT")+"\n"},ru=function(t){return t.getFieldValue("TEXT")+"\n"},lu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},du=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Iu=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_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},mu.scrubNakedValue=function(t){return t+"\n"},mu.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},mu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},mu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,mu.COMMENT_WRAP-3),n+=mu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+a+" + "+s+")":s<0?"int("+a+" - "+-s+")":"int("+a+")",n&&(a="-"+a)),a};const Eu="#74A55B",Ou={init:function(){this.setColour(Eu),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)}},Ru={init:function(){this.setColour(Eu),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)}},cu={init:function(){this.setColour(Eu),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)}},gu={init:function(){this.setColour(Eu),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)}},Cu={init:function(){this.setColour(Eu),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)}},Su={init:function(){this.setColour(Eu),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)}},Au={init:function(){this.setColour(Eu),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)}},Lu={init:function(){this.setColour(Eu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nu={init:function(){this.setColour(Eu),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)}},Du={init:function(){this.setColour(Eu),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)}},fu={init:function(){this.setColour(Eu),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)}},Fu={init:function(){this.setColour(Eu),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)}},Pu={init:function(){this.setColour(Eu),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)}},vu={init:function(){this.setColour(Eu),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)}},Yu={init:function(){this.setColour(Eu),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)}},Xu={init:function(){this.setColour(Eu),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)}},xu={init:function(){this.setColour(Eu),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)}},bu={init:function(){this.setColour(Eu),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)}},yu={init:function(){this.setColour(Eu),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)}},Vu={init:function(){this.setColour(Eu),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通信")}},Bu={init:function(){this.setColour(Eu),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)")}},Gu={init:function(){this.setColour(Eu),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)")}},Uu={init:function(){this.setColour(Eu),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)}},wu={init:function(){this.setColour(Eu),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)}},ku={init:function(){this.setColour(Eu),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)}},Hu={init:function(){this.setColour(Eu),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)}},Wu={init:function(){this.setColour(Eu),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+"SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Ku={init:function(){this.setColour(Eu),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)}},Ju={init:function(){this.setColour(Eu),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)}},Qu={init:function(){this.setColour(Eu),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)}},qu={init:function(){this.setColour(Eu),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)}},zu={init:function(){this.setColour(Eu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},ju={init:function(){this.setColour(Eu),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)}},Zu={init:function(){this.setColour(Eu),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)}},$u={init:function(){this.setColour(Eu),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)}},tr={init:function(){this.setColour(Eu),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)}},er={init:function(){this.setColour(Eu),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)}},ir={init:function(){this.setColour(Eu),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(Eu),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)}},sr={init:function(){this.setColour(Eu),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)}},_r={init:function(){this.setColour(Eu),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)}},or={init:function(){this.setColour(Eu),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)}},ar={init:function(){this.setColour(Eu),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)}},pr={init:function(){this.setColour(Eu),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)}},ur={init:function(){this.setColour(Eu),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)}},rr={init:function(){this.setColour(Eu),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)}},lr="#6C9858",dr={init:function(){this.setColour(lr),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Ir={init:function(){this.setColour(lr),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)}},Tr={init:function(){this.setColour(lr),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)}},Mr={init:function(){this.setColour(lr),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)}},hr={init:function(){this.setColour(lr),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)}},mr={init:function(){this.setColour(lr),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%)")}},Er={init:function(){this.setColour(lr),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()}},Or={init:function(){this.setColour(lr),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)}},Rr={init:function(){this.setColour(lr),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)}},cr={init:function(){this.setColour(lr),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)}},gr={init:function(){this.setColour(lr),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)")}},Cr={init:function(){this.setColour(lr),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Sr={init:function(){this.setColour(lr),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)}}},Ar={init:function(){this.setColour(lr),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)}},Lr={init:function(){this.setColour(lr),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("")}},Nr={init:function(){this.setColour(lr),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("")}},Dr={init:function(){this.setColour(lr),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)}},fr={init:function(){this.setColour(lr),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)}}},Fr={init:function(){this.setColour(lr),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)}},Pr={init:function(){this.setColour(lr),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("")}},vr={init:function(){this.setColour(lr),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)}},Yr={init:function(){this.setColour(lr),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)}},Xr={init:function(){this.setColour(lr),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)}},xr={init:function(){this.setColour(lr),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)}},br={init:function(){this.setColour(lr),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)}},yr={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vr={init:function(){this.setColour(lr),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)}},Br={init:function(){this.setColour(lr),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)}},Gr={init:function(){this.setColour(lr),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)}},Ur={init:function(){this.setColour(lr),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("")}},wr={init:function(){this.setColour(lr),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)}},kr={init:function(){this.setColour(lr),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)}},Hr={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Wr={init:function(){this.setColour(lr),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)}},Kr={init:function(){this.setColour(lr),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)}},Jr={init:function(){this.setColour(lr),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)}},Qr={init:function(){this.setColour(lr),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)}},qr={init:function(){this.setColour(lr),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)}},zr={init:function(){this.setColour(lr),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)}},jr={init:function(){this.setColour(lr),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)}},Zr={init:function(){this.setColour(lr),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)}},$r={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},tl={init:function(){this.setColour(lr),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)}},el={init:function(){this.setColour(lr),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)}},il={init:function(){this.setColour(lr),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)}},nl={init:function(){this.setColour(lr),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)}},sl={init:function(){this.setColour(lr),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_l={init:function(){this.setColour(lr),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)}},ol={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},al={init:function(){this.setColour(lr),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"]]),"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()}},pl={init:function(){this.setColour(lr),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)}},ul={init:function(){this.setColour(lr),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)}},rl={init:function(){this.setColour(lr),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)}},ll={init:function(){this.setColour(lr),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_KEY1,"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)}},dl={init:function(){this.setColour(lr),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)}},Il={init:function(){this.setColour(lr),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;ne?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")}},Hm={init:function(){this.setColour(ym),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Wm={init:function(){this.setColour(ym),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}},Km={init:function(){this.setColour(ym),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}},Jm={init:function(){this.setColour(ym),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)}},Qm={init:function(){this.setColour(ym),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)}},qm={init:function(){this.setColour(ym),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)}},zm={init:function(){this.setColour(ym),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jm={init:function(){this.setColour(ym),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zm={init:function(){this.setColour(ym),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$m={init:function(){this.setColour(ym),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},tE={init:function(){this.setColour(ym),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},eE={init:function(){this.setColour(ym),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},iE={init:function(){this.setColour(ym),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},nE={init:function(){this.setColour(ym),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)}},sE={init:function(){this.setColour(ym),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)}},_E={init:function(){this.setColour(ym),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)}},oE={init:function(){this.setColour(ym),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)}},aE={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(ym),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")}},pE={init:function(){this.setColour(ym),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},uE={init:function(){this.setColour(ym),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)}},rE={init:function(){this.setColour(ym),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)}},lE={init:function(){this.setColour(ym),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)}},dE={init:function(){this.setColour(ym),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)}},IE=Vm,TE=Bm,ME=Gm,hE=Um,mE=km,EE=225,OE={init:function(){this.setColour(EE),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)}},RE={init:function(){this.setColour(EE),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}))}},cE={init:function(){this.setColour(EE),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)}},gE={init:function(){this.setColour(EE),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}))}},CE={init:function(){this.setColour(EE),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)}},SE={init:function(){this.setColour(EE),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)}},AE={init:function(){this.setColour(EE),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]}))}},LE={init:function(){this.setColour(EE),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)}},NE={init:function(){this.setColour(EE),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)}},DE={init:function(){this.setColour(EE),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)}},fE={init:function(){this.setColour(EE),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)}},FE={init:function(){this.setColour(EE),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]}))}},PE={init:function(){this.setColour(EE),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)}},vE={init:function(){this.setColour(EE),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)}},YE={init:function(){this.setColour(EE),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)}},XE={init:function(){this.setColour(EE),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)}},xE={init:function(){this.setColour(EE),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)}},bE={init:function(){this.setColour(EE),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)}},yE={init:function(){this.setColour(EE),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)}},VE={init:function(){this.setColour(EE),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)}},BE={init:function(){this.setColour(EE),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)}},GE={init:function(){this.setColour(EE),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")}},UE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(EE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},wE={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(EE),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},kE={init:function(){this.setColour(EE),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)}},HE={init:function(){this.setColour(EE),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)}},WE="#3288dd",KE={init:function(){this.setColour(WE),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("")}},JE={init:function(){this.setColour(WE),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("")}},QE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(WE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},qE="#A58C5B",zE={init:function(){this.setColour(qE),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)}},jE={init:function(){this.setColour(qE),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)}},ZE={init:function(){this.setColour(qE),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)}},$E={init:function(){this.setColour(qE),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)}},tO={init:function(){this.setColour(qE),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]+_}))}},eO={init:function(){this.setColour(qE),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}))}},iO={init:function(){this.setColour(qE),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)}},nO={init:function(){var t=[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(qE),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},sO={init:function(){this.setColour(qE),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)}},_O={init:function(){this.setColour(qE),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)}},oO={init:function(){this.setColour(qE),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}))}},aO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("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]}))}},pO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("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]}))}},uO={init:function(){this.setColour(qE),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)}},rO={init:function(){this.setColour(qE),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)}},lO={init:function(){this.setColour(qE),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},dO={init:function(){this.setColour(qE),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)}},IO={init:function(){this.setColour(qE),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)}},TO={init:function(){this.setColour(qE),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},MO={init:function(){this.setColour(qE),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)}},hO={init:function(){this.setColour(qE),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)}},mO={init:function(){this.setColour(qE),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)}},EO={init:function(){this.setColour(qE),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]}))}},OO={init:function(){this.setColour(qE),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]}))}},RO={init:function(){this.setColour(qE),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)}},cO={init:function(){this.setColour(qE),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)}},gO={init:function(){this.setColour(qE),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]+_}))}},CO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("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}))}},SO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("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}))}},AO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("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}))}},LO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("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)}},NO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},DO={init:function(){this.setColour(qE),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]}))}},fO={init:function(){this.setColour(qE),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)}},FO={init:function(){this.setColour(qE),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")}},PO={init:function(){this.setColour(qE),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)}},vO={init:function(){this.setColour(qE),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)}},YO={init:function(){this.setColour(qE),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)}},XO={init:function(){this.setColour(qE),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)}},xO={init:function(){this.setColour(qE),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)}},bO={init:function(){this.setColour(qE),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)}},yO={init:function(){this.setColour(qE),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)")}},VO={init:function(){this.setColour(qE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},BO={init:function(){this.setColour(qE),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)}},GO={init:function(){this.setColour(qE),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_zero"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+",font_address="+a+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},JN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},QN=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"},qN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},zN=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"},jN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},ZN=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"},$N=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},tD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},eD=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]},iD=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"},nD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},sD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},_D=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},oD=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]},aD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pD=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"},uD=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"},rD=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"},lD=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),a="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(a){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+","+p+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+","+p+")\n"}},dD=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"},ID=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},TD=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]},MD=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"},hD=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},mD=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",a=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+a+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+a+")\n"}},ED=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),a=e.valueToCode(this,"x2",e.ORDER_ATOMIC),p=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+", "+a+", "+p+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+a+", "+p+", "+r+")\n"}},OD=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"},RD=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"},cD=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},gD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},CD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},SD=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"},AD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},LD=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_zero"].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),a=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="+a+",cs_pin="+o+",rotation="+this.getFieldValue("rotate")+",font_address="+n+")\n"},ND=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p=i+".image("+n+",x = "+s+",y = "+_+",size = "+o+",color="+a+")\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".image("+n+",x = "+s+",y = "+_+",size = "+o+",color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},DD=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]},fD=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==p.slice(0,2))var r=i+".shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+u+",color="+p+")\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=i+".shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+u+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},FD=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 a=i+".frame("+n+",size = "+s+",delay = "+_+",color="+o+")\n";else{const t=o.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".frame("+n+",size = "+s+",delay = "+_+",color=0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\n"}return a},PD=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var u=i+".scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color="+p+")\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=i+".scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},vD=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},YD=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p=i+".line("+n+", "+s+", "+_+", "+o+", color="+a+")\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},XD=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"},xD=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"},bD=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"},yD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},VD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},BD=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),_=Et.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},GD=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"},UD=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"},wD=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"},kD=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"},HD=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"},WD=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"},KD=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"},JD=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"},QD=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"},qD=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"},zD=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]},jD=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"},ZD=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),a=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+a+")\n"+i+".show()\n"},$D=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"},tf=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"},ef=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nf=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},sf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},_f=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},of=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},af=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},pf=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]},uf=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]},rf=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,a=0;for(let n=0;n<32;n++)n<8?a=7-n:n<16?a=23-n:n<24?a=39-n:n<32&&(a=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-a);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},wf=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=this.getFieldValue("center"),u=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+p+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+a+",center = "+p+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},kf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Hf=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 a="onboard_tft.frame("+n+",size = "+s+",delay = "+_+",color="+o+")\n";else{const t=o.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.frame("+n+",size = "+s+",delay = "+_+",color=0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\n"}return a},Wf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Kf=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),a=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var u="onboard_tft.scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color="+p+")\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.scroll("+n+",y = "+s+",size = "+_+",speed ="+o+",space = "+a+",color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Jf=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape");if("0x"==a.slice(0,2))var u="onboard_tft."+p+"("+n+", "+s+", "+_+", "+o+", "+a+")\nonboard_tft.show()\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."+p+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},Qf=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),a=t.getFieldValue("dir_h_v");if("0x"==o.slice(0,2))var p="onboard_tft."+("0"==a?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft."+("0"==a?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return p},qf=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+a+")\nonboard_tft.show()\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return p},zf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},jf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},Zf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},$f=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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\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");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},tF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},eF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},iF=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},nF=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),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var p=o+"=Clock("+n+","+s+","+_+","+a+")\n";else{const t=a.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=o+"=Clock("+n+","+s+","+_+",0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return p},sF=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"},_F=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"},oF=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"},aF=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 _},pF=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),a=t.getFieldValue("shape");if("0x"==o.slice(0,2))var p="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+a+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+a+")\nonboard_tft.show()\n"}return p},uF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},rF=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},lF=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},dF=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},_x=function(){return"control.reset()\n"},ox=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},ax=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"},px=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"},ux=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},rx=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},lx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},dx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Ix=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},Tx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},Mx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},hx=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]}},mx=function(){return"while True:\n pass\n"},Ex=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},Ox=function(t,e){return e.definitions_.import_os="import os","os.uname()"},Rx=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"}},cx=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"}},gx=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"},Cx=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"},Sx=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]},Ax=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},Lx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},Nx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Dx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},fx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},Fx=Ax,Px=Cx,vx=Sx,Yx=Rx,Xx=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]},xx=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]},bx=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]},yx=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"},Vx=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]},Bx=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]},Gx=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]},Ux=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]},wx=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]},kx=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]},Hx=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"},Wx=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]},Kx=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]},Jx=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]},Qx=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]},qx={};qx["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"]]},qx["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"]]},qx["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"]]},qx["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 zx=qx,jx=20,Zx={init:function(){this.setColour(jx),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)}},$x={init:function(){this.setColour(jx),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)}},tb={init:function(){this.setColour(jx),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)}},eb={init:function(){this.setColour(jx),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)}},ib={init:function(){this.setColour(jx),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)}},nb={init:function(){this.setColour(jx),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},sb={init:function(){this.setColour(jx),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)}},_b={init:function(){this.setColour(jx),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)}},ob={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)}},ab={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")}},pb={init:function(){this.setColour(jx),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")}},ub={init:function(){this.setColour(jx),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("adc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_Analog_PINMODEIN),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_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==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")}},rb={init:function(){this.setColour(jx),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")}},lb={init:function(){this.setColour(jx),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)}},db=ab,Ib=rb,Tb=_b,Mb=ob,hb=40,mb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),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]}))}},Eb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),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)}},Ob={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),this.appendDummyInput().appendField(t).appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},cb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),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.setOutput(!0,Number),this.setInputsInline(!0)}},gb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),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.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),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.setInputsInline(!0),this.setOutput(!0)}},Sb={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(hb),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.setOutput(!0,Number),this.setInputsInline(!0)}},Ab=230,Lb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},Nb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},Db={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},fb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},Fb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},Pb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},vb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Yb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},Xb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},xb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},bb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},yb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},Vb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},Bb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},Gb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Ub={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},wb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},kb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},Hb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},Wb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Kb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Jb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},Qb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},qb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},zb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},jb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},Zb={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},$b={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},ty={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},ey={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},iy={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},ny={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},sy={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},_y={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},oy={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},ay={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},py={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},uy={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},ry={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},ly={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},dy={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},Iy={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Ty={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},My={init:function(){this.setColour(Ab),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},hy=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},my=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"},Ey=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Oy=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"},Ry=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"},cy=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},gy=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Cy=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"},Sy=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"},Ay=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"},Ly=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},Ny=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},Dy=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"},fy=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]},Fy=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]},Py=function(t,e){e.definitions_.import_me_g1="import me_g1";return["me_g1.varistor()",e.ORDER_ATOMIC]},vy=function(t,e){e.definitions_.import_me_g1="import me_g1";return['me_g1.ext_rc522.read_card(0, x="id")',e.ORDER_ATOMIC]},Yy=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]},Xy=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"},xy=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]},by=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]},yy=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Vy=yy,By=yy,Gy=yy,Uy=yy,wy=yy,ky=yy,Hy=yy,Wy=yy,Ky=yy,Jy=yy,Qy=yy,qy=yy,zy=yy,jy=yy,Zy=yy,$y=yy,tV=yy,eV=yy,iV=yy,nV=yy,sV=yy,_V=yy,oV=yy,aV=yy,pV=yy,uV=yy,rV=yy,lV=yy,dV=yy,IV=yy,TV=yy,MV=yy,hV=yy,mV=yy,EV=yy,OV=yy,RV=yy,cV=yy,gV=yy,CV=yy,SV=yy,AV=yy,LV=yy,NV=yy;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,jn),mt.Python=mu,mt.generator=mu,Et.Profile.default={},Object.assign(Et.Profile,zx),Object.assign(Et.Profile.default,zx["MixGo CC"]),Object.assign(mt.Blocks,e,i,n,s,_,o,a,p,u,r,l,d,I,V,H,k,X,B,W,f,w,U,G,F,D,N,b,x,y,P,v,Y,lt,dt,It),Object.assign(mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,nt,ut,pt,$,st,rt,Q,at,ot,_t,q,J,K,et,tt,it,z,j,Z,Tt,Mt,ht)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32s2/main.bundle.js b/boards/default/micropython_esp32s2/main.bundle.js index cf3ddaba..822c4372 100644 --- a/boards/default/micropython_esp32s2/main.bundle.js +++ b/boards/default/micropython_esp32s2/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>yt,controls_delay:()=>bt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>Zt,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:()=>xt,controls_pass:()=>ee,controls_range:()=>Gt,controls_repeat_ext:()=>$t,controls_thread:()=>ie,controls_try:()=>Qt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,do_while:()=>ne,garbage_collection:()=>se,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>pe});var n={};t.r(n),t.d(n,{base_map:()=>De,math_arithmetic:()=>de,math_bit:()=>Te,math_constant:()=>re,math_constant_mp:()=>le,math_constrain:()=>ce,math_dec:()=>Me,math_indexer_number:()=>Ce,math_map:()=>ge,math_max_min:()=>Oe,math_number:()=>ue,math_number_base_conversion:()=>Ee,math_random:()=>Re,math_random_seed:()=>Se,math_round:()=>Ae,math_selfcalcu:()=>Ie,math_to_int:()=>me,math_trig:()=>he,text_to_number:()=>Le,text_to_number_skulpt:()=>Ne,turn_to_int:()=>fe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>xe,char_to_ascii:()=>ye,number_to_text:()=>be,os_system:()=>ai,text:()=>Pe,text_capital:()=>Ke,text_center:()=>Je,text_char:()=>Ye,text_char_at:()=>Ge,text_char_at2:()=>Be,text_char_at3:()=>si,text_compareTo:()=>ni,text_compare_to:()=>We,text_create_with_container:()=>ti,text_create_with_item:()=>ei,text_encode:()=>oi,text_equals_starts_ends:()=>He,text_eval:()=>pi,text_find:()=>qe,text_format:()=>$e,text_format_noreturn:()=>_i,text_join:()=>Xe,text_join_seq:()=>ze,text_length:()=>Ve,text_random_char:()=>Ue,text_replace:()=>Qe,text_split:()=>je,text_strip:()=>Ze,text_substring:()=>ke,text_substring2:()=>we,text_substring3:()=>ii,text_textarea:()=>ve});var _={};t.r(_),t.d(_,{list_many_input:()=>Pi,list_tolist:()=>xi,list_tolist2:()=>ki,list_trig:()=>Di,lists_2d_get_col_row_data:()=>Ii,lists_2d_get_data_with_col_row:()=>di,lists_append_extend:()=>Ei,lists_change_to:()=>Fi,lists_change_to_general:()=>Yi,lists_clear:()=>Si,lists_create_with:()=>Ti,lists_create_with2:()=>yi,lists_create_with_container:()=>Mi,lists_create_with_item:()=>mi,lists_create_with_noreturn:()=>vi,lists_create_with_text:()=>hi,lists_create_with_text2:()=>bi,lists_del_general:()=>Xi,lists_find:()=>Ni,lists_getIndex3:()=>Vi,lists_getSublist3:()=>Bi,lists_get_index:()=>ri,lists_get_random_item:()=>Ri,lists_get_random_sublist:()=>ci,lists_get_sublist:()=>li,lists_insert_value:()=>gi,lists_insert_value2:()=>Ui,lists_pop:()=>Li,lists_remove_at:()=>Ai,lists_remove_at2:()=>wi,lists_reverse:()=>Ci,lists_setIndex3:()=>Gi,lists_set_index:()=>Oi,lists_sort:()=>fi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>on,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:()=>_n,dicts_delete:()=>Zi,dicts_get:()=>zi,dicts_get_default:()=>Qi,dicts_items:()=>en,dicts_keys:()=>qi,dicts_length:()=>sn,dicts_pop:()=>pn,dicts_setdefault:()=>an,dicts_to_json:()=>ln,dicts_todict:()=>rn,dicts_update:()=>$i,dicts_values:()=>nn,json_to_dicts:()=>dn});var p={};t.r(p),t.d(p,{logic_boolean:()=>On,logic_compare:()=>Tn,logic_compare_continous:()=>hn,logic_is:()=>gn,logic_is_in:()=>cn,logic_negate:()=>mn,logic_null:()=>En,logic_operation:()=>Mn,logic_tobool:()=>Cn,logic_true_or_false:()=>Rn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Kn,sdcard_use_spi_init:()=>Wn,storage_can_write_ornot:()=>vn,storage_change_dir:()=>kn,storage_close_file:()=>Xn,storage_delete_file:()=>yn,storage_file_seek:()=>Bn,storage_file_tell:()=>Vn,storage_file_write:()=>Dn,storage_fileopen:()=>An,storage_fileopen_new:()=>Ln,storage_fileopen_new_encoding:()=>Nn,storage_get_a_line:()=>Pn,storage_get_contents:()=>Fn,storage_get_contents_without_para:()=>fn,storage_get_current_dir:()=>Gn,storage_get_file_size:()=>bn,storage_get_filename:()=>Yn,storage_is_file:()=>Hn,storage_list_all_files:()=>xn,storage_make_dir:()=>Un,storage_open_file_with_os:()=>Sn,storage_rename:()=>wn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>$n,procedures_callreturn:()=>ts,procedures_defnoreturn:()=>zn,procedures_defreturn:()=>Qn,procedures_ifreturn:()=>es,procedures_mutatorarg:()=>Zn,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:()=>_s,tuple_create_with_item:()=>os,tuple_create_with_noreturn:()=>Os,tuple_create_with_text2:()=>ps,tuple_create_with_text_return:()=>as,tuple_del:()=>ls,tuple_find:()=>hs,tuple_getIndex:()=>us,tuple_getSublist:()=>ms,tuple_get_random_item:()=>Rs,tuple_get_sublist:()=>Es,tuple_join:()=>ds,tuple_length:()=>rs,tuple_max:()=>Is,tuple_totuple:()=>cs,tuple_trig:()=>Ms});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ps,set_clear:()=>Ds,set_create_with:()=>Cs,set_create_with_container:()=>Ss,set_create_with_item:()=>As,set_create_with_text_return:()=>Xs,set_length:()=>Ls,set_operate:()=>fs,set_operate_update:()=>Fs,set_pop:()=>Ns,set_sub:()=>vs,set_toset:()=>xs,set_update:()=>Ys});var d={};t.r(d),t.d(d,{html_content:()=>Gs,html_content_more:()=>Us,html_document:()=>bs,html_form:()=>ks,html_head_body:()=>Bs,html_style:()=>ws,html_style_color:()=>Ws,html_style_content:()=>Hs,html_text:()=>Ks,html_title:()=>Vs});var I={};t.r(I),t.d(I,{attribute_access:()=>o_,function_call:()=>n_,function_call_container:()=>s_,function_call_item:()=>__,raw_block:()=>zs,raw_empty:()=>js,raw_expression:()=>Qs,raw_table:()=>qs,text_comment:()=>Zs,text_print_multiple:()=>t_,text_print_multiple_container:()=>e_,text_print_multiple_item:()=>i_,type_check:()=>$s});var T={};t.r(T),t.d(T,{controls_type:()=>l_,controls_typeLists:()=>d_,lists_zip:()=>I_,unpack_iterable_object:()=>T_,variables_change:()=>u_,variables_get:()=>p_,variables_global:()=>r_,variables_set:()=>a_});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>S_,base_setup:()=>M_,controls_delay:()=>C_,controls_flow_statements:()=>g_,controls_for:()=>E_,controls_forEach:()=>f_,controls_for_range:()=>R_,controls_if:()=>m_,controls_interrupts:()=>N_,controls_lambda:()=>P_,controls_main:()=>h_,controls_millis:()=>A_,controls_nointerrupts:()=>D_,controls_pass:()=>Y_,controls_range:()=>F_,controls_repeat:()=>U_,controls_repeat_ext:()=>y_,controls_thread:()=>X_,controls_try_finally:()=>O_,controls_whileUntil:()=>c_,do_while:()=>x_,garbage_collection:()=>b_,get_mem_alloc:()=>V_,get_mem_free:()=>B_,get_unique_identifier:()=>G_,reset:()=>L_,time_sleep:()=>v_});var M={};t.r(M),t.d(M,{base_map:()=>ao,math_arithmetic:()=>K_,math_bit:()=>W_,math_constant:()=>k_,math_constant_mp:()=>H_,math_constrain:()=>eo,math_dec:()=>Q_,math_indexer_number:()=>so,math_map:()=>to,math_max_min:()=>Z_,math_number:()=>w_,math_number_base_conversion:()=>io,math_random:()=>$_,math_random_seed:()=>no,math_round:()=>_o,math_selfcalcu:()=>J_,math_single:()=>q_,math_to_int:()=>j_,math_trig:()=>z_,text_to_number:()=>oo,text_to_number_skulpt:()=>po,turn_to_int:()=>uo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>ho,char_to_ascii:()=>Mo,number_to_text:()=>mo,os_system:()=>Go,text:()=>ro,text_capital:()=>Lo,text_center:()=>No,text_char:()=>Io,text_char_at:()=>Ro,text_char_at2:()=>Eo,text_char_at3:()=>bo,text_compareTo:()=>yo,text_compare_to:()=>Co,text_encode:()=>Vo,text_equals_starts_ends:()=>go,text_eval:()=>Bo,text_find:()=>Do,text_format:()=>Yo,text_format_noreturn:()=>Xo,text_join:()=>To,text_join_seq:()=>fo,text_length:()=>Oo,text_random_char:()=>co,text_replace:()=>Fo,text_split:()=>Po,text_strip:()=>vo,text_substring:()=>Ao,text_substring2:()=>So,text_substring3:()=>xo,text_textarea:()=>lo});var O={};t.r(O),t.d(O,{list_many_input:()=>op,list_tolist:()=>mp,list_tolist2:()=>Op,list_trig:()=>np,lists_2d_get_col_row_data:()=>ko,lists_2d_get_data_with_col_row:()=>wo,lists_append_extend:()=>qo,lists_change_to:()=>_p,lists_change_to_general:()=>ap,lists_clear:()=>$o,lists_create_with:()=>Ho,lists_create_with2:()=>rp,lists_create_with_noreturn:()=>pp,lists_create_with_text:()=>Wo,lists_create_with_text2:()=>lp,lists_del_general:()=>up,lists_find:()=>tp,lists_getIndex3:()=>dp,lists_getSublist3:()=>Ip,lists_get_index:()=>Ko,lists_get_random_item:()=>zo,lists_get_random_sublist:()=>Qo,lists_get_sublist:()=>Uo,lists_insert_value:()=>jo,lists_insert_value2:()=>hp,lists_pop:()=>ip,lists_remove_at:()=>ep,lists_remove_at2:()=>Mp,lists_reverse:()=>Zo,lists_setIndex3:()=>Tp,lists_set_index:()=>Jo,lists_sort:()=>sp});var E={};t.r(E),t.d(E,{dicts_add_change_del:()=>Pp,dicts_add_or_change:()=>Cp,dicts_clear:()=>Lp,dicts_create_with:()=>Ep,dicts_create_with_noreturn:()=>Xp,dicts_deldict:()=>Fp,dicts_delete:()=>Sp,dicts_get:()=>cp,dicts_get_default:()=>gp,dicts_items:()=>Np,dicts_keys:()=>Rp,dicts_length:()=>fp,dicts_pop:()=>vp,dicts_setdefault:()=>Yp,dicts_to_json:()=>yp,dicts_todict:()=>xp,dicts_update:()=>Ap,dicts_values:()=>Dp,json_to_dicts:()=>bp});var R={};t.r(R),t.d(R,{logic_boolean:()=>wp,logic_compare:()=>Vp,logic_compare_continous:()=>Bp,logic_is:()=>Kp,logic_is_in:()=>Wp,logic_negate:()=>Up,logic_null:()=>kp,logic_operation:()=>Gp,logic_tobool:()=>Jp,logic_true_or_false:()=>Hp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ma,sdcard_use_spi_init:()=>ha,storage_can_write_ornot:()=>ia,storage_change_dir:()=>ra,storage_close_file:()=>sa,storage_delete_file:()=>oa,storage_file_seek:()=>ua,storage_file_tell:()=>aa,storage_file_write:()=>Zp,storage_fileopen:()=>zp,storage_fileopen_new:()=>Qp,storage_fileopen_new_encoding:()=>jp,storage_get_a_line:()=>ea,storage_get_contents:()=>ta,storage_get_contents_without_para:()=>$p,storage_get_current_dir:()=>la,storage_get_file_size:()=>pa,storage_get_filename:()=>na,storage_is_file:()=>Ta,storage_list_all_files:()=>_a,storage_make_dir:()=>da,storage_open_file_with_os:()=>qp,storage_rename:()=>Ia});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ra,procedures_callreturn:()=>Ea,procedures_defnoreturn:()=>Oa,procedures_defreturn:()=>ma,procedures_ifreturn:()=>ca,procedures_return:()=>ga});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Pa,tuple_create_with:()=>Ca,tuple_create_with_noreturn:()=>xa,tuple_create_with_text2:()=>Sa,tuple_create_with_text_return:()=>Aa,tuple_del:()=>Da,tuple_find:()=>va,tuple_getIndex:()=>La,tuple_getSublist:()=>Xa,tuple_get_random_item:()=>ba,tuple_get_sublist:()=>ya,tuple_join:()=>fa,tuple_length:()=>Na,tuple_max:()=>Fa,tuple_totuple:()=>Va,tuple_trig:()=>Ya});var S={};t.r(S),t.d(S,{set_add_discard:()=>Wa,set_clear:()=>wa,set_create_with:()=>Ba,set_create_with_text_return:()=>qa,set_length:()=>Ga,set_operate:()=>ka,set_operate_update:()=>Ha,set_pop:()=>Ua,set_sub:()=>Ka,set_toset:()=>za,set_update:()=>Ja});var A={};t.r(A),t.d(A,{html_content:()=>$a,html_content_more:()=>tu,html_document:()=>Qa,html_form:()=>iu,html_head_body:()=>Za,html_style:()=>eu,html_style_content:()=>nu,html_text:()=>su,html_title:()=>ja});var L={};t.r(L),t.d(L,{attribute_access:()=>lu,function_call:()=>ru,raw_block:()=>_u,raw_empty:()=>pu,raw_expression:()=>ou,raw_table:()=>au,type_check:()=>uu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Cu,actuator_extern_get_led_state:()=>Su,actuator_extern_led_bright:()=>gu,actuator_extern_led_brightness:()=>Au,actuator_ms32006_dcmotor:()=>Xu,actuator_ms32006_init:()=>Yu,actuator_ms32006_stepper:()=>xu,actuator_neopixel_init:()=>yu,actuator_neopixel_rgb:()=>bu,actuator_neopixel_rgb_all:()=>Vu,actuator_neopixel_write:()=>Bu,actuator_use_uart_init:()=>Gu,esp32_music_get_tempo_extern:()=>Eu,esp32_music_pitch:()=>hu,esp32_music_pitch_init:()=>Tu,esp32_music_pitch_with_time:()=>Mu,esp32_music_play_list:()=>mu,esp32_music_reset_extern:()=>Ru,esp32_music_set_tempo_extern:()=>Ou,esp32_music_stop:()=>cu,mixbot_actuator_extern_get_addr:()=>sr,mixbot_actuator_extern_set_addr:()=>_r,mixbot_addr_extern:()=>Wu,robot_led_extern:()=>zu,robot_led_extern_get_value:()=>Qu,robot_motor_extern:()=>Ku,robot_motor_extern_get_speed:()=>Ju,robot_servo_extern_absolute_run:()=>tr,robot_servo_extern_get_status:()=>ju,robot_servo_extern_relative_continue:()=>nr,robot_servo_extern_relative_origin:()=>er,robot_servo_extern_relative_run:()=>ir,robot_servo_extern_stop:()=>$u,robot_servo_extern_stop_mode:()=>Zu,robot_traffic_light_extern:()=>qu,servo_get_angle:()=>Pu,servo_get_speed:()=>vu,servo_init:()=>Lu,servo_move:()=>Nu,servo_set_angle:()=>fu,servo_set_speed:()=>Fu,servo_speed_360:()=>Du,syn6288_builtin_voice:()=>ku,syn6288_get_voice:()=>wu,syn6288_set_voice:()=>Uu,syn6288_tts_play:()=>Hu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>br,actuator_dc_motor_stop:()=>Vr,actuator_get_led_bright:()=>rr,actuator_get_led_state:()=>lr,actuator_led_bright:()=>ur,actuator_led_brightness:()=>dr,actuator_mixbot_buzzer_on_off:()=>kr,actuator_mixgo_nova_mic_get:()=>qr,actuator_mixgo_nova_mic_set:()=>Jr,actuator_mixgo_nova_onboard_music_pitch:()=>tl,actuator_mixgo_nova_onboard_music_stop:()=>el,actuator_mixgo_nova_play_audio:()=>Zr,actuator_mixgo_nova_play_online_audio:()=>$r,actuator_mixgo_nova_record_audio:()=>jr,actuator_mixgo_nova_voice_get:()=>Qr,actuator_mixgo_nova_voice_set:()=>zr,actuator_mixgo_zero_led_color:()=>Ir,actuator_onboard_neopixel_rgb:()=>Er,actuator_onboard_neopixel_rgb_all:()=>Rr,actuator_onboard_neopixel_rgb_show_all_chase:()=>gr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>cr,actuator_onboard_neopixel_write:()=>Cr,actuator_rm_onboard_neopixel_rgb:()=>Sr,actuator_rm_onboard_neopixel_rgb_all:()=>Ar,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Lr,actuator_stepper_keep:()=>xr,actuator_stepper_stop:()=>yr,analog_ble_keyboard_init:()=>Tl,analog_ble_keyboard_input:()=>ml,analog_ble_keyboard_send_battery:()=>El,analog_ble_keyboard_str:()=>Ol,analog_ble_mouse_init:()=>Rl,analog_ble_mouse_input:()=>Cl,analog_ble_mouse_send_battery:()=>Sl,analog_keyboard_input:()=>_l,analog_keyboard_str:()=>Il,analog_mouse_input:()=>ll,bitbot_motor:()=>Kr,bitbot_move:()=>Hr,bitbot_stop:()=>Wr,ble_keyboard_connect:()=>Ml,ble_keyboard_get_mac:()=>hl,ble_mouse_connect:()=>gl,ble_mouse_get_mac:()=>cl,cc_number:()=>Or,esp32_music_get_tempo:()=>Dr,esp32_music_reset:()=>fr,esp32_music_set_tempo:()=>Nr,esp32_onboard_music_pitch:()=>Fr,esp32_onboard_music_pitch_with_time:()=>Pr,esp32_onboard_music_play_list:()=>Yr,esp32_onboard_music_stop:()=>vr,general_key:()=>pl,general_key_tuple:()=>al,generalkey_container:()=>ul,generalkey_create_with_item:()=>rl,get_power_output:()=>nl,ledswitch:()=>ar,mixbot_motor:()=>wr,mixbot_motor_status:()=>Br,mixbot_move:()=>Gr,mixbot_stop:()=>Ur,mouse_key:()=>dl,number:()=>pr,rm_actuator_get_led_bright:()=>hr,rm_actuator_get_led_state:()=>Mr,rm_actuator_led_bright:()=>Tr,rm_actuator_led_brightness:()=>mr,rm_motor:()=>Xr,set_all_power_output:()=>sl,set_power_output:()=>il,special_key:()=>ol});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>sd,ai_sensor_ailocal_class:()=>Jl,ai_sensor_ailocal_class_result:()=>ql,ai_sensor_ailocal_train:()=>Kl,ai_sensor_asr_recognize:()=>$l,ai_sensor_audio_play:()=>Ql,ai_sensor_audio_record:()=>zl,ai_sensor_barcode:()=>vl,ai_sensor_circle:()=>Vl,ai_sensor_classifier_faces:()=>nd,ai_sensor_color:()=>wl,ai_sensor_color_chases:()=>Wl,ai_sensor_color_chases_result:()=>Hl,ai_sensor_config:()=>Fl,ai_sensor_face:()=>id,ai_sensor_find_20objects:()=>_d,ai_sensor_find_barcodes:()=>Yl,ai_sensor_find_circles:()=>Bl,ai_sensor_find_colors:()=>kl,ai_sensor_find_licenseplates:()=>ed,ai_sensor_find_lines:()=>bl,ai_sensor_find_qrcodes:()=>fl,ai_sensor_find_rects:()=>Ul,ai_sensor_find_tags:()=>xl,ai_sensor_licenseplate:()=>td,ai_sensor_line:()=>yl,ai_sensor_qrcode:()=>Nl,ai_sensor_qrcode_lite:()=>Dl,ai_sensor_rect:()=>Gl,ai_sensor_rgb:()=>Pl,ai_sensor_tag:()=>Xl,ai_sensor_use_uart_init:()=>Ll,ai_sensor_yolo_recognize:()=>jl,ai_sensor_yolo_recognize_result:()=>Zl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>ad,MICROPYTHON_AI_Speech_unit:()=>pd,MICROPYTHON_AI_client:()=>od});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Cd,mpython_blynk_app_notify:()=>Md,mpython_blynk_email:()=>Ed,mpython_blynk_get_timers:()=>Rd,mpython_blynk_on_connected:()=>Id,mpython_blynk_on_disconnected:()=>dd,mpython_blynk_run:()=>hd,mpython_blynk_sensor_data_to_app:()=>gd,mpython_blynk_set_property:()=>Od,mpython_blynk_setup:()=>Sd,mpython_blynk_stop_timers:()=>md,mpython_blynk_sync_virtual:()=>ld,mpython_blynk_terminal_widget_vpin:()=>rd,mpython_blynktimer:()=>cd,mpython_blynktimer_run:()=>Td});var v={};t.r(v),t.d(v,{cc_g1_init:()=>Ad,cc_g1_read_bat:()=>Ld,cc_g1_read_joystick:()=>Nd,cc_g1_read_key:()=>Dd,cc_g1_turnoff:()=>fd});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>Vd,ce_go_get_led_bright:()=>Yd,ce_go_get_led_state:()=>Xd,ce_go_hall_attachInterrupt:()=>Bd,ce_go_hall_data:()=>Ud,ce_go_hall_initialize:()=>Gd,ce_go_led_bright:()=>vd,ce_go_led_brightness:()=>xd,ce_go_light_number:()=>Pd,ce_go_pin_light:()=>Kd,ce_go_pin_near:()=>kd,ce_go_pin_near_line:()=>wd,ce_go_pin_near_state_change:()=>Hd,ce_go_stepper_keep:()=>yd,ce_go_stepper_stop:()=>bd,sensor_mixgome_eulerangles:()=>Wd});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>DI,communicate_bluetooth_connect:()=>vI,communicate_bluetooth_disconnect:()=>YI,communicate_bluetooth_handle:()=>VI,communicate_bluetooth_is_connected:()=>xI,communicate_bluetooth_mac:()=>PI,communicate_bluetooth_peripheral_init:()=>fI,communicate_bluetooth_recv:()=>yI,communicate_bluetooth_recv_only:()=>bI,communicate_bluetooth_scan:()=>FI,communicate_bluetooth_send:()=>XI,communicate_espnow_init:()=>BI,communicate_espnow_init_new:()=>GI,communicate_i2c_available:()=>rI,communicate_i2c_init:()=>Qd,communicate_i2c_master_read:()=>uI,communicate_i2c_onboard:()=>qd,communicate_i2c_read:()=>jd,communicate_i2c_scan:()=>$d,communicate_i2c_write:()=>Zd,communicate_ir_recv_init:()=>OI,communicate_ir_send_init:()=>CI,communicate_ow_init:()=>dI,communicate_ow_read:()=>TI,communicate_ow_reset:()=>mI,communicate_ow_scan:()=>II,communicate_ow_select:()=>MI,communicate_ow_write:()=>hI,communicate_spi_buffer:()=>iI,communicate_spi_init:()=>tI,communicate_spi_onboard:()=>zd,communicate_spi_read:()=>nI,communicate_spi_read_output:()=>sI,communicate_spi_readinto:()=>_I,communicate_spi_readinto_output:()=>oI,communicate_spi_set:()=>eI,communicate_spi_write:()=>pI,communicate_spi_write_readinto:()=>aI,espnow_radio_channel:()=>KI,espnow_radio_channel_new:()=>qI,espnow_radio_on_off:()=>zI,espnow_radio_rec:()=>jI,espnow_radio_recv:()=>$I,espnow_radio_recv_certain_msg:()=>tT,espnow_radio_recv_certain_msg_new:()=>iT,espnow_radio_recv_msg:()=>ZI,espnow_radio_recv_new:()=>eT,espnow_radio_send:()=>QI,espnow_radio_txpower:()=>JI,i2c_available:()=>ST,i2c_init:()=>rT,i2c_master_reader2:()=>CT,i2c_read:()=>lT,i2c_scan:()=>IT,i2c_slave_onreceive:()=>lI,i2c_write:()=>dT,internal_variable:()=>EI,ir_recv_timeout:()=>gI,ir_transmit_busy:()=>NI,ir_transmit_conventional_data:()=>SI,ir_transmit_raw_code:()=>LI,ir_transmit_study_code:()=>AI,ir_whether_recv:()=>cI,lora_init:()=>nT,lora_packet:()=>sT,lora_recv:()=>oT,lora_send:()=>_T,network_espnow_info:()=>wI,network_espnow_mac:()=>UI,network_espnow_recv:()=>kI,network_espnow_recv_handle:()=>WI,network_espnow_send:()=>HI,recv_fun:()=>RI,spi_buffer:()=>MT,spi_init:()=>TT,spi_read:()=>mT,spi_read_output:()=>OT,spi_readinto:()=>ET,spi_readinto_output:()=>RT,spi_set:()=>hT,spi_write:()=>cT,spi_write_readinto:()=>gT,urequests_attribute:()=>aT,urequests_get:()=>pT,urequests_method:()=>uT});var x={};t.r(x),t.d(x,{display_animate:()=>th,display_blink_rate:()=>QT,display_circle:()=>eh,display_color_seclet:()=>Ih,display_draw_4strings:()=>HT,display_fill:()=>$T,display_get_screen_image:()=>zT,display_help:()=>nh,display_image_size:()=>WT,display_lcd_use_i2c_init:()=>Eh,display_line:()=>JT,display_line_arbitrarily:()=>qT,display_matrix_extern_bright_point:()=>yT,display_matrix_extern_bright_screen:()=>VT,display_matrix_extern_clear:()=>BT,display_matrix_extern_get_pixel:()=>xT,display_matrix_extern_get_screen_pixel:()=>bT,display_matrix_extern_image_builtins:()=>GT,display_matrix_extern_scroll_string:()=>FT,display_matrix_extern_scroll_string_delay:()=>PT,display_matrix_extern_shift:()=>XT,display_matrix_extern_show_frame_string:()=>vT,display_matrix_extern_show_frame_string_delay:()=>YT,display_matrix_extern_show_image:()=>DT,display_matrix_extern_show_image_or_string_delay:()=>fT,display_matrix_use_i2c_init:()=>NT,display_oled_drawPixel:()=>_h,display_oled_showBitmap:()=>sh,display_oled_use_i2c_init:()=>Sh,display_onoff:()=>ZT,display_rect:()=>KT,display_rgb_color:()=>jT,display_tm1650_power:()=>ph,display_tm1650_set_brightness:()=>rh,display_tm1650_show_dot:()=>uh,display_tm1650_show_num:()=>ah,display_tm_use_i2c_init:()=>oh,display_triangle:()=>ih,display_use_i2c_init:()=>kT,extern_oled_bright_point:()=>xh,extern_oled_clear:()=>yh,extern_oled_get_pixel:()=>Xh,extern_oled_hvline:()=>Vh,extern_oled_line:()=>Bh,extern_oled_scroll_string:()=>fh,extern_oled_scroll_string_delay:()=>Fh,extern_oled_shape_rect:()=>bh,extern_oled_shift:()=>Yh,extern_oled_show_frame_string:()=>Ph,extern_oled_show_frame_string_delay:()=>vh,extern_oled_show_image:()=>Ah,extern_oled_show_image_or_string_delay:()=>Dh,extern_oled_show_image_xy:()=>Lh,extern_oled_show_string:()=>Nh,lcd_backlight:()=>gh,lcd_clear:()=>Ch,lcd_print_string:()=>ch,lcd_show_image_or_string_delay:()=>Rh,matrix_extern_image_arithmetic:()=>UT,matrix_extern_image_invert:()=>wT,tft_fill:()=>mh,tft_line_arbitrarily:()=>Oh,tft_scroll_string_delay:()=>hh,tft_show_frame_string_delay:()=>Mh,tft_show_image_or_string_delay:()=>Th,tft_show_image_xy:()=>dh,tft_use_spi_init:()=>lh});var y={};t.r(y),t.d(y,{bitbot_display_image_create:()=>SM,display_bright_point:()=>tM,display_bright_screen:()=>iM,display_clear:()=>nM,display_get_pixel:()=>$h,display_get_screen_pixel:()=>eM,display_image_builtins:()=>qh,display_image_builtins_all:()=>zh,display_image_create:()=>Jh,display_scroll_string:()=>kh,display_scroll_string_delay:()=>Hh,display_shift:()=>Zh,display_show_frame_string:()=>Wh,display_show_frame_string_delay:()=>Kh,display_show_image:()=>Uh,display_show_image_or_string_delay:()=>wh,draw_pointer:()=>qM,image_arithmetic:()=>Qh,image_invert:()=>jh,mixbot_display_bright_screen:()=>gM,mixbot_display_get_ambientbright:()=>cM,mixbot_display_get_screen_pixel:()=>RM,mixbot_display_image_create:()=>EM,mixbot_display_rotate:()=>CM,mixgo_display_image_create_new:()=>oM,mixgome_display_font:()=>pM,mixgome_display_image_create:()=>sM,mixgomini_display_image_create:()=>_M,mpython_display_hvline:()=>MM,mpython_display_line:()=>mM,mpython_display_shape_rect:()=>hM,mpython_pbm_image:()=>OM,onboard_oled_bright_point:()=>TM,onboard_oled_scroll_string_delay:()=>dM,onboard_oled_show_frame_string_delay:()=>IM,onboard_oled_show_image:()=>aM,onboard_oled_show_image_or_string_delay:()=>lM,onboard_oled_show_image_xy:()=>uM,onboard_oled_show_string:()=>rM,onboard_tft_bright_point:()=>bM,onboard_tft_bright_screen:()=>GM,onboard_tft_clear:()=>VM,onboard_tft_clock_clear:()=>KM,onboard_tft_clock_draw:()=>WM,onboard_tft_clock_get_rtctime:()=>kM,onboard_tft_clock_init:()=>wM,onboard_tft_clock_set_time:()=>HM,onboard_tft_display_hvline:()=>YM,onboard_tft_display_line:()=>XM,onboard_tft_display_shape_circle:()=>JM,onboard_tft_display_shape_rect:()=>vM,onboard_tft_fill:()=>UM,onboard_tft_get_pixel:()=>yM,onboard_tft_get_screen_pixel:()=>BM,onboard_tft_scroll_string:()=>DM,onboard_tft_scroll_string_delay:()=>fM,onboard_tft_shift:()=>xM,onboard_tft_show_frame_string:()=>FM,onboard_tft_show_frame_string_delay:()=>PM,onboard_tft_show_image:()=>AM,onboard_tft_show_image_or_string_delay:()=>NM,onboard_tft_show_image_xy:()=>LM});var b={};t.r(b),t.d(b,{factory_block:()=>_m,factory_block_return:()=>om,factory_block_return_with_textarea:()=>am,factory_block_with_textarea:()=>pm,factory_callMethod_noreturn:()=>nm,factory_callMethod_return:()=>sm,factory_create_with_container:()=>$M,factory_create_with_item:()=>tm,factory_declare:()=>im,factory_from_import:()=>QM,factory_function_noreturn:()=>ZM,factory_function_return:()=>em,factory_import:()=>jM,folding_block:()=>um});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>Pm,inout_analog_atten:()=>Em,inout_analog_read:()=>Om,inout_analog_read_init:()=>Am,inout_analog_write:()=>hm,inout_analog_write_init:()=>Sm,inout_analog_write_set:()=>Mm,inout_analog_write_set_freq:()=>Dm,inout_digital_init:()=>gm,inout_digital_read:()=>Im,inout_digital_write:()=>dm,inout_highlow:()=>lm,inout_pinMode:()=>Nm,inout_pin_attachInterrupt:()=>cm,inout_pin_pressed:()=>Rm,inout_pin_pressed_init:()=>Lm,inout_pwm_analog_write:()=>Tm,inout_pwm_analog_write_init:()=>Cm,inout_pwm_analog_write_set_freq:()=>mm,pin_pressed:()=>Fm,pin_pressed_init:()=>fm});var B={};t.r(B),t.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>eO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>tO,IOT_EMQX_PING:()=>Zm,IOT_FORMATTING:()=>Qm,IOT_FORMAT_STRING:()=>jm,IOT_MIXIO_NTP:()=>$m,IOT_MIXIO_PUBLISH:()=>km,IOT_MIXIO_SUBSCRIBE:()=>Hm,iot_checkonenet:()=>lO,iot_client_onboard:()=>nO,iot_create_with_item:()=>Um,iot_http_client:()=>sO,iot_http_data:()=>_O,iot_mixio_check:()=>Jm,iot_mixio_connect:()=>wm,iot_mixio_connect_only:()=>Km,iot_mixio_disconnect:()=>Wm,iot_mixio_format_msg:()=>zm,iot_mixio_format_topic:()=>qm,iot_mixly_key:()=>iO,iot_mqtt_client:()=>oO,iot_mqtt_data:()=>pO,iot_onenet_check:()=>ym,iot_onenet_connect:()=>Xm,iot_onenet_disconnect:()=>xm,iot_onenet_publish:()=>Vm,iot_onenet_publish_dict:()=>bm,iot_onenetconnect:()=>uO,iot_onenetdisconnect:()=>rO,iot_publish:()=>dO,iot_publish_container:()=>Bm,iot_publish_item:()=>Gm,iot_wifi_connect:()=>Ym,iot_wificonnect:()=>aO});var G={};t.r(G),t.d(G,{network_ap_connect:()=>CO,network_connect:()=>OO,network_get_connect:()=>RO,network_get_wifi:()=>gO,network_init:()=>TO,network_is_active:()=>MO,network_open:()=>hO,network_scan:()=>mO,network_server:()=>SO,network_socket_accept:()=>fO,network_socket_bind:()=>LO,network_socket_close:()=>XO,network_socket_connect:()=>NO,network_socket_init:()=>AO,network_socket_listen:()=>DO,network_socket_receive:()=>FO,network_socket_receive_from:()=>vO,network_socket_send:()=>PO,network_socket_send_to:()=>YO,network_stop:()=>cO,network_wifi_connect:()=>EO,ntptime_address:()=>BO,ntptime_time:()=>VO,requests_attribute:()=>yO,requests_attribute2:()=>kO,requests_get:()=>xO,requests_get2:()=>UO,requests_method:()=>bO,requests_post:()=>wO});var U={};t.r(U),t.d(U,{pe_g1_battery_left:()=>KO,pe_g1_dc_motor:()=>JO,pe_g1_dc_motor_speed:()=>qO,pe_g1_servo_get_angle:()=>jO,pe_g1_servo_get_speed:()=>ZO,pe_g1_servo_set_angle:()=>zO,pe_g1_servo_set_speed:()=>QO,pe_g1_use_i2c_init:()=>WO});var w={};t.r(w),t.d(w,{HCSR04:()=>$E,PS2_Button:()=>nR,PS2_Buttons:()=>_R,PS2_Buttons_new:()=>uR,PS2_State:()=>sR,PS2_init:()=>tR,PS2_init_new:()=>pR,PS2_stk:()=>oR,PS2_stk_new:()=>rR,PS2_vibration:()=>iR,PS2_vibration_new:()=>aR,esp32_s2_weather_init:()=>zE,esp32_s2_weather_rain:()=>jE,esp32_s2_weather_wd:()=>QE,esp32_s2_weather_ws:()=>ZE,extern_rfid_read:()=>xE,extern_rfid_readcontent:()=>bE,extern_rfid_readid:()=>yE,extern_rfid_status:()=>GE,extern_rfid_write:()=>VE,extern_rfid_write_return:()=>BE,gnss_get_data:()=>TR,gnss_have_data:()=>IR,mixbot_sensor_extern_get_addr:()=>cR,mixbot_sensor_extern_set_addr:()=>gR,pm25_get_data:()=>dR,robot_button_extern_get_value:()=>hR,robot_color_extern_get_value:()=>RR,robot_infrared_extern_get_value:()=>mR,robot_infrared_extern_grey_get_value:()=>OR,robot_potentiometer_extern_get_value:()=>ER,robot_sonar_extern_get_value:()=>CR,robot_sonar_extern_led:()=>SR,robot_touch_extern_get_value:()=>MR,sensor_APDS9960_extern:()=>mE,sensor_DS18X20:()=>IE,sensor_LTR308_extern:()=>OE,sensor_LTR390UV_extern:()=>RE,sensor_MAX30102_extern:()=>ME,sensor_QMC5883L_extern:()=>AE,sensor_VL530LX_extern:()=>cE,sensor_adxl345_get_acceleration:()=>_E,sensor_aht11_extern:()=>CE,sensor_bmp:()=>lE,sensor_compass_reset:()=>YE,sensor_dht11:()=>pE,sensor_hp203_extern:()=>SE,sensor_light_level:()=>oE,sensor_lm35:()=>TE,sensor_ltr381_extern:()=>EE,sensor_mixgo_extern_button_attachInterrupt:()=>nE,sensor_mixgo_extern_button_get_presses:()=>iE,sensor_mixgo_extern_button_is_pressed:()=>tE,sensor_mixgo_extern_button_was_pressed:()=>eE,sensor_mixgo_extern_light:()=>aE,sensor_mixgo_extern_pin_near:()=>rE,sensor_mixgo_extern_sound:()=>uE,sensor_mixgoce_hot_wheel_degrees:()=>qE,sensor_mixgoce_hot_wheel_is_touched:()=>JE,sensor_mpu9250_attachGestureInterrupt:()=>sE,sensor_mpu9250_calibrate_compass:()=>FE,sensor_mpu9250_field_strength:()=>vE,sensor_mpu9250_gesture:()=>LE,sensor_mpu9250_get_acceleration:()=>NE,sensor_mpu9250_get_gyro:()=>fE,sensor_mpu9250_get_magnetic:()=>DE,sensor_mpu9250_temperature:()=>PE,sensor_sht:()=>dE,sensor_shtc3_extern:()=>gE,sensor_use_i2c_init:()=>hE,sensor_use_spi_init:()=>XE,sensor_use_uart_init:()=>lR,sensor_weather_solo_init:()=>AR,sensor_weather_solo_rain:()=>DR,sensor_weather_solo_wd:()=>LR,sensor_weather_solo_ws:()=>NR,weather_data:()=>UE,weather_have_data:()=>wE,weather_set_label:()=>HE,weather_set_label_container:()=>WE,weather_set_label_item:()=>KE,weather_uart_mixio:()=>kE});var k={};t.r(k),t.d(k,{HCSR04:()=>WR,RTC_set_date:()=>HR,RTC_set_time:()=>kR,bitbot_als_num:()=>jc,dht11:()=>sg,number1:()=>JR,number2:()=>qR,number3:()=>zR,number4:()=>QR,number5:()=>jR,number6:()=>ZR,number7:()=>$R,onboard_RTC_get_time:()=>oc,onboard_RTC_get_time_str:()=>dc,onboard_RTC_get_timestamp:()=>pc,onboard_RTC_set_datetime:()=>rc,onboard_RTC_settime_string:()=>uc,onboard_RTC_timestamp_totuple:()=>ac,rfid_readcontent:()=>Ec,rfid_readid:()=>Oc,rfid_write:()=>Rc,rfid_write_return:()=>cc,sensor_LTR308:()=>Ic,sensor_aht11:()=>hc,sensor_bitbot_ALS:()=>Qc,sensor_button_get_presses:()=>tg,sensor_button_is_pressed:()=>Zc,sensor_button_was_pressed:()=>$c,sensor_distance_hrsc04:()=>wR,sensor_eulerangles:()=>Cc,sensor_field_strength:()=>_g,sensor_get_acceleration:()=>gc,sensor_get_temperature:()=>Mc,sensor_hp203:()=>mc,sensor_light:()=>ng,sensor_mixbot_get_gyro:()=>zc,sensor_mixbot_patrol_calibrate:()=>Kc,sensor_mixbot_patrol_value:()=>Jc,sensor_mixbot_temperature:()=>qc,sensor_mixgo_LTR308:()=>_c,sensor_mixgo_button_attachInterrupt:()=>YR,sensor_mixgo_button_get_presses:()=>vR,sensor_mixgo_button_is_pressed:()=>FR,sensor_mixgo_button_was_pressed:()=>PR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Xc,sensor_mixgo_cc_mmc5603_get_angle:()=>Yc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>vc,sensor_mixgo_light:()=>KR,sensor_mixgo_nova_LTR308:()=>sc,sensor_mixgo_nova_pin_near:()=>nc,sensor_mixgo_pin_near:()=>ic,sensor_mixgo_pin_near_double:()=>ec,sensor_mixgo_pin_near_single:()=>tc,sensor_mixgo_pin_pressed:()=>VR,sensor_mixgo_touch_slide:()=>UR,sensor_mixgocar42_button_attachInterrupt:()=>bR,sensor_mixgocar42_button_get_presses:()=>yR,sensor_mixgocar42_button_is_pressed:()=>XR,sensor_mixgocar42_button_was_pressed:()=>xR,sensor_mixgocar_battery_left:()=>Wc,sensor_mixgocar_pin_near:()=>kc,sensor_mixgocar_pin_near_line:()=>wc,sensor_mixgocar_pin_near_state_change:()=>Hc,sensor_mixgoce_pin_pressed:()=>BR,sensor_mixgoce_temperature:()=>yc,sensor_mixgome_temperature:()=>xc,sensor_mpython_pin_pressed:()=>GR,sensor_mpython_qmi8658_get_gyro:()=>bc,sensor_mpython_qmi8658_temperature:()=>Vc,sensor_onboard_compass_reset:()=>Pc,sensor_onboard_mpu9250_calibrate_compass:()=>Dc,sensor_onboard_mpu9250_field_strength:()=>Fc,sensor_onboard_mpu9250_gesture:()=>Sc,sensor_onboard_mpu9250_get_acceleration:()=>Ac,sensor_onboard_mpu9250_get_gyro:()=>Nc,sensor_onboard_mpu9250_get_magnetic:()=>Lc,sensor_onboard_mpu9250_temperature:()=>fc,sensor_pin_near:()=>ig,sensor_pin_pressed:()=>eg,sensor_rm_acc:()=>Uc,sensor_rm_battery_left:()=>Gc,sensor_rm_pin_near_double:()=>Bc,sensor_rtc_init:()=>lc,sensor_sound:()=>Tc,sensor_temperature:()=>og});var H={};t.r(H),t.d(H,{serial_any:()=>Tg,serial_begin:()=>Eg,serial_print:()=>ug,serial_print_byte:()=>ag,serial_print_hex:()=>lg,serial_println:()=>rg,serial_read_from_ai:()=>Dg,serial_readline:()=>hg,serial_readstr:()=>Ig,serial_readstr_until:()=>Mg,serial_receive_data_event:()=>dg,serial_send_to_ai:()=>Ng,serial_softserial:()=>Og,serial_softserial_new:()=>mg,system_input:()=>Rg,system_print:()=>cg,system_print_container:()=>Ag,system_print_end:()=>Cg,system_print_inline:()=>gg,system_print_item:()=>Lg,system_print_many:()=>Sg});var W={};t.r(W),t.d(W,{Panic_with_status_code:()=>vg,Timer_init:()=>Wg,base_delay:()=>qg,controls_delay:()=>Pg,controls_delay_new:()=>Fg,controls_millis:()=>Xg,controls_uname:()=>yg,raw_block:()=>xg,reset:()=>Yg,system_bitbot_shutdown:()=>Hg,system_machine_reset:()=>kg,system_ticks_diff:()=>Bg,system_timer:()=>Vg,system_timer_init:()=>Gg,system_wdt_feed:()=>wg,system_wdt_init:()=>Ug,time_ticks_diff:()=>Jg,timer:()=>bg,timer2:()=>Kg});var K={};t.r(K),t.d(K,{Air_daily_content:()=>aC,Air_now_content:()=>eC,Geo_moon_content:()=>rC,Geo_sun_content:()=>uC,Life_suggestion_content:()=>nC,Location_search_content:()=>_C,Tide_daily_content:()=>sC,WEATHER_DAILY:()=>jg,WEATHER_HOUR:()=>Zg,WEATHER_NOW:()=>Qg,Weather_alarm_content:()=>iC,Weather_daily:()=>oC,Weather_daily_content:()=>pC,Weather_now:()=>$g,Weather_now_content:()=>tC});var J={};t.r(J),t.d(J,{actuator_extern_get_led_bright:()=>FC,actuator_extern_get_led_state:()=>PC,actuator_extern_led_bright:()=>fC,actuator_extern_led_brightness:()=>vC,actuator_ms32006_dcmotor:()=>OC,actuator_ms32006_init:()=>mC,actuator_ms32006_stepper:()=>EC,actuator_neopixel_init:()=>YC,actuator_neopixel_rgb:()=>yC,actuator_neopixel_rgb_all:()=>XC,actuator_neopixel_write:()=>xC,actuator_use_uart_init:()=>bC,esp32_music_get_tempo_extern:()=>AC,esp32_music_pitch:()=>cC,esp32_music_pitch_init:()=>RC,esp32_music_pitch_with_time:()=>gC,esp32_music_play_list:()=>LC,esp32_music_reset_extern:()=>NC,esp32_music_set_tempo_extern:()=>SC,esp32_music_stop:()=>CC,mixbot_actuator_extern_get_addr:()=>eS,mixbot_actuator_extern_set_addr:()=>iS,mixbot_addr_extern:()=>wC,robot_led_extern:()=>KC,robot_led_extern_get_value:()=>JC,robot_motor_extern:()=>kC,robot_motor_extern_get_speed:()=>HC,robot_servo_extern_absolute_run:()=>jC,robot_servo_extern_get_status:()=>qC,robot_servo_extern_relative_continue:()=>tS,robot_servo_extern_relative_origin:()=>ZC,robot_servo_extern_relative_run:()=>$C,robot_servo_extern_stop:()=>QC,robot_servo_extern_stop_mode:()=>zC,robot_traffic_light_extern:()=>WC,servo_get_angle:()=>hC,servo_get_speed:()=>MC,servo_init:()=>lC,servo_move:()=>DC,servo_set_angle:()=>IC,servo_set_speed:()=>TC,servo_speed_360:()=>dC,syn6288_builtin_voice:()=>GC,syn6288_get_voice:()=>BC,syn6288_set_voice:()=>VC,syn6288_tts_play:()=>UC});var q={};t.r(q),t.d(q,{actuator_dc_motor:()=>FS,actuator_dc_motor_stop:()=>PS,actuator_get_led_bright:()=>IS,actuator_get_led_state:()=>TS,actuator_led_bright:()=>dS,actuator_led_brightness:()=>hS,actuator_mixbot_buzzer_on_off:()=>yS,actuator_mixgo_nova_mic_get:()=>US,actuator_mixgo_nova_mic_set:()=>GS,actuator_mixgo_nova_onboard_music_pitch:()=>JS,actuator_mixgo_nova_onboard_music_stop:()=>qS,actuator_mixgo_nova_play_audio:()=>WS,actuator_mixgo_nova_play_online_audio:()=>KS,actuator_mixgo_nova_record_audio:()=>HS,actuator_mixgo_nova_voice_get:()=>kS,actuator_mixgo_nova_voice_set:()=>wS,actuator_mixgo_zero_led_color:()=>MS,actuator_onboard_neopixel_rgb:()=>CS,actuator_onboard_neopixel_rgb_all:()=>SS,actuator_onboard_neopixel_rgb_show_all_chase:()=>AS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>LS,actuator_onboard_neopixel_write:()=>gS,actuator_stepper_keep:()=>DS,actuator_stepper_stop:()=>fS,analog_ble_keyboard_init:()=>_A,analog_ble_keyboard_input:()=>aA,analog_ble_keyboard_send_battery:()=>rA,analog_ble_keyboard_str:()=>uA,analog_ble_mouse_init:()=>lA,analog_ble_mouse_input:()=>TA,analog_ble_mouse_send_battery:()=>hA,analog_keyboard_input:()=>ZS,analog_keyboard_str:()=>nA,analog_mouse_input:()=>eA,bitbot_motor:()=>BS,bitbot_move:()=>bS,bitbot_stop:()=>VS,ble_keyboard_connect:()=>pA,ble_keyboard_get_mac:()=>oA,ble_mouse_connect:()=>IA,ble_mouse_get_mac:()=>dA,cc_number:()=>mS,esp32_music_get_tempo:()=>sS,esp32_music_reset:()=>uS,esp32_music_set_tempo:()=>nS,esp32_onboard_music_pitch:()=>_S,esp32_onboard_music_pitch_with_time:()=>oS,esp32_onboard_music_play_list:()=>aS,esp32_onboard_music_stop:()=>pS,general_key:()=>tA,general_key_tuple:()=>sA,get_power_output:()=>QS,ledswitch:()=>lS,mixbot_motor:()=>xS,mixbot_motor_status:()=>vS,mixbot_move:()=>YS,mixbot_stop:()=>XS,mouse_key:()=>iA,number:()=>rS,rm_actuator_get_led_bright:()=>ES,rm_actuator_get_led_state:()=>RS,rm_actuator_led_bright:()=>OS,rm_actuator_led_brightness:()=>cS,rm_motor:()=>NS,set_all_power_output:()=>jS,set_power_output:()=>zS,special_key:()=>$S});var z={};t.r(z),t.d(z,{ai_sensor_20object:()=>qA,ai_sensor_ailocal_class:()=>bA,ai_sensor_ailocal_class_result:()=>VA,ai_sensor_ailocal_train:()=>yA,ai_sensor_asr_recognize:()=>kA,ai_sensor_audio_play:()=>GA,ai_sensor_audio_record:()=>BA,ai_sensor_barcode:()=>gA,ai_sensor_circle:()=>DA,ai_sensor_classifier_faces:()=>JA,ai_sensor_color:()=>vA,ai_sensor_color_chases:()=>xA,ai_sensor_color_chases_result:()=>XA,ai_sensor_config:()=>OA,ai_sensor_face:()=>KA,ai_sensor_find_20objects:()=>zA,ai_sensor_find_barcodes:()=>CA,ai_sensor_find_circles:()=>fA,ai_sensor_find_colors:()=>YA,ai_sensor_find_licenseplates:()=>WA,ai_sensor_find_lines:()=>NA,ai_sensor_find_qrcodes:()=>cA,ai_sensor_find_rects:()=>PA,ai_sensor_find_tags:()=>AA,ai_sensor_licenseplate:()=>HA,ai_sensor_line:()=>LA,ai_sensor_qrcode:()=>RA,ai_sensor_qrcode_lite:()=>mA,ai_sensor_rect:()=>FA,ai_sensor_rgb:()=>EA,ai_sensor_tag:()=>SA,ai_sensor_use_uart_init:()=>MA,ai_sensor_yolo_recognize:()=>UA,ai_sensor_yolo_recognize_result:()=>wA});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>ZA,MICROPYTHON_AI_Speech_unit:()=>jA,MICROPYTHON_AI_client:()=>QA});var j={};t.r(j),t.d(j,{mpython_blynk_app_data:()=>rL,mpython_blynk_app_notify:()=>_L,mpython_blynk_email:()=>lL,mpython_blynk_get_timers:()=>pL,mpython_blynk_on_connected:()=>iL,mpython_blynk_on_disconnected:()=>eL,mpython_blynk_run:()=>sL,mpython_blynk_sensor_data_to_app:()=>uL,mpython_blynk_set_property:()=>dL,mpython_blynk_setup:()=>IL,mpython_blynk_stop_timers:()=>oL,mpython_blynk_sync_virtual:()=>tL,mpython_blynk_terminal_widget_vpin:()=>$A,mpython_blynktimer:()=>aL,mpython_blynktimer_run:()=>nL});var Z={};t.r(Z),t.d(Z,{cc_g1_read_bat:()=>TL,cc_g1_read_joystick:()=>hL,cc_g1_read_key:()=>ML,cc_g1_turnoff:()=>mL});var $={};t.r($),t.d($,{ce_go_dc_motor:()=>AL,ce_go_get_led_bright:()=>RL,ce_go_get_led_state:()=>cL,ce_go_hall_attachInterrupt:()=>LL,ce_go_hall_data:()=>DL,ce_go_hall_initialize:()=>NL,ce_go_led_bright:()=>EL,ce_go_led_brightness:()=>gL,ce_go_light_number:()=>OL,ce_go_pin_light:()=>YL,ce_go_pin_near:()=>FL,ce_go_pin_near_line:()=>fL,ce_go_pin_near_state_change:()=>PL,ce_go_stepper_keep:()=>CL,ce_go_stepper_stop:()=>SL,sensor_mixgome_eulerangles:()=>vL});var tt={};t.r(tt),t.d(tt,{communicate_bluetooth_central_init:()=>TN,communicate_bluetooth_connect:()=>mN,communicate_bluetooth_disconnect:()=>ON,communicate_bluetooth_handle:()=>SN,communicate_bluetooth_is_connected:()=>RN,communicate_bluetooth_mac:()=>EN,communicate_bluetooth_peripheral_init:()=>hN,communicate_bluetooth_recv:()=>CN,communicate_bluetooth_recv_only:()=>gN,communicate_bluetooth_scan:()=>MN,communicate_bluetooth_send:()=>cN,communicate_espnow_init:()=>AN,communicate_espnow_init_new:()=>LN,communicate_i2c_available:()=>UL,communicate_i2c_init:()=>yL,communicate_i2c_master_read:()=>GL,communicate_i2c_onboard:()=>XL,communicate_i2c_read:()=>bL,communicate_i2c_scan:()=>BL,communicate_i2c_write:()=>VL,communicate_ir_recv_init:()=>sN,communicate_ir_send_init:()=>uN,communicate_ow_init:()=>ZL,communicate_ow_read:()=>eN,communicate_ow_reset:()=>tN,communicate_ow_scan:()=>$L,communicate_ow_select:()=>nN,communicate_ow_write:()=>iN,communicate_spi_buffer:()=>WL,communicate_spi_init:()=>kL,communicate_spi_onboard:()=>xL,communicate_spi_read:()=>KL,communicate_spi_read_output:()=>JL,communicate_spi_readinto:()=>qL,communicate_spi_readinto_output:()=>zL,communicate_spi_set:()=>HL,communicate_spi_write:()=>QL,communicate_spi_write_readinto:()=>jL,espnow_radio_channel:()=>vN,espnow_radio_channel_new:()=>XN,espnow_radio_on_off:()=>xN,espnow_radio_rec:()=>bN,espnow_radio_recv:()=>BN,espnow_radio_recv_certain_msg:()=>GN,espnow_radio_recv_certain_msg_new:()=>wN,espnow_radio_recv_msg:()=>VN,espnow_radio_recv_new:()=>UN,espnow_radio_send:()=>yN,espnow_radio_txpower:()=>YN,i2c_slave_onreceive:()=>wL,internal_variable:()=>_N,ir_recv_timeout:()=>aN,ir_transmit_busy:()=>IN,ir_transmit_conventional_data:()=>rN,ir_transmit_raw_code:()=>dN,ir_transmit_study_code:()=>lN,ir_whether_recv:()=>pN,lora_init:()=>kN,lora_packet:()=>HN,lora_recv:()=>KN,lora_send:()=>WN,network_espnow_info:()=>DN,network_espnow_mac:()=>NN,network_espnow_recv:()=>fN,network_espnow_recv_handle:()=>PN,network_espnow_send:()=>FN,recv_fun:()=>oN,urequests_attribute:()=>qN,urequests_get:()=>JN,urequests_method:()=>zN});var et={};t.r(et),t.d(et,{display_animate:()=>RD,display_circle:()=>cD,display_color_seclet:()=>vD,display_draw_4strings:()=>ID,display_fill:()=>ED,display_lcd_use_i2c_init:()=>VD,display_line:()=>MD,display_line_arbitrarily:()=>TD,display_matrix_extern_bright_point:()=>oD,display_matrix_extern_bright_screen:()=>aD,display_matrix_extern_clear:()=>nD,display_matrix_extern_get_pixel:()=>_D,display_matrix_extern_get_screen_pixel:()=>pD,display_matrix_extern_image_builtins:()=>uD,display_matrix_extern_scroll_string:()=>eD,display_matrix_extern_scroll_string_delay:()=>iD,display_matrix_extern_shift:()=>sD,display_matrix_extern_show_frame_string:()=>$N,display_matrix_extern_show_frame_string_delay:()=>tD,display_matrix_extern_show_image:()=>jN,display_matrix_extern_show_image_or_string_delay:()=>ZN,display_matrix_use_i2c_init:()=>QN,display_oled_drawPixel:()=>SD,display_oled_showBitmap:()=>CD,display_oled_use_i2c_init:()=>kD,display_onoff:()=>mD,display_rect:()=>hD,display_tm1650_power:()=>LD,display_tm1650_set_brightness:()=>fD,display_tm1650_show_dot:()=>DD,display_tm1650_show_num:()=>ND,display_tm_use_i2c_init:()=>AD,display_triangle:()=>gD,display_use_i2c_init:()=>dD,extern_oled_bright_point:()=>ef,extern_oled_clear:()=>ZD,extern_oled_get_pixel:()=>tf,extern_oled_hvline:()=>sf,extern_oled_line:()=>_f,extern_oled_scroll_string:()=>QD,extern_oled_scroll_string_delay:()=>jD,extern_oled_shape_rect:()=>nf,extern_oled_shift:()=>$D,extern_oled_show_frame_string:()=>qD,extern_oled_show_frame_string_delay:()=>zD,extern_oled_show_image:()=>HD,extern_oled_show_image_or_string_delay:()=>JD,extern_oled_show_image_xy:()=>WD,extern_oled_show_string:()=>KD,image_shift:()=>OD,lcd_backlight:()=>UD,lcd_clear:()=>wD,lcd_print_string:()=>GD,lcd_show_image_or_string_delay:()=>BD,matrix_extern_image_arithmetic:()=>rD,matrix_extern_image_invert:()=>lD,tft_fill:()=>yD,tft_line_arbitrarily:()=>bD,tft_scroll_string_delay:()=>xD,tft_show_frame_string_delay:()=>XD,tft_show_image_or_string_delay:()=>YD,tft_show_image_xy:()=>PD,tft_use_spi_init:()=>FD});var it={};t.r(it),t.d(it,{bitbot_display_image_create:()=>kf,display_bright_point:()=>Rf,display_bright_screen:()=>gf,display_clear:()=>hf,display_get_pixel:()=>Ef,display_get_screen_pixel:()=>cf,display_image_builtins:()=>df,display_image_builtins_all:()=>If,display_image_create:()=>Tf,display_scroll_string:()=>rf,display_scroll_string_delay:()=>lf,display_shift:()=>Of,display_show_frame_string:()=>af,display_show_frame_string_delay:()=>uf,display_show_image:()=>of,display_show_image_or_string_delay:()=>pf,draw_pointer:()=>IF,image_arithmetic:()=>Mf,image_invert:()=>mf,mixbot_display_bright_screen:()=>Uf,mixbot_display_get_ambientbright:()=>Gf,mixbot_display_get_screen_pixel:()=>Bf,mixbot_display_image_create:()=>Vf,mixbot_display_rotate:()=>wf,mixgo_display_image_create_new:()=>Lf,mixgome_display_font:()=>Af,mixgome_display_image_create:()=>Cf,mixgomini_display_image_create:()=>Sf,mpython_display_hvline:()=>yf,mpython_display_line:()=>bf,mpython_display_shape_rect:()=>xf,mpython_pbm_image:()=>Nf,onboard_oled_bright_point:()=>Xf,onboard_oled_scroll_string_delay:()=>Yf,onboard_oled_show_frame_string_delay:()=>vf,onboard_oled_show_image:()=>Df,onboard_oled_show_image_or_string_delay:()=>Pf,onboard_oled_show_image_xy:()=>ff,onboard_oled_show_string:()=>Ff,onboard_tft_bright_point:()=>nF,onboard_tft_bright_screen:()=>_F,onboard_tft_clear:()=>tF,onboard_tft_clock_clear:()=>lF,onboard_tft_clock_draw:()=>rF,onboard_tft_clock_get_rtctime:()=>aF,onboard_tft_clock_init:()=>pF,onboard_tft_clock_set_time:()=>uF,onboard_tft_display_hvline:()=>Zf,onboard_tft_display_line:()=>$f,onboard_tft_display_shape_circle:()=>dF,onboard_tft_display_shape_rect:()=>jf,onboard_tft_fill:()=>oF,onboard_tft_get_pixel:()=>iF,onboard_tft_get_screen_pixel:()=>sF,onboard_tft_scroll_string:()=>zf,onboard_tft_scroll_string_delay:()=>Qf,onboard_tft_shift:()=>eF,onboard_tft_show_frame_string:()=>Jf,onboard_tft_show_frame_string_delay:()=>qf,onboard_tft_show_image:()=>Hf,onboard_tft_show_image_or_string_delay:()=>Kf,onboard_tft_show_image_xy:()=>Wf});var nt={};t.r(nt),t.d(nt,{factory_block:()=>cF,factory_block_return:()=>gF,factory_block_return_with_textarea:()=>SF,factory_block_with_textarea:()=>CF,factory_callMethod_noreturn:()=>EF,factory_callMethod_return:()=>RF,factory_declare:()=>OF,factory_from_import:()=>TF,factory_function_noreturn:()=>MF,factory_function_return:()=>mF,factory_import:()=>hF,folding_block:()=>AF});var st={};t.r(st),t.d(st,{inout_analog_atten:()=>GF,inout_analog_read:()=>YF,inout_analog_read_init:()=>BF,inout_analog_write:()=>FF,inout_analog_write_init:()=>VF,inout_analog_write_set:()=>PF,inout_digital_init:()=>yF,inout_digital_read:()=>DF,inout_digital_write:()=>NF,inout_highlow:()=>LF,inout_pin_attachInterrupt:()=>xF,inout_pin_pressed:()=>XF,inout_pin_pressed_init:()=>UF,inout_pwm_analog_write:()=>fF,inout_pwm_analog_write_init:()=>bF,inout_pwm_analog_write_set_freq:()=>vF});var _t={};t.r(_t),t.d(_t,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>oP,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>sP,IOT_EMQX_PING:()=>pP,IOT_FORMATTING:()=>iP,IOT_FORMAT_STRING:()=>nP,IOT_MIXIO_NTP:()=>aP,IOT_MIXIO_PUBLISH:()=>zF,IOT_MIXIO_SUBSCRIBE:()=>QF,iot_client_onboard:()=>uP,iot_http_client:()=>rP,iot_http_data:()=>lP,iot_mixio_check:()=>$F,iot_mixio_connect:()=>qF,iot_mixio_connect_only:()=>ZF,iot_mixio_disconnect:()=>jF,iot_mixio_format_msg:()=>eP,iot_mixio_format_topic:()=>tP,iot_mixly_key:()=>_P,iot_mqtt_client:()=>dP,iot_mqtt_data:()=>IP,iot_onenet_check:()=>KF,iot_onenet_connect:()=>kF,iot_onenet_disconnect:()=>HF,iot_onenet_publish:()=>JF,iot_onenet_publish_dict:()=>WF,iot_wifi_connect:()=>wF});var ot={};t.r(ot),t.d(ot,{network_ap_connect:()=>gP,network_connect:()=>hP,network_get_connect:()=>mP,network_get_wifi:()=>cP,network_init:()=>TP,network_is_active:()=>RP,network_open:()=>EP,network_scan:()=>CP,network_server:()=>SP,network_socket_accept:()=>fP,network_socket_bind:()=>LP,network_socket_close:()=>XP,network_socket_connect:()=>NP,network_socket_init:()=>AP,network_socket_listen:()=>DP,network_socket_receive:()=>FP,network_socket_receive_from:()=>vP,network_socket_send:()=>PP,network_socket_send_to:()=>YP,network_stop:()=>OP,network_wifi_connect:()=>MP,ntptime_address:()=>BP,ntptime_time:()=>VP,requests_attribute:()=>yP,requests_attribute2:()=>UP,requests_get:()=>xP,requests_get2:()=>GP,requests_method:()=>bP,requests_post:()=>wP});var pt={};t.r(pt),t.d(pt,{pe_g1_battery_left:()=>HP,pe_g1_dc_motor:()=>WP,pe_g1_dc_motor_speed:()=>KP,pe_g1_servo_get_angle:()=>zP,pe_g1_servo_get_speed:()=>QP,pe_g1_servo_set_angle:()=>JP,pe_g1_servo_set_speed:()=>qP,pe_g1_use_i2c_init:()=>kP});var at={};t.r(at),t.d(at,{HCSR04:()=>Bv,PS2_Button:()=>wv,PS2_Buttons:()=>kv,PS2_Buttons_new:()=>jv,PS2_State:()=>Hv,PS2_init:()=>Gv,PS2_init_new:()=>zv,PS2_stk:()=>Wv,PS2_stk_new:()=>Zv,PS2_vibration:()=>Uv,PS2_vibration_new:()=>Qv,RTC_get_time:()=>Jv,RTC_set_date:()=>sv,RTC_set_datetime:()=>Kv,RTC_set_time:()=>nv,esp32_s2_weather_init:()=>xv,esp32_s2_weather_rain:()=>bv,esp32_s2_weather_wd:()=>yv,esp32_s2_weather_ws:()=>Vv,extern_rfid_read:()=>Cv,extern_rfid_readcontent:()=>Av,extern_rfid_readid:()=>Sv,extern_rfid_status:()=>Dv,extern_rfid_write:()=>Lv,extern_rfid_write_return:()=>Nv,gnss_get_data:()=>eY,gnss_have_data:()=>iY,mixbot_sensor_extern_get_addr:()=>lY,mixbot_sensor_extern_set_addr:()=>dY,pm25_get_data:()=>tY,robot_button_extern_get_value:()=>nY,robot_color_extern_get_value:()=>aY,robot_infrared_extern_get_value:()=>_Y,robot_infrared_extern_grey_get_value:()=>oY,robot_potentiometer_extern_get_value:()=>pY,robot_sonar_extern_get_value:()=>uY,robot_sonar_extern_led:()=>rY,robot_touch_extern_get_value:()=>sY,sensor_APDS9960_extern:()=>Iv,sensor_DS18X20:()=>mY,sensor_LTR308_extern:()=>Tv,sensor_LTR390UV_extern:()=>mv,sensor_MAX30102_extern:()=>dv,sensor_QMC5883L_extern:()=>Ov,sensor_VL530LX_extern:()=>cv,sensor_aht11_extern:()=>Rv,sensor_bmp:()=>uv,sensor_dht11:()=>qv,sensor_distance_hrsc04:()=>iv,sensor_hp203_extern:()=>hv,sensor_ltr381_extern:()=>Mv,sensor_mixgo_extern_button_attachInterrupt:()=>tv,sensor_mixgo_extern_button_get_presses:()=>$P,sensor_mixgo_extern_button_is_pressed:()=>jP,sensor_mixgo_extern_button_was_pressed:()=>ZP,sensor_mixgo_extern_light:()=>_v,sensor_mixgo_extern_pin_near:()=>pv,sensor_mixgo_extern_sound:()=>ov,sensor_mixgoce_hot_wheel_degrees:()=>Xv,sensor_mixgoce_hot_wheel_is_touched:()=>Yv,sensor_mpu9250_attachGestureInterrupt:()=>ev,sensor_rtc_init:()=>av,sensor_sht:()=>rv,sensor_shtc3_extern:()=>Ev,sensor_use_i2c_init:()=>lv,sensor_use_spi_init:()=>gv,sensor_use_uart_init:()=>$v,sensor_weather_solo_init:()=>IY,sensor_weather_solo_rain:()=>MY,sensor_weather_solo_wd:()=>TY,sensor_weather_solo_ws:()=>hY,weather_data:()=>fv,weather_have_data:()=>Fv,weather_set_label:()=>vv,weather_uart_mixio:()=>Pv});var ut={};t.r(ut),t.d(ut,{HCSR04:()=>LY,bitbot_als_num:()=>WX,dht11:()=>$X,number1:()=>NY,number2:()=>DY,number3:()=>fY,number4:()=>FY,number5:()=>PY,number6:()=>vY,number7:()=>YY,onboard_RTC_get_time:()=>gX,onboard_RTC_get_time_str:()=>AX,onboard_RTC_get_timestamp:()=>CX,onboard_RTC_set_datetime:()=>RX,onboard_RTC_settime_string:()=>cX,onboard_RTC_timestamp_totuple:()=>SX,rfid_readcontent:()=>qY,rfid_readid:()=>JY,rfid_write:()=>zY,rfid_write_return:()=>QY,sensor_LTR308:()=>wY,sensor_adxl345_get_acceleration:()=>_X,sensor_aht11:()=>WY,sensor_bitbot_ALS:()=>HX,sensor_button_get_presses:()=>qX,sensor_button_is_pressed:()=>KX,sensor_button_was_pressed:()=>JX,sensor_compass_reset:()=>lX,sensor_ds18x20:()=>GY,sensor_eulerangles:()=>ZY,sensor_get_acceleration:()=>jY,sensor_get_temperature:()=>KY,sensor_hp203:()=>HY,sensor_light:()=>ZX,sensor_lm35:()=>UY,sensor_mixbot_get_gyro:()=>kX,sensor_mixbot_patrol_calibrate:()=>GX,sensor_mixbot_patrol_value:()=>UX,sensor_mixbot_temperature:()=>wX,sensor_mixgo_LTR308:()=>VY,sensor_mixgo_button_attachInterrupt:()=>cY,sensor_mixgo_button_get_presses:()=>RY,sensor_mixgo_button_is_pressed:()=>OY,sensor_mixgo_button_was_pressed:()=>EY,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>DX,sensor_mixgo_cc_mmc5603_get_angle:()=>NX,sensor_mixgo_cc_mmc5603_get_magnetic:()=>LX,sensor_mixgo_light:()=>jX,sensor_mixgo_nova_LTR308:()=>BY,sensor_mixgo_nova_pin_near:()=>bY,sensor_mixgo_pin_near:()=>yY,sensor_mixgo_pin_near_double:()=>xY,sensor_mixgo_pin_near_single:()=>XY,sensor_mixgo_pin_pressed:()=>nX,sensor_mixgo_touch_slide:()=>iX,sensor_mixgocar42_button_attachInterrupt:()=>AY,sensor_mixgocar42_button_get_presses:()=>SY,sensor_mixgocar42_button_is_pressed:()=>gY,sensor_mixgocar42_button_was_pressed:()=>CY,sensor_mixgocar_battery_left:()=>BX,sensor_mixgocar_pin_near:()=>bX,sensor_mixgocar_pin_near_line:()=>yX,sensor_mixgocar_pin_near_state_change:()=>VX,sensor_mixgoce_pin_pressed:()=>eX,sensor_mixgoce_temperature:()=>FX,sensor_mixgome_temperature:()=>fX,sensor_mpu9250_calibrate_compass:()=>aX,sensor_mpu9250_field_strength:()=>rX,sensor_mpu9250_gesture:()=>$Y,sensor_mpu9250_get_acceleration:()=>tX,sensor_mpu9250_get_gyro:()=>pX,sensor_mpu9250_get_magnetic:()=>oX,sensor_mpu9250_temperature:()=>uX,sensor_mpython_pin_pressed:()=>sX,sensor_mpython_qmi8658_get_gyro:()=>PX,sensor_mpython_qmi8658_temperature:()=>vX,sensor_onboard_compass_reset:()=>EX,sensor_onboard_mpu9250_calibrate_compass:()=>MX,sensor_onboard_mpu9250_field_strength:()=>OX,sensor_onboard_mpu9250_gesture:()=>dX,sensor_onboard_mpu9250_get_acceleration:()=>IX,sensor_onboard_mpu9250_get_gyro:()=>hX,sensor_onboard_mpu9250_get_magnetic:()=>TX,sensor_onboard_mpu9250_temperature:()=>mX,sensor_pin_near:()=>QX,sensor_pin_pressed:()=>zX,sensor_rm_acc:()=>xX,sensor_rm_battery_left:()=>XX,sensor_rm_pin_near_double:()=>YX,sensor_sound:()=>kY});var rt={};t.r(rt),t.d(rt,{serial_any:()=>sx,serial_print:()=>tx,serial_print_byte:()=>ex,serial_print_hex:()=>nx,serial_println:()=>ix,serial_read_from_ai:()=>hx,serial_readline:()=>ox,serial_readstr:()=>_x,serial_send_to_ai:()=>Tx,serial_softserial:()=>px,serial_softserial_new:()=>ax,system_input:()=>ux,system_print:()=>rx,system_print_end:()=>dx,system_print_inline:()=>lx,system_print_many:()=>Ix});var lt={};t.r(lt),t.d(lt,{Panic_with_status_code:()=>Nx,Timer_init:()=>wx,base_delay:()=>Wx,controls_delay:()=>vx,controls_delay_new:()=>Yx,controls_end_program:()=>fx,controls_millis:()=>Dx,controls_uname:()=>Px,reset:()=>Fx,system_bitbot_shutdown:()=>Ux,system_device_name:()=>Ax,system_device_serial_number:()=>Lx,system_event_bus_source:()=>Cx,system_event_bus_value:()=>Sx,system_machine_reset:()=>Gx,system_on_event:()=>Rx,system_raise_event:()=>Ex,system_reset:()=>mx,system_run_in_background:()=>Mx,system_ticks_diff:()=>yx,system_timer:()=>xx,system_timer_init:()=>bx,system_timestamp:()=>cx,system_value:()=>gx,system_wait:()=>Ox,system_wdt_feed:()=>Bx,system_wdt_init:()=>Vx,time_ticks_diff:()=>Hx,timer:()=>Xx,timer2:()=>kx});var dt={};t.r(dt),t.d(dt,{Air_daily_content:()=>sy,Air_now_content:()=>jx,Geo_moon_content:()=>oy,Geo_sun_content:()=>_y,Life_suggestion_content:()=>$x,Location_search_content:()=>ey,Tide_daily_content:()=>ty,WEATHER_DAILY:()=>Jx,WEATHER_HOUR:()=>qx,WEATHER_NOW:()=>Kx,Weather_alarm_content:()=>Zx,Weather_daily:()=>iy,Weather_daily_content:()=>ny,Weather_now:()=>zx,Weather_now_content:()=>Qx});var It={};t.r(It),t.d(It,{controls_pin_attachInterrupt:()=>Fy,inout_analog_atten:()=>Oy,inout_analog_read:()=>my,inout_analog_read_init:()=>Sy,inout_analog_write:()=>Ty,inout_analog_write_init:()=>Cy,inout_analog_write_set:()=>hy,inout_analog_write_set_freq:()=>Ny,inout_digital_init:()=>cy,inout_digital_read:()=>dy,inout_digital_write:()=>ly,inout_highlow:()=>ry,inout_pinMode:()=>Ly,inout_pin_attachInterrupt:()=>Ry,inout_pin_pressed:()=>Ey,inout_pin_pressed_init:()=>Ay,inout_pwm_analog_write:()=>Iy,inout_pwm_analog_write_init:()=>gy,inout_pwm_analog_write_set_freq:()=>My,pin_pressed:()=>fy,pin_pressed_init:()=>Dy});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>By,analog_output:()=>Uy,espnow_channel:()=>yy,haskylens_model:()=>by,i2c_A_pin:()=>wy,i2c_B_pin:()=>ky,pins_analog:()=>qy,pins_analog_pin:()=>zy,pins_axis:()=>db,pins_brightness:()=>Ib,pins_builtinimg:()=>_b,pins_builtinimg_extern:()=>ob,pins_button:()=>Zy,pins_buttonB:()=>$y,pins_dac:()=>Qy,pins_dac_pin:()=>jy,pins_digital:()=>vy,pins_digital_dot:()=>cb,pins_digital_pin:()=>Yy,pins_exlcdh:()=>rb,pins_exlcdv:()=>lb,pins_imglist:()=>pb,pins_input_pin:()=>Xy,pins_one_more:()=>Rb,pins_output_pin:()=>xy,pins_playlist:()=>ab,pins_playlist_extern:()=>ub,pins_pwm:()=>tb,pins_pwm_pin:()=>eb,pins_radio_datarate:()=>Eb,pins_radio_power:()=>Ob,pins_serial:()=>sb,pins_tone_notes:()=>mb,pins_touch:()=>nb,pins_touch_pin:()=>ib,pins_tts_bgmusic:()=>Mb,pins_tts_builtin_music:()=>hb,pins_tts_voice:()=>Tb,pwm_input:()=>Vy,pwm_output:()=>Gy,spi_A_pin:()=>Hy,spi_B_pin:()=>Wy,spi_C_pin:()=>Ky,spi_D_pin:()=>Jy});var ht={};t.r(ht),t.d(ht,{inout_analog_atten:()=>yb,inout_analog_read:()=>fb,inout_analog_read_init:()=>xb,inout_analog_write:()=>Lb,inout_analog_write_init:()=>Xb,inout_analog_write_set:()=>Nb,inout_digital_init:()=>vb,inout_digital_read:()=>Sb,inout_digital_write:()=>Cb,inout_highlow:()=>gb,inout_pin_attachInterrupt:()=>Pb,inout_pin_pressed:()=>Fb,inout_pin_pressed_init:()=>bb,inout_pwm_analog_write:()=>Ab,inout_pwm_analog_write_init:()=>Yb,inout_pwm_analog_write_set_freq:()=>Db});var Mt={};t.r(Mt),t.d(Mt,{analog_input:()=>Jb,analog_output:()=>zb,espnow_channel:()=>Wb,haskylens_model:()=>Kb,i2c_A_pin:()=>Qb,i2c_B_pin:()=>jb,pins_analog:()=>nV,pins_analog_pin:()=>iV,pins_axis:()=>mV,pins_brightness:()=>RV,pins_builtinimg:()=>dV,pins_builtinimg_extern:()=>IV,pins_button:()=>Bb,pins_buttonB:()=>Gb,pins_dac:()=>pV,pins_dac_pin:()=>oV,pins_digital:()=>Vb,pins_digital_dot:()=>DV,pins_digital_pin:()=>Ub,pins_exlcdh:()=>OV,pins_exlcdv:()=>EV,pins_imglist:()=>TV,pins_input_pin:()=>wb,pins_interrupt:()=>rV,pins_one_more:()=>NV,pins_output_pin:()=>kb,pins_playlist:()=>hV,pins_playlist_extern:()=>MV,pins_pwm:()=>_V,pins_pwm_input:()=>Hb,pins_pwm_pin:()=>sV,pins_radio_datarate:()=>LV,pins_radio_power:()=>AV,pins_serial:()=>lV,pins_tone_notes:()=>SV,pins_touch:()=>uV,pins_touch_pin:()=>aV,pins_tts_bgmusic:()=>CV,pins_tts_builtin_music:()=>gV,pins_tts_voice:()=>cV,pwm_output:()=>qb,spi_A_pin:()=>Zb,spi_B_pin:()=>$b,spi_C_pin:()=>tV,spi_D_pin:()=>eV});const mt=Blockly,Ot=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&&(o+=n)):i=o}else i="i";return i}},Rt=Et; +(()=>{"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:()=>yt,controls_delay:()=>bt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>Zt,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:()=>$t,controls_thread:()=>ie,controls_try:()=>zt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>ae,do_while:()=>ne,garbage_collection:()=>se,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>pe});var n={};t.r(n),t.d(n,{base_map:()=>fe,math_arithmetic:()=>Ie,math_bit:()=>he,math_constant:()=>le,math_constant_mp:()=>de,math_constrain:()=>ge,math_dec:()=>me,math_indexer_number:()=>Se,math_map:()=>Ce,math_max_min:()=>Oe,math_number:()=>re,math_number_base_conversion:()=>Re,math_random:()=>ce,math_random_seed:()=>Ae,math_round:()=>Le,math_selfcalcu:()=>Te,math_to_int:()=>Ee,math_trig:()=>Me,text_to_number:()=>Ne,text_to_number_skulpt:()=>De,turn_to_int:()=>Fe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>ye,char_to_ascii:()=>be,number_to_text:()=>Ve,os_system:()=>ui,text:()=>ve,text_capital:()=>Je,text_center:()=>qe,text_char:()=>Xe,text_char_at:()=>Ue,text_char_at2:()=>Ge,text_char_at3:()=>_i,text_compareTo:()=>si,text_compare_to:()=>Ke,text_create_with_container:()=>ei,text_create_with_item:()=>ii,text_encode:()=>pi,text_equals_starts_ends:()=>We,text_eval:()=>ai,text_find:()=>Qe,text_format:()=>ti,text_format_noreturn:()=>oi,text_join:()=>xe,text_join_seq:()=>ze,text_length:()=>Be,text_random_char:()=>we,text_replace:()=>je,text_split:()=>Ze,text_strip:()=>$e,text_substring:()=>He,text_substring2:()=>ke,text_substring3:()=>ni,text_textarea:()=>Ye});var _={};t.r(_),t.d(_,{ENUMERATE:()=>Wi,enumerate:()=>Ki,list_many_input:()=>vi,list_tolist:()=>yi,list_tolist2:()=>Hi,list_trig:()=>fi,lists_2d_get_col_row_data:()=>Ti,lists_2d_get_data_with_col_row:()=>Ii,lists_append_extend:()=>Ri,lists_change_to:()=>Pi,lists_change_to_general:()=>Xi,lists_clear:()=>Ai,lists_create_with:()=>hi,lists_create_with2:()=>bi,lists_create_with_container:()=>mi,lists_create_with_item:()=>Ei,lists_create_with_noreturn:()=>Yi,lists_create_with_text:()=>Mi,lists_create_with_text2:()=>Vi,lists_del_general:()=>xi,lists_find:()=>Di,lists_getIndex3:()=>Bi,lists_getSublist3:()=>Gi,lists_get_index:()=>li,lists_get_random_item:()=>ci,lists_get_random_sublist:()=>gi,lists_get_sublist:()=>di,lists_insert_value:()=>Ci,lists_insert_value2:()=>wi,lists_pop:()=>Ni,lists_remove_at:()=>Li,lists_remove_at2:()=>ki,lists_reverse:()=>Si,lists_setIndex3:()=>Ui,lists_set_index:()=>Oi,lists_sort:()=>Fi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>un,dicts_add_or_change:()=>tn,dicts_clear:()=>sn,dicts_create_with:()=>qi,dicts_create_with_container:()=>Qi,dicts_create_with_item:()=>zi,dicts_create_with_noreturn:()=>dn,dicts_deldict:()=>an,dicts_delete:()=>en,dicts_get:()=>Zi,dicts_get_default:()=>$i,dicts_items:()=>_n,dicts_keys:()=>ji,dicts_length:()=>pn,dicts_pop:()=>rn,dicts_setdefault:()=>ln,dicts_to_json:()=>Tn,dicts_todict:()=>In,dicts_update:()=>nn,dicts_values:()=>on,json_to_dicts:()=>hn});var p={};t.r(p),t.d(p,{logic_boolean:()=>cn,logic_compare:()=>mn,logic_compare_continous:()=>En,logic_is:()=>An,logic_is_in:()=>Sn,logic_negate:()=>Rn,logic_null:()=>gn,logic_operation:()=>On,logic_tobool:()=>Ln,logic_true_or_false:()=>Cn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Qn,sdcard_use_spi_init:()=>qn,storage_can_write_ornot:()=>xn,storage_change_dir:()=>Kn,storage_close_file:()=>bn,storage_delete_file:()=>Bn,storage_file_seek:()=>wn,storage_file_tell:()=>Un,storage_file_write:()=>Pn,storage_fileopen:()=>Dn,storage_fileopen_new:()=>fn,storage_fileopen_new_encoding:()=>Fn,storage_get_a_line:()=>Xn,storage_get_contents:()=>Yn,storage_get_contents_without_para:()=>vn,storage_get_current_dir:()=>kn,storage_get_file_size:()=>Gn,storage_get_filename:()=>yn,storage_is_file:()=>Jn,storage_list_all_files:()=>Vn,storage_make_dir:()=>Hn,storage_open_file_with_os:()=>Nn,storage_rename:()=>Wn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>is,procedures_callreturn:()=>ns,procedures_defnoreturn:()=>Zn,procedures_defreturn:()=>$n,procedures_ifreturn:()=>ss,procedures_mutatorarg:()=>es,procedures_mutatorcontainer:()=>ts,procedures_return:()=>_s});var r={};t.r(r),t.d(r,{tuple_change_to:()=>ms,tuple_create_with:()=>ps,tuple_create_with_container:()=>as,tuple_create_with_item:()=>us,tuple_create_with_noreturn:()=>cs,tuple_create_with_text2:()=>rs,tuple_create_with_text_return:()=>ls,tuple_del:()=>Ts,tuple_find:()=>Es,tuple_getIndex:()=>ds,tuple_getSublist:()=>Rs,tuple_get_random_item:()=>Cs,tuple_get_sublist:()=>gs,tuple_join:()=>hs,tuple_length:()=>Is,tuple_max:()=>Ms,tuple_totuple:()=>Ss,tuple_trig:()=>Os});var l={};t.r(l),t.d(l,{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:()=>bs,set_length:()=>fs,set_operate:()=>vs,set_operate_update:()=>Ys,set_pop:()=>Fs,set_sub:()=>xs,set_toset:()=>Vs,set_update:()=>ys});var d={};t.r(d),t.d(d,{html_content:()=>ks,html_content_more:()=>Hs,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:()=>u_,function_call:()=>o_,function_call_container:()=>p_,function_call_item:()=>a_,raw_block:()=>Zs,raw_empty:()=>t_,raw_expression:()=>$s,raw_table:()=>js,text_comment:()=>e_,text_print_multiple:()=>n_,text_print_multiple_container:()=>s_,text_print_multiple_item:()=>__,type_check:()=>i_});var T={};t.r(T),t.d(T,{controls_type:()=>T_,controls_typeLists:()=>h_,lists_zip:()=>M_,unpack_iterable_object:()=>m_,variables_change:()=>d_,variables_get:()=>r_,variables_global:()=>I_,variables_set:()=>l_});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>N_,base_setup:()=>O_,controls_delay:()=>L_,controls_flow_statements:()=>A_,controls_for:()=>g_,controls_forEach:()=>v_,controls_for_range:()=>C_,controls_if:()=>R_,controls_interrupts:()=>F_,controls_lambda:()=>X_,controls_main:()=>E_,controls_millis:()=>D_,controls_nointerrupts:()=>P_,controls_pass:()=>y_,controls_range:()=>Y_,controls_repeat:()=>H_,controls_repeat_ext:()=>B_,controls_thread:()=>b_,controls_try_finally:()=>c_,controls_whileUntil:()=>S_,datetime_fromtimestamp:()=>W_,do_while:()=>V_,garbage_collection:()=>G_,get_mem_alloc:()=>U_,get_mem_free:()=>w_,get_unique_identifier:()=>k_,reset:()=>f_,time_sleep:()=>x_});var M={};t.r(M),t.d(M,{base_map:()=>Io,math_arithmetic:()=>z_,math_bit:()=>Q_,math_constant:()=>J_,math_constant_mp:()=>q_,math_constrain:()=>_o,math_dec:()=>to,math_indexer_number:()=>ao,math_map:()=>so,math_max_min:()=>io,math_number:()=>K_,math_number_base_conversion:()=>oo,math_random:()=>no,math_random_seed:()=>po,math_round:()=>uo,math_selfcalcu:()=>j_,math_single:()=>Z_,math_to_int:()=>eo,math_trig:()=>$_,text_to_number:()=>ro,text_to_number_skulpt:()=>lo,turn_to_int:()=>To});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Oo,char_to_ascii:()=>Ro,number_to_text:()=>co,os_system:()=>Ho,text:()=>ho,text_capital:()=>Fo,text_center:()=>Po,text_char:()=>mo,text_char_at:()=>So,text_char_at2:()=>Co,text_char_at3:()=>Uo,text_compareTo:()=>Go,text_compare_to:()=>No,text_encode:()=>wo,text_equals_starts_ends:()=>Lo,text_eval:()=>ko,text_find:()=>vo,text_format:()=>bo,text_format_noreturn:()=>Vo,text_join:()=>Eo,text_join_seq:()=>Yo,text_length:()=>go,text_random_char:()=>Ao,text_replace:()=>Xo,text_split:()=>xo,text_strip:()=>yo,text_substring:()=>fo,text_substring2:()=>Do,text_substring3:()=>Bo,text_textarea:()=>Mo});var E={};t.r(E),t.d(E,{enumerate:()=>Cp,list_many_input:()=>rp,list_tolist:()=>cp,list_tolist2:()=>gp,list_trig:()=>pp,lists_2d_get_col_row_data:()=>Jo,lists_2d_get_data_with_col_row:()=>Ko,lists_append_extend:()=>Zo,lists_change_to:()=>up,lists_change_to_general:()=>dp,lists_clear:()=>np,lists_create_with:()=>qo,lists_create_with2:()=>Tp,lists_create_with_noreturn:()=>lp,lists_create_with_text:()=>Qo,lists_create_with_text2:()=>hp,lists_del_general:()=>Ip,lists_find:()=>sp,lists_getIndex3:()=>Mp,lists_getSublist3:()=>mp,lists_get_index:()=>zo,lists_get_random_item:()=>$o,lists_get_random_sublist:()=>tp,lists_get_sublist:()=>Wo,lists_insert_value:()=>ep,lists_insert_value2:()=>Op,lists_pop:()=>op,lists_remove_at:()=>_p,lists_remove_at2:()=>Rp,lists_reverse:()=>ip,lists_setIndex3:()=>Ep,lists_set_index:()=>jo,lists_sort:()=>ap});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>yp,dicts_add_or_change:()=>Dp,dicts_clear:()=>Pp,dicts_create_with:()=>Sp,dicts_create_with_noreturn:()=>Bp,dicts_deldict:()=>xp,dicts_delete:()=>fp,dicts_get:()=>Lp,dicts_get_default:()=>Np,dicts_items:()=>vp,dicts_keys:()=>Ap,dicts_length:()=>Xp,dicts_pop:()=>bp,dicts_setdefault:()=>Vp,dicts_to_json:()=>Up,dicts_todict:()=>Gp,dicts_update:()=>Fp,dicts_values:()=>Yp,json_to_dicts:()=>wp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Jp,logic_compare:()=>kp,logic_compare_continous:()=>Hp,logic_is:()=>jp,logic_is_in:()=>zp,logic_negate:()=>Kp,logic_null:()=>qp,logic_operation:()=>Wp,logic_tobool:()=>Zp,logic_true_or_false:()=>Qp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>ca,sdcard_use_spi_init:()=>Ra,storage_can_write_ornot:()=>pa,storage_change_dir:()=>ha,storage_close_file:()=>ua,storage_delete_file:()=>la,storage_file_seek:()=>Ta,storage_file_tell:()=>Ia,storage_file_write:()=>na,storage_fileopen:()=>ta,storage_fileopen_new:()=>ea,storage_fileopen_new_encoding:()=>ia,storage_get_a_line:()=>oa,storage_get_contents:()=>_a,storage_get_contents_without_para:()=>sa,storage_get_current_dir:()=>Ma,storage_get_file_size:()=>da,storage_get_filename:()=>aa,storage_is_file:()=>Oa,storage_list_all_files:()=>ra,storage_make_dir:()=>ma,storage_open_file_with_os:()=>$p,storage_rename:()=>Ea});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Aa,procedures_callreturn:()=>Sa,procedures_defnoreturn:()=>Ca,procedures_defreturn:()=>ga,procedures_ifreturn:()=>La,procedures_return:()=>Na});var C={};t.r(C),t.d(C,{tuple_change_to:()=>ya,tuple_create_with:()=>Da,tuple_create_with_noreturn:()=>Ga,tuple_create_with_text2:()=>fa,tuple_create_with_text_return:()=>Fa,tuple_del:()=>Ya,tuple_find:()=>ba,tuple_getIndex:()=>Pa,tuple_getSublist:()=>Ba,tuple_get_random_item:()=>wa,tuple_get_sublist:()=>Ua,tuple_join:()=>Xa,tuple_length:()=>va,tuple_max:()=>xa,tuple_totuple:()=>ka,tuple_trig:()=>Va});var S={};t.r(S),t.d(S,{set_add_discard:()=>za,set_clear:()=>Ja,set_create_with:()=>Ha,set_create_with_text_return:()=>$a,set_length:()=>Wa,set_operate:()=>qa,set_operate_update:()=>Qa,set_pop:()=>Ka,set_sub:()=>ja,set_toset:()=>tu,set_update:()=>Za});var A={};t.r(A),t.d(A,{html_content:()=>su,html_content_more:()=>_u,html_document:()=>eu,html_form:()=>pu,html_head_body:()=>nu,html_style:()=>ou,html_style_content:()=>au,html_text:()=>uu,html_title:()=>iu});var L={};t.r(L),t.d(L,{attribute_access:()=>Mu,function_call:()=>hu,raw_block:()=>ru,raw_empty:()=>du,raw_expression:()=>lu,raw_table:()=>Iu,type_check:()=>Tu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Du,actuator_extern_get_led_state:()=>fu,actuator_extern_led_bright:()=>Nu,actuator_extern_led_brightness:()=>Fu,actuator_ms32006_dcmotor:()=>Bu,actuator_ms32006_init:()=>Vu,actuator_ms32006_stepper:()=>Gu,actuator_neopixel_init:()=>Uu,actuator_neopixel_rgb:()=>wu,actuator_neopixel_rgb_all:()=>ku,actuator_neopixel_write:()=>Hu,actuator_use_uart_init:()=>Wu,esp32_music_get_tempo_extern:()=>Su,esp32_music_pitch:()=>Ru,esp32_music_pitch_init:()=>Ou,esp32_music_pitch_with_time:()=>cu,esp32_music_play_list:()=>gu,esp32_music_reset_extern:()=>Au,esp32_music_set_tempo_extern:()=>Cu,esp32_music_stop:()=>Lu,mixbot_actuator_extern_get_addr:()=>ur,mixbot_actuator_extern_set_addr:()=>rr,mixbot_addr_extern:()=>zu,robot_led_extern:()=>tr,robot_led_extern_get_value:()=>er,robot_motor_extern:()=>ju,robot_motor_extern_get_speed:()=>Zu,robot_servo_extern_absolute_run:()=>_r,robot_servo_extern_get_status:()=>ir,robot_servo_extern_relative_continue:()=>ar,robot_servo_extern_relative_origin:()=>or,robot_servo_extern_relative_run:()=>pr,robot_servo_extern_stop:()=>sr,robot_servo_extern_stop_mode:()=>nr,robot_traffic_light_extern:()=>$u,servo_get_angle:()=>yu,servo_get_speed:()=>bu,servo_init:()=>Pu,servo_move:()=>vu,servo_set_angle:()=>Xu,servo_set_speed:()=>xu,servo_speed_360:()=>Yu,syn6288_builtin_voice:()=>qu,syn6288_get_voice:()=>Ju,syn6288_set_voice:()=>Ku,syn6288_tts_play:()=>Qu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>wr,actuator_dc_motor_stop:()=>kr,actuator_get_led_bright:()=>hr,actuator_get_led_state:()=>Mr,actuator_led_bright:()=>Tr,actuator_led_brightness:()=>mr,actuator_mixbot_buzzer_on_off:()=>qr,actuator_mixgo_nova_mic_get:()=>$r,actuator_mixgo_nova_mic_set:()=>Zr,actuator_mixgo_nova_onboard_music_pitch:()=>_l,actuator_mixgo_nova_onboard_music_stop:()=>ol,actuator_mixgo_nova_play_audio:()=>nl,actuator_mixgo_nova_play_online_audio:()=>sl,actuator_mixgo_nova_record_audio:()=>il,actuator_mixgo_nova_voice_get:()=>el,actuator_mixgo_nova_voice_set:()=>tl,actuator_mixgo_zero_led_color:()=>Er,actuator_onboard_neopixel_rgb:()=>Sr,actuator_onboard_neopixel_rgb_all:()=>Ar,actuator_onboard_neopixel_rgb_show_all_chase:()=>Nr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Lr,actuator_onboard_neopixel_write:()=>Dr,actuator_rm_onboard_neopixel_rgb:()=>fr,actuator_rm_onboard_neopixel_rgb_all:()=>Fr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Pr,actuator_stepper_keep:()=>Gr,actuator_stepper_stop:()=>Ur,analog_ble_keyboard_init:()=>Ol,analog_ble_keyboard_input:()=>gl,analog_ble_keyboard_send_battery:()=>Sl,analog_ble_keyboard_str:()=>Cl,analog_ble_mouse_init:()=>Al,analog_ble_mouse_input:()=>Dl,analog_ble_mouse_send_battery:()=>fl,analog_keyboard_input:()=>rl,analog_keyboard_str:()=>El,analog_mouse_input:()=>Ml,bitbot_motor:()=>jr,bitbot_move:()=>Qr,bitbot_stop:()=>zr,ble_keyboard_connect:()=>cl,ble_keyboard_get_mac:()=>Rl,ble_mouse_connect:()=>Nl,ble_mouse_get_mac:()=>Ll,cc_number:()=>Cr,esp32_music_get_tempo:()=>Yr,esp32_music_reset:()=>Xr,esp32_music_set_tempo:()=>vr,esp32_onboard_music_pitch:()=>xr,esp32_onboard_music_pitch_with_time:()=>yr,esp32_onboard_music_play_list:()=>Vr,esp32_onboard_music_stop:()=>br,general_key:()=>dl,general_key_tuple:()=>Il,generalkey_container:()=>Tl,generalkey_create_with_item:()=>hl,get_power_output:()=>al,ledswitch:()=>Ir,mixbot_motor:()=>Jr,mixbot_motor_status:()=>Hr,mixbot_move:()=>Wr,mixbot_stop:()=>Kr,mouse_key:()=>ml,number:()=>dr,rm_actuator_get_led_bright:()=>Rr,rm_actuator_get_led_state:()=>cr,rm_actuator_led_bright:()=>Or,rm_actuator_led_brightness:()=>gr,rm_motor:()=>Br,set_all_power_output:()=>ul,set_power_output:()=>pl,special_key:()=>ll});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>ud,ai_sensor_ailocal_class:()=>Zl,ai_sensor_ailocal_class_result:()=>$l,ai_sensor_ailocal_train:()=>jl,ai_sensor_asr_recognize:()=>sd,ai_sensor_audio_play:()=>ed,ai_sensor_audio_record:()=>td,ai_sensor_barcode:()=>bl,ai_sensor_circle:()=>kl,ai_sensor_classifier_faces:()=>ad,ai_sensor_color:()=>Jl,ai_sensor_color_chases:()=>zl,ai_sensor_color_chases_result:()=>Ql,ai_sensor_config:()=>xl,ai_sensor_face:()=>pd,ai_sensor_find_20objects:()=>rd,ai_sensor_find_barcodes:()=>Vl,ai_sensor_find_circles:()=>Hl,ai_sensor_find_colors:()=>ql,ai_sensor_find_licenseplates:()=>od,ai_sensor_find_lines:()=>wl,ai_sensor_find_qrcodes:()=>Xl,ai_sensor_find_rects:()=>Kl,ai_sensor_find_tags:()=>Gl,ai_sensor_licenseplate:()=>_d,ai_sensor_line:()=>Ul,ai_sensor_qrcode:()=>vl,ai_sensor_qrcode_lite:()=>Yl,ai_sensor_rect:()=>Wl,ai_sensor_rgb:()=>yl,ai_sensor_tag:()=>Bl,ai_sensor_use_uart_init:()=>Pl,ai_sensor_yolo_recognize:()=>id,ai_sensor_yolo_recognize_result:()=>nd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>Id,MICROPYTHON_AI_Speech_unit:()=>dd,MICROPYTHON_AI_client:()=>ld});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Dd,mpython_blynk_app_notify:()=>cd,mpython_blynk_email:()=>Sd,mpython_blynk_get_timers:()=>Ad,mpython_blynk_on_connected:()=>Ed,mpython_blynk_on_disconnected:()=>md,mpython_blynk_run:()=>Rd,mpython_blynk_sensor_data_to_app:()=>Nd,mpython_blynk_set_property:()=>Cd,mpython_blynk_setup:()=>fd,mpython_blynk_stop_timers:()=>gd,mpython_blynk_sync_virtual:()=>Md,mpython_blynk_terminal_widget_vpin:()=>hd,mpython_blynktimer:()=>Ld,mpython_blynktimer_run:()=>Od});var v={};t.r(v),t.d(v,{cc_g1_init:()=>Fd,cc_g1_read_bat:()=>Pd,cc_g1_read_joystick:()=>vd,cc_g1_read_key:()=>Yd,cc_g1_turnoff:()=>Xd});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>kd,ce_go_get_led_bright:()=>Vd,ce_go_get_led_state:()=>Bd,ce_go_hall_attachInterrupt:()=>Hd,ce_go_hall_data:()=>Kd,ce_go_hall_initialize:()=>Wd,ce_go_led_bright:()=>bd,ce_go_led_brightness:()=>Gd,ce_go_light_number:()=>yd,ce_go_pin_light:()=>jd,ce_go_pin_near:()=>qd,ce_go_pin_near_line:()=>Jd,ce_go_pin_near_state_change:()=>Qd,ce_go_stepper_keep:()=>Ud,ce_go_stepper_stop:()=>wd,sensor_mixgome_eulerangles:()=>zd});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>YI,communicate_bluetooth_connect:()=>bI,communicate_bluetooth_disconnect:()=>VI,communicate_bluetooth_handle:()=>kI,communicate_bluetooth_is_connected:()=>GI,communicate_bluetooth_mac:()=>yI,communicate_bluetooth_peripheral_init:()=>XI,communicate_bluetooth_recv:()=>UI,communicate_bluetooth_recv_only:()=>wI,communicate_bluetooth_scan:()=>xI,communicate_bluetooth_send:()=>BI,communicate_espnow_init:()=>HI,communicate_espnow_init_new:()=>WI,communicate_i2c_available:()=>hI,communicate_i2c_init:()=>eI,communicate_i2c_master_read:()=>TI,communicate_i2c_onboard:()=>$d,communicate_i2c_read:()=>iI,communicate_i2c_scan:()=>sI,communicate_i2c_write:()=>nI,communicate_ir_recv_init:()=>CI,communicate_ir_send_init:()=>DI,communicate_ow_init:()=>mI,communicate_ow_read:()=>OI,communicate_ow_reset:()=>gI,communicate_ow_scan:()=>EI,communicate_ow_select:()=>cI,communicate_ow_write:()=>RI,communicate_spi_buffer:()=>pI,communicate_spi_init:()=>_I,communicate_spi_onboard:()=>tI,communicate_spi_read:()=>aI,communicate_spi_read_output:()=>uI,communicate_spi_readinto:()=>rI,communicate_spi_readinto_output:()=>lI,communicate_spi_set:()=>oI,communicate_spi_write:()=>dI,communicate_spi_write_readinto:()=>II,espnow_radio_channel:()=>jI,espnow_radio_channel_new:()=>$I,espnow_radio_on_off:()=>tT,espnow_radio_rec:()=>iT,espnow_radio_recv:()=>sT,espnow_radio_recv_certain_msg:()=>_T,espnow_radio_recv_certain_msg_new:()=>pT,espnow_radio_recv_msg:()=>nT,espnow_radio_recv_new:()=>oT,espnow_radio_send:()=>eT,espnow_radio_txpower:()=>ZI,i2c_available:()=>fT,i2c_init:()=>hT,i2c_master_reader2:()=>DT,i2c_read:()=>MT,i2c_scan:()=>ET,i2c_slave_onreceive:()=>MI,i2c_write:()=>mT,internal_variable:()=>SI,ir_recv_timeout:()=>NI,ir_transmit_busy:()=>vI,ir_transmit_conventional_data:()=>fI,ir_transmit_raw_code:()=>PI,ir_transmit_study_code:()=>FI,ir_whether_recv:()=>LI,lora_init:()=>aT,lora_packet:()=>uT,lora_recv:()=>lT,lora_send:()=>rT,network_espnow_info:()=>JI,network_espnow_mac:()=>KI,network_espnow_recv:()=>qI,network_espnow_recv_handle:()=>zI,network_espnow_send:()=>QI,recv_fun:()=>AI,spi_buffer:()=>cT,spi_init:()=>OT,spi_read:()=>gT,spi_read_output:()=>CT,spi_readinto:()=>ST,spi_readinto_output:()=>AT,spi_set:()=>RT,spi_write:()=>LT,spi_write_readinto:()=>NT,urequests_attribute:()=>IT,urequests_get:()=>dT,urequests_method:()=>TT});var x={};t.r(x),t.d(x,{display_animate:()=>_h,display_blink_rate:()=>eh,display_circle:()=>oh,display_color_seclet:()=>Eh,display_draw_4strings:()=>QT,display_fill:()=>sh,display_get_screen_image:()=>th,display_help:()=>ah,display_image_size:()=>zT,display_lcd_use_i2c_init:()=>Sh,display_line:()=>ZT,display_line_arbitrarily:()=>$T,display_matrix_extern_bright_point:()=>UT,display_matrix_extern_bright_screen:()=>kT,display_matrix_extern_clear:()=>HT,display_matrix_extern_get_pixel:()=>GT,display_matrix_extern_get_screen_pixel:()=>wT,display_matrix_extern_image_builtins:()=>WT,display_matrix_extern_scroll_string:()=>xT,display_matrix_extern_scroll_string_delay:()=>yT,display_matrix_extern_shift:()=>BT,display_matrix_extern_show_frame_string:()=>bT,display_matrix_extern_show_frame_string_delay:()=>VT,display_matrix_extern_show_image:()=>YT,display_matrix_extern_show_image_or_string_delay:()=>XT,display_matrix_use_i2c_init:()=>vT,display_oled_drawPixel:()=>rh,display_oled_showBitmap:()=>uh,display_oled_use_i2c_init:()=>fh,display_onoff:()=>nh,display_rect:()=>jT,display_rgb_color:()=>ih,display_tm1650_power:()=>dh,display_tm1650_set_brightness:()=>hh,display_tm1650_show_dot:()=>Th,display_tm1650_show_num:()=>Ih,display_tm_use_i2c_init:()=>lh,display_triangle:()=>ph,display_use_i2c_init:()=>qT,extern_oled_bright_point:()=>Gh,extern_oled_clear:()=>Uh,extern_oled_get_pixel:()=>Bh,extern_oled_hvline:()=>kh,extern_oled_line:()=>Hh,extern_oled_scroll_string:()=>Xh,extern_oled_scroll_string_delay:()=>xh,extern_oled_shape_rect:()=>wh,extern_oled_shift:()=>Vh,extern_oled_show_frame_string:()=>yh,extern_oled_show_frame_string_delay:()=>bh,extern_oled_show_image:()=>Fh,extern_oled_show_image_or_string_delay:()=>Yh,extern_oled_show_image_xy:()=>Ph,extern_oled_show_string:()=>vh,lcd_backlight:()=>Nh,lcd_clear:()=>Dh,lcd_print_string:()=>Lh,lcd_show_image_or_string_delay:()=>Ah,matrix_extern_image_arithmetic:()=>KT,matrix_extern_image_invert:()=>JT,tft_fill:()=>gh,tft_line_arbitrarily:()=>Ch,tft_scroll_string_delay:()=>Rh,tft_show_frame_string_delay:()=>ch,tft_show_image_or_string_delay:()=>Oh,tft_show_image_xy:()=>mh,tft_use_spi_init:()=>Mh});var y={};t.r(y),t.d(y,{bitbot_display_image_create:()=>fM,display_bright_point:()=>_M,display_bright_screen:()=>pM,display_clear:()=>aM,display_get_pixel:()=>sM,display_get_screen_pixel:()=>oM,display_image_builtins:()=>$h,display_image_builtins_all:()=>tM,display_image_create:()=>Zh,display_scroll_string:()=>qh,display_scroll_string_delay:()=>Qh,display_shift:()=>nM,display_show_frame_string:()=>zh,display_show_frame_string_delay:()=>jh,display_show_image:()=>Kh,display_show_image_or_string_delay:()=>Jh,draw_pointer:()=>$M,image_arithmetic:()=>eM,image_invert:()=>iM,mixbot_display_bright_screen:()=>NM,mixbot_display_get_ambientbright:()=>LM,mixbot_display_get_screen_pixel:()=>AM,mixbot_display_image_create:()=>SM,mixbot_display_rotate:()=>DM,mixgo_display_image_create_new:()=>lM,mixgome_display_font:()=>dM,mixgome_display_image_create:()=>uM,mixgomini_display_image_create:()=>rM,mpython_display_hvline:()=>cM,mpython_display_line:()=>gM,mpython_display_shape_rect:()=>RM,mpython_pbm_image:()=>CM,onboard_oled_bright_point:()=>OM,onboard_oled_scroll_string_delay:()=>mM,onboard_oled_show_frame_string_delay:()=>EM,onboard_oled_show_image:()=>IM,onboard_oled_show_image_or_string_delay:()=>MM,onboard_oled_show_image_xy:()=>TM,onboard_oled_show_string:()=>hM,onboard_tft_bright_point:()=>wM,onboard_tft_bright_screen:()=>WM,onboard_tft_clear:()=>kM,onboard_tft_clock_clear:()=>jM,onboard_tft_clock_draw:()=>zM,onboard_tft_clock_get_rtctime:()=>qM,onboard_tft_clock_init:()=>JM,onboard_tft_clock_set_time:()=>QM,onboard_tft_display_hvline:()=>VM,onboard_tft_display_line:()=>BM,onboard_tft_display_shape_circle:()=>ZM,onboard_tft_display_shape_rect:()=>bM,onboard_tft_fill:()=>KM,onboard_tft_get_pixel:()=>UM,onboard_tft_get_screen_pixel:()=>HM,onboard_tft_scroll_string:()=>YM,onboard_tft_scroll_string_delay:()=>XM,onboard_tft_shift:()=>GM,onboard_tft_show_frame_string:()=>xM,onboard_tft_show_frame_string_delay:()=>yM,onboard_tft_show_image:()=>FM,onboard_tft_show_image_or_string_delay:()=>vM,onboard_tft_show_image_xy:()=>PM});var b={};t.r(b),t.d(b,{factory_block:()=>rm,factory_block_return:()=>lm,factory_block_return_with_textarea:()=>Im,factory_block_with_textarea:()=>dm,factory_callMethod_noreturn:()=>am,factory_callMethod_return:()=>um,factory_create_with_container:()=>sm,factory_create_with_item:()=>_m,factory_declare:()=>pm,factory_from_import:()=>em,factory_function_noreturn:()=>nm,factory_function_return:()=>om,factory_import:()=>im,folding_block:()=>Tm});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>ym,inout_analog_atten:()=>Sm,inout_analog_read:()=>Cm,inout_analog_read_init:()=>Fm,inout_analog_write:()=>Rm,inout_analog_write_init:()=>fm,inout_analog_write_set:()=>cm,inout_analog_write_set_freq:()=>Ym,inout_digital_init:()=>Nm,inout_digital_read:()=>Em,inout_digital_write:()=>mm,inout_highlow:()=>Mm,inout_pinMode:()=>vm,inout_pin_attachInterrupt:()=>Lm,inout_pin_pressed:()=>Am,inout_pin_pressed_init:()=>Pm,inout_pwm_analog_write:()=>Om,inout_pwm_analog_write_init:()=>Dm,inout_pwm_analog_write_set_freq:()=>gm,pin_pressed:()=>xm,pin_pressed_init:()=>Xm});var B={};t.r(B),t.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>oE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>_E,IOT_EMQX_PING:()=>nE,IOT_FORMATTING:()=>eE,IOT_FORMAT_STRING:()=>iE,IOT_MIXIO_NTP:()=>sE,IOT_MIXIO_PUBLISH:()=>qm,IOT_MIXIO_SUBSCRIBE:()=>Qm,iot_checkonenet:()=>ME,iot_client_onboard:()=>aE,iot_create_with_item:()=>Km,iot_http_client:()=>uE,iot_http_data:()=>rE,iot_mixio_check:()=>Zm,iot_mixio_connect:()=>Jm,iot_mixio_connect_only:()=>jm,iot_mixio_disconnect:()=>zm,iot_mixio_format_msg:()=>tE,iot_mixio_format_topic:()=>$m,iot_mixly_key:()=>pE,iot_mqtt_client:()=>lE,iot_mqtt_data:()=>dE,iot_onenet_check:()=>Um,iot_onenet_connect:()=>Bm,iot_onenet_disconnect:()=>Gm,iot_onenet_publish:()=>km,iot_onenet_publish_dict:()=>wm,iot_onenetconnect:()=>TE,iot_onenetdisconnect:()=>hE,iot_publish:()=>mE,iot_publish_container:()=>Hm,iot_publish_item:()=>Wm,iot_wifi_connect:()=>Vm,iot_wificonnect:()=>IE});var G={};t.r(G),t.d(G,{network_ap_connect:()=>DE,network_connect:()=>CE,network_get_connect:()=>AE,network_get_wifi:()=>NE,network_init:()=>OE,network_is_active:()=>cE,network_open:()=>RE,network_scan:()=>gE,network_server:()=>fE,network_socket_accept:()=>XE,network_socket_bind:()=>PE,network_socket_close:()=>BE,network_socket_connect:()=>vE,network_socket_init:()=>FE,network_socket_listen:()=>YE,network_socket_receive:()=>xE,network_socket_receive_from:()=>bE,network_socket_send:()=>yE,network_socket_send_to:()=>VE,network_stop:()=>LE,network_wifi_connect:()=>SE,ntptime_address:()=>HE,ntptime_time:()=>kE,requests_attribute:()=>UE,requests_attribute2:()=>qE,requests_get:()=>GE,requests_get2:()=>KE,requests_method:()=>wE,requests_post:()=>JE});var U={};t.r(U),t.d(U,{pe_g1_battery_left:()=>jE,pe_g1_dc_motor:()=>ZE,pe_g1_dc_motor_speed:()=>$E,pe_g1_servo_get_angle:()=>iO,pe_g1_servo_get_speed:()=>nO,pe_g1_servo_set_angle:()=>tO,pe_g1_servo_set_speed:()=>eO,pe_g1_use_i2c_init:()=>zE});var w={};t.r(w),t.d(w,{HCSR04:()=>sR,PS2_Button:()=>aR,PS2_Buttons:()=>rR,PS2_Buttons_new:()=>TR,PS2_State:()=>uR,PS2_init:()=>_R,PS2_init_new:()=>dR,PS2_stk:()=>lR,PS2_stk_new:()=>hR,PS2_vibration:()=>pR,PS2_vibration_new:()=>IR,esp32_s2_weather_init:()=>tR,esp32_s2_weather_rain:()=>iR,esp32_s2_weather_wd:()=>eR,esp32_s2_weather_ws:()=>nR,extern_rfid_read:()=>GO,extern_rfid_readcontent:()=>wO,extern_rfid_readid:()=>UO,extern_rfid_status:()=>WO,extern_rfid_write:()=>kO,extern_rfid_write_return:()=>HO,gnss_get_data:()=>OR,gnss_have_data:()=>ER,mixbot_sensor_extern_get_addr:()=>LR,mixbot_sensor_extern_set_addr:()=>NR,pm25_get_data:()=>mR,robot_button_extern_get_value:()=>RR,robot_color_extern_get_value:()=>AR,robot_infrared_extern_get_value:()=>gR,robot_infrared_extern_grey_get_value:()=>CR,robot_potentiometer_extern_get_value:()=>SR,robot_sonar_extern_get_value:()=>DR,robot_sonar_extern_led:()=>fR,robot_touch_extern_get_value:()=>cR,sensor_APDS9960_extern:()=>gO,sensor_DS18X20:()=>EO,sensor_LTR308_extern:()=>CO,sensor_LTR390UV_extern:()=>AO,sensor_MAX30102_extern:()=>cO,sensor_QMC5883L_extern:()=>FO,sensor_VL530LX_extern:()=>LO,sensor_adxl345_get_acceleration:()=>rO,sensor_aht11_extern:()=>DO,sensor_bmp:()=>MO,sensor_compass_reset:()=>VO,sensor_dht11:()=>dO,sensor_hp203_extern:()=>fO,sensor_light_level:()=>lO,sensor_lm35:()=>OO,sensor_ltr381_extern:()=>SO,sensor_mixgo_extern_button_attachInterrupt:()=>aO,sensor_mixgo_extern_button_get_presses:()=>pO,sensor_mixgo_extern_button_is_pressed:()=>_O,sensor_mixgo_extern_button_was_pressed:()=>oO,sensor_mixgo_extern_light:()=>IO,sensor_mixgo_extern_pin_near:()=>hO,sensor_mixgo_extern_sound:()=>TO,sensor_mixgoce_hot_wheel_degrees:()=>$O,sensor_mixgoce_hot_wheel_is_touched:()=>ZO,sensor_mpu9250_attachGestureInterrupt:()=>uO,sensor_mpu9250_calibrate_compass:()=>xO,sensor_mpu9250_field_strength:()=>bO,sensor_mpu9250_gesture:()=>PO,sensor_mpu9250_get_acceleration:()=>vO,sensor_mpu9250_get_gyro:()=>XO,sensor_mpu9250_get_magnetic:()=>YO,sensor_mpu9250_temperature:()=>yO,sensor_sht:()=>mO,sensor_shtc3_extern:()=>NO,sensor_use_i2c_init:()=>RO,sensor_use_spi_init:()=>BO,sensor_use_uart_init:()=>MR,sensor_weather_solo_init:()=>FR,sensor_weather_solo_rain:()=>YR,sensor_weather_solo_wd:()=>PR,sensor_weather_solo_ws:()=>vR,weather_data:()=>KO,weather_have_data:()=>JO,weather_set_label:()=>QO,weather_set_label_container:()=>zO,weather_set_label_item:()=>jO,weather_uart_mixio:()=>qO});var k={};t.r(k),t.d(k,{HCSR04:()=>zR,RTC_set_date:()=>QR,RTC_set_time:()=>qR,bitbot_als_num:()=>ig,dht11:()=>ug,number1:()=>ZR,number2:()=>$R,number3:()=>tc,number4:()=>ec,number5:()=>ic,number6:()=>nc,number7:()=>sc,onboard_RTC_get_time:()=>lc,onboard_RTC_get_time_str:()=>mc,onboard_RTC_get_timestamp:()=>dc,onboard_RTC_set_datetime:()=>hc,onboard_RTC_settime_string:()=>Tc,onboard_RTC_timestamp_totuple:()=>Ic,rfid_readcontent:()=>Sc,rfid_readid:()=>Cc,rfid_write:()=>Ac,rfid_write_return:()=>Lc,sensor_LTR308:()=>Ec,sensor_aht11:()=>Rc,sensor_bitbot_ALS:()=>eg,sensor_button_get_presses:()=>_g,sensor_button_is_pressed:()=>ng,sensor_button_was_pressed:()=>sg,sensor_distance_hrsc04:()=>JR,sensor_eulerangles:()=>Dc,sensor_field_strength:()=>rg,sensor_get_acceleration:()=>Nc,sensor_get_temperature:()=>cc,sensor_hp203:()=>gc,sensor_light:()=>ag,sensor_mixbot_get_gyro:()=>tg,sensor_mixbot_patrol_calibrate:()=>jc,sensor_mixbot_patrol_value:()=>Zc,sensor_mixbot_temperature:()=>$c,sensor_mixgo_LTR308:()=>rc,sensor_mixgo_button_attachInterrupt:()=>VR,sensor_mixgo_button_get_presses:()=>bR,sensor_mixgo_button_is_pressed:()=>xR,sensor_mixgo_button_was_pressed:()=>yR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Bc,sensor_mixgo_cc_mmc5603_get_angle:()=>Vc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>bc,sensor_mixgo_light:()=>jR,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:()=>kR,sensor_mixgo_touch_slide:()=>KR,sensor_mixgocar42_button_attachInterrupt:()=>wR,sensor_mixgocar42_button_get_presses:()=>UR,sensor_mixgocar42_button_is_pressed:()=>BR,sensor_mixgocar42_button_was_pressed:()=>GR,sensor_mixgocar_battery_left:()=>zc,sensor_mixgocar_pin_near:()=>qc,sensor_mixgocar_pin_near_line:()=>Jc,sensor_mixgocar_pin_near_state_change:()=>Qc,sensor_mixgoce_pin_pressed:()=>HR,sensor_mixgoce_temperature:()=>Uc,sensor_mixgome_temperature:()=>Gc,sensor_mpython_pin_pressed:()=>WR,sensor_mpython_qmi8658_get_gyro:()=>wc,sensor_mpython_qmi8658_temperature:()=>kc,sensor_onboard_compass_reset:()=>yc,sensor_onboard_mpu9250_calibrate_compass:()=>Yc,sensor_onboard_mpu9250_field_strength:()=>xc,sensor_onboard_mpu9250_gesture:()=>fc,sensor_onboard_mpu9250_get_acceleration:()=>Fc,sensor_onboard_mpu9250_get_gyro:()=>vc,sensor_onboard_mpu9250_get_magnetic:()=>Pc,sensor_onboard_mpu9250_temperature:()=>Xc,sensor_pin_near:()=>pg,sensor_pin_pressed:()=>og,sensor_rm_acc:()=>Kc,sensor_rm_battery_left:()=>Wc,sensor_rm_pin_near_double:()=>Hc,sensor_rtc_init:()=>Mc,sensor_sound:()=>Oc,sensor_temperature:()=>lg});var H={};t.r(H),t.d(H,{serial_any:()=>Og,serial_begin:()=>Sg,serial_print:()=>Tg,serial_print_byte:()=>Ig,serial_print_hex:()=>Mg,serial_println:()=>hg,serial_read_from_ai:()=>Yg,serial_readline:()=>Rg,serial_readstr:()=>Eg,serial_readstr_until:()=>cg,serial_receive_data_event:()=>mg,serial_send_to_ai:()=>vg,serial_softserial:()=>Cg,serial_softserial_new:()=>gg,system_input:()=>Ag,system_print:()=>Lg,system_print_container:()=>Fg,system_print_end:()=>Dg,system_print_inline:()=>Ng,system_print_item:()=>Pg,system_print_many:()=>fg});var W={};t.r(W),t.d(W,{Panic_with_status_code:()=>bg,Timer_init:()=>zg,base_delay:()=>$g,controls_delay:()=>yg,controls_delay_new:()=>xg,controls_millis:()=>Bg,controls_uname:()=>Ug,raw_block:()=>Gg,reset:()=>Vg,system_bitbot_shutdown:()=>Qg,system_machine_reset:()=>qg,system_ticks_diff:()=>Hg,system_timer:()=>kg,system_timer_init:()=>Wg,system_wdt_feed:()=>Jg,system_wdt_init:()=>Kg,time_ticks_diff:()=>Zg,timer:()=>wg,timer2:()=>jg});var K={};t.r(K),t.d(K,{Air_daily_content:()=>IC,Air_now_content:()=>oC,Geo_moon_content:()=>hC,Geo_sun_content:()=>TC,Life_suggestion_content:()=>aC,Location_search_content:()=>rC,Tide_daily_content:()=>uC,WEATHER_DAILY:()=>iC,WEATHER_HOUR:()=>nC,WEATHER_NOW:()=>eC,Weather_alarm_content:()=>pC,Weather_daily:()=>lC,Weather_daily_content:()=>dC,Weather_now:()=>sC,Weather_now_content:()=>_C});var J={};t.r(J),t.d(J,{actuator_extern_get_led_bright:()=>xC,actuator_extern_get_led_state:()=>yC,actuator_extern_led_bright:()=>XC,actuator_extern_led_brightness:()=>bC,actuator_ms32006_dcmotor:()=>CC,actuator_ms32006_init:()=>gC,actuator_ms32006_stepper:()=>SC,actuator_neopixel_init:()=>VC,actuator_neopixel_rgb:()=>UC,actuator_neopixel_rgb_all:()=>BC,actuator_neopixel_write:()=>GC,actuator_use_uart_init:()=>wC,esp32_music_get_tempo_extern:()=>FC,esp32_music_pitch:()=>LC,esp32_music_pitch_init:()=>AC,esp32_music_pitch_with_time:()=>NC,esp32_music_play_list:()=>PC,esp32_music_reset_extern:()=>vC,esp32_music_set_tempo_extern:()=>fC,esp32_music_stop:()=>DC,mixbot_actuator_extern_get_addr:()=>oS,mixbot_actuator_extern_set_addr:()=>pS,mixbot_addr_extern:()=>JC,robot_led_extern:()=>jC,robot_led_extern_get_value:()=>ZC,robot_motor_extern:()=>qC,robot_motor_extern_get_speed:()=>QC,robot_servo_extern_absolute_run:()=>iS,robot_servo_extern_get_status:()=>$C,robot_servo_extern_relative_continue:()=>_S,robot_servo_extern_relative_origin:()=>nS,robot_servo_extern_relative_run:()=>sS,robot_servo_extern_stop:()=>eS,robot_servo_extern_stop_mode:()=>tS,robot_traffic_light_extern:()=>zC,servo_get_angle:()=>RC,servo_get_speed:()=>cC,servo_init:()=>MC,servo_move:()=>YC,servo_set_angle:()=>EC,servo_set_speed:()=>OC,servo_speed_360:()=>mC,syn6288_builtin_voice:()=>WC,syn6288_get_voice:()=>HC,syn6288_set_voice:()=>kC,syn6288_tts_play:()=>KC});var q={};t.r(q),t.d(q,{actuator_dc_motor:()=>xS,actuator_dc_motor_stop:()=>yS,actuator_get_led_bright:()=>ES,actuator_get_led_state:()=>OS,actuator_led_bright:()=>mS,actuator_led_brightness:()=>RS,actuator_mixbot_buzzer_on_off:()=>US,actuator_mixgo_nova_mic_get:()=>KS,actuator_mixgo_nova_mic_set:()=>WS,actuator_mixgo_nova_onboard_music_pitch:()=>ZS,actuator_mixgo_nova_onboard_music_stop:()=>$S,actuator_mixgo_nova_play_audio:()=>zS,actuator_mixgo_nova_play_online_audio:()=>jS,actuator_mixgo_nova_record_audio:()=>QS,actuator_mixgo_nova_voice_get:()=>qS,actuator_mixgo_nova_voice_set:()=>JS,actuator_mixgo_zero_led_color:()=>cS,actuator_onboard_neopixel_rgb:()=>DS,actuator_onboard_neopixel_rgb_all:()=>fS,actuator_onboard_neopixel_rgb_show_all_chase:()=>FS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>PS,actuator_onboard_neopixel_write:()=>NS,actuator_stepper_keep:()=>YS,actuator_stepper_stop:()=>XS,analog_ble_keyboard_init:()=>rA,analog_ble_keyboard_input:()=>IA,analog_ble_keyboard_send_battery:()=>hA,analog_ble_keyboard_str:()=>TA,analog_ble_mouse_init:()=>MA,analog_ble_mouse_input:()=>OA,analog_ble_mouse_send_battery:()=>RA,analog_keyboard_input:()=>nA,analog_keyboard_str:()=>aA,analog_mouse_input:()=>oA,bitbot_motor:()=>HS,bitbot_move:()=>wS,bitbot_stop:()=>kS,ble_keyboard_connect:()=>dA,ble_keyboard_get_mac:()=>lA,ble_mouse_connect:()=>EA,ble_mouse_get_mac:()=>mA,cc_number:()=>gS,esp32_music_get_tempo:()=>uS,esp32_music_reset:()=>TS,esp32_music_set_tempo:()=>aS,esp32_onboard_music_pitch:()=>rS,esp32_onboard_music_pitch_with_time:()=>lS,esp32_onboard_music_play_list:()=>IS,esp32_onboard_music_stop:()=>dS,general_key:()=>_A,general_key_tuple:()=>uA,get_power_output:()=>eA,ledswitch:()=>MS,mixbot_motor:()=>GS,mixbot_motor_status:()=>bS,mixbot_move:()=>VS,mixbot_stop:()=>BS,mouse_key:()=>pA,number:()=>hS,rm_actuator_get_led_bright:()=>SS,rm_actuator_get_led_state:()=>AS,rm_actuator_led_bright:()=>CS,rm_actuator_led_brightness:()=>LS,rm_motor:()=>vS,set_all_power_output:()=>iA,set_power_output:()=>tA,special_key:()=>sA});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>$A,ai_sensor_ailocal_class:()=>wA,ai_sensor_ailocal_class_result:()=>kA,ai_sensor_ailocal_train:()=>UA,ai_sensor_asr_recognize:()=>qA,ai_sensor_audio_play:()=>WA,ai_sensor_audio_record:()=>HA,ai_sensor_barcode:()=>NA,ai_sensor_circle:()=>YA,ai_sensor_classifier_faces:()=>ZA,ai_sensor_color:()=>bA,ai_sensor_color_chases:()=>GA,ai_sensor_color_chases_result:()=>BA,ai_sensor_config:()=>CA,ai_sensor_face:()=>jA,ai_sensor_find_20objects:()=>tL,ai_sensor_find_barcodes:()=>DA,ai_sensor_find_circles:()=>XA,ai_sensor_find_colors:()=>VA,ai_sensor_find_licenseplates:()=>zA,ai_sensor_find_lines:()=>vA,ai_sensor_find_qrcodes:()=>LA,ai_sensor_find_rects:()=>yA,ai_sensor_find_tags:()=>FA,ai_sensor_licenseplate:()=>QA,ai_sensor_line:()=>PA,ai_sensor_qrcode:()=>AA,ai_sensor_qrcode_lite:()=>gA,ai_sensor_rect:()=>xA,ai_sensor_rgb:()=>SA,ai_sensor_tag:()=>fA,ai_sensor_use_uart_init:()=>cA,ai_sensor_yolo_recognize:()=>KA,ai_sensor_yolo_recognize_result:()=>JA});var z={};t.r(z),t.d(z,{MICROPYTHON_AI_Speech_asr:()=>nL,MICROPYTHON_AI_Speech_unit:()=>iL,MICROPYTHON_AI_client:()=>eL});var j={};t.r(j),t.d(j,{mpython_blynk_app_data:()=>hL,mpython_blynk_app_notify:()=>rL,mpython_blynk_email:()=>ML,mpython_blynk_get_timers:()=>dL,mpython_blynk_on_connected:()=>pL,mpython_blynk_on_disconnected:()=>oL,mpython_blynk_run:()=>uL,mpython_blynk_sensor_data_to_app:()=>TL,mpython_blynk_set_property:()=>mL,mpython_blynk_setup:()=>EL,mpython_blynk_stop_timers:()=>lL,mpython_blynk_sync_virtual:()=>_L,mpython_blynk_terminal_widget_vpin:()=>sL,mpython_blynktimer:()=>IL,mpython_blynktimer_run:()=>aL});var Z={};t.r(Z),t.d(Z,{cc_g1_read_bat:()=>OL,cc_g1_read_joystick:()=>RL,cc_g1_read_key:()=>cL,cc_g1_turnoff:()=>gL});var $={};t.r($),t.d($,{ce_go_dc_motor:()=>FL,ce_go_get_led_bright:()=>AL,ce_go_get_led_state:()=>LL,ce_go_hall_attachInterrupt:()=>PL,ce_go_hall_data:()=>YL,ce_go_hall_initialize:()=>vL,ce_go_led_bright:()=>SL,ce_go_led_brightness:()=>NL,ce_go_light_number:()=>CL,ce_go_pin_light:()=>VL,ce_go_pin_near:()=>xL,ce_go_pin_near_line:()=>XL,ce_go_pin_near_state_change:()=>yL,ce_go_stepper_keep:()=>DL,ce_go_stepper_stop:()=>fL,sensor_mixgome_eulerangles:()=>bL});var tt={};t.r(tt),t.d(tt,{communicate_bluetooth_central_init:()=>ON,communicate_bluetooth_connect:()=>gN,communicate_bluetooth_disconnect:()=>CN,communicate_bluetooth_handle:()=>fN,communicate_bluetooth_is_connected:()=>AN,communicate_bluetooth_mac:()=>SN,communicate_bluetooth_peripheral_init:()=>RN,communicate_bluetooth_recv:()=>DN,communicate_bluetooth_recv_only:()=>NN,communicate_bluetooth_scan:()=>cN,communicate_bluetooth_send:()=>LN,communicate_espnow_init:()=>FN,communicate_espnow_init_new:()=>PN,communicate_i2c_available:()=>KL,communicate_i2c_init:()=>UL,communicate_i2c_master_read:()=>WL,communicate_i2c_onboard:()=>BL,communicate_i2c_read:()=>wL,communicate_i2c_scan:()=>HL,communicate_i2c_write:()=>kL,communicate_ir_recv_init:()=>uN,communicate_ir_send_init:()=>TN,communicate_ow_init:()=>nN,communicate_ow_read:()=>oN,communicate_ow_reset:()=>_N,communicate_ow_scan:()=>sN,communicate_ow_select:()=>aN,communicate_ow_write:()=>pN,communicate_spi_buffer:()=>zL,communicate_spi_init:()=>qL,communicate_spi_onboard:()=>GL,communicate_spi_read:()=>jL,communicate_spi_read_output:()=>ZL,communicate_spi_readinto:()=>$L,communicate_spi_readinto_output:()=>tN,communicate_spi_set:()=>QL,communicate_spi_write:()=>eN,communicate_spi_write_readinto:()=>iN,espnow_radio_channel:()=>bN,espnow_radio_channel_new:()=>BN,espnow_radio_on_off:()=>GN,espnow_radio_rec:()=>wN,espnow_radio_recv:()=>HN,espnow_radio_recv_certain_msg:()=>WN,espnow_radio_recv_certain_msg_new:()=>JN,espnow_radio_recv_msg:()=>kN,espnow_radio_recv_new:()=>KN,espnow_radio_send:()=>UN,espnow_radio_txpower:()=>VN,i2c_slave_onreceive:()=>JL,internal_variable:()=>rN,ir_recv_timeout:()=>IN,ir_transmit_busy:()=>EN,ir_transmit_conventional_data:()=>hN,ir_transmit_raw_code:()=>mN,ir_transmit_study_code:()=>MN,ir_whether_recv:()=>dN,lora_init:()=>qN,lora_packet:()=>QN,lora_recv:()=>jN,lora_send:()=>zN,network_espnow_info:()=>YN,network_espnow_mac:()=>vN,network_espnow_recv:()=>XN,network_espnow_recv_handle:()=>yN,network_espnow_send:()=>xN,recv_fun:()=>lN,urequests_attribute:()=>$N,urequests_get:()=>ZN,urequests_method:()=>tD});var et={};t.r(et),t.d(et,{display_animate:()=>AD,display_circle:()=>LD,display_color_seclet:()=>bD,display_draw_4strings:()=>ED,display_fill:()=>SD,display_lcd_use_i2c_init:()=>kD,display_line:()=>cD,display_line_arbitrarily:()=>OD,display_matrix_extern_bright_point:()=>lD,display_matrix_extern_bright_screen:()=>ID,display_matrix_extern_clear:()=>aD,display_matrix_extern_get_pixel:()=>rD,display_matrix_extern_get_screen_pixel:()=>dD,display_matrix_extern_image_builtins:()=>TD,display_matrix_extern_scroll_string:()=>oD,display_matrix_extern_scroll_string_delay:()=>pD,display_matrix_extern_shift:()=>uD,display_matrix_extern_show_frame_string:()=>sD,display_matrix_extern_show_frame_string_delay:()=>_D,display_matrix_extern_show_image:()=>iD,display_matrix_extern_show_image_or_string_delay:()=>nD,display_matrix_use_i2c_init:()=>eD,display_oled_drawPixel:()=>fD,display_oled_showBitmap:()=>DD,display_oled_use_i2c_init:()=>qD,display_onoff:()=>gD,display_rect:()=>RD,display_tm1650_power:()=>PD,display_tm1650_set_brightness:()=>XD,display_tm1650_show_dot:()=>YD,display_tm1650_show_num:()=>vD,display_tm_use_i2c_init:()=>FD,display_triangle:()=>ND,display_use_i2c_init:()=>mD,extern_oled_bright_point:()=>pf,extern_oled_clear:()=>sf,extern_oled_get_pixel:()=>of,extern_oled_hvline:()=>uf,extern_oled_line:()=>rf,extern_oled_scroll_string:()=>ef,extern_oled_scroll_string_delay:()=>nf,extern_oled_shape_rect:()=>af,extern_oled_shift:()=>_f,extern_oled_show_frame_string:()=>$D,extern_oled_show_frame_string_delay:()=>tf,extern_oled_show_image:()=>QD,extern_oled_show_image_or_string_delay:()=>ZD,extern_oled_show_image_xy:()=>zD,extern_oled_show_string:()=>jD,image_shift:()=>CD,lcd_backlight:()=>KD,lcd_clear:()=>JD,lcd_print_string:()=>WD,lcd_show_image_or_string_delay:()=>HD,matrix_extern_image_arithmetic:()=>hD,matrix_extern_image_invert:()=>MD,tft_fill:()=>UD,tft_line_arbitrarily:()=>wD,tft_scroll_string_delay:()=>GD,tft_show_frame_string_delay:()=>BD,tft_show_image_or_string_delay:()=>VD,tft_show_image_xy:()=>yD,tft_use_spi_init:()=>xD});var it={};t.r(it),t.d(it,{bitbot_display_image_create:()=>qf,display_bright_point:()=>Af,display_bright_screen:()=>Nf,display_clear:()=>Rf,display_get_pixel:()=>Sf,display_get_screen_pixel:()=>Lf,display_image_builtins:()=>mf,display_image_builtins_all:()=>Ef,display_image_create:()=>Of,display_scroll_string:()=>hf,display_scroll_string_delay:()=>Mf,display_shift:()=>Cf,display_show_frame_string:()=>If,display_show_frame_string_delay:()=>Tf,display_show_image:()=>lf,display_show_image_or_string_delay:()=>df,draw_pointer:()=>EF,image_arithmetic:()=>cf,image_invert:()=>gf,mixbot_display_bright_screen:()=>Kf,mixbot_display_get_ambientbright:()=>Wf,mixbot_display_get_screen_pixel:()=>Hf,mixbot_display_image_create:()=>kf,mixbot_display_rotate:()=>Jf,mixgo_display_image_create_new:()=>Pf,mixgome_display_font:()=>Ff,mixgome_display_image_create:()=>Df,mixgomini_display_image_create:()=>ff,mpython_display_hvline:()=>Uf,mpython_display_line:()=>wf,mpython_display_shape_rect:()=>Gf,mpython_pbm_image:()=>vf,onboard_oled_bright_point:()=>Bf,onboard_oled_scroll_string_delay:()=>Vf,onboard_oled_show_frame_string_delay:()=>bf,onboard_oled_show_image:()=>Yf,onboard_oled_show_image_or_string_delay:()=>yf,onboard_oled_show_image_xy:()=>Xf,onboard_oled_show_string:()=>xf,onboard_tft_bright_point:()=>aF,onboard_tft_bright_screen:()=>rF,onboard_tft_clear:()=>_F,onboard_tft_clock_clear:()=>MF,onboard_tft_clock_draw:()=>hF,onboard_tft_clock_get_rtctime:()=>IF,onboard_tft_clock_init:()=>dF,onboard_tft_clock_set_time:()=>TF,onboard_tft_display_hvline:()=>nF,onboard_tft_display_line:()=>sF,onboard_tft_display_shape_circle:()=>mF,onboard_tft_display_shape_rect:()=>iF,onboard_tft_fill:()=>lF,onboard_tft_get_pixel:()=>pF,onboard_tft_get_screen_pixel:()=>uF,onboard_tft_scroll_string:()=>tF,onboard_tft_scroll_string_delay:()=>eF,onboard_tft_shift:()=>oF,onboard_tft_show_frame_string:()=>Zf,onboard_tft_show_frame_string_delay:()=>$f,onboard_tft_show_image:()=>Qf,onboard_tft_show_image_or_string_delay:()=>jf,onboard_tft_show_image_xy:()=>zf});var nt={};t.r(nt),t.d(nt,{factory_block:()=>LF,factory_block_return:()=>NF,factory_block_return_with_textarea:()=>fF,factory_block_with_textarea:()=>DF,factory_callMethod_noreturn:()=>SF,factory_callMethod_return:()=>AF,factory_declare:()=>CF,factory_from_import:()=>OF,factory_function_noreturn:()=>cF,factory_function_return:()=>gF,factory_import:()=>RF,folding_block:()=>FF});var st={};t.r(st),t.d(st,{inout_analog_atten:()=>WF,inout_analog_read:()=>VF,inout_analog_read_init:()=>HF,inout_analog_write:()=>xF,inout_analog_write_init:()=>kF,inout_analog_write_set:()=>yF,inout_digital_init:()=>UF,inout_digital_read:()=>YF,inout_digital_write:()=>vF,inout_highlow:()=>PF,inout_pin_attachInterrupt:()=>GF,inout_pin_pressed:()=>BF,inout_pin_pressed_init:()=>KF,inout_pwm_analog_write:()=>XF,inout_pwm_analog_write_init:()=>wF,inout_pwm_analog_write_set_freq:()=>bF});var _t={};t.r(_t),t.d(_t,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>lP,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>uP,IOT_EMQX_PING:()=>dP,IOT_FORMATTING:()=>pP,IOT_FORMAT_STRING:()=>aP,IOT_MIXIO_NTP:()=>IP,IOT_MIXIO_PUBLISH:()=>tP,IOT_MIXIO_SUBSCRIBE:()=>eP,iot_client_onboard:()=>TP,iot_http_client:()=>hP,iot_http_data:()=>MP,iot_mixio_check:()=>sP,iot_mixio_connect:()=>$F,iot_mixio_connect_only:()=>nP,iot_mixio_disconnect:()=>iP,iot_mixio_format_msg:()=>oP,iot_mixio_format_topic:()=>_P,iot_mixly_key:()=>rP,iot_mqtt_client:()=>mP,iot_mqtt_data:()=>EP,iot_onenet_check:()=>jF,iot_onenet_connect:()=>qF,iot_onenet_disconnect:()=>QF,iot_onenet_publish:()=>ZF,iot_onenet_publish_dict:()=>zF,iot_wifi_connect:()=>JF});var ot={};t.r(ot),t.d(ot,{network_ap_connect:()=>NP,network_connect:()=>RP,network_get_connect:()=>gP,network_get_wifi:()=>LP,network_init:()=>OP,network_is_active:()=>AP,network_open:()=>SP,network_scan:()=>DP,network_server:()=>fP,network_socket_accept:()=>XP,network_socket_bind:()=>PP,network_socket_close:()=>BP,network_socket_connect:()=>vP,network_socket_init:()=>FP,network_socket_listen:()=>YP,network_socket_receive:()=>xP,network_socket_receive_from:()=>bP,network_socket_send:()=>yP,network_socket_send_to:()=>VP,network_stop:()=>CP,network_wifi_connect:()=>cP,ntptime_address:()=>HP,ntptime_time:()=>kP,requests_attribute:()=>UP,requests_attribute2:()=>KP,requests_get:()=>GP,requests_get2:()=>WP,requests_method:()=>wP,requests_post:()=>JP});var pt={};t.r(pt),t.d(pt,{pe_g1_battery_left:()=>QP,pe_g1_dc_motor:()=>zP,pe_g1_dc_motor_speed:()=>jP,pe_g1_servo_get_angle:()=>tv,pe_g1_servo_get_speed:()=>ev,pe_g1_servo_set_angle:()=>ZP,pe_g1_servo_set_speed:()=>$P,pe_g1_use_i2c_init:()=>qP});var at={};t.r(at),t.d(at,{HCSR04:()=>Hv,PS2_Button:()=>Jv,PS2_Buttons:()=>qv,PS2_Buttons_new:()=>iY,PS2_State:()=>Qv,PS2_init:()=>Wv,PS2_init_new:()=>tY,PS2_stk:()=>zv,PS2_stk_new:()=>nY,PS2_vibration:()=>Kv,PS2_vibration_new:()=>eY,RTC_get_time:()=>Zv,RTC_set_date:()=>uv,RTC_set_datetime:()=>jv,RTC_set_time:()=>av,esp32_s2_weather_init:()=>Gv,esp32_s2_weather_rain:()=>wv,esp32_s2_weather_wd:()=>Uv,esp32_s2_weather_ws:()=>kv,extern_rfid_read:()=>Dv,extern_rfid_readcontent:()=>Fv,extern_rfid_readid:()=>fv,extern_rfid_status:()=>Yv,extern_rfid_write:()=>Pv,extern_rfid_write_return:()=>vv,gnss_get_data:()=>oY,gnss_have_data:()=>pY,mixbot_sensor_extern_get_addr:()=>MY,mixbot_sensor_extern_set_addr:()=>mY,pm25_get_data:()=>_Y,robot_button_extern_get_value:()=>aY,robot_color_extern_get_value:()=>IY,robot_infrared_extern_get_value:()=>rY,robot_infrared_extern_grey_get_value:()=>lY,robot_potentiometer_extern_get_value:()=>dY,robot_sonar_extern_get_value:()=>TY,robot_sonar_extern_led:()=>hY,robot_touch_extern_get_value:()=>uY,sensor_APDS9960_extern:()=>Ev,sensor_DS18X20:()=>gY,sensor_LTR308_extern:()=>Ov,sensor_LTR390UV_extern:()=>gv,sensor_MAX30102_extern:()=>mv,sensor_QMC5883L_extern:()=>Cv,sensor_VL530LX_extern:()=>Lv,sensor_aht11_extern:()=>Av,sensor_bmp:()=>Tv,sensor_dht11:()=>$v,sensor_distance_hrsc04:()=>pv,sensor_hp203_extern:()=>Rv,sensor_ltr381_extern:()=>cv,sensor_mixgo_extern_button_attachInterrupt:()=>_v,sensor_mixgo_extern_button_get_presses:()=>sv,sensor_mixgo_extern_button_is_pressed:()=>iv,sensor_mixgo_extern_button_was_pressed:()=>nv,sensor_mixgo_extern_light:()=>rv,sensor_mixgo_extern_pin_near:()=>dv,sensor_mixgo_extern_sound:()=>lv,sensor_mixgoce_hot_wheel_degrees:()=>Bv,sensor_mixgoce_hot_wheel_is_touched:()=>Vv,sensor_mpu9250_attachGestureInterrupt:()=>ov,sensor_rtc_init:()=>Iv,sensor_sht:()=>hv,sensor_shtc3_extern:()=>Sv,sensor_use_i2c_init:()=>Mv,sensor_use_spi_init:()=>Nv,sensor_use_uart_init:()=>sY,sensor_weather_solo_init:()=>EY,sensor_weather_solo_rain:()=>cY,sensor_weather_solo_wd:()=>OY,sensor_weather_solo_ws:()=>RY,weather_data:()=>Xv,weather_have_data:()=>xv,weather_set_label:()=>bv,weather_uart_mixio:()=>yv});var ut={};t.r(ut),t.d(ut,{HCSR04:()=>PY,bitbot_als_num:()=>zX,dht11:()=>sx,number1:()=>vY,number2:()=>YY,number3:()=>XY,number4:()=>xY,number5:()=>yY,number6:()=>bY,number7:()=>VY,onboard_RTC_get_time:()=>NX,onboard_RTC_get_time_str:()=>FX,onboard_RTC_get_timestamp:()=>DX,onboard_RTC_set_datetime:()=>AX,onboard_RTC_settime_string:()=>LX,onboard_RTC_timestamp_totuple:()=>fX,rfid_readcontent:()=>$Y,rfid_readid:()=>ZY,rfid_write:()=>tX,rfid_write_return:()=>eX,sensor_LTR308:()=>JY,sensor_adxl345_get_acceleration:()=>rX,sensor_aht11:()=>zY,sensor_bitbot_ALS:()=>QX,sensor_button_get_presses:()=>$X,sensor_button_is_pressed:()=>jX,sensor_button_was_pressed:()=>ZX,sensor_compass_reset:()=>MX,sensor_ds18x20:()=>WY,sensor_eulerangles:()=>nX,sensor_get_acceleration:()=>iX,sensor_get_temperature:()=>jY,sensor_hp203:()=>QY,sensor_light:()=>nx,sensor_lm35:()=>KY,sensor_mixbot_get_gyro:()=>qX,sensor_mixbot_patrol_calibrate:()=>WX,sensor_mixbot_patrol_value:()=>KX,sensor_mixbot_temperature:()=>JX,sensor_mixgo_LTR308:()=>kY,sensor_mixgo_button_attachInterrupt:()=>LY,sensor_mixgo_button_get_presses:()=>AY,sensor_mixgo_button_is_pressed:()=>CY,sensor_mixgo_button_was_pressed:()=>SY,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>YX,sensor_mixgo_cc_mmc5603_get_angle:()=>vX,sensor_mixgo_cc_mmc5603_get_magnetic:()=>PX,sensor_mixgo_light:()=>ix,sensor_mixgo_nova_LTR308:()=>HY,sensor_mixgo_nova_pin_near:()=>wY,sensor_mixgo_pin_near:()=>UY,sensor_mixgo_pin_near_double:()=>GY,sensor_mixgo_pin_near_single:()=>BY,sensor_mixgo_pin_pressed:()=>aX,sensor_mixgo_touch_slide:()=>pX,sensor_mixgocar42_button_attachInterrupt:()=>FY,sensor_mixgocar42_button_get_presses:()=>fY,sensor_mixgocar42_button_is_pressed:()=>NY,sensor_mixgocar42_button_was_pressed:()=>DY,sensor_mixgocar_battery_left:()=>HX,sensor_mixgocar_pin_near:()=>wX,sensor_mixgocar_pin_near_line:()=>UX,sensor_mixgocar_pin_near_state_change:()=>kX,sensor_mixgoce_pin_pressed:()=>oX,sensor_mixgoce_temperature:()=>xX,sensor_mixgome_temperature:()=>XX,sensor_mpu9250_calibrate_compass:()=>IX,sensor_mpu9250_field_strength:()=>hX,sensor_mpu9250_gesture:()=>sX,sensor_mpu9250_get_acceleration:()=>_X,sensor_mpu9250_get_gyro:()=>dX,sensor_mpu9250_get_magnetic:()=>lX,sensor_mpu9250_temperature:()=>TX,sensor_mpython_pin_pressed:()=>uX,sensor_mpython_qmi8658_get_gyro:()=>yX,sensor_mpython_qmi8658_temperature:()=>bX,sensor_onboard_compass_reset:()=>SX,sensor_onboard_mpu9250_calibrate_compass:()=>cX,sensor_onboard_mpu9250_field_strength:()=>CX,sensor_onboard_mpu9250_gesture:()=>mX,sensor_onboard_mpu9250_get_acceleration:()=>EX,sensor_onboard_mpu9250_get_gyro:()=>RX,sensor_onboard_mpu9250_get_magnetic:()=>OX,sensor_onboard_mpu9250_temperature:()=>gX,sensor_pin_near:()=>ex,sensor_pin_pressed:()=>tx,sensor_rm_acc:()=>GX,sensor_rm_battery_left:()=>BX,sensor_rm_pin_near_double:()=>VX,sensor_sound:()=>qY});var rt={};t.r(rt),t.d(rt,{serial_any:()=>ux,serial_print:()=>_x,serial_print_byte:()=>ox,serial_print_hex:()=>ax,serial_println:()=>px,serial_read_from_ai:()=>Rx,serial_readline:()=>lx,serial_readstr:()=>rx,serial_send_to_ai:()=>Ox,serial_softserial:()=>dx,serial_softserial_new:()=>Ix,system_input:()=>Tx,system_print:()=>hx,system_print_end:()=>mx,system_print_inline:()=>Mx,system_print_many:()=>Ex});var lt={};t.r(lt),t.d(lt,{Panic_with_status_code:()=>vx,Timer_init:()=>Jx,base_delay:()=>zx,controls_delay:()=>bx,controls_delay_new:()=>Vx,controls_end_program:()=>Xx,controls_millis:()=>Yx,controls_uname:()=>yx,reset:()=>xx,system_bitbot_shutdown:()=>Kx,system_device_name:()=>Fx,system_device_serial_number:()=>Px,system_event_bus_source:()=>Dx,system_event_bus_value:()=>fx,system_machine_reset:()=>Wx,system_on_event:()=>Ax,system_raise_event:()=>Sx,system_reset:()=>gx,system_run_in_background:()=>cx,system_ticks_diff:()=>Ux,system_timer:()=>Gx,system_timer_init:()=>wx,system_timestamp:()=>Lx,system_value:()=>Nx,system_wait:()=>Cx,system_wdt_feed:()=>Hx,system_wdt_init:()=>kx,time_ticks_diff:()=>Qx,timer:()=>Bx,timer2:()=>qx});var dt={};t.r(dt),t.d(dt,{Air_daily_content:()=>uy,Air_now_content:()=>iy,Geo_moon_content:()=>ly,Geo_sun_content:()=>ry,Life_suggestion_content:()=>sy,Location_search_content:()=>oy,Tide_daily_content:()=>_y,WEATHER_DAILY:()=>Zx,WEATHER_HOUR:()=>$x,WEATHER_NOW:()=>jx,Weather_alarm_content:()=>ny,Weather_daily:()=>py,Weather_daily_content:()=>ay,Weather_now:()=>ty,Weather_now_content:()=>ey});var It={};t.r(It),t.d(It,{controls_pin_attachInterrupt:()=>vy,inout_analog_atten:()=>cy,inout_analog_read:()=>Ry,inout_analog_read_init:()=>Ly,inout_analog_write:()=>Ey,inout_analog_write_init:()=>Ay,inout_analog_write_set:()=>Oy,inout_analog_write_set_freq:()=>Dy,inout_digital_init:()=>Sy,inout_digital_read:()=>my,inout_digital_write:()=>My,inout_highlow:()=>hy,inout_pinMode:()=>fy,inout_pin_attachInterrupt:()=>Cy,inout_pin_pressed:()=>gy,inout_pin_pressed_init:()=>Ny,pin_pressed:()=>Py,pin_pressed_init:()=>Fy});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>Uy,analog_output:()=>ky,espnow_channel:()=>Vy,haskylens_model:()=>By,i2c_A_pin:()=>Hy,i2c_B_pin:()=>Wy,pins_analog:()=>zy,pins_analog_pin:()=>jy,pins_axis:()=>Tb,pins_brightness:()=>hb,pins_builtinimg:()=>pb,pins_builtinimg_extern:()=>ab,pins_button:()=>tb,pins_buttonB:()=>eb,pins_dac:()=>Zy,pins_dac_pin:()=>$y,pins_digital:()=>Xy,pins_digital_dot:()=>Cb,pins_digital_pin:()=>xy,pins_exlcdh:()=>db,pins_exlcdv:()=>Ib,pins_imglist:()=>ub,pins_input_pin:()=>yy,pins_one_more:()=>gb,pins_output_pin:()=>by,pins_playlist:()=>rb,pins_playlist_extern:()=>lb,pins_pwm:()=>ib,pins_pwm_pin:()=>nb,pins_radio_datarate:()=>cb,pins_radio_power:()=>Rb,pins_serial:()=>ob,pins_tone_notes:()=>Ob,pins_touch:()=>_b,pins_touch_pin:()=>sb,pins_tts_bgmusic:()=>Eb,pins_tts_builtin_music:()=>mb,pins_tts_voice:()=>Mb,pwm_input:()=>Gy,pwm_output:()=>wy,spi_A_pin:()=>Ky,spi_B_pin:()=>Jy,spi_C_pin:()=>qy,spi_D_pin:()=>Qy});var ht={};t.r(ht),t.d(ht,{inout_analog_atten:()=>xb,inout_analog_read:()=>fb,inout_analog_read_init:()=>Xb,inout_analog_write:()=>Nb,inout_analog_write_init:()=>Yb,inout_analog_write_set:()=>Db,inout_digital_init:()=>vb,inout_digital_read:()=>Lb,inout_digital_write:()=>Ab,inout_highlow:()=>Sb,inout_pin_attachInterrupt:()=>Pb,inout_pin_pressed:()=>Fb,inout_pin_pressed_init:()=>yb});var Mt={};t.r(Mt),t.d(Mt,{analog_input:()=>Kb,analog_output:()=>qb,espnow_channel:()=>Hb,haskylens_model:()=>Wb,i2c_A_pin:()=>Qb,i2c_B_pin:()=>zb,pins_analog:()=>iV,pins_analog_pin:()=>eV,pins_axis:()=>MV,pins_brightness:()=>OV,pins_builtinimg:()=>lV,pins_builtinimg_extern:()=>dV,pins_button:()=>Vb,pins_buttonB:()=>Bb,pins_dac:()=>oV,pins_dac_pin:()=>_V,pins_digital:()=>bb,pins_digital_dot:()=>NV,pins_digital_pin:()=>Gb,pins_exlcdh:()=>mV,pins_exlcdv:()=>EV,pins_imglist:()=>IV,pins_input_pin:()=>Ub,pins_interrupt:()=>uV,pins_one_more:()=>LV,pins_output_pin:()=>wb,pins_playlist:()=>TV,pins_playlist_extern:()=>hV,pins_pwm:()=>sV,pins_pwm_input:()=>kb,pins_pwm_pin:()=>nV,pins_radio_datarate:()=>AV,pins_radio_power:()=>SV,pins_serial:()=>rV,pins_tone_notes:()=>CV,pins_touch:()=>aV,pins_touch_pin:()=>pV,pins_tts_bgmusic:()=>gV,pins_tts_builtin_music:()=>cV,pins_tts_voice:()=>RV,pwm_output:()=>Jb,spi_A_pin:()=>jb,spi_B_pin:()=>Zb,spi_C_pin:()=>$b,spi_D_pin:()=>tV});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 @@ -18,4 +18,4 @@ * 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)}},Zt={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)}},$t={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=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 ue={init:function(){this.setColour(ae),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},re={init:function(){this.setColour(ae);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]}))}},le={init:function(){this.setColour(ae);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]}))}},de={init:function(){this.setColour(ae),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]}))}},Ie={init:function(){this.setColour(ae),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]}))}},Te={init:function(){this.setColour(ae),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},he={init:function(){this.setColour(ae),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]}))}},Me={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(ae),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]}))}},me={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(ae),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]}))}},Oe={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(ae),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]}))}},Ee={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(ae),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]}))}},Re={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ae),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(ae),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)}},ge={init:function(){this.setColour(ae),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)}},Ce={init:function(){this.setColour(ae),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)}},Se={init:function(){this.setColour(ae),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)}},Ae={init:function(){this.setColour(ae),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)}},Le={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(ae),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]}))}},Ne={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ae),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]}))}},De=ge,fe={init:function(){this.setColour(ae),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)}},Fe=160,Pe={init:function(){this.setColour(Fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_TEXT_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}},ve={init:function(){this.setColour(Fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_LINES_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}};mt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 Ye={init:function(){this.setColour(Fe),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,'"')}},Xe={init:function(){this.setColour(Fe),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)}},xe={init:function(){this.setColour(Fe),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ye={init:function(){this.setColour(Fe),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},be={init:function(){this.setColour(Fe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ve={init:function(){this.setColour(Fe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Be={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(Fe),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)}},Ge={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Fe),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)}},Ue={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},we={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(Fe),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"))}},ke={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Fe),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)}},He={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},We={init:function(){this.setColour(Fe),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)}},Ke={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(Fe),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]}))}},Je={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Fe),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)}},qe={init:function(){this.setColour(Fe),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)}},ze={init:function(){this.setColour(Fe),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)}},Qe={init:function(){this.setColour(Fe),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)}},je={init:function(){this.setColour(Fe),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)}},Ze={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Fe),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]}))}},$e={init:function(){this.setColour(Fe),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")}},Ki={init:function(){this.setColour(Hi),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ji={init:function(){this.setColour(Hi),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}},qi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},zi={init:function(){this.setColour(Hi),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)}},Qi={init:function(){this.setColour(Hi),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)}},ji={init:function(){this.setColour(Hi),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)}},Zi={init:function(){this.setColour(Hi),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)}},$i={init:function(){this.setColour(Hi),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)}},tn={init:function(){this.setColour(Hi),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)}},en={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},nn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},_n={init:function(){this.setColour(Hi),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)}},on={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(Hi),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")}},pn={init:function(){this.setColour(Hi),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)}},an={init:function(){this.setColour(Hi),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)}},un={init:function(){this.setColour(Hi),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")}},rn={init:function(){this.setColour(Hi),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},ln={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},dn={init:function(){this.setColour(Hi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},In=210,Tn={init:function(){var t=mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(In),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]}},hn={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(In),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)}},Mn={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(In),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]}))}},mn={init:function(){this.setColour(In),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},On={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(In),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},En={init:function(){this.setColour(In),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Rn={init:function(){this.setColour(In),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)}},cn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(In),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)}},gn={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(In),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)}},Cn={init:function(){this.setColour(In),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Sn={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)}},An={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")}},Ln={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}))}},Nn={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}))}},Dn={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)}},fn={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)}},Fn={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}))}},Pn={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)}},vn={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)}},Yn={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)}},Xn={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)}},xn={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 yn={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)}},bn={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)}},Vn={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)}},Bn={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}))}},Gn={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)}},Un={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]}))}},wn={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)}},kn={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)}},Hn={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]}))}},Wn={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)}},Kn={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()}},Jn={};Jn.NAME_TYPE=mt.PROCEDURE_CATEGORY_NAME,Jn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},ws={init:function(){this.setColour(ys),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ks={init:function(){this.setColour(ys),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)}},Hs={init:function(){this.setColour(ys),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(ys),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(ys),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js=160,qs={init:function(){this.setColour(Js),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new mt.FieldTable(""),"TEXT")}},zs={init:function(){this.setColour(Js),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},Qs={init:function(){this.setColour(Js),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},js={init:function(){this.setColour(Js),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Zs={init:function(){this.setColour(Js),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},$s={init:function(){this.setColour(Js),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},t_={init:function(){this.setColour(Js),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 Gp=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]},Up=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},wp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},kp=function(t,e){return["None",e.ORDER_ATOMIC]},Hp=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]},Wp=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]},Kp=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]},Jp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},qp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},zp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Qp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},jp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Zp=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},$p=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ta=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]},ia=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},na=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"},_a=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},oa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},pa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ua=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"},la=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},da=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ia=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"},Ta=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]},ha=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"},Ma=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"},ma=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]},ja=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Za=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},$a=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},tu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},eu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},iu=function(t,e){return'"},nu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},su=function(){return this.getFieldValue("TEXT")+"\n"},_u=function(t){return t.getFieldValue("TEXT")+"\n"},ou=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},pu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},au=function(){return""},uu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},ru=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},du.scrubNakedValue=function(t){return t+"\n"},du.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},du.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},du.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,du.COMMENT_WRAP-3),n+=du.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Iu="#74A55B",Tu={init:function(){this.setColour(Iu),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)}},hu={init:function(){this.setColour(Iu),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)}},Mu={init:function(){this.setColour(Iu),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)}},mu={init:function(){this.setColour(Iu),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)}},Ou={init:function(){this.setColour(Iu),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)}},Eu={init:function(){this.setColour(Iu),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)}},Ru={init:function(){this.setColour(Iu),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)}},cu={init:function(){this.setColour(Iu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gu={init:function(){this.setColour(Iu),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)}},Cu={init:function(){this.setColour(Iu),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)}},Su={init:function(){this.setColour(Iu),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)}},Au={init:function(){this.setColour(Iu),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)}},Lu={init:function(){this.setColour(Iu),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)}},Nu={init:function(){this.setColour(Iu),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)}},Du={init:function(){this.setColour(Iu),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)}},fu={init:function(){this.setColour(Iu),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)}},Fu={init:function(){this.setColour(Iu),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)}},Pu={init:function(){this.setColour(Iu),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)}},vu={init:function(){this.setColour(Iu),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)}},Yu={init:function(){this.setColour(Iu),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通信")}},Xu={init:function(){this.setColour(Iu),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)")}},xu={init:function(){this.setColour(Iu),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)")}},yu={init:function(){this.setColour(Iu),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)}},bu={init:function(){this.setColour(Iu),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)}},Vu={init:function(){this.setColour(Iu),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)}},Bu={init:function(){this.setColour(Iu),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)}},Gu={init:function(){this.setColour(Iu),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+"SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Uu={init:function(){this.setColour(Iu),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)}},wu={init:function(){this.setColour(Iu),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)}},ku={init:function(){this.setColour(Iu),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)}},Hu={init:function(){this.setColour(Iu),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)}},Wu={init:function(){this.setColour(Iu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Ku={init:function(){this.setColour(Iu),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)}},Ju={init:function(){this.setColour(Iu),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)}},qu={init:function(){this.setColour(Iu),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)}},zu={init:function(){this.setColour(Iu),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)}},Qu={init:function(){this.setColour(Iu),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)}},ju={init:function(){this.setColour(Iu),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)}},Zu={init:function(){this.setColour(Iu),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)}},$u={init:function(){this.setColour(Iu),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)}},tr={init:function(){this.setColour(Iu),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)}},er={init:function(){this.setColour(Iu),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)}},ir={init:function(){this.setColour(Iu),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)}},nr={init:function(){this.setColour(Iu),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)}},sr={init:function(){this.setColour(Iu),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)}},_r={init:function(){this.setColour(Iu),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)}},or="#6C9858",pr={init:function(){this.setColour(or),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},ar={init:function(){this.setColour(or),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)}},ur={init:function(){this.setColour(or),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)}},rr={init:function(){this.setColour(or),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)}},lr={init:function(){this.setColour(or),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)}},dr={init:function(){this.setColour(or),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%)")}},Ir={init:function(){this.setColour(or),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()}},Tr={init:function(){this.setColour(or),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)}},hr={init:function(){this.setColour(or),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)}},Mr={init:function(){this.setColour(or),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)}},mr={init:function(){this.setColour(or),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)")}},Or={init:function(){this.setColour(or),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Er={init:function(){this.setColour(or),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(Ot.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)}}},Rr={init:function(){this.setColour(or),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)}},cr={init:function(){this.setColour(or),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("")}},gr={init:function(){this.setColour(or),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("")}},Cr={init:function(){this.setColour(or),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)}},Sr={init:function(){this.setColour(or),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(Ot.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)}}},Ar={init:function(){this.setColour(or),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)}},Lr={init:function(){this.setColour(or),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("")}},Nr={init:function(){this.setColour(or),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)}},Dr={init:function(){this.setColour(or),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)}},fr={init:function(){this.setColour(or),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)}},Fr={init:function(){this.setColour(or),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)}},Pr={init:function(){this.setColour(or),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)}},vr={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yr={init:function(){this.setColour(or),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)}},Xr={init:function(){this.setColour(or),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)}},xr={init:function(){this.setColour(or),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)}},yr={init:function(){this.setColour(or),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("")}},br={init:function(){this.setColour(or),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)}},Vr={init:function(){this.setColour(or),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)}},Br={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Gr={init:function(){this.setColour(or),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)}},Ur={init:function(){this.setColour(or),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)}},wr={init:function(){this.setColour(or),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)}},kr={init:function(){this.setColour(or),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)}},Hr={init:function(){this.setColour(or),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)}},Wr={init:function(){this.setColour(or),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)}},Kr={init:function(){this.setColour(or),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)}},Jr={init:function(){this.setColour(or),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)}},qr={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},zr={init:function(){this.setColour(or),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)}},Qr={init:function(){this.setColour(or),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)}},jr={init:function(){this.setColour(or),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)}},Zr={init:function(){this.setColour(or),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)}},$r={init:function(){this.setColour(or),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},tl={init:function(){this.setColour(or),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)}},el={init:function(){this.setColour(or),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},il={init:function(){this.setColour(or),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"]]),"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()}},nl={init:function(){this.setColour(or),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)}},sl={init:function(){this.setColour(or),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)}},_l={init:function(){this.setColour(or),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)}},ol={init:function(){this.setColour(or),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_KEY1,"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)}},pl={init:function(){this.setColour(or),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)}},al={init:function(){this.setColour(or),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;ne?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")}},Bm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Gm={init:function(){this.setColour(vm),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}},Um={init:function(){this.setColour(vm),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}},wm={init:function(){this.setColour(vm),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)}},km={init:function(){this.setColour(vm),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)}},Hm={init:function(){this.setColour(vm),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)}},Wm={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Km={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jm={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},zm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Qm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},jm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Zm={init:function(){this.setColour(vm),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)}},$m={init:function(){this.setColour(vm),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)}},tO={init:function(){this.setColour(vm),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)}},eO={init:function(){this.setColour(vm),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)}},iO={init:function(){this.VISITOR_ID=Ot.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(vm),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")}},nO={init:function(){this.setColour(vm),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},sO={init:function(){this.setColour(vm),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)}},_O={init:function(){this.setColour(vm),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)}},oO={init:function(){this.setColour(vm),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)}},pO={init:function(){this.setColour(vm),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)}},aO=Ym,uO=Xm,rO=xm,lO=ym,dO=Vm,IO=225,TO={init:function(){this.setColour(IO),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(IO),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}))}},MO={init:function(){this.setColour(IO),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)}},mO={init:function(){this.setColour(IO),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}))}},OO={init:function(){this.setColour(IO),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)}},EO={init:function(){this.setColour(IO),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)}},RO={init:function(){this.setColour(IO),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]}))}},cO={init:function(){this.setColour(IO),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)}},gO={init:function(){this.setColour(IO),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)}},CO={init:function(){this.setColour(IO),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)}},SO={init:function(){this.setColour(IO),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)}},AO={init:function(){this.setColour(IO),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]}))}},LO={init:function(){this.setColour(IO),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)}},NO={init:function(){this.setColour(IO),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)}},DO={init:function(){this.setColour(IO),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)}},fO={init:function(){this.setColour(IO),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)}},FO={init:function(){this.setColour(IO),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)}},PO={init:function(){this.setColour(IO),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)}},vO={init:function(){this.setColour(IO),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)}},YO={init:function(){this.setColour(IO),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)}},XO={init:function(){this.setColour(IO),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)}},xO={init:function(){this.setColour(IO),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")}},yO={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(IO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},bO={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(IO),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},VO={init:function(){this.setColour(IO),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)}},BO={init:function(){this.setColour(IO),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)}},GO="#3288dd",UO={init:function(){this.setColour(GO),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("")}},wO={init:function(){this.setColour(GO),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("")}},kO={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(GO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},HO=100,WO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},KO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},JO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},qO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},zO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},QO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},jO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},ZO={init:function(){var t=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(HO),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)}},$O="#A58C5B",tE={init:function(){this.setColour($O),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)}},eE={init:function(){this.setColour($O),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)}},iE={init:function(){this.setColour($O),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)}},nE={init:function(){this.setColour($O),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)}},sE={init:function(){this.setColour($O),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]+_}))}},_E={init:function(){this.setColour($O),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}))}},oE={init:function(){this.setColour($O),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)}},pE={init:function(){var t=[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour($O),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},aE={init:function(){this.setColour($O),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)}},uE={init:function(){this.setColour($O),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)}},rE={init:function(){this.setColour($O),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}))}},lE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("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]}))}},dE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("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]}))}},IE={init:function(){this.setColour($O),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)}},TE={init:function(){this.setColour($O),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)}},hE={init:function(){this.setColour($O),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},ME={init:function(){this.setColour($O),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)}},mE={init:function(){this.setColour($O),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)}},OE={init:function(){this.setColour($O),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},EE={init:function(){this.setColour($O),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)}},RE={init:function(){this.setColour($O),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)}},cE={init:function(){this.setColour($O),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)}},gE={init:function(){this.setColour($O),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]}))}},CE={init:function(){this.setColour($O),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]}))}},SE={init:function(){this.setColour($O),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)}},AE={init:function(){this.setColour($O),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)}},LE={init:function(){this.setColour($O),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]+_}))}},NE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("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}))}},DE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("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}))}},fE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("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}))}},FE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("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)}},PE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},vE={init:function(){this.setColour($O),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]}))}},YE={init:function(){this.setColour($O),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)}},XE={init:function(){this.setColour($O),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")}},xE={init:function(){this.setColour($O),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)}},yE={init:function(){this.setColour($O),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)}},bE={init:function(){this.setColour($O),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)}},VE={init:function(){this.setColour($O),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)}},BE={init:function(){this.setColour($O),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)}},GE={init:function(){this.setColour($O),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)}},UE={init:function(){this.setColour($O),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)")}},wE={init:function(){this.setColour($O),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},kE={init:function(){this.setColour($O),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)}},HE={init:function(){this.setColour($O),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_zero"].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},jN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},ZN=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"},$N=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tD=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"},eD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},iD=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"},nD=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},sD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},_D=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]},oD=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"},pD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},aD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},uD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},rD=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]},lD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dD=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"},ID=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"},TD=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"},hD=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"}},MD=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"},mD=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},OD=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]},ED=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"},RD=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},cD=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"}},gD=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"}},CD=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"},SD=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"},AD=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},LD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},ND=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},DD=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"},fD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},FD=function(t,e){e.definitions_.import_st7789="import st7789";var i=Ot.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_zero"].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"},PD=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},vD=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]},YD=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},XD=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},xD=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},yD=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},bD=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},VD=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"},BD=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"},GD=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"},UD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},wD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},kD=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),_=Ot.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},HD=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"},WD=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"},KD=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"},JD=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"},qD=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"},zD=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"},QD=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"},jD=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"},ZD=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"},$D=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"},tf=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]},ef=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"},nf=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"},sf=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"},_f=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"},of=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pf=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},af=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},uf=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},rf=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},lf=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},df=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},If=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Tf=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Kf=function(t,e){var i=Ot.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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},Jf=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},qf=function(t,e){var i=Ot.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},zf=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Qf=function(t,e){var i=Ot.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},jf=function(t,e){var i=Ot.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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},Zf=function(t,e){var i=Ot.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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},$f=function(t,e){var i=Ot.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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},tF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},eF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},iF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},nF=function(t,e){var i=Ot.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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},sF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},_F=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},oF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},pF=function(t,e){var i=Ot.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},aF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},uF=function(t,e){var i=Ot.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"},rF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},lF=function(t,e){var i=Ot.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 _},dF=function(t,e){var i=Ot.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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},IF=function(t,e){var i=Ot.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},TF=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},hF=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},MF=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},mx=function(){return"control.reset()\n"},Ox=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Ot.Profile.default.serial)+")\n"},Ex=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Ot.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Ot.Profile.default.serial)+")\n"},Rx=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Ot.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Ot.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},cx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},gx=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},Cx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Sx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Ax=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},Lx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},Nx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Dx=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]}},fx=function(){return"while True:\n pass\n"},Fx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},Px=function(t,e){return e.definitions_.import_os="import os","os.uname()"},vx=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"}},Yx=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"}},Xx=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"},xx=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"},yx=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]},bx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},Vx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},Bx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Gx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Ux=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},wx=bx,kx=xx,Hx=yx,Wx=vx,Kx=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]},Jx=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]},qx=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]},zx=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"},Qx=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]},jx=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]},Zx=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]},$x=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]},ty=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]},ey=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]},iy=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"},ny=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]},sy=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]},_y=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]},oy=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]},py={};py["MixGo CE"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Ot.Profile.generate(["0-18","21-46"]),input_pin:Ot.Profile.generate(["0-18","21-46"]),output_pin:Ot.Profile.generate(["0-18","21-45"]),pwm_input:Ot.Profile.generate(["0-18","21-46"],"pwm","pwm"),analog_input:Ot.Profile.generate(["0-18","21-46"],"adc","adc"),pwm_output:Ot.Profile.generate(["0-18","21-45"],"pwm","pwm"),analog_output:Ot.Profile.generate(["0-18","21-45"],"adc","adc"),espnow_channel:Ot.Profile.generate(["1-13"]),haskylens_model:Ot.Profile.generate(["0-4"]),digital:Ot.Profile.generate(["0-18","21-45"],"pin","pin"),pwm_pin:Ot.Profile.generate(["0-18","21-45"]),pwm:Ot.Profile.generate(["0-18","21-45"],"pwm","pwm"),analog_pin:Ot.Profile.generate(["1-18"]),analog:Ot.Profile.generate(["1-18"],"adc","adc"),dac_pin:Ot.Profile.generate(["17-18"]),dac:Ot.Profile.generate(["17-18"],"dac","dac"),touch:Ot.Profile.generate(["1-14"],"tc","tc"),touch_pin:Ot.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Ot.Profile.generate(["0-4"]),exlcdh:Ot.Profile.generate(["0-15"]),exlcdv:Ot.Profile.generate(["0-7"]),brightness:Ot.Profile.generate(["0-9"]),tts_voice:Ot.Profile.generate(["0-16"]),tts_builtin_music:Ot.Profile.generate(["0-47"]),tts_bgmusic:Ot.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"]]},py["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Ot.Profile.generate(["0-42","45"]),input_pin:Ot.Profile.generate(["0-42","45-46"]),output_pin:Ot.Profile.generate(["0-42","45"]),pwm_input:Ot.Profile.generate(["0-42","45-46"],"pwm","pwm"),analog_input:Ot.Profile.generate(["0-18","21-46"],"adc","adc"),pwm_output:Ot.Profile.generate(["0-42","45"],"pwm","pwm"),analog_output:Ot.Profile.generate(["0-42","45"],"adc","adc"),espnow_channel:Ot.Profile.generate(["1-13"]),haskylens_model:Ot.Profile.generate(["0-4"]),digital:Ot.Profile.generate(["0-42","45"],"pin","pin"),pwm_pin:Ot.Profile.generate(["0-42","45"]),pwm:Ot.Profile.generate(["0-42","45"],"pwm","pwm"),analog_pin:Ot.Profile.generate(["1-20"]),analog:Ot.Profile.generate(["1-20"],"adc","adc"),dac_pin:Ot.Profile.generate(["17-18"]),dac:Ot.Profile.generate(["17-18"],"dac","dac"),touch:Ot.Profile.generate(["1-14"],"tc","tc"),touch_pin:Ot.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Ot.Profile.generate(["0-4"]),exlcdh:Ot.Profile.generate(["0-15"]),exlcdv:Ot.Profile.generate(["0-7"]),brightness:Ot.Profile.generate(["0-9"]),tts_voice:Ot.Profile.generate(["0-16"]),tts_builtin_music:Ot.Profile.generate(["0-47"]),tts_bgmusic:Ot.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 ay=py,uy=20,ry={init:function(){this.setColour(uy),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)}},ly={init:function(){this.setColour(uy),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)}},dy={init:function(){this.setColour(uy),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)}},Iy={init:function(){this.setColour(uy),this.appendValueInput("PIN",Number).appendField("PWM"+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_PWM_ANALOG_WRITE_TOOLTIP)}},Ty={init:function(){this.setColour(uy),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)}},hy={init:function(){this.setColour(uy),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)}},My={init:function(){this.setColour(uy),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)}},my={init:function(){this.setColour(uy),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},Oy={init:function(){this.setColour(uy),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)}},Ey={init:function(){this.setColour(uy),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)}},Ry={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)}},cy={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")}},gy={init:function(){this.setColour(uy),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("pwm#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("PWM"+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_PWM_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["pwm#"==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")}},Cy={init:function(){this.setColour(uy),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")}},Sy={init:function(){this.setColour(uy),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("adc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_Analog_PINMODEIN),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_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==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")}},Ay={init:function(){this.setColour(uy),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")}},Ly=cy,Ny=My,Dy=Ay,fy=Ey,Fy=Ry,Py=230,vy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.digital),"PIN"),this.setOutput(!0)}},Yy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},Xy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},xy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},yy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},by={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},Vy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},By={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},Gy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},Uy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},wy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},ky={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},Hy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},Wy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},Ky={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Jy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},qy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.analog),"PIN"),this.setOutput(!0)}},zy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},Qy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.dac),"PIN"),this.setOutput(!0)}},jy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Zy={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},$y={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},tb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.pwm),"PIN"),this.setOutput(!0)}},eb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.touch),"PIN"),this.setOutput(!0)}},sb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},_b={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},ob={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},pb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.imglist),"PIN"),this.setOutput(!0)}},ab={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.playlist),"PIN"),this.setOutput(!0)}},ub={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},rb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},lb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},db={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},Ib={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Tb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},hb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},Mb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},mb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},Ob={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},Eb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Rb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.one_more),"PIN"),this.setOutput(!0)}},cb={init:function(){this.setColour(Py),this.appendDummyInput("").appendField(new mt.FieldDropdown(Ot.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},gb=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},Cb=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"},Sb=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Ab=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".duty("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Lb=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"},Nb=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"},Db=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".freq("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},fb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Fb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Pb=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"},vb=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"},Yb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pwm#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("pwm#"==i?"pwm"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.PWM(machine.Pin("+n+"))\n"},Xb=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"},xb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},yb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},bb=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"},Vb=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Bb=Vb,Gb=Vb,Ub=Vb,wb=Vb,kb=Vb,Hb=Vb,Wb=Vb,Kb=Vb,Jb=Vb,qb=Vb,zb=Vb,Qb=Vb,jb=Vb,Zb=Vb,$b=Vb,tV=Vb,eV=Vb,iV=Vb,nV=Vb,sV=Vb,_V=Vb,oV=Vb,pV=Vb,aV=Vb,uV=Vb,rV=Vb,lV=Vb,dV=Vb,IV=Vb,TV=Vb,hV=Vb,MV=Vb,mV=Vb,OV=Vb,EV=Vb,RV=Vb,cV=Vb,gV=Vb,CV=Vb,SV=Vb,AV=Vb,LV=Vb,NV=Vb,DV=Vb;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,qn),mt.Python=du,mt.generator=du,Ot.Profile.default={},Object.assign(Ot.Profile,ay),Object.assign(Ot.Profile.default,ay["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,y,x,b,P,v,Y,It,Tt),Object.assign(mt.Python.forBlock,T,h,M,m,O,E,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,$,ht,Mt)})(); \ No newline at end of file +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)}},Zt={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)}},$t={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=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 re={init:function(){this.setColour(ue),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},le={init:function(){this.setColour(ue);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]}))}},de={init:function(){this.setColour(ue);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]}))}},Ie={init:function(){this.setColour(ue),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]}))}},Te={init:function(){this.setColour(ue),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(ue),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(ue),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]}))}},me={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(ue),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]}))}},Ee={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(ue),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]}))}},Oe={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(ue),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]}))}},Re={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(ue),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]}))}},ce={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ue),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]}))}},ge={init:function(){this.setColour(ue),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)}},Ce={init:function(){this.setColour(ue),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)}},Se={init:function(){this.setColour(ue),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)}},Ae={init:function(){this.setColour(ue),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)}},Le={init:function(){this.setColour(ue),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)}},Ne={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(ue),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]}))}},De={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ue),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=Ce,Fe={init:function(){this.setColour(ue),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)}},Pe=160,ve={init:function(){this.setColour(Pe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_TEXT_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}},Ye={init:function(){this.setColour(Pe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(mt.Msg.TEXT_LINES_TOOLTIP)},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 mt.FieldImage(e,12,12,'"')}};mt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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(Pe),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,'"')}},xe={init:function(){this.setColour(Pe),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)}},ye={init:function(){this.setColour(Pe),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},be={init:function(){this.setColour(Pe),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ve={init:function(){this.setColour(Pe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Be={init:function(){this.setColour(Pe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ge={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(Pe),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)}},Ue={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Pe),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)}},we={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Pe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ke={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(Pe),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"))}},He={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pe),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)}},We={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Pe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ke={init:function(){this.setColour(Pe),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(Pe),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]}))}},qe={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Pe),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)}},Qe={init:function(){this.setColour(Pe),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)}},ze={init:function(){this.setColour(Pe),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)}},je={init:function(){this.setColour(Pe),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)}},Ze={init:function(){this.setColour(Pe),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)}},$e={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Pe),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]}))}},ti={init:function(){this.setColour(Pe),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")}},Qi={init:function(){this.setColour(Ji),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},zi={init:function(){this.setColour(Ji),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}},ji={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Zi={init:function(){this.setColour(Ji),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)}},$i={init:function(){this.setColour(Ji),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)}},tn={init:function(){this.setColour(Ji),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)}},en={init:function(){this.setColour(Ji),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)}},nn={init:function(){this.setColour(Ji),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)}},sn={init:function(){this.setColour(Ji),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)}},_n={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},pn={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},an={init:function(){this.setColour(Ji),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)}},un={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(Ji),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")}},rn={init:function(){this.setColour(Ji),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)}},ln={init:function(){this.setColour(Ji),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)}},dn={init:function(){this.setColour(Ji),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")}},In={init:function(){this.setColour(Ji),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Tn={init:function(){this.setColour(Ji),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},hn={init:function(){this.setColour(Ji),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn=210,mn={init:function(){var t=mt.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 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]}},En={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(Mn),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)}},On={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(Mn),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]}))}},Rn={init:function(){this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},cn={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},gn={init:function(){this.setColour(Mn),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Cn={init:function(){this.setColour(Mn),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)}},Sn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Mn),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)}},An={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Mn),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)}},Ln={init:function(){this.setColour(Mn),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Nn={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)}},Dn={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")}},fn={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}))}},Fn={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}))}},Pn={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)}},vn={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)}},Yn={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}))}},Xn={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)}},xn={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)}},yn={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)}},bn={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)}},Vn={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 Bn={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)}},Gn={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)}},Un={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)}},wn={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}))}},kn={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)}},Hn={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]}))}},Wn={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)}},Kn={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)}},Jn={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]}))}},qn={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)}},Qn={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()}},zn={};zn.NAME_TYPE=mt.PROCEDURE_CATEGORY_NAME,zn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},Ws={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ks={init:function(){this.setColour(Bs),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)}},Js={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.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 mt.FieldTable(""),"TEXT")}},Zs={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},$s={init:function(){this.setColour(zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},t_={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},e_={init:function(){this.setColour(zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},i_={init:function(){this.setColour(zs),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},n_={init:function(){this.setColour(zs),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 Wp=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]},Kp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Jp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},qp=function(t,e){return["None",e.ORDER_ATOMIC]},Qp=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]},zp=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]},jp=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]},Zp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},$p=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},ta=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ea=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ia=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},na=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},sa=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},_a=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]},pa=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]},ua=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ra=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"},da=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ia=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Ta=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"},ha=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ma=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ma=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ea=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"},Oa=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]},Ra=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"},ca=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"),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]},iu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},nu=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},su=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},_u=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},ou=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},pu=function(t,e){return'"},au=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},uu=function(){return this.getFieldValue("TEXT")+"\n"},ru=function(t){return t.getFieldValue("TEXT")+"\n"},lu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},du=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Iu=function(){return""},Tu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},hu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},mu.scrubNakedValue=function(t){return t+"\n"},mu.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},mu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},mu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,mu.COMMENT_WRAP-3),n+=mu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Eu="#74A55B",Ou={init:function(){this.setColour(Eu),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)}},Ru={init:function(){this.setColour(Eu),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)}},cu={init:function(){this.setColour(Eu),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)}},gu={init:function(){this.setColour(Eu),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)}},Cu={init:function(){this.setColour(Eu),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)}},Su={init:function(){this.setColour(Eu),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)}},Au={init:function(){this.setColour(Eu),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)}},Lu={init:function(){this.setColour(Eu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nu={init:function(){this.setColour(Eu),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)}},Du={init:function(){this.setColour(Eu),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)}},fu={init:function(){this.setColour(Eu),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)}},Fu={init:function(){this.setColour(Eu),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)}},Pu={init:function(){this.setColour(Eu),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)}},vu={init:function(){this.setColour(Eu),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)}},Yu={init:function(){this.setColour(Eu),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)}},Xu={init:function(){this.setColour(Eu),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)}},xu={init:function(){this.setColour(Eu),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)}},yu={init:function(){this.setColour(Eu),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)}},bu={init:function(){this.setColour(Eu),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)}},Vu={init:function(){this.setColour(Eu),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通信")}},Bu={init:function(){this.setColour(Eu),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)")}},Gu={init:function(){this.setColour(Eu),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)")}},Uu={init:function(){this.setColour(Eu),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)}},wu={init:function(){this.setColour(Eu),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)}},ku={init:function(){this.setColour(Eu),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)}},Hu={init:function(){this.setColour(Eu),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)}},Wu={init:function(){this.setColour(Eu),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+"SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Ku={init:function(){this.setColour(Eu),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)}},Ju={init:function(){this.setColour(Eu),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)}},qu={init:function(){this.setColour(Eu),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)}},Qu={init:function(){this.setColour(Eu),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)}},zu={init:function(){this.setColour(Eu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},ju={init:function(){this.setColour(Eu),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)}},Zu={init:function(){this.setColour(Eu),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)}},$u={init:function(){this.setColour(Eu),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)}},tr={init:function(){this.setColour(Eu),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)}},er={init:function(){this.setColour(Eu),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)}},ir={init:function(){this.setColour(Eu),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(Eu),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)}},sr={init:function(){this.setColour(Eu),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)}},_r={init:function(){this.setColour(Eu),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)}},or={init:function(){this.setColour(Eu),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(Eu),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)}},ar={init:function(){this.setColour(Eu),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)}},ur={init:function(){this.setColour(Eu),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)}},rr={init:function(){this.setColour(Eu),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)}},lr="#6C9858",dr={init:function(){this.setColour(lr),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Ir={init:function(){this.setColour(lr),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)}},Tr={init:function(){this.setColour(lr),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)}},hr={init:function(){this.setColour(lr),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)}},Mr={init:function(){this.setColour(lr),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)}},mr={init:function(){this.setColour(lr),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%)")}},Er={init:function(){this.setColour(lr),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()}},Or={init:function(){this.setColour(lr),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)}},Rr={init:function(){this.setColour(lr),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)}},cr={init:function(){this.setColour(lr),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)}},gr={init:function(){this.setColour(lr),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)")}},Cr={init:function(){this.setColour(lr),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Sr={init:function(){this.setColour(lr),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)}}},Ar={init:function(){this.setColour(lr),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)}},Lr={init:function(){this.setColour(lr),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("")}},Nr={init:function(){this.setColour(lr),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("")}},Dr={init:function(){this.setColour(lr),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)}},fr={init:function(){this.setColour(lr),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)}}},Fr={init:function(){this.setColour(lr),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)}},Pr={init:function(){this.setColour(lr),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("")}},vr={init:function(){this.setColour(lr),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)}},Yr={init:function(){this.setColour(lr),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)}},Xr={init:function(){this.setColour(lr),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)}},xr={init:function(){this.setColour(lr),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)}},yr={init:function(){this.setColour(lr),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)}},br={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vr={init:function(){this.setColour(lr),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)}},Br={init:function(){this.setColour(lr),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)}},Gr={init:function(){this.setColour(lr),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)}},Ur={init:function(){this.setColour(lr),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("")}},wr={init:function(){this.setColour(lr),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)}},kr={init:function(){this.setColour(lr),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)}},Hr={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Wr={init:function(){this.setColour(lr),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)}},Kr={init:function(){this.setColour(lr),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)}},Jr={init:function(){this.setColour(lr),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)}},qr={init:function(){this.setColour(lr),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)}},Qr={init:function(){this.setColour(lr),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)}},zr={init:function(){this.setColour(lr),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)}},jr={init:function(){this.setColour(lr),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)}},Zr={init:function(){this.setColour(lr),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)}},$r={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},tl={init:function(){this.setColour(lr),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)}},el={init:function(){this.setColour(lr),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)}},il={init:function(){this.setColour(lr),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)}},nl={init:function(){this.setColour(lr),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)}},sl={init:function(){this.setColour(lr),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_l={init:function(){this.setColour(lr),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)}},ol={init:function(){this.setColour(lr),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl={init:function(){this.setColour(lr),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"]]),"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()}},al={init:function(){this.setColour(lr),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)}},ul={init:function(){this.setColour(lr),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)}},rl={init:function(){this.setColour(lr),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)}},ll={init:function(){this.setColour(lr),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_KEY1,"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)}},dl={init:function(){this.setColour(lr),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)}},Il={init:function(){this.setColour(lr),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;ne?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")}},Hm={init:function(){this.setColour(bm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Wm={init:function(){this.setColour(bm),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}},Km={init:function(){this.setColour(bm),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}},Jm={init:function(){this.setColour(bm),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)}},qm={init:function(){this.setColour(bm),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)}},Qm={init:function(){this.setColour(bm),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)}},zm={init:function(){this.setColour(bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jm={init:function(){this.setColour(bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zm={init:function(){this.setColour(bm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$m={init:function(){this.setColour(bm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},tE={init:function(){this.setColour(bm),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},eE={init:function(){this.setColour(bm),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},iE={init:function(){this.setColour(bm),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},nE={init:function(){this.setColour(bm),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)}},sE={init:function(){this.setColour(bm),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)}},_E={init:function(){this.setColour(bm),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)}},oE={init:function(){this.setColour(bm),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)}},pE={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(bm),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")}},aE={init:function(){this.setColour(bm),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},uE={init:function(){this.setColour(bm),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)}},rE={init:function(){this.setColour(bm),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)}},lE={init:function(){this.setColour(bm),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)}},dE={init:function(){this.setColour(bm),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)}},IE=Vm,TE=Bm,hE=Gm,ME=Um,mE=km,EE=225,OE={init:function(){this.setColour(EE),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)}},RE={init:function(){this.setColour(EE),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}))}},cE={init:function(){this.setColour(EE),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)}},gE={init:function(){this.setColour(EE),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}))}},CE={init:function(){this.setColour(EE),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)}},SE={init:function(){this.setColour(EE),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)}},AE={init:function(){this.setColour(EE),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]}))}},LE={init:function(){this.setColour(EE),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)}},NE={init:function(){this.setColour(EE),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)}},DE={init:function(){this.setColour(EE),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)}},fE={init:function(){this.setColour(EE),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)}},FE={init:function(){this.setColour(EE),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]}))}},PE={init:function(){this.setColour(EE),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)}},vE={init:function(){this.setColour(EE),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)}},YE={init:function(){this.setColour(EE),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)}},XE={init:function(){this.setColour(EE),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)}},xE={init:function(){this.setColour(EE),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)}},yE={init:function(){this.setColour(EE),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)}},bE={init:function(){this.setColour(EE),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)}},VE={init:function(){this.setColour(EE),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)}},BE={init:function(){this.setColour(EE),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)}},GE={init:function(){this.setColour(EE),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")}},UE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(EE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},wE={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(EE),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},kE={init:function(){this.setColour(EE),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)}},HE={init:function(){this.setColour(EE),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)}},WE="#3288dd",KE={init:function(){this.setColour(WE),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("")}},JE={init:function(){this.setColour(WE),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("")}},qE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(WE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},QE=100,zE={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(QE),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)}},jE={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(QE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},ZE={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(QE),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)}},$E={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(QE),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)}},tO={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(QE),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)}},eO={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(QE),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)}},iO={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(QE),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)}},nO={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(QE),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)}},sO="#A58C5B",_O={init:function(){this.setColour(sO),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)}},oO={init:function(){this.setColour(sO),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)}},pO={init:function(){this.setColour(sO),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)}},aO={init:function(){this.setColour(sO),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)}},uO={init:function(){this.setColour(sO),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]+_}))}},rO={init:function(){this.setColour(sO),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}))}},lO={init:function(){this.setColour(sO),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)}},dO={init:function(){var t=[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(sO),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},IO={init:function(){this.setColour(sO),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)}},TO={init:function(){this.setColour(sO),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)}},hO={init:function(){this.setColour(sO),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}))}},MO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("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]}))}},mO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("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]}))}},EO={init:function(){this.setColour(sO),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)}},OO={init:function(){this.setColour(sO),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)}},RO={init:function(){this.setColour(sO),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},cO={init:function(){this.setColour(sO),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)}},gO={init:function(){this.setColour(sO),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)}},CO={init:function(){this.setColour(sO),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},SO={init:function(){this.setColour(sO),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)}},AO={init:function(){this.setColour(sO),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)}},LO={init:function(){this.setColour(sO),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)}},NO={init:function(){this.setColour(sO),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]}))}},DO={init:function(){this.setColour(sO),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]}))}},fO={init:function(){this.setColour(sO),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)}},FO={init:function(){this.setColour(sO),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)}},PO={init:function(){this.setColour(sO),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]+_}))}},vO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("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}))}},YO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("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}))}},XO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("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}))}},xO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("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)}},yO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},bO={init:function(){this.setColour(sO),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]}))}},VO={init:function(){this.setColour(sO),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)}},BO={init:function(){this.setColour(sO),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")}},GO={init:function(){this.setColour(sO),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)}},UO={init:function(){this.setColour(sO),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)}},wO={init:function(){this.setColour(sO),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)}},kO={init:function(){this.setColour(sO),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)}},HO={init:function(){this.setColour(sO),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)}},WO={init:function(){this.setColour(sO),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)}},KO={init:function(){this.setColour(sO),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)")}},JO={init:function(){this.setColour(sO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},qO={init:function(){this.setColour(sO),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)}},QO={init:function(){this.setColour(sO),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_zero"].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},iD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nD=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"},sD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_D=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"},oD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pD=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"},aD=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},uD=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},rD=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]},lD=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"},dD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},ID=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},TD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},hD=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]},MD=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},mD=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"},ED=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"},OD=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"},RD=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"}},cD=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"},gD=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},CD=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]},SD=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"},AD=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},LD=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"}},ND=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"}},DD=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"},fD=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"},FD=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},PD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},vD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},YD=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"},XD=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},xD=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_zero"].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"},yD=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},bD=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]},VD=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},BD=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},GD=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},UD=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},wD=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},kD=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"},HD=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"},WD=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"},KD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},JD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},qD=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),_=Et.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},QD=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"},zD=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"},jD=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"},ZD=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"},$D=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"},tf=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"},ef=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"},nf=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"},sf=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"},of=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]},pf=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"},af=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"},uf=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"},rf=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"},lf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},df=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},If=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},Tf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},hf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},Mf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},mf=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]},Ef=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]},Of=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},jf=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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},Zf=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},$f=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},tF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},eF=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},iF=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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},nF=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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},sF=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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},_F=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},oF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},pF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},aF=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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},uF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},rF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},lF=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},dF=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},IF=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"},TF=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"},hF=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"},MF=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 _},mF=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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},EF=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},OF=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},RF=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},cF=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},gx=function(){return"control.reset()\n"},Cx=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},Sx=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"},Ax=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"},Lx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},Nx=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},Dx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},fx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Fx=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},Px=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},vx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Yx=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]}},Xx=function(){return"while True:\n pass\n"},xx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},yx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},bx=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"}},Vx=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"}},Bx=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"},Gx=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"},Ux=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]},wx=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},kx=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},Hx=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},Wx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},Kx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},Jx=wx,qx=Gx,Qx=Ux,zx=bx,jx=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]},Zx=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]},$x=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]},ty=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"},ey=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]},iy=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]},ny=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]},sy=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]},_y=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]},oy=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]},py=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"},ay=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]},uy=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]},ry=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]},ly=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]},dy={};dy["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"]]},dy["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 Iy=dy,Ty=20,hy={init:function(){this.setColour(Ty),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)}},My={init:function(){this.setColour(Ty),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)}},my={init:function(){this.setColour(Ty),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)}},Ey={init:function(){this.setColour(Ty),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)}},Oy={init:function(){this.setColour(Ty),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)}},Ry={init:function(){this.setColour(Ty),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},cy={init:function(){this.setColour(Ty),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)}},gy={init:function(){this.setColour(Ty),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)}},Cy={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)}},Sy={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")}},Ay={init:function(){this.setColour(Ty),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")}},Ly={init:function(){this.setColour(Ty),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("adc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_Analog_PINMODEIN),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_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==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")}},Ny={init:function(){this.setColour(Ty),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")}},Dy={init:function(){this.setColour(Ty),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)}},fy=Sy,Fy=Ny,Py=gy,vy=Cy,Yy=230,Xy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},xy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},yy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},by={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},Vy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},By={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},Gy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Uy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},wy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},ky={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},Hy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},Wy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},Ky={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},Jy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},qy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Qy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},zy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},jy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},Zy={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},$y={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},tb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},eb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},nb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},sb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},_b={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},ob={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},pb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},ab={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},ub={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},rb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},lb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},db={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},Ib={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},Tb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},hb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Mb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},mb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},Eb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},Ob={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},Rb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},cb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},gb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},Cb={init:function(){this.setColour(Yy),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},Sb=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},Ab=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"},Lb=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Nb=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"},Db=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"},fb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Fb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Pb=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"},vb=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"},Yb=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"},Xb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},xb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},yb=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"},bb=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Vb=bb,Bb=bb,Gb=bb,Ub=bb,wb=bb,kb=bb,Hb=bb,Wb=bb,Kb=bb,Jb=bb,qb=bb,Qb=bb,zb=bb,jb=bb,Zb=bb,$b=bb,tV=bb,eV=bb,iV=bb,nV=bb,sV=bb,_V=bb,oV=bb,pV=bb,aV=bb,uV=bb,rV=bb,lV=bb,dV=bb,IV=bb,TV=bb,hV=bb,MV=bb,mV=bb,EV=bb,OV=bb,RV=bb,cV=bb,gV=bb,CV=bb,SV=bb,AV=bb,LV=bb,NV=bb;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,jn),mt.Python=mu,mt.generator=mu,Et.Profile.default={},Object.assign(Et.Profile,Iy),Object.assign(Et.Profile.default,Iy["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,y,x,b,P,v,Y,It,Tt),Object.assign(mt.Python.forBlock,T,h,M,m,E,O,R,c,g,C,S,A,L,st,lt,rt,tt,_t,dt,Q,ut,at,pt,ot,z,q,J,it,et,nt,j,Z,$,ht,Mt)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32s3/main.bundle.js b/boards/default/micropython_esp32s3/main.bundle.js index 4e254f0a..ce608c8f 100644 --- a/boards/default/micropython_esp32s3/main.bundle.js +++ b/boards/default/micropython_esp32s3/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>Lt,controls_typeLists:()=>Nt,lists_zip:()=>Dt,lists_zip_container:()=>ft,lists_zip_item:()=>Ft,unpack_iterable_object:()=>Pt,variables_change:()=>St,variables_get:()=>gt,variables_global:()=>At,variables_set:()=>Ct});var i={};t.r(i),t.d(i,{base_setup:()=>xt,controls_delay:()=>Xt,controls_end_program:()=>bt,controls_except:()=>qt,controls_finally:()=>zt,controls_flow_statements:()=>wt,controls_for:()=>kt,controls_forEach:()=>Bt,controls_for_range:()=>Ht,controls_if:()=>yt,controls_if_else:()=>Jt,controls_if_elseif:()=>Kt,controls_if_if:()=>Wt,controls_lambda:()=>Zt,controls_main:()=>Yt,controls_pass:()=>$t,controls_range:()=>Vt,controls_repeat_ext:()=>jt,controls_thread:()=>te,controls_try:()=>Qt,controls_try_finally:()=>Ut,controls_whileUntil:()=>Gt,do_while:()=>ee,garbage_collection:()=>ie,get_mem_alloc:()=>ne,get_mem_free:()=>se,get_unique_identifier:()=>_e});var n={};t.r(n),t.d(n,{base_map:()=>Le,math_arithmetic:()=>re,math_bit:()=>de,math_constant:()=>ae,math_constant_mp:()=>ue,math_constrain:()=>Oe,math_dec:()=>Te,math_indexer_number:()=>ce,math_map:()=>Re,math_max_min:()=>Me,math_number:()=>pe,math_number_base_conversion:()=>me,math_random:()=>Ee,math_random_seed:()=>ge,math_round:()=>Ce,math_selfcalcu:()=>le,math_to_int:()=>he,math_trig:()=>Ie,text_to_number:()=>Se,text_to_number_skulpt:()=>Ae,turn_to_int:()=>Ne});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ye,char_to_ascii:()=>xe,number_to_text:()=>Xe,os_system:()=>oi,text:()=>fe,text_capital:()=>He,text_center:()=>We,text_char:()=>Pe,text_char_at:()=>Ve,text_char_at2:()=>ye,text_char_at3:()=>ii,text_compareTo:()=>ei,text_compare_to:()=>ke,text_create_with_container:()=>Ze,text_create_with_item:()=>$e,text_encode:()=>si,text_equals_starts_ends:()=>we,text_eval:()=>_i,text_find:()=>Ke,text_format:()=>je,text_format_noreturn:()=>ni,text_join:()=>ve,text_join_seq:()=>Je,text_length:()=>be,text_random_char:()=>Be,text_replace:()=>Qe,text_split:()=>qe,text_strip:()=>ze,text_substring:()=>Ue,text_substring2:()=>Ge,text_substring3:()=>ti,text_textarea:()=>Fe});var _={};t.r(_),t.d(_,{list_many_input:()=>fi,list_tolist:()=>Yi,list_tolist2:()=>Ui,list_trig:()=>Li,lists_2d_get_col_row_data:()=>li,lists_2d_get_data_with_col_row:()=>ri,lists_append_extend:()=>mi,lists_change_to:()=>Di,lists_change_to_general:()=>Pi,lists_clear:()=>gi,lists_create_with:()=>di,lists_create_with2:()=>xi,lists_create_with_container:()=>Ti,lists_create_with_item:()=>hi,lists_create_with_noreturn:()=>Fi,lists_create_with_text:()=>Ii,lists_create_with_text2:()=>Xi,lists_del_general:()=>vi,lists_find:()=>Ai,lists_getIndex3:()=>bi,lists_getSublist3:()=>yi,lists_get_index:()=>ai,lists_get_random_item:()=>Ei,lists_get_random_sublist:()=>Oi,lists_get_sublist:()=>ui,lists_insert_value:()=>Ri,lists_insert_value2:()=>Bi,lists_pop:()=>Si,lists_remove_at:()=>Ci,lists_remove_at2:()=>Gi,lists_reverse:()=>ci,lists_setIndex3:()=>Vi,lists_set_index:()=>Mi,lists_sort:()=>Ni});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>sn,dicts_add_or_change:()=>qi,dicts_clear:()=>Zi,dicts_create_with:()=>ki,dicts_create_with_container:()=>Hi,dicts_create_with_item:()=>Wi,dicts_create_with_noreturn:()=>pn,dicts_deldict:()=>nn,dicts_delete:()=>zi,dicts_get:()=>Ji,dicts_get_default:()=>Qi,dicts_items:()=>$i,dicts_keys:()=>Ki,dicts_length:()=>en,dicts_pop:()=>_n,dicts_setdefault:()=>on,dicts_to_json:()=>un,dicts_todict:()=>an,dicts_update:()=>ji,dicts_values:()=>tn,json_to_dicts:()=>rn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Mn,logic_compare:()=>dn,logic_compare_continous:()=>In,logic_is:()=>Rn,logic_is_in:()=>On,logic_negate:()=>hn,logic_null:()=>mn,logic_operation:()=>Tn,logic_tobool:()=>cn,logic_true_or_false:()=>En});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Hn,sdcard_use_spi_init:()=>kn,storage_can_write_ornot:()=>Fn,storage_change_dir:()=>Un,storage_close_file:()=>vn,storage_delete_file:()=>xn,storage_file_seek:()=>yn,storage_file_tell:()=>bn,storage_file_write:()=>Ln,storage_fileopen:()=>Cn,storage_fileopen_new:()=>Sn,storage_fileopen_new_encoding:()=>An,storage_get_a_line:()=>fn,storage_get_contents:()=>Dn,storage_get_contents_without_para:()=>Nn,storage_get_current_dir:()=>Vn,storage_get_file_size:()=>Xn,storage_get_filename:()=>Pn,storage_is_file:()=>wn,storage_list_all_files:()=>Yn,storage_make_dir:()=>Bn,storage_open_file_with_os:()=>gn,storage_rename:()=>Gn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>jn,procedures_callreturn:()=>Zn,procedures_defnoreturn:()=>Jn,procedures_defreturn:()=>Qn,procedures_ifreturn:()=>$n,procedures_mutatorarg:()=>zn,procedures_mutatorcontainer:()=>qn,procedures_return:()=>ts});var r={};t.r(r),t.d(r,{tuple_change_to:()=>ds,tuple_create_with:()=>is,tuple_create_with_container:()=>ns,tuple_create_with_item:()=>ss,tuple_create_with_noreturn:()=>Ms,tuple_create_with_text2:()=>_s,tuple_create_with_text_return:()=>os,tuple_del:()=>us,tuple_find:()=>Is,tuple_getIndex:()=>ps,tuple_getSublist:()=>hs,tuple_get_random_item:()=>Es,tuple_get_sublist:()=>ms,tuple_join:()=>rs,tuple_length:()=>as,tuple_max:()=>ls,tuple_totuple:()=>Os,tuple_trig:()=>Ts});var l={};t.r(l),t.d(l,{set_add_discard:()=>fs,set_clear:()=>Ls,set_create_with:()=>cs,set_create_with_container:()=>gs,set_create_with_item:()=>Cs,set_create_with_text_return:()=>vs,set_length:()=>Ss,set_operate:()=>Ns,set_operate_update:()=>Ds,set_pop:()=>As,set_sub:()=>Fs,set_toset:()=>Ys,set_update:()=>Ps});var d={};t.r(d),t.d(d,{html_content:()=>Vs,html_content_more:()=>Bs,html_document:()=>Xs,html_form:()=>Us,html_head_body:()=>ys,html_style:()=>Gs,html_style_color:()=>ks,html_style_content:()=>ws,html_text:()=>Hs,html_title:()=>bs});var I={};t.r(I),t.d(I,{attribute_access:()=>s_,function_call:()=>e_,function_call_container:()=>i_,function_call_item:()=>n_,raw_block:()=>Js,raw_empty:()=>qs,raw_expression:()=>Qs,raw_table:()=>Ks,text_comment:()=>zs,text_print_multiple:()=>Zs,text_print_multiple_container:()=>$s,text_print_multiple_item:()=>t_,type_check:()=>js});var T={};t.r(T),t.d(T,{controls_type:()=>u_,controls_typeLists:()=>r_,lists_zip:()=>l_,unpack_iterable_object:()=>d_,variables_change:()=>p_,variables_get:()=>__,variables_global:()=>a_,variables_set:()=>o_});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>g_,base_setup:()=>T_,controls_delay:()=>c_,controls_flow_statements:()=>R_,controls_for:()=>m_,controls_forEach:()=>N_,controls_for_range:()=>E_,controls_if:()=>h_,controls_interrupts:()=>A_,controls_lambda:()=>f_,controls_main:()=>I_,controls_millis:()=>C_,controls_nointerrupts:()=>L_,controls_pass:()=>P_,controls_range:()=>D_,controls_repeat:()=>B_,controls_repeat_ext:()=>x_,controls_thread:()=>v_,controls_try_finally:()=>M_,controls_whileUntil:()=>O_,do_while:()=>Y_,garbage_collection:()=>X_,get_mem_alloc:()=>b_,get_mem_free:()=>y_,get_unique_identifier:()=>V_,reset:()=>S_,time_sleep:()=>F_});var M={};t.r(M),t.d(M,{base_map:()=>oo,math_arithmetic:()=>H_,math_bit:()=>k_,math_constant:()=>U_,math_constant_mp:()=>w_,math_constrain:()=>$_,math_dec:()=>Q_,math_indexer_number:()=>io,math_map:()=>Z_,math_max_min:()=>z_,math_number:()=>G_,math_number_base_conversion:()=>to,math_random:()=>j_,math_random_seed:()=>eo,math_round:()=>no,math_selfcalcu:()=>W_,math_single:()=>K_,math_to_int:()=>q_,math_trig:()=>J_,text_to_number:()=>so,text_to_number_skulpt:()=>_o,turn_to_int:()=>po});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Io,char_to_ascii:()=>To,number_to_text:()=>ho,os_system:()=>Vo,text:()=>ao,text_capital:()=>So,text_center:()=>Ao,text_char:()=>ro,text_char_at:()=>Eo,text_char_at2:()=>mo,text_char_at3:()=>Xo,text_compareTo:()=>xo,text_compare_to:()=>co,text_encode:()=>bo,text_equals_starts_ends:()=>Ro,text_eval:()=>yo,text_find:()=>Lo,text_format:()=>Po,text_format_noreturn:()=>vo,text_join:()=>lo,text_join_seq:()=>No,text_length:()=>Mo,text_random_char:()=>Oo,text_replace:()=>Do,text_split:()=>fo,text_strip:()=>Fo,text_substring:()=>Co,text_substring2:()=>go,text_substring3:()=>Yo,text_textarea:()=>uo});var E={};t.r(E),t.d(E,{list_many_input:()=>sp,list_tolist:()=>hp,list_tolist2:()=>Mp,list_trig:()=>ep,lists_2d_get_col_row_data:()=>Uo,lists_2d_get_data_with_col_row:()=>Go,lists_append_extend:()=>Ko,lists_change_to:()=>np,lists_change_to_general:()=>op,lists_clear:()=>jo,lists_create_with:()=>wo,lists_create_with2:()=>ap,lists_create_with_noreturn:()=>_p,lists_create_with_text:()=>ko,lists_create_with_text2:()=>up,lists_del_general:()=>pp,lists_find:()=>Zo,lists_getIndex3:()=>rp,lists_getSublist3:()=>lp,lists_get_index:()=>Ho,lists_get_random_item:()=>Jo,lists_get_random_sublist:()=>Qo,lists_get_sublist:()=>Bo,lists_insert_value:()=>qo,lists_insert_value2:()=>Ip,lists_pop:()=>tp,lists_remove_at:()=>$o,lists_remove_at2:()=>Tp,lists_reverse:()=>zo,lists_setIndex3:()=>dp,lists_set_index:()=>Wo,lists_sort:()=>ip});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>fp,dicts_add_or_change:()=>cp,dicts_clear:()=>Sp,dicts_create_with:()=>mp,dicts_create_with_noreturn:()=>vp,dicts_deldict:()=>Dp,dicts_delete:()=>gp,dicts_get:()=>Op,dicts_get_default:()=>Rp,dicts_items:()=>Ap,dicts_keys:()=>Ep,dicts_length:()=>Np,dicts_pop:()=>Fp,dicts_setdefault:()=>Pp,dicts_to_json:()=>xp,dicts_todict:()=>Yp,dicts_update:()=>Cp,dicts_values:()=>Lp,json_to_dicts:()=>Xp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Gp,logic_compare:()=>bp,logic_compare_continous:()=>yp,logic_is:()=>Hp,logic_is_in:()=>kp,logic_negate:()=>Bp,logic_null:()=>Up,logic_operation:()=>Vp,logic_tobool:()=>Wp,logic_true_or_false:()=>wp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ta,sdcard_use_spi_init:()=>Ia,storage_can_write_ornot:()=>ta,storage_change_dir:()=>aa,storage_close_file:()=>ia,storage_delete_file:()=>sa,storage_file_seek:()=>pa,storage_file_tell:()=>oa,storage_file_write:()=>zp,storage_fileopen:()=>Jp,storage_fileopen_new:()=>Qp,storage_fileopen_new_encoding:()=>qp,storage_get_a_line:()=>$p,storage_get_contents:()=>Zp,storage_get_contents_without_para:()=>jp,storage_get_current_dir:()=>ua,storage_get_file_size:()=>_a,storage_get_filename:()=>ea,storage_is_file:()=>da,storage_list_all_files:()=>na,storage_make_dir:()=>ra,storage_open_file_with_os:()=>Kp,storage_rename:()=>la});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ea,procedures_callreturn:()=>ma,procedures_defnoreturn:()=>Ma,procedures_defreturn:()=>ha,procedures_ifreturn:()=>Oa,procedures_return:()=>Ra});var C={};t.r(C),t.d(C,{tuple_change_to:()=>fa,tuple_create_with:()=>ca,tuple_create_with_noreturn:()=>Ya,tuple_create_with_text2:()=>ga,tuple_create_with_text_return:()=>Ca,tuple_del:()=>La,tuple_find:()=>Fa,tuple_getIndex:()=>Sa,tuple_getSublist:()=>va,tuple_get_random_item:()=>Xa,tuple_get_sublist:()=>xa,tuple_join:()=>Na,tuple_length:()=>Aa,tuple_max:()=>Da,tuple_totuple:()=>ba,tuple_trig:()=>Pa});var S={};t.r(S),t.d(S,{set_add_discard:()=>ka,set_clear:()=>Ga,set_create_with:()=>ya,set_create_with_text_return:()=>Ka,set_length:()=>Va,set_operate:()=>Ua,set_operate_update:()=>wa,set_pop:()=>Ba,set_sub:()=>Ha,set_toset:()=>Ja,set_update:()=>Wa});var A={};t.r(A),t.d(A,{html_content:()=>ja,html_content_more:()=>Za,html_document:()=>Qa,html_form:()=>tu,html_head_body:()=>za,html_style:()=>$a,html_style_content:()=>eu,html_text:()=>iu,html_title:()=>qa});var L={};t.r(L),t.d(L,{attribute_access:()=>uu,function_call:()=>au,raw_block:()=>nu,raw_empty:()=>_u,raw_expression:()=>su,raw_table:()=>ou,type_check:()=>pu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>cu,actuator_extern_get_led_state:()=>gu,actuator_extern_led_bright:()=>Ru,actuator_extern_led_brightness:()=>Cu,actuator_ms32006_dcmotor:()=>vu,actuator_ms32006_init:()=>Pu,actuator_ms32006_stepper:()=>Yu,actuator_neopixel_init:()=>xu,actuator_neopixel_rgb:()=>Xu,actuator_neopixel_rgb_all:()=>bu,actuator_neopixel_write:()=>yu,actuator_use_uart_init:()=>Vu,esp32_music_get_tempo_extern:()=>mu,esp32_music_pitch:()=>Iu,esp32_music_pitch_init:()=>du,esp32_music_pitch_with_time:()=>Tu,esp32_music_play_list:()=>hu,esp32_music_reset_extern:()=>Eu,esp32_music_set_tempo_extern:()=>Mu,esp32_music_stop:()=>Ou,mixbot_actuator_extern_get_addr:()=>ir,mixbot_actuator_extern_set_addr:()=>nr,mixbot_addr_extern:()=>ku,robot_led_extern:()=>Ju,robot_led_extern_get_value:()=>Qu,robot_motor_extern:()=>Hu,robot_motor_extern_get_speed:()=>Wu,robot_servo_extern_absolute_run:()=>Zu,robot_servo_extern_get_status:()=>qu,robot_servo_extern_relative_continue:()=>er,robot_servo_extern_relative_origin:()=>$u,robot_servo_extern_relative_run:()=>tr,robot_servo_extern_stop:()=>ju,robot_servo_extern_stop_mode:()=>zu,robot_traffic_light_extern:()=>Ku,servo_get_angle:()=>fu,servo_get_speed:()=>Fu,servo_init:()=>Su,servo_move:()=>Au,servo_set_angle:()=>Nu,servo_set_speed:()=>Du,servo_speed_360:()=>Lu,syn6288_builtin_voice:()=>Uu,syn6288_get_voice:()=>Gu,syn6288_set_voice:()=>Bu,syn6288_tts_play:()=>wu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Xr,actuator_dc_motor_stop:()=>br,actuator_get_led_bright:()=>ar,actuator_get_led_state:()=>ur,actuator_led_bright:()=>pr,actuator_led_brightness:()=>rr,actuator_mixbot_buzzer_on_off:()=>Ur,actuator_mixgo_nova_mic_get:()=>Kr,actuator_mixgo_nova_mic_set:()=>Wr,actuator_mixgo_nova_onboard_music_pitch:()=>Zr,actuator_mixgo_nova_onboard_music_stop:()=>$r,actuator_mixgo_nova_play_audio:()=>zr,actuator_mixgo_nova_play_online_audio:()=>jr,actuator_mixgo_nova_record_audio:()=>qr,actuator_mixgo_nova_voice_get:()=>Qr,actuator_mixgo_nova_voice_set:()=>Jr,actuator_mixgo_zero_led_color:()=>lr,actuator_onboard_neopixel_rgb:()=>mr,actuator_onboard_neopixel_rgb_all:()=>Er,actuator_onboard_neopixel_rgb_show_all_chase:()=>Rr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Or,actuator_onboard_neopixel_write:()=>cr,actuator_rm_onboard_neopixel_rgb:()=>gr,actuator_rm_onboard_neopixel_rgb_all:()=>Cr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Sr,actuator_stepper_keep:()=>Yr,actuator_stepper_stop:()=>xr,analog_ble_keyboard_init:()=>dl,analog_ble_keyboard_input:()=>hl,analog_ble_keyboard_send_battery:()=>ml,analog_ble_keyboard_str:()=>Ml,analog_ble_mouse_init:()=>El,analog_ble_mouse_input:()=>cl,analog_ble_mouse_send_battery:()=>gl,analog_keyboard_input:()=>nl,analog_keyboard_str:()=>ll,analog_mouse_input:()=>ul,bitbot_motor:()=>Hr,bitbot_move:()=>wr,bitbot_stop:()=>kr,ble_keyboard_connect:()=>Tl,ble_keyboard_get_mac:()=>Il,ble_mouse_connect:()=>Rl,ble_mouse_get_mac:()=>Ol,cc_number:()=>Mr,esp32_music_get_tempo:()=>Lr,esp32_music_reset:()=>Nr,esp32_music_set_tempo:()=>Ar,esp32_onboard_music_pitch:()=>Dr,esp32_onboard_music_pitch_with_time:()=>fr,esp32_onboard_music_play_list:()=>Pr,esp32_onboard_music_stop:()=>Fr,general_key:()=>_l,general_key_tuple:()=>ol,generalkey_container:()=>pl,generalkey_create_with_item:()=>al,get_power_output:()=>el,ledswitch:()=>or,mixbot_motor:()=>Gr,mixbot_motor_status:()=>yr,mixbot_move:()=>Vr,mixbot_stop:()=>Br,mouse_key:()=>rl,number:()=>_r,rm_actuator_get_led_bright:()=>Ir,rm_actuator_get_led_state:()=>Tr,rm_actuator_led_bright:()=>dr,rm_actuator_led_brightness:()=>hr,rm_motor:()=>vr,set_all_power_output:()=>il,set_power_output:()=>tl,special_key:()=>sl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>id,ai_sensor_ailocal_class:()=>Wl,ai_sensor_ailocal_class_result:()=>Kl,ai_sensor_ailocal_train:()=>Hl,ai_sensor_asr_recognize:()=>jl,ai_sensor_audio_play:()=>Ql,ai_sensor_audio_record:()=>Jl,ai_sensor_barcode:()=>Fl,ai_sensor_circle:()=>bl,ai_sensor_classifier_faces:()=>ed,ai_sensor_color:()=>Gl,ai_sensor_color_chases:()=>kl,ai_sensor_color_chases_result:()=>wl,ai_sensor_config:()=>Dl,ai_sensor_face:()=>td,ai_sensor_find_20objects:()=>nd,ai_sensor_find_barcodes:()=>Pl,ai_sensor_find_circles:()=>yl,ai_sensor_find_colors:()=>Ul,ai_sensor_find_licenseplates:()=>$l,ai_sensor_find_lines:()=>Xl,ai_sensor_find_qrcodes:()=>Nl,ai_sensor_find_rects:()=>Bl,ai_sensor_find_tags:()=>Yl,ai_sensor_licenseplate:()=>Zl,ai_sensor_line:()=>xl,ai_sensor_qrcode:()=>Al,ai_sensor_qrcode_lite:()=>Ll,ai_sensor_rect:()=>Vl,ai_sensor_rgb:()=>fl,ai_sensor_tag:()=>vl,ai_sensor_use_uart_init:()=>Sl,ai_sensor_yolo_recognize:()=>ql,ai_sensor_yolo_recognize_result:()=>zl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>od,MICROPYTHON_AI_Speech_unit:()=>_d,MICROPYTHON_AI_client:()=>sd});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>cd,mpython_blynk_app_notify:()=>Td,mpython_blynk_email:()=>md,mpython_blynk_get_timers:()=>Ed,mpython_blynk_on_connected:()=>ld,mpython_blynk_on_disconnected:()=>rd,mpython_blynk_run:()=>Id,mpython_blynk_sensor_data_to_app:()=>Rd,mpython_blynk_set_property:()=>Md,mpython_blynk_setup:()=>gd,mpython_blynk_stop_timers:()=>hd,mpython_blynk_sync_virtual:()=>ud,mpython_blynk_terminal_widget_vpin:()=>ad,mpython_blynktimer:()=>Od,mpython_blynktimer_run:()=>dd});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>sI,communicate_bluetooth_connect:()=>aI,communicate_bluetooth_disconnect:()=>uI,communicate_bluetooth_handle:()=>TI,communicate_bluetooth_is_connected:()=>lI,communicate_bluetooth_mac:()=>pI,communicate_bluetooth_peripheral_init:()=>_I,communicate_bluetooth_recv:()=>dI,communicate_bluetooth_recv_only:()=>II,communicate_bluetooth_scan:()=>oI,communicate_bluetooth_send:()=>rI,communicate_espnow_init:()=>hI,communicate_espnow_init_new:()=>MI,communicate_i2c_available:()=>Gd,communicate_i2c_init:()=>Ld,communicate_i2c_master_read:()=>Bd,communicate_i2c_onboard:()=>Sd,communicate_i2c_read:()=>Nd,communicate_i2c_scan:()=>fd,communicate_i2c_write:()=>Dd,communicate_ir_recv_init:()=>Qd,communicate_ir_send_init:()=>$d,communicate_ow_init:()=>wd,communicate_ow_read:()=>Hd,communicate_ow_reset:()=>Jd,communicate_ow_scan:()=>kd,communicate_ow_select:()=>Kd,communicate_ow_write:()=>Wd,communicate_spi_buffer:()=>vd,communicate_spi_init:()=>Fd,communicate_spi_onboard:()=>Ad,communicate_spi_read:()=>Yd,communicate_spi_read_output:()=>xd,communicate_spi_readinto:()=>Xd,communicate_spi_readinto_output:()=>bd,communicate_spi_set:()=>Pd,communicate_spi_write:()=>yd,communicate_spi_write_readinto:()=>Vd,espnow_radio_channel:()=>gI,espnow_radio_channel_new:()=>SI,espnow_radio_on_off:()=>AI,espnow_radio_rec:()=>NI,espnow_radio_recv:()=>fI,espnow_radio_recv_certain_msg:()=>FI,espnow_radio_recv_certain_msg_new:()=>vI,espnow_radio_recv_msg:()=>DI,espnow_radio_recv_new:()=>PI,espnow_radio_send:()=>LI,espnow_radio_txpower:()=>CI,i2c_available:()=>tT,i2c_init:()=>GI,i2c_master_reader2:()=>$I,i2c_read:()=>UI,i2c_scan:()=>kI,i2c_slave_onreceive:()=>Ud,i2c_write:()=>wI,internal_variable:()=>qd,ir_recv_timeout:()=>Zd,ir_transmit_busy:()=>nI,ir_transmit_conventional_data:()=>tI,ir_transmit_raw_code:()=>iI,ir_transmit_study_code:()=>eI,ir_whether_recv:()=>jd,lora_init:()=>YI,lora_packet:()=>xI,lora_recv:()=>bI,lora_send:()=>XI,network_espnow_info:()=>EI,network_espnow_mac:()=>mI,network_espnow_recv:()=>OI,network_espnow_recv_handle:()=>cI,network_espnow_send:()=>RI,recv_fun:()=>zd,spi_buffer:()=>KI,spi_init:()=>HI,spi_read:()=>JI,spi_read_output:()=>QI,spi_readinto:()=>qI,spi_readinto_output:()=>zI,spi_set:()=>WI,spi_write:()=>jI,spi_write_readinto:()=>ZI,urequests_attribute:()=>VI,urequests_get:()=>yI,urequests_method:()=>BI});var Y={};t.r(Y),t.d(Y,{display_animate:()=>FT,display_blink_rate:()=>LT,display_circle:()=>PT,display_color_seclet:()=>kT,display_draw_4strings:()=>RT,display_fill:()=>fT,display_get_screen_image:()=>AT,display_help:()=>YT,display_image_size:()=>cT,display_lcd_use_i2c_init:()=>qT,display_line:()=>CT,display_line_arbitrarily:()=>ST,display_matrix_extern_bright_point:()=>dT,display_matrix_extern_bright_screen:()=>TT,display_matrix_extern_clear:()=>hT,display_matrix_extern_get_pixel:()=>lT,display_matrix_extern_get_screen_pixel:()=>IT,display_matrix_extern_image_builtins:()=>MT,display_matrix_extern_scroll_string:()=>oT,display_matrix_extern_scroll_string_delay:()=>pT,display_matrix_extern_shift:()=>rT,display_matrix_extern_show_frame_string:()=>aT,display_matrix_extern_show_frame_string_delay:()=>uT,display_matrix_extern_show_image:()=>sT,display_matrix_extern_show_image_or_string_delay:()=>_T,display_matrix_use_i2c_init:()=>nT,display_oled_drawPixel:()=>XT,display_oled_showBitmap:()=>xT,display_oled_use_i2c_init:()=>th,display_onoff:()=>DT,display_rect:()=>gT,display_rgb_color:()=>NT,display_tm1650_power:()=>yT,display_tm1650_set_brightness:()=>GT,display_tm1650_show_dot:()=>BT,display_tm1650_show_num:()=>VT,display_tm_use_i2c_init:()=>bT,display_triangle:()=>vT,display_use_i2c_init:()=>OT,extern_oled_bright_point:()=>lh,extern_oled_clear:()=>dh,extern_oled_get_pixel:()=>rh,extern_oled_hvline:()=>Th,extern_oled_line:()=>hh,extern_oled_scroll_string:()=>_h,extern_oled_scroll_string_delay:()=>oh,extern_oled_shape_rect:()=>Ih,extern_oled_shift:()=>uh,extern_oled_show_frame_string:()=>ph,extern_oled_show_frame_string_delay:()=>ah,extern_oled_show_image:()=>eh,extern_oled_show_image_or_string_delay:()=>sh,extern_oled_show_image_xy:()=>ih,extern_oled_show_string:()=>nh,lcd_backlight:()=>ZT,lcd_clear:()=>$T,lcd_print_string:()=>jT,lcd_show_image_or_string_delay:()=>zT,matrix_extern_image_arithmetic:()=>mT,matrix_extern_image_invert:()=>ET,tft_fill:()=>JT,tft_line_arbitrarily:()=>QT,tft_scroll_string_delay:()=>WT,tft_show_frame_string_delay:()=>KT,tft_show_image_or_string_delay:()=>HT,tft_show_image_xy:()=>wT,tft_use_spi_init:()=>UT});var x={};t.r(x),t.d(x,{bitbot_display_image_create:()=>tM,display_bright_point:()=>Fh,display_bright_screen:()=>vh,display_clear:()=>Yh,display_get_pixel:()=>fh,display_get_screen_pixel:()=>Ph,display_image_builtins:()=>Sh,display_image_builtins_all:()=>Ah,display_image_create:()=>Ch,display_scroll_string:()=>Oh,display_scroll_string_delay:()=>Rh,display_shift:()=>Dh,display_show_frame_string:()=>ch,display_show_frame_string_delay:()=>gh,display_show_image:()=>mh,display_show_image_or_string_delay:()=>Eh,draw_pointer:()=>SM,image_arithmetic:()=>Lh,image_invert:()=>Nh,mixbot_display_bright_screen:()=>Zh,mixbot_display_get_ambientbright:()=>jh,mixbot_display_get_screen_pixel:()=>zh,mixbot_display_image_create:()=>qh,mixbot_display_rotate:()=>$h,mixgo_display_image_create_new:()=>bh,mixgome_display_font:()=>yh,mixgome_display_image_create:()=>xh,mixgomini_display_image_create:()=>Xh,mpython_display_hvline:()=>Kh,mpython_display_line:()=>Jh,mpython_display_shape_rect:()=>Wh,mpython_pbm_image:()=>Qh,onboard_oled_bright_point:()=>Hh,onboard_oled_scroll_string_delay:()=>wh,onboard_oled_show_frame_string_delay:()=>kh,onboard_oled_show_image:()=>Vh,onboard_oled_show_image_or_string_delay:()=>Uh,onboard_oled_show_image_xy:()=>Bh,onboard_oled_show_string:()=>Gh,onboard_tft_bright_point:()=>IM,onboard_tft_bright_screen:()=>MM,onboard_tft_clear:()=>TM,onboard_tft_clock_clear:()=>gM,onboard_tft_clock_draw:()=>cM,onboard_tft_clock_get_rtctime:()=>OM,onboard_tft_clock_init:()=>EM,onboard_tft_clock_set_time:()=>RM,onboard_tft_display_hvline:()=>uM,onboard_tft_display_line:()=>rM,onboard_tft_display_shape_circle:()=>CM,onboard_tft_display_shape_rect:()=>aM,onboard_tft_fill:()=>mM,onboard_tft_get_pixel:()=>dM,onboard_tft_get_screen_pixel:()=>hM,onboard_tft_scroll_string:()=>sM,onboard_tft_scroll_string_delay:()=>_M,onboard_tft_shift:()=>lM,onboard_tft_show_frame_string:()=>oM,onboard_tft_show_frame_string_delay:()=>pM,onboard_tft_show_image:()=>eM,onboard_tft_show_image_or_string_delay:()=>nM,onboard_tft_show_image_xy:()=>iM});var X={};t.r(X),t.d(X,{factory_block:()=>XM,factory_block_return:()=>bM,factory_block_return_with_textarea:()=>VM,factory_block_with_textarea:()=>yM,factory_callMethod_noreturn:()=>YM,factory_callMethod_return:()=>xM,factory_create_with_container:()=>fM,factory_create_with_item:()=>FM,factory_declare:()=>vM,factory_from_import:()=>LM,factory_function_noreturn:()=>DM,factory_function_return:()=>PM,factory_import:()=>NM,folding_block:()=>BM});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>pm,inout_analog_atten:()=>qM,inout_analog_read:()=>QM,inout_analog_read_init:()=>em,inout_analog_write:()=>WM,inout_analog_write_init:()=>tm,inout_analog_write_set:()=>KM,inout_analog_write_set_freq:()=>sm,inout_digital_init:()=>ZM,inout_digital_read:()=>kM,inout_digital_write:()=>wM,inout_highlow:()=>UM,inout_pinMode:()=>nm,inout_pin_attachInterrupt:()=>jM,inout_pin_pressed:()=>zM,inout_pin_pressed_init:()=>im,inout_pwm_analog_write:()=>HM,inout_pwm_analog_write_init:()=>$M,inout_pwm_analog_write_set_freq:()=>JM,pin_pressed:()=>om,pin_pressed_init:()=>_m});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Pm,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Fm,IOT_EMQX_PING:()=>Dm,IOT_FORMATTING:()=>Lm,IOT_FORMAT_STRING:()=>Nm,IOT_MIXIO_NTP:()=>fm,IOT_MIXIO_PUBLISH:()=>Om,IOT_MIXIO_SUBSCRIBE:()=>Rm,iot_checkonenet:()=>Um,iot_client_onboard:()=>Ym,iot_create_with_item:()=>mm,iot_http_client:()=>xm,iot_http_data:()=>Xm,iot_mixio_check:()=>Cm,iot_mixio_connect:()=>Em,iot_mixio_connect_only:()=>gm,iot_mixio_disconnect:()=>cm,iot_mixio_format_msg:()=>Am,iot_mixio_format_topic:()=>Sm,iot_mixly_key:()=>vm,iot_mqtt_client:()=>bm,iot_mqtt_data:()=>ym,iot_onenet_check:()=>dm,iot_onenet_connect:()=>rm,iot_onenet_disconnect:()=>lm,iot_onenet_publish:()=>Tm,iot_onenet_publish_dict:()=>Im,iot_onenetconnect:()=>Bm,iot_onenetdisconnect:()=>Gm,iot_publish:()=>wm,iot_publish_container:()=>hm,iot_publish_item:()=>Mm,iot_wifi_connect:()=>um,iot_wificonnect:()=>Vm});var V={};t.r(V),t.d(V,{network_ap_connect:()=>$m,network_connect:()=>Qm,network_get_connect:()=>zm,network_get_wifi:()=>Zm,network_init:()=>Hm,network_is_active:()=>Km,network_open:()=>Wm,network_scan:()=>Jm,network_server:()=>tE,network_socket_accept:()=>_E,network_socket_bind:()=>iE,network_socket_close:()=>rE,network_socket_connect:()=>nE,network_socket_init:()=>eE,network_socket_listen:()=>sE,network_socket_receive:()=>oE,network_socket_receive_from:()=>aE,network_socket_send:()=>pE,network_socket_send_to:()=>uE,network_stop:()=>jm,network_wifi_connect:()=>qm,ntptime_address:()=>hE,ntptime_time:()=>TE,requests_attribute:()=>dE,requests_attribute2:()=>OE,requests_get:()=>lE,requests_get2:()=>mE,requests_method:()=>IE,requests_post:()=>EE});var B={};t.r(B),t.d(B,{get_potential_num:()=>cE,nova_g1_motor:()=>gE,nova_g1_spk_en:()=>SE,nova_g1_usb:()=>CE});var G={};t.r(G),t.d(G,{pe_g1_battery_left:()=>NE,pe_g1_dc_motor:()=>DE,pe_g1_dc_motor_speed:()=>fE,pe_g1_servo_get_angle:()=>vE,pe_g1_servo_get_speed:()=>YE,pe_g1_servo_set_angle:()=>FE,pe_g1_servo_set_speed:()=>PE,pe_g1_use_i2c_init:()=>LE});var U={};t.r(U),t.d(U,{HCSR04:()=>xO,PS2_Button:()=>VO,PS2_Buttons:()=>GO,PS2_Buttons_new:()=>HO,PS2_State:()=>BO,PS2_init:()=>XO,PS2_init_new:()=>wO,PS2_stk:()=>UO,PS2_stk_new:()=>WO,PS2_vibration:()=>yO,PS2_vibration_new:()=>kO,esp32_s2_weather_init:()=>FO,esp32_s2_weather_rain:()=>vO,esp32_s2_weather_wd:()=>PO,esp32_s2_weather_ws:()=>YO,extern_rfid_read:()=>MO,extern_rfid_readcontent:()=>EO,extern_rfid_readid:()=>mO,extern_rfid_status:()=>cO,extern_rfid_write:()=>OO,extern_rfid_write_return:()=>RO,gnss_get_data:()=>qO,gnss_have_data:()=>QO,mixbot_sensor_extern_get_addr:()=>iR,mixbot_sensor_extern_set_addr:()=>nR,pm25_get_data:()=>JO,robot_button_extern_get_value:()=>zO,robot_color_extern_get_value:()=>eR,robot_infrared_extern_get_value:()=>ZO,robot_infrared_extern_grey_get_value:()=>$O,robot_potentiometer_extern_get_value:()=>tR,robot_sonar_extern_get_value:()=>sR,robot_sonar_extern_led:()=>_R,robot_touch_extern_get_value:()=>jO,sensor_APDS9960_extern:()=>ZE,sensor_DS18X20:()=>QE,sensor_LTR308_extern:()=>$E,sensor_LTR390UV_extern:()=>eO,sensor_MAX30102_extern:()=>jE,sensor_QMC5883L_extern:()=>oO,sensor_VL530LX_extern:()=>iO,sensor_adxl345_get_acceleration:()=>GE,sensor_aht11_extern:()=>sO,sensor_bmp:()=>KE,sensor_compass_reset:()=>TO,sensor_dht11:()=>wE,sensor_hp203_extern:()=>_O,sensor_light_level:()=>UE,sensor_lm35:()=>qE,sensor_ltr381_extern:()=>tO,sensor_mixgo_extern_button_attachInterrupt:()=>VE,sensor_mixgo_extern_button_get_presses:()=>yE,sensor_mixgo_extern_button_is_pressed:()=>XE,sensor_mixgo_extern_button_was_pressed:()=>bE,sensor_mixgo_extern_light:()=>kE,sensor_mixgo_extern_pin_near:()=>WE,sensor_mixgo_extern_sound:()=>HE,sensor_mixgoce_hot_wheel_degrees:()=>fO,sensor_mixgoce_hot_wheel_is_touched:()=>DO,sensor_mpu9250_attachGestureInterrupt:()=>BE,sensor_mpu9250_calibrate_compass:()=>lO,sensor_mpu9250_field_strength:()=>IO,sensor_mpu9250_gesture:()=>pO,sensor_mpu9250_get_acceleration:()=>aO,sensor_mpu9250_get_gyro:()=>rO,sensor_mpu9250_get_magnetic:()=>uO,sensor_mpu9250_temperature:()=>dO,sensor_sht:()=>JE,sensor_shtc3_extern:()=>nO,sensor_use_i2c_init:()=>zE,sensor_use_spi_init:()=>hO,sensor_use_uart_init:()=>KO,sensor_weather_solo_init:()=>oR,sensor_weather_solo_rain:()=>uR,sensor_weather_solo_wd:()=>pR,sensor_weather_solo_ws:()=>aR,weather_data:()=>gO,weather_have_data:()=>CO,weather_set_label:()=>AO,weather_set_label_container:()=>LO,weather_set_label_item:()=>NO,weather_uart_mixio:()=>SO});var w={};t.r(w),t.d(w,{HCSR04:()=>LR,RTC_set_date:()=>AR,RTC_set_time:()=>SR,bitbot_als_num:()=>vc,dht11:()=>Bc,number1:()=>DR,number2:()=>fR,number3:()=>FR,number4:()=>PR,number5:()=>vR,number6:()=>YR,number7:()=>xR,onboard_RTC_get_time:()=>UR,onboard_RTC_get_time_str:()=>JR,onboard_RTC_get_timestamp:()=>wR,onboard_RTC_set_datetime:()=>WR,onboard_RTC_settime_string:()=>HR,onboard_RTC_timestamp_totuple:()=>kR,rfid_readcontent:()=>tc,rfid_readid:()=>$R,rfid_write:()=>ec,rfid_write_return:()=>ic,sensor_LTR308:()=>QR,sensor_aht11:()=>zR,sensor_bitbot_ALS:()=>Pc,sensor_button_get_presses:()=>Xc,sensor_button_is_pressed:()=>Yc,sensor_button_was_pressed:()=>xc,sensor_distance_hrsc04:()=>CR,sensor_eulerangles:()=>sc,sensor_field_strength:()=>Gc,sensor_get_acceleration:()=>nc,sensor_get_temperature:()=>jR,sensor_hp203:()=>ZR,sensor_light:()=>Vc,sensor_mixbot_get_gyro:()=>Fc,sensor_mixbot_patrol_calibrate:()=>Nc,sensor_mixbot_patrol_value:()=>Dc,sensor_mixbot_temperature:()=>fc,sensor_mixgo_LTR308:()=>GR,sensor_mixgo_button_attachInterrupt:()=>TR,sensor_mixgo_button_get_presses:()=>IR,sensor_mixgo_button_is_pressed:()=>lR,sensor_mixgo_button_was_pressed:()=>dR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>hc,sensor_mixgo_cc_mmc5603_get_angle:()=>Tc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Ic,sensor_mixgo_light:()=>NR,sensor_mixgo_nova_LTR308:()=>BR,sensor_mixgo_nova_pin_near:()=>VR,sensor_mixgo_pin_near:()=>yR,sensor_mixgo_pin_near_double:()=>bR,sensor_mixgo_pin_near_single:()=>XR,sensor_mixgo_pin_pressed:()=>OR,sensor_mixgo_touch_slide:()=>gR,sensor_mixgocar42_button_attachInterrupt:()=>ER,sensor_mixgocar42_button_get_presses:()=>mR,sensor_mixgocar42_button_is_pressed:()=>hR,sensor_mixgocar42_button_was_pressed:()=>MR,sensor_mixgocar_battery_left:()=>Lc,sensor_mixgocar_pin_near:()=>Sc,sensor_mixgocar_pin_near_line:()=>Cc,sensor_mixgocar_pin_near_state_change:()=>Ac,sensor_mixgoce_pin_pressed:()=>RR,sensor_mixgoce_temperature:()=>mc,sensor_mixgome_temperature:()=>Mc,sensor_mpython_pin_pressed:()=>cR,sensor_mpython_qmi8658_get_gyro:()=>Ec,sensor_mpython_qmi8658_temperature:()=>Oc,sensor_onboard_compass_reset:()=>dc,sensor_onboard_mpu9250_calibrate_compass:()=>uc,sensor_onboard_mpu9250_field_strength:()=>lc,sensor_onboard_mpu9250_gesture:()=>_c,sensor_onboard_mpu9250_get_acceleration:()=>oc,sensor_onboard_mpu9250_get_gyro:()=>ac,sensor_onboard_mpu9250_get_magnetic:()=>pc,sensor_onboard_mpu9250_temperature:()=>rc,sensor_pin_near:()=>yc,sensor_pin_pressed:()=>bc,sensor_rm_acc:()=>gc,sensor_rm_battery_left:()=>cc,sensor_rm_pin_near_double:()=>Rc,sensor_rtc_init:()=>KR,sensor_sound:()=>qR,sensor_temperature:()=>Uc});var k={};t.r(k),t.d(k,{serial_any:()=>qc,serial_begin:()=>tg,serial_print:()=>Hc,serial_print_byte:()=>kc,serial_print_hex:()=>Kc,serial_println:()=>Wc,serial_read_from_ai:()=>ug,serial_readline:()=>zc,serial_readstr:()=>Qc,serial_readstr_until:()=>jc,serial_receive_data_event:()=>Jc,serial_send_to_ai:()=>ag,serial_softserial:()=>$c,serial_softserial_new:()=>Zc,system_input:()=>eg,system_print:()=>ig,system_print_container:()=>og,system_print_end:()=>sg,system_print_inline:()=>ng,system_print_item:()=>pg,system_print_many:()=>_g});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>Ig,Timer_init:()=>Lg,base_delay:()=>fg,controls_delay:()=>dg,controls_delay_new:()=>lg,controls_millis:()=>hg,controls_uname:()=>mg,raw_block:()=>Mg,reset:()=>Tg,system_bitbot_shutdown:()=>Ag,system_machine_reset:()=>Sg,system_ticks_diff:()=>Rg,system_timer:()=>Og,system_timer_init:()=>cg,system_wdt_feed:()=>Cg,system_wdt_init:()=>gg,time_ticks_diff:()=>Dg,timer:()=>Eg,timer2:()=>Ng});var W={};t.r(W),t.d(W,{Air_daily_content:()=>kg,Air_now_content:()=>bg,Geo_moon_content:()=>Wg,Geo_sun_content:()=>Hg,Life_suggestion_content:()=>Vg,Location_search_content:()=>Gg,Tide_daily_content:()=>Bg,WEATHER_DAILY:()=>vg,WEATHER_HOUR:()=>Yg,WEATHER_NOW:()=>Pg,Weather_alarm_content:()=>yg,Weather_daily:()=>Ug,Weather_daily_content:()=>wg,Weather_now:()=>xg,Weather_now_content:()=>Xg});var K={};t.r(K),t.d(K,{actuator_extern_get_led_bright:()=>lC,actuator_extern_get_led_state:()=>dC,actuator_extern_led_bright:()=>rC,actuator_extern_led_brightness:()=>IC,actuator_ms32006_dcmotor:()=>$g,actuator_ms32006_init:()=>Zg,actuator_ms32006_stepper:()=>tC,actuator_neopixel_init:()=>TC,actuator_neopixel_rgb:()=>mC,actuator_neopixel_rgb_all:()=>hC,actuator_neopixel_write:()=>MC,actuator_use_uart_init:()=>EC,esp32_music_get_tempo_extern:()=>oC,esp32_music_pitch:()=>iC,esp32_music_pitch_init:()=>eC,esp32_music_pitch_with_time:()=>nC,esp32_music_play_list:()=>pC,esp32_music_reset_extern:()=>aC,esp32_music_set_tempo_extern:()=>_C,esp32_music_stop:()=>sC,mixbot_actuator_extern_get_addr:()=>bC,mixbot_actuator_extern_set_addr:()=>yC,mixbot_addr_extern:()=>CC,robot_led_extern:()=>NC,robot_led_extern_get_value:()=>DC,robot_motor_extern:()=>SC,robot_motor_extern_get_speed:()=>AC,robot_servo_extern_absolute_run:()=>vC,robot_servo_extern_get_status:()=>fC,robot_servo_extern_relative_continue:()=>XC,robot_servo_extern_relative_origin:()=>YC,robot_servo_extern_relative_run:()=>xC,robot_servo_extern_stop:()=>PC,robot_servo_extern_stop_mode:()=>FC,robot_traffic_light_extern:()=>LC,servo_get_angle:()=>zg,servo_get_speed:()=>jg,servo_init:()=>Kg,servo_move:()=>uC,servo_set_angle:()=>Qg,servo_set_speed:()=>qg,servo_speed_360:()=>Jg,syn6288_builtin_voice:()=>cC,syn6288_get_voice:()=>RC,syn6288_set_voice:()=>OC,syn6288_tts_play:()=>gC});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>lS,actuator_dc_motor_stop:()=>dS,actuator_get_led_bright:()=>QC,actuator_get_led_state:()=>qC,actuator_led_bright:()=>JC,actuator_led_brightness:()=>zC,actuator_mixbot_buzzer_on_off:()=>mS,actuator_mixgo_nova_mic_get:()=>gS,actuator_mixgo_nova_mic_set:()=>cS,actuator_mixgo_nova_onboard_music_pitch:()=>DS,actuator_mixgo_nova_onboard_music_stop:()=>fS,actuator_mixgo_nova_play_audio:()=>LS,actuator_mixgo_nova_play_online_audio:()=>NS,actuator_mixgo_nova_record_audio:()=>AS,actuator_mixgo_nova_voice_get:()=>SS,actuator_mixgo_nova_voice_set:()=>CS,actuator_mixgo_zero_led_color:()=>jC,actuator_onboard_neopixel_rgb:()=>sS,actuator_onboard_neopixel_rgb_all:()=>_S,actuator_onboard_neopixel_rgb_show_all_chase:()=>oS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>pS,actuator_onboard_neopixel_write:()=>nS,actuator_stepper_keep:()=>uS,actuator_stepper_stop:()=>rS,analog_ble_keyboard_init:()=>GS,analog_ble_keyboard_input:()=>kS,analog_ble_keyboard_send_battery:()=>WS,analog_ble_keyboard_str:()=>HS,analog_ble_mouse_init:()=>KS,analog_ble_mouse_input:()=>qS,analog_ble_mouse_send_battery:()=>zS,analog_keyboard_input:()=>YS,analog_keyboard_str:()=>VS,analog_mouse_input:()=>bS,bitbot_motor:()=>RS,bitbot_move:()=>ES,bitbot_stop:()=>OS,ble_keyboard_connect:()=>wS,ble_keyboard_get_mac:()=>US,ble_mouse_connect:()=>QS,ble_mouse_get_mac:()=>JS,cc_number:()=>ZC,esp32_music_get_tempo:()=>BC,esp32_music_reset:()=>HC,esp32_music_set_tempo:()=>VC,esp32_onboard_music_pitch:()=>GC,esp32_onboard_music_pitch_with_time:()=>UC,esp32_onboard_music_play_list:()=>kC,esp32_onboard_music_stop:()=>wC,general_key:()=>XS,general_key_tuple:()=>BS,get_power_output:()=>PS,ledswitch:()=>KC,mixbot_motor:()=>MS,mixbot_motor_status:()=>IS,mixbot_move:()=>TS,mixbot_stop:()=>hS,mouse_key:()=>yS,number:()=>WC,rm_actuator_get_led_bright:()=>tS,rm_actuator_get_led_state:()=>eS,rm_actuator_led_bright:()=>$C,rm_actuator_led_brightness:()=>iS,rm_motor:()=>aS,set_all_power_output:()=>vS,set_power_output:()=>FS,special_key:()=>xS});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>fA,ai_sensor_ailocal_class:()=>EA,ai_sensor_ailocal_class_result:()=>OA,ai_sensor_ailocal_train:()=>mA,ai_sensor_asr_recognize:()=>SA,ai_sensor_audio_play:()=>cA,ai_sensor_audio_record:()=>RA,ai_sensor_barcode:()=>nA,ai_sensor_circle:()=>uA,ai_sensor_classifier_faces:()=>DA,ai_sensor_color:()=>IA,ai_sensor_color_chases:()=>MA,ai_sensor_color_chases_result:()=>hA,ai_sensor_config:()=>$S,ai_sensor_face:()=>NA,ai_sensor_find_20objects:()=>FA,ai_sensor_find_barcodes:()=>sA,ai_sensor_find_circles:()=>rA,ai_sensor_find_colors:()=>TA,ai_sensor_find_licenseplates:()=>LA,ai_sensor_find_lines:()=>aA,ai_sensor_find_qrcodes:()=>iA,ai_sensor_find_rects:()=>dA,ai_sensor_find_tags:()=>oA,ai_sensor_licenseplate:()=>AA,ai_sensor_line:()=>pA,ai_sensor_qrcode:()=>eA,ai_sensor_qrcode_lite:()=>ZS,ai_sensor_rect:()=>lA,ai_sensor_rgb:()=>tA,ai_sensor_tag:()=>_A,ai_sensor_use_uart_init:()=>jS,ai_sensor_yolo_recognize:()=>gA,ai_sensor_yolo_recognize_result:()=>CA});var q={};t.r(q),t.d(q,{MICROPYTHON_AI_Speech_asr:()=>YA,MICROPYTHON_AI_Speech_unit:()=>vA,MICROPYTHON_AI_client:()=>PA});var z={};t.r(z),t.d(z,{mpython_blynk_app_data:()=>WA,mpython_blynk_app_notify:()=>GA,mpython_blynk_email:()=>KA,mpython_blynk_get_timers:()=>wA,mpython_blynk_on_connected:()=>yA,mpython_blynk_on_disconnected:()=>bA,mpython_blynk_run:()=>BA,mpython_blynk_sensor_data_to_app:()=>HA,mpython_blynk_set_property:()=>JA,mpython_blynk_setup:()=>QA,mpython_blynk_stop_timers:()=>UA,mpython_blynk_sync_virtual:()=>XA,mpython_blynk_terminal_widget_vpin:()=>xA,mpython_blynktimer:()=>kA,mpython_blynktimer_run:()=>VA});var j={};t.r(j),t.d(j,{communicate_bluetooth_central_init:()=>fL,communicate_bluetooth_connect:()=>vL,communicate_bluetooth_disconnect:()=>YL,communicate_bluetooth_handle:()=>BL,communicate_bluetooth_is_connected:()=>XL,communicate_bluetooth_mac:()=>xL,communicate_bluetooth_peripheral_init:()=>FL,communicate_bluetooth_recv:()=>VL,communicate_bluetooth_recv_only:()=>yL,communicate_bluetooth_scan:()=>PL,communicate_bluetooth_send:()=>bL,communicate_espnow_init:()=>GL,communicate_espnow_init_new:()=>UL,communicate_i2c_available:()=>iL,communicate_i2c_init:()=>jA,communicate_i2c_master_read:()=>eL,communicate_i2c_onboard:()=>qA,communicate_i2c_read:()=>ZA,communicate_i2c_scan:()=>tL,communicate_i2c_write:()=>$A,communicate_ir_recv_init:()=>OL,communicate_ir_send_init:()=>SL,communicate_ow_init:()=>IL,communicate_ow_read:()=>ML,communicate_ow_reset:()=>hL,communicate_ow_scan:()=>TL,communicate_ow_select:()=>EL,communicate_ow_write:()=>mL,communicate_spi_buffer:()=>oL,communicate_spi_init:()=>sL,communicate_spi_onboard:()=>zA,communicate_spi_read:()=>pL,communicate_spi_read_output:()=>aL,communicate_spi_readinto:()=>uL,communicate_spi_readinto_output:()=>rL,communicate_spi_set:()=>_L,communicate_spi_write:()=>lL,communicate_spi_write_readinto:()=>dL,espnow_radio_channel:()=>JL,espnow_radio_channel_new:()=>qL,espnow_radio_on_off:()=>zL,espnow_radio_rec:()=>ZL,espnow_radio_recv:()=>tN,espnow_radio_recv_certain_msg:()=>eN,espnow_radio_recv_certain_msg_new:()=>nN,espnow_radio_recv_msg:()=>$L,espnow_radio_recv_new:()=>iN,espnow_radio_send:()=>jL,espnow_radio_txpower:()=>QL,i2c_slave_onreceive:()=>nL,internal_variable:()=>RL,ir_recv_timeout:()=>CL,ir_transmit_busy:()=>DL,ir_transmit_conventional_data:()=>AL,ir_transmit_raw_code:()=>NL,ir_transmit_study_code:()=>LL,ir_whether_recv:()=>gL,lora_init:()=>sN,lora_packet:()=>_N,lora_recv:()=>pN,lora_send:()=>oN,network_espnow_info:()=>kL,network_espnow_mac:()=>wL,network_espnow_recv:()=>HL,network_espnow_recv_handle:()=>KL,network_espnow_send:()=>WL,recv_fun:()=>cL,urequests_attribute:()=>uN,urequests_get:()=>aN,urequests_method:()=>rN});var Z={};t.r(Z),t.d(Z,{display_animate:()=>XN,display_circle:()=>bN,display_color_seclet:()=>JN,display_draw_4strings:()=>DN,display_fill:()=>xN,display_lcd_use_i2c_init:()=>$N,display_line:()=>PN,display_line_arbitrarily:()=>fN,display_matrix_extern_bright_point:()=>cN,display_matrix_extern_bright_screen:()=>CN,display_matrix_extern_clear:()=>EN,display_matrix_extern_get_pixel:()=>RN,display_matrix_extern_get_screen_pixel:()=>gN,display_matrix_extern_image_builtins:()=>SN,display_matrix_extern_scroll_string:()=>MN,display_matrix_extern_scroll_string_delay:()=>mN,display_matrix_extern_shift:()=>ON,display_matrix_extern_show_frame_string:()=>TN,display_matrix_extern_show_frame_string_delay:()=>hN,display_matrix_extern_show_image:()=>dN,display_matrix_extern_show_image_or_string_delay:()=>IN,display_matrix_use_i2c_init:()=>lN,display_oled_drawPixel:()=>BN,display_oled_showBitmap:()=>VN,display_oled_use_i2c_init:()=>sD,display_onoff:()=>vN,display_rect:()=>FN,display_tm1650_power:()=>UN,display_tm1650_set_brightness:()=>HN,display_tm1650_show_dot:()=>kN,display_tm1650_show_num:()=>wN,display_tm_use_i2c_init:()=>GN,display_triangle:()=>yN,display_use_i2c_init:()=>NN,extern_oled_bright_point:()=>MD,extern_oled_clear:()=>ID,extern_oled_get_pixel:()=>hD,extern_oled_hvline:()=>ED,extern_oled_line:()=>OD,extern_oled_scroll_string:()=>lD,extern_oled_scroll_string_delay:()=>dD,extern_oled_shape_rect:()=>mD,extern_oled_shift:()=>TD,extern_oled_show_frame_string:()=>uD,extern_oled_show_frame_string_delay:()=>rD,extern_oled_show_image:()=>_D,extern_oled_show_image_or_string_delay:()=>aD,extern_oled_show_image_xy:()=>oD,extern_oled_show_string:()=>pD,image_shift:()=>YN,lcd_backlight:()=>iD,lcd_clear:()=>nD,lcd_print_string:()=>eD,lcd_show_image_or_string_delay:()=>tD,matrix_extern_image_arithmetic:()=>AN,matrix_extern_image_invert:()=>LN,tft_fill:()=>jN,tft_line_arbitrarily:()=>ZN,tft_scroll_string_delay:()=>zN,tft_show_frame_string_delay:()=>qN,tft_show_image_or_string_delay:()=>QN,tft_show_image_xy:()=>KN,tft_use_spi_init:()=>WN});var $={};t.r($),t.d($,{bitbot_display_image_create:()=>sf,display_bright_point:()=>xD,display_bright_screen:()=>bD,display_clear:()=>fD,display_get_pixel:()=>YD,display_get_screen_pixel:()=>XD,display_image_builtins:()=>LD,display_image_builtins_all:()=>ND,display_image_create:()=>DD,display_scroll_string:()=>SD,display_scroll_string_delay:()=>AD,display_shift:()=>vD,display_show_frame_string:()=>gD,display_show_frame_string_delay:()=>CD,display_show_image:()=>RD,display_show_image_or_string_delay:()=>cD,draw_pointer:()=>Df,image_arithmetic:()=>FD,image_invert:()=>PD,mixbot_display_bright_screen:()=>ef,mixbot_display_get_ambientbright:()=>tf,mixbot_display_get_screen_pixel:()=>$D,mixbot_display_image_create:()=>ZD,mixbot_display_rotate:()=>nf,mixgo_display_image_create_new:()=>GD,mixgome_display_font:()=>BD,mixgome_display_image_create:()=>yD,mixgomini_display_image_create:()=>VD,mpython_display_hvline:()=>zD,mpython_display_line:()=>jD,mpython_display_shape_rect:()=>qD,mpython_pbm_image:()=>UD,onboard_oled_bright_point:()=>QD,onboard_oled_scroll_string_delay:()=>JD,onboard_oled_show_frame_string_delay:()=>KD,onboard_oled_show_image:()=>wD,onboard_oled_show_image_or_string_delay:()=>WD,onboard_oled_show_image_xy:()=>kD,onboard_oled_show_string:()=>HD,onboard_tft_bright_point:()=>Ef,onboard_tft_bright_screen:()=>Rf,onboard_tft_clear:()=>hf,onboard_tft_clock_clear:()=>Lf,onboard_tft_clock_draw:()=>Af,onboard_tft_clock_get_rtctime:()=>Cf,onboard_tft_clock_init:()=>gf,onboard_tft_clock_set_time:()=>Sf,onboard_tft_display_hvline:()=>If,onboard_tft_display_line:()=>Tf,onboard_tft_display_shape_circle:()=>Nf,onboard_tft_display_shape_rect:()=>df,onboard_tft_fill:()=>cf,onboard_tft_get_pixel:()=>mf,onboard_tft_get_screen_pixel:()=>Of,onboard_tft_scroll_string:()=>rf,onboard_tft_scroll_string_delay:()=>lf,onboard_tft_shift:()=>Mf,onboard_tft_show_frame_string:()=>af,onboard_tft_show_frame_string_delay:()=>uf,onboard_tft_show_image:()=>_f,onboard_tft_show_image_or_string_delay:()=>pf,onboard_tft_show_image_xy:()=>of});var tt={};t.r(tt),t.d(tt,{factory_block:()=>bf,factory_block_return:()=>yf,factory_block_return_with_textarea:()=>Bf,factory_block_with_textarea:()=>Vf,factory_callMethod_noreturn:()=>xf,factory_callMethod_return:()=>Xf,factory_declare:()=>Yf,factory_from_import:()=>ff,factory_function_noreturn:()=>Pf,factory_function_return:()=>vf,factory_import:()=>Ff,folding_block:()=>Gf});var et={};t.r(et),t.d(et,{inout_analog_atten:()=>eF,inout_analog_read:()=>Qf,inout_analog_read_init:()=>tF,inout_analog_write:()=>Wf,inout_analog_write_init:()=>$f,inout_analog_write_set:()=>Kf,inout_digital_init:()=>jf,inout_digital_read:()=>kf,inout_digital_write:()=>wf,inout_highlow:()=>Uf,inout_pin_attachInterrupt:()=>zf,inout_pin_pressed:()=>qf,inout_pin_pressed_init:()=>iF,inout_pwm_analog_write:()=>Hf,inout_pwm_analog_write_init:()=>Zf,inout_pwm_analog_write_set_freq:()=>Jf});var it={};t.r(it),t.d(it,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>cF,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>OF,IOT_EMQX_PING:()=>gF,IOT_FORMATTING:()=>mF,IOT_FORMAT_STRING:()=>EF,IOT_MIXIO_NTP:()=>CF,IOT_MIXIO_PUBLISH:()=>rF,IOT_MIXIO_SUBSCRIBE:()=>lF,iot_client_onboard:()=>SF,iot_http_client:()=>AF,iot_http_data:()=>LF,iot_mixio_check:()=>TF,iot_mixio_connect:()=>uF,iot_mixio_connect_only:()=>IF,iot_mixio_disconnect:()=>dF,iot_mixio_format_msg:()=>MF,iot_mixio_format_topic:()=>hF,iot_mixly_key:()=>RF,iot_mqtt_client:()=>NF,iot_mqtt_data:()=>DF,iot_onenet_check:()=>pF,iot_onenet_connect:()=>sF,iot_onenet_disconnect:()=>_F,iot_onenet_publish:()=>aF,iot_onenet_publish_dict:()=>oF,iot_wifi_connect:()=>nF});var nt={};t.r(nt),t.d(nt,{network_ap_connect:()=>yF,network_connect:()=>FF,network_get_connect:()=>vF,network_get_wifi:()=>bF,network_init:()=>fF,network_is_active:()=>XF,network_open:()=>xF,network_scan:()=>VF,network_server:()=>BF,network_socket_accept:()=>HF,network_socket_bind:()=>UF,network_socket_close:()=>qF,network_socket_connect:()=>wF,network_socket_init:()=>GF,network_socket_listen:()=>kF,network_socket_receive:()=>WF,network_socket_receive_from:()=>JF,network_socket_send:()=>KF,network_socket_send_to:()=>QF,network_stop:()=>YF,network_wifi_connect:()=>PF,ntptime_address:()=>tP,ntptime_time:()=>$F,requests_attribute:()=>jF,requests_attribute2:()=>iP,requests_get:()=>zF,requests_get2:()=>eP,requests_method:()=>ZF,requests_post:()=>nP});var st={};t.r(st),t.d(st,{get_potential_num:()=>sP,nova_g1_motor:()=>_P,nova_g1_spk_en:()=>pP,nova_g1_usb:()=>oP});var _t={};t.r(_t),t.d(_t,{pe_g1_battery_left:()=>uP,pe_g1_dc_motor:()=>rP,pe_g1_dc_motor_speed:()=>lP,pe_g1_servo_get_angle:()=>TP,pe_g1_servo_get_speed:()=>hP,pe_g1_servo_set_angle:()=>dP,pe_g1_servo_set_speed:()=>IP,pe_g1_use_i2c_init:()=>aP});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>sv,PS2_Button:()=>pv,PS2_Buttons:()=>av,PS2_Buttons_new:()=>Mv,PS2_State:()=>uv,PS2_init:()=>_v,PS2_init_new:()=>Tv,PS2_stk:()=>rv,PS2_stk_new:()=>mv,PS2_vibration:()=>ov,PS2_vibration_new:()=>hv,RTC_get_time:()=>dv,RTC_set_date:()=>CP,RTC_set_datetime:()=>lv,RTC_set_time:()=>gP,esp32_s2_weather_init:()=>tv,esp32_s2_weather_rain:()=>iv,esp32_s2_weather_wd:()=>ev,esp32_s2_weather_ws:()=>nv,extern_rfid_read:()=>wP,extern_rfid_readcontent:()=>HP,extern_rfid_readid:()=>kP,extern_rfid_status:()=>JP,extern_rfid_write:()=>WP,extern_rfid_write_return:()=>KP,gnss_get_data:()=>Rv,gnss_have_data:()=>cv,mixbot_sensor_extern_get_addr:()=>Fv,mixbot_sensor_extern_set_addr:()=>Pv,pm25_get_data:()=>Ov,robot_button_extern_get_value:()=>gv,robot_color_extern_get_value:()=>Nv,robot_infrared_extern_get_value:()=>Sv,robot_infrared_extern_grey_get_value:()=>Av,robot_potentiometer_extern_get_value:()=>Lv,robot_sonar_extern_get_value:()=>Dv,robot_sonar_extern_led:()=>fv,robot_touch_extern_get_value:()=>Cv,sensor_APDS9960_extern:()=>vP,sensor_DS18X20:()=>bv,sensor_LTR308_extern:()=>YP,sensor_LTR390UV_extern:()=>bP,sensor_MAX30102_extern:()=>PP,sensor_QMC5883L_extern:()=>yP,sensor_VL530LX_extern:()=>GP,sensor_aht11_extern:()=>BP,sensor_bmp:()=>DP,sensor_dht11:()=>Iv,sensor_distance_hrsc04:()=>cP,sensor_hp203_extern:()=>xP,sensor_ltr381_extern:()=>XP,sensor_mixgo_extern_button_attachInterrupt:()=>OP,sensor_mixgo_extern_button_get_presses:()=>EP,sensor_mixgo_extern_button_is_pressed:()=>MP,sensor_mixgo_extern_button_was_pressed:()=>mP,sensor_mixgo_extern_light:()=>SP,sensor_mixgo_extern_pin_near:()=>LP,sensor_mixgo_extern_sound:()=>AP,sensor_mixgoce_hot_wheel_degrees:()=>$P,sensor_mixgoce_hot_wheel_is_touched:()=>ZP,sensor_mpu9250_attachGestureInterrupt:()=>RP,sensor_rtc_init:()=>NP,sensor_sht:()=>fP,sensor_shtc3_extern:()=>VP,sensor_use_i2c_init:()=>FP,sensor_use_spi_init:()=>UP,sensor_use_uart_init:()=>Ev,sensor_weather_solo_init:()=>vv,sensor_weather_solo_rain:()=>Xv,sensor_weather_solo_wd:()=>Yv,sensor_weather_solo_ws:()=>xv,weather_data:()=>QP,weather_have_data:()=>qP,weather_set_label:()=>jP,weather_uart_mixio:()=>zP});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>Wv,bitbot_als_num:()=>rx,dht11:()=>Ex,number1:()=>Kv,number2:()=>Jv,number3:()=>Qv,number4:()=>qv,number5:()=>zv,number6:()=>jv,number7:()=>Zv,onboard_RTC_get_time:()=>UY,onboard_RTC_get_time_str:()=>HY,onboard_RTC_get_timestamp:()=>wY,onboard_RTC_set_datetime:()=>BY,onboard_RTC_settime_string:()=>GY,onboard_RTC_timestamp_totuple:()=>kY,rfid_readcontent:()=>IY,rfid_readid:()=>dY,rfid_write:()=>TY,rfid_write_return:()=>hY,sensor_LTR308:()=>pY,sensor_adxl345_get_acceleration:()=>SY,sensor_aht11:()=>rY,sensor_bitbot_ALS:()=>ux,sensor_button_get_presses:()=>Ix,sensor_button_is_pressed:()=>lx,sensor_button_was_pressed:()=>dx,sensor_compass_reset:()=>FY,sensor_ds18x20:()=>_Y,sensor_eulerangles:()=>mY,sensor_get_acceleration:()=>MY,sensor_get_temperature:()=>lY,sensor_hp203:()=>uY,sensor_light:()=>mx,sensor_lm35:()=>oY,sensor_mixbot_get_gyro:()=>ax,sensor_mixbot_patrol_calibrate:()=>_x,sensor_mixbot_patrol_value:()=>ox,sensor_mixbot_temperature:()=>px,sensor_mixgo_LTR308:()=>nY,sensor_mixgo_button_attachInterrupt:()=>Gv,sensor_mixgo_button_get_presses:()=>Bv,sensor_mixgo_button_is_pressed:()=>yv,sensor_mixgo_button_was_pressed:()=>Vv,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>JY,sensor_mixgo_cc_mmc5603_get_angle:()=>KY,sensor_mixgo_cc_mmc5603_get_magnetic:()=>WY,sensor_mixgo_light:()=>Mx,sensor_mixgo_nova_LTR308:()=>sY,sensor_mixgo_nova_pin_near:()=>iY,sensor_mixgo_pin_near:()=>eY,sensor_mixgo_pin_near_double:()=>tY,sensor_mixgo_pin_near_single:()=>$v,sensor_mixgo_pin_pressed:()=>gY,sensor_mixgo_touch_slide:()=>cY,sensor_mixgocar42_button_attachInterrupt:()=>Hv,sensor_mixgocar42_button_get_presses:()=>kv,sensor_mixgocar42_button_is_pressed:()=>Uv,sensor_mixgocar42_button_was_pressed:()=>wv,sensor_mixgocar_battery_left:()=>sx,sensor_mixgocar_pin_near:()=>ix,sensor_mixgocar_pin_near_line:()=>ex,sensor_mixgocar_pin_near_state_change:()=>nx,sensor_mixgoce_pin_pressed:()=>RY,sensor_mixgoce_temperature:()=>qY,sensor_mixgome_temperature:()=>QY,sensor_mpu9250_calibrate_compass:()=>NY,sensor_mpu9250_field_strength:()=>fY,sensor_mpu9250_gesture:()=>EY,sensor_mpu9250_get_acceleration:()=>OY,sensor_mpu9250_get_gyro:()=>LY,sensor_mpu9250_get_magnetic:()=>AY,sensor_mpu9250_temperature:()=>DY,sensor_mpython_pin_pressed:()=>CY,sensor_mpython_qmi8658_get_gyro:()=>zY,sensor_mpython_qmi8658_temperature:()=>jY,sensor_onboard_compass_reset:()=>VY,sensor_onboard_mpu9250_calibrate_compass:()=>XY,sensor_onboard_mpu9250_field_strength:()=>yY,sensor_onboard_mpu9250_gesture:()=>PY,sensor_onboard_mpu9250_get_acceleration:()=>vY,sensor_onboard_mpu9250_get_gyro:()=>xY,sensor_onboard_mpu9250_get_magnetic:()=>YY,sensor_onboard_mpu9250_temperature:()=>bY,sensor_pin_near:()=>hx,sensor_pin_pressed:()=>Tx,sensor_rm_acc:()=>tx,sensor_rm_battery_left:()=>$Y,sensor_rm_pin_near_double:()=>ZY,sensor_sound:()=>aY});var at={};t.r(at),t.d(at,{serial_any:()=>Cx,serial_print:()=>Ox,serial_print_byte:()=>Rx,serial_print_hex:()=>gx,serial_println:()=>cx,serial_read_from_ai:()=>xx,serial_readline:()=>Ax,serial_readstr:()=>Sx,serial_send_to_ai:()=>Yx,serial_softserial:()=>Lx,serial_softserial_new:()=>Nx,system_input:()=>Dx,system_print:()=>fx,system_print_end:()=>Px,system_print_inline:()=>Fx,system_print_many:()=>vx});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>Kx,Timer_init:()=>pX,base_delay:()=>rX,controls_delay:()=>jx,controls_delay_new:()=>Zx,controls_end_program:()=>Qx,controls_millis:()=>Jx,controls_uname:()=>zx,reset:()=>qx,system_bitbot_shutdown:()=>oX,system_device_name:()=>Hx,system_device_serial_number:()=>Wx,system_event_bus_source:()=>wx,system_event_bus_value:()=>kx,system_machine_reset:()=>_X,system_on_event:()=>Bx,system_raise_event:()=>Vx,system_reset:()=>bx,system_run_in_background:()=>Xx,system_ticks_diff:()=>eX,system_timer:()=>tX,system_timer_init:()=>iX,system_timestamp:()=>Gx,system_value:()=>Ux,system_wait:()=>yx,system_wdt_feed:()=>sX,system_wdt_init:()=>nX,time_ticks_diff:()=>uX,timer:()=>$x,timer2:()=>aX});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>CX,Air_now_content:()=>MX,Geo_moon_content:()=>AX,Geo_sun_content:()=>SX,Life_suggestion_content:()=>EX,Location_search_content:()=>RX,Tide_daily_content:()=>OX,WEATHER_DAILY:()=>dX,WEATHER_HOUR:()=>IX,WEATHER_NOW:()=>lX,Weather_alarm_content:()=>mX,Weather_daily:()=>cX,Weather_daily_content:()=>gX,Weather_now:()=>TX,Weather_now_content:()=>hX});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>qX,inout_analog_atten:()=>yX,inout_analog_read:()=>bX,inout_analog_read_init:()=>kX,inout_analog_write:()=>YX,inout_analog_write_init:()=>wX,inout_analog_write_set:()=>xX,inout_analog_write_set_freq:()=>KX,inout_digital_init:()=>GX,inout_digital_read:()=>PX,inout_digital_write:()=>FX,inout_highlow:()=>fX,inout_pinMode:()=>WX,inout_pin_attachInterrupt:()=>BX,inout_pin_pressed:()=>VX,inout_pin_pressed_init:()=>HX,inout_pwm_analog_write:()=>vX,inout_pwm_analog_write_init:()=>UX,inout_pwm_analog_write_set_freq:()=>XX,pin_pressed:()=>QX,pin_pressed_init:()=>JX});var dt={};t.r(dt),t.d(dt,{analog_input:()=>sb,analog_output:()=>ob,espnow_channel:()=>eb,haskylens_model:()=>ib,i2c_A_pin:()=>pb,i2c_B_pin:()=>ab,pins_analog:()=>Ib,pins_analog_pin:()=>Tb,pins_axis:()=>Pb,pins_brightness:()=>vb,pins_builtinimg:()=>Sb,pins_builtinimg_extern:()=>Ab,pins_button:()=>mb,pins_buttonB:()=>Eb,pins_dac:()=>hb,pins_dac_pin:()=>Mb,pins_digital:()=>jX,pins_digital_dot:()=>Gb,pins_digital_pin:()=>ZX,pins_exlcdh:()=>fb,pins_exlcdv:()=>Fb,pins_imglist:()=>Lb,pins_input_pin:()=>$X,pins_one_more:()=>Bb,pins_output_pin:()=>tb,pins_playlist:()=>Nb,pins_playlist_extern:()=>Db,pins_pwm:()=>Ob,pins_pwm_pin:()=>Rb,pins_radio_datarate:()=>Vb,pins_radio_power:()=>yb,pins_serial:()=>Cb,pins_tone_notes:()=>bb,pins_touch:()=>gb,pins_touch_pin:()=>cb,pins_tts_bgmusic:()=>Xb,pins_tts_builtin_music:()=>xb,pins_tts_voice:()=>Yb,pwm_input:()=>nb,pwm_output:()=>_b,spi_A_pin:()=>ub,spi_B_pin:()=>rb,spi_C_pin:()=>lb,spi_D_pin:()=>db});var It={};t.r(It),t.d(It,{inout_analog_atten:()=>ey,inout_analog_read:()=>Qb,inout_analog_read_init:()=>ty,inout_analog_write:()=>Wb,inout_analog_write_init:()=>$b,inout_analog_write_set:()=>Kb,inout_digital_init:()=>jb,inout_digital_read:()=>kb,inout_digital_write:()=>wb,inout_highlow:()=>Ub,inout_pin_attachInterrupt:()=>zb,inout_pin_pressed:()=>qb,inout_pin_pressed_init:()=>iy,inout_pwm_analog_write:()=>Hb,inout_pwm_analog_write_init:()=>Zb,inout_pwm_analog_write_set_freq:()=>Jb});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>dy,analog_output:()=>Ty,espnow_channel:()=>ry,haskylens_model:()=>ly,i2c_A_pin:()=>hy,i2c_B_pin:()=>My,pins_analog:()=>gy,pins_analog_pin:()=>cy,pins_axis:()=>by,pins_brightness:()=>By,pins_builtinimg:()=>Py,pins_builtinimg_extern:()=>vy,pins_button:()=>sy,pins_buttonB:()=>_y,pins_dac:()=>Ly,pins_dac_pin:()=>Ay,pins_digital:()=>ny,pins_digital_dot:()=>Jy,pins_digital_pin:()=>oy,pins_exlcdh:()=>yy,pins_exlcdv:()=>Vy,pins_imglist:()=>Yy,pins_input_pin:()=>py,pins_interrupt:()=>fy,pins_one_more:()=>Ky,pins_output_pin:()=>ay,pins_playlist:()=>xy,pins_playlist_extern:()=>Xy,pins_pwm:()=>Sy,pins_pwm_input:()=>uy,pins_pwm_pin:()=>Cy,pins_radio_datarate:()=>Wy,pins_radio_power:()=>Hy,pins_serial:()=>Fy,pins_tone_notes:()=>ky,pins_touch:()=>Dy,pins_touch_pin:()=>Ny,pins_tts_bgmusic:()=>wy,pins_tts_builtin_music:()=>Uy,pins_tts_voice:()=>Gy,pwm_output:()=>Iy,spi_A_pin:()=>my,spi_B_pin:()=>Ey,spi_C_pin:()=>Oy,spi_D_pin:()=>Ry});const ht=Blockly,Mt=Mixly,mt={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}},Et=mt; +(()=>{"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:()=>Lt,controls_typeLists:()=>Nt,lists_zip:()=>Dt,lists_zip_container:()=>ft,lists_zip_item:()=>Ft,unpack_iterable_object:()=>Pt,variables_change:()=>St,variables_get:()=>gt,variables_global:()=>At,variables_set:()=>Ct});var i={};t.r(i),t.d(i,{base_setup:()=>Xt,controls_delay:()=>xt,controls_end_program:()=>bt,controls_except:()=>qt,controls_finally:()=>zt,controls_flow_statements:()=>wt,controls_for:()=>kt,controls_forEach:()=>Bt,controls_for_range:()=>Ht,controls_if:()=>yt,controls_if_else:()=>Jt,controls_if_elseif:()=>Kt,controls_if_if:()=>Wt,controls_lambda:()=>Zt,controls_main:()=>Yt,controls_pass:()=>$t,controls_range:()=>Vt,controls_repeat_ext:()=>jt,controls_thread:()=>te,controls_try:()=>Qt,controls_try_finally:()=>Ut,controls_whileUntil:()=>Gt,datetime_fromtimestamp:()=>oe,do_while:()=>ee,garbage_collection:()=>ie,get_mem_alloc:()=>ne,get_mem_free:()=>se,get_unique_identifier:()=>_e});var n={};t.r(n),t.d(n,{base_map:()=>Ne,math_arithmetic:()=>le,math_bit:()=>Ie,math_constant:()=>ue,math_constant_mp:()=>re,math_constrain:()=>Re,math_dec:()=>Me,math_indexer_number:()=>ge,math_map:()=>ce,math_max_min:()=>me,math_number:()=>ae,math_number_base_conversion:()=>Ee,math_random:()=>Oe,math_random_seed:()=>Ce,math_round:()=>Se,math_selfcalcu:()=>de,math_to_int:()=>he,math_trig:()=>Te,text_to_number:()=>Ae,text_to_number_skulpt:()=>Le,turn_to_int:()=>De});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:()=>He,text_create_with_container:()=>$e,text_create_with_item:()=>ti,text_encode:()=>_i,text_equals_starts_ends:()=>ke,text_eval:()=>oi,text_find:()=>Je,text_format:()=>Ze,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 _={};t.r(_),t.d(_,{ENUMERATE:()=>ki,enumerate:()=>Hi,list_many_input:()=>Fi,list_tolist:()=>Xi,list_tolist2:()=>wi,list_trig:()=>Ni,lists_2d_get_col_row_data:()=>di,lists_2d_get_data_with_col_row:()=>li,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 o={};t.r(o),t.d(o,{dicts_add_change_del:()=>pn,dicts_add_or_change:()=>Zi,dicts_clear:()=>en,dicts_create_with:()=>Ki,dicts_create_with_container:()=>Ji,dicts_create_with_item:()=>Qi,dicts_create_with_noreturn:()=>rn,dicts_deldict:()=>on,dicts_delete:()=>$i,dicts_get:()=>zi,dicts_get_default:()=>ji,dicts_items:()=>nn,dicts_keys:()=>qi,dicts_length:()=>_n,dicts_pop:()=>an,dicts_setdefault:()=>un,dicts_to_json:()=>dn,dicts_todict:()=>ln,dicts_update:()=>tn,dicts_values:()=>sn,json_to_dicts:()=>In});var p={};t.r(p),t.d(p,{logic_boolean:()=>On,logic_compare:()=>Mn,logic_compare_continous:()=>hn,logic_is:()=>Cn,logic_is_in:()=>gn,logic_negate:()=>En,logic_null:()=>Rn,logic_operation:()=>mn,logic_tobool:()=>Sn,logic_true_or_false:()=>cn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Jn,sdcard_use_spi_init:()=>Kn,storage_can_write_ornot:()=>Yn,storage_change_dir:()=>Hn,storage_close_file:()=>xn,storage_delete_file:()=>yn,storage_file_seek:()=>Gn,storage_file_tell:()=>Bn,storage_file_write:()=>fn,storage_fileopen:()=>Ln,storage_fileopen_new:()=>Nn,storage_fileopen_new_encoding:()=>Dn,storage_get_a_line:()=>vn,storage_get_contents:()=>Pn,storage_get_contents_without_para:()=>Fn,storage_get_current_dir:()=>Un,storage_get_file_size:()=>Vn,storage_get_filename:()=>Xn,storage_is_file:()=>Wn,storage_list_all_files:()=>bn,storage_make_dir:()=>wn,storage_open_file_with_os:()=>An,storage_rename:()=>kn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ts,procedures_callreturn:()=>es,procedures_defnoreturn:()=>zn,procedures_defreturn:()=>jn,procedures_ifreturn:()=>is,procedures_mutatorarg:()=>$n,procedures_mutatorcontainer:()=>Zn,procedures_return:()=>ns});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ms,tuple_create_with:()=>_s,tuple_create_with_container:()=>os,tuple_create_with_item:()=>ps,tuple_create_with_noreturn:()=>Os,tuple_create_with_text2:()=>as,tuple_create_with_text_return:()=>us,tuple_del:()=>ds,tuple_find:()=>hs,tuple_getIndex:()=>rs,tuple_getSublist:()=>Es,tuple_get_random_item:()=>cs,tuple_get_sublist:()=>Rs,tuple_join:()=>Is,tuple_length:()=>ls,tuple_max:()=>Ts,tuple_totuple:()=>gs,tuple_trig:()=>ms});var l={};t.r(l),t.d(l,{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:()=>xs,set_length:()=>Ns,set_operate:()=>Fs,set_operate_update:()=>Ps,set_pop:()=>Ds,set_sub:()=>Ys,set_toset:()=>bs,set_update:()=>Xs});var d={};t.r(d),t.d(d,{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:()=>p_,function_call:()=>s_,function_call_container:()=>__,function_call_item:()=>o_,raw_block:()=>zs,raw_empty:()=>Zs,raw_expression:()=>js,raw_table:()=>qs,text_comment:()=>$s,text_print_multiple:()=>e_,text_print_multiple_container:()=>i_,text_print_multiple_item:()=>n_,type_check:()=>t_});var T={};t.r(T),t.d(T,{controls_type:()=>d_,controls_typeLists:()=>I_,lists_zip:()=>T_,unpack_iterable_object:()=>M_,variables_change:()=>r_,variables_get:()=>a_,variables_global:()=>l_,variables_set:()=>u_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>A_,base_setup:()=>m_,controls_delay:()=>S_,controls_flow_statements:()=>C_,controls_for:()=>R_,controls_forEach:()=>F_,controls_for_range:()=>c_,controls_if:()=>E_,controls_interrupts:()=>D_,controls_lambda:()=>v_,controls_main:()=>h_,controls_millis:()=>L_,controls_nointerrupts:()=>f_,controls_pass:()=>X_,controls_range:()=>P_,controls_repeat:()=>w_,controls_repeat_ext:()=>y_,controls_thread:()=>x_,controls_try_finally:()=>O_,controls_whileUntil:()=>g_,datetime_fromtimestamp:()=>k_,do_while:()=>b_,garbage_collection:()=>V_,get_mem_alloc:()=>B_,get_mem_free:()=>G_,get_unique_identifier:()=>U_,reset:()=>N_,time_sleep:()=>Y_});var h={};t.r(h),t.d(h,{base_map:()=>ro,math_arithmetic:()=>Q_,math_bit:()=>J_,math_constant:()=>W_,math_constant_mp:()=>K_,math_constrain:()=>no,math_dec:()=>Z_,math_indexer_number:()=>oo,math_map:()=>io,math_max_min:()=>to,math_number:()=>H_,math_number_base_conversion:()=>so,math_random:()=>eo,math_random_seed:()=>_o,math_round:()=>po,math_selfcalcu:()=>q_,math_single:()=>z_,math_to_int:()=>$_,math_trig:()=>j_,text_to_number:()=>ao,text_to_number_skulpt:()=>uo,turn_to_int:()=>lo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>mo,char_to_ascii:()=>Eo,number_to_text:()=>Oo,os_system:()=>wo,text:()=>Io,text_capital:()=>Do,text_center:()=>fo,text_char:()=>Mo,text_char_at:()=>go,text_char_at2:()=>co,text_char_at3:()=>Bo,text_compareTo:()=>Vo,text_compare_to:()=>Ao,text_encode:()=>Go,text_equals_starts_ends:()=>So,text_eval:()=>Uo,text_find:()=>Fo,text_format:()=>xo,text_format_noreturn:()=>bo,text_join:()=>ho,text_join_seq:()=>Po,text_length:()=>Ro,text_random_char:()=>Co,text_replace:()=>vo,text_split:()=>Yo,text_strip:()=>Xo,text_substring:()=>No,text_substring2:()=>Lo,text_substring3:()=>yo,text_textarea:()=>To});var E={};t.r(E),t.d(E,{enumerate:()=>cp,list_many_input:()=>ap,list_tolist:()=>Op,list_tolist2:()=>Rp,list_trig:()=>_p,lists_2d_get_col_row_data:()=>Wo,lists_2d_get_data_with_col_row:()=>Ho,lists_append_extend:()=>zo,lists_change_to:()=>pp,lists_change_to_general:()=>rp,lists_clear:()=>ep,lists_create_with:()=>Ko,lists_create_with2:()=>dp,lists_create_with_noreturn:()=>up,lists_create_with_text:()=>Jo,lists_create_with_text2:()=>Ip,lists_del_general:()=>lp,lists_find:()=>ip,lists_getIndex3:()=>Tp,lists_getSublist3:()=>Mp,lists_get_index:()=>Qo,lists_get_random_item:()=>jo,lists_get_random_sublist:()=>Zo,lists_get_sublist:()=>ko,lists_insert_value:()=>$o,lists_insert_value2:()=>mp,lists_pop:()=>sp,lists_remove_at:()=>np,lists_remove_at2:()=>Ep,lists_reverse:()=>tp,lists_setIndex3:()=>hp,lists_set_index:()=>qo,lists_sort:()=>op});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Xp,dicts_add_or_change:()=>Lp,dicts_clear:()=>fp,dicts_create_with:()=>gp,dicts_create_with_noreturn:()=>yp,dicts_deldict:()=>Yp,dicts_delete:()=>Np,dicts_get:()=>Sp,dicts_get_default:()=>Ap,dicts_items:()=>Fp,dicts_keys:()=>Cp,dicts_length:()=>vp,dicts_pop:()=>xp,dicts_setdefault:()=>bp,dicts_to_json:()=>Bp,dicts_todict:()=>Vp,dicts_update:()=>Dp,dicts_values:()=>Pp,json_to_dicts:()=>Gp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Wp,logic_compare:()=>Up,logic_compare_continous:()=>wp,logic_is:()=>qp,logic_is_in:()=>Qp,logic_negate:()=>Hp,logic_null:()=>Kp,logic_operation:()=>kp,logic_tobool:()=>zp,logic_true_or_false:()=>Jp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Oa,sdcard_use_spi_init:()=>Ea,storage_can_write_ornot:()=>_a,storage_change_dir:()=>Ia,storage_close_file:()=>pa,storage_delete_file:()=>ua,storage_file_seek:()=>da,storage_file_tell:()=>la,storage_file_write:()=>ea,storage_fileopen:()=>Zp,storage_fileopen_new:()=>$p,storage_fileopen_new_encoding:()=>ta,storage_get_a_line:()=>sa,storage_get_contents:()=>na,storage_get_contents_without_para:()=>ia,storage_get_current_dir:()=>Ta,storage_get_file_size:()=>ra,storage_get_filename:()=>oa,storage_is_file:()=>ma,storage_list_all_files:()=>aa,storage_make_dir:()=>Ma,storage_open_file_with_os:()=>jp,storage_rename:()=>ha});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ca,procedures_callreturn:()=>ga,procedures_defnoreturn:()=>ca,procedures_defreturn:()=>Ra,procedures_ifreturn:()=>Sa,procedures_return:()=>Aa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Xa,tuple_create_with:()=>La,tuple_create_with_noreturn:()=>Va,tuple_create_with_text2:()=>Na,tuple_create_with_text_return:()=>Da,tuple_del:()=>Pa,tuple_find:()=>xa,tuple_getIndex:()=>fa,tuple_getSublist:()=>ya,tuple_get_random_item:()=>Ga,tuple_get_sublist:()=>Ba,tuple_join:()=>va,tuple_length:()=>Fa,tuple_max:()=>Ya,tuple_totuple:()=>Ua,tuple_trig:()=>ba});var S={};t.r(S),t.d(S,{set_add_discard:()=>Qa,set_clear:()=>Wa,set_create_with:()=>wa,set_create_with_text_return:()=>ja,set_length:()=>ka,set_operate:()=>Ka,set_operate_update:()=>Ja,set_pop:()=>Ha,set_sub:()=>qa,set_toset:()=>Za,set_update:()=>za});var A={};t.r(A),t.d(A,{html_content:()=>iu,html_content_more:()=>nu,html_document:()=>$a,html_form:()=>_u,html_head_body:()=>eu,html_style:()=>su,html_style_content:()=>ou,html_text:()=>pu,html_title:()=>tu});var L={};t.r(L),t.d(L,{attribute_access:()=>Tu,function_call:()=>Iu,raw_block:()=>au,raw_empty:()=>ru,raw_expression:()=>uu,raw_table:()=>lu,type_check:()=>du});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Lu,actuator_extern_get_led_state:()=>Nu,actuator_extern_led_bright:()=>Au,actuator_extern_led_brightness:()=>Du,actuator_ms32006_dcmotor:()=>yu,actuator_ms32006_init:()=>bu,actuator_ms32006_stepper:()=>Vu,actuator_neopixel_init:()=>Bu,actuator_neopixel_rgb:()=>Gu,actuator_neopixel_rgb_all:()=>Uu,actuator_neopixel_write:()=>wu,actuator_use_uart_init:()=>ku,esp32_music_get_tempo_extern:()=>gu,esp32_music_pitch:()=>Eu,esp32_music_pitch_init:()=>mu,esp32_music_pitch_with_time:()=>Ou,esp32_music_play_list:()=>Ru,esp32_music_reset_extern:()=>Cu,esp32_music_set_tempo_extern:()=>cu,esp32_music_stop:()=>Su,mixbot_actuator_extern_get_addr:()=>pr,mixbot_actuator_extern_set_addr:()=>ar,mixbot_addr_extern:()=>Qu,robot_led_extern:()=>Zu,robot_led_extern_get_value:()=>$u,robot_motor_extern:()=>qu,robot_motor_extern_get_speed:()=>zu,robot_servo_extern_absolute_run:()=>nr,robot_servo_extern_get_status:()=>tr,robot_servo_extern_relative_continue:()=>or,robot_servo_extern_relative_origin:()=>sr,robot_servo_extern_relative_run:()=>_r,robot_servo_extern_stop:()=>ir,robot_servo_extern_stop_mode:()=>er,robot_traffic_light_extern:()=>ju,servo_get_angle:()=>Xu,servo_get_speed:()=>xu,servo_init:()=>fu,servo_move:()=>Fu,servo_set_angle:()=>vu,servo_set_speed:()=>Yu,servo_speed_360:()=>Pu,syn6288_builtin_voice:()=>Ku,syn6288_get_voice:()=>Wu,syn6288_set_voice:()=>Hu,syn6288_tts_play:()=>Ju});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Gr,actuator_dc_motor_stop:()=>Ur,actuator_get_led_bright:()=>Ir,actuator_get_led_state:()=>Tr,actuator_led_bright:()=>dr,actuator_led_brightness:()=>Mr,actuator_mixbot_buzzer_on_off:()=>Kr,actuator_mixgo_nova_mic_get:()=>jr,actuator_mixgo_nova_mic_set:()=>zr,actuator_mixgo_nova_onboard_music_pitch:()=>nl,actuator_mixgo_nova_onboard_music_stop:()=>sl,actuator_mixgo_nova_play_audio:()=>el,actuator_mixgo_nova_play_online_audio:()=>il,actuator_mixgo_nova_record_audio:()=>tl,actuator_mixgo_nova_voice_get:()=>$r,actuator_mixgo_nova_voice_set:()=>Zr,actuator_mixgo_zero_led_color:()=>hr,actuator_onboard_neopixel_rgb:()=>gr,actuator_onboard_neopixel_rgb_all:()=>Cr,actuator_onboard_neopixel_rgb_show_all_chase:()=>Ar,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Sr,actuator_onboard_neopixel_write:()=>Lr,actuator_rm_onboard_neopixel_rgb:()=>Nr,actuator_rm_onboard_neopixel_rgb_all:()=>Dr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>fr,actuator_stepper_keep:()=>Vr,actuator_stepper_stop:()=>Br,analog_ble_keyboard_init:()=>ml,analog_ble_keyboard_input:()=>Rl,analog_ble_keyboard_send_battery:()=>gl,analog_ble_keyboard_str:()=>cl,analog_ble_mouse_init:()=>Cl,analog_ble_mouse_input:()=>Ll,analog_ble_mouse_send_battery:()=>Nl,analog_keyboard_input:()=>al,analog_keyboard_str:()=>hl,analog_mouse_input:()=>Tl,bitbot_motor:()=>qr,bitbot_move:()=>Jr,bitbot_stop:()=>Qr,ble_keyboard_connect:()=>Ol,ble_keyboard_get_mac:()=>El,ble_mouse_connect:()=>Al,ble_mouse_get_mac:()=>Sl,cc_number:()=>cr,esp32_music_get_tempo:()=>Pr,esp32_music_reset:()=>vr,esp32_music_set_tempo:()=>Fr,esp32_onboard_music_pitch:()=>Yr,esp32_onboard_music_pitch_with_time:()=>Xr,esp32_onboard_music_play_list:()=>br,esp32_onboard_music_stop:()=>xr,general_key:()=>rl,general_key_tuple:()=>ll,generalkey_container:()=>dl,generalkey_create_with_item:()=>Il,get_power_output:()=>ol,ledswitch:()=>lr,mixbot_motor:()=>Wr,mixbot_motor_status:()=>wr,mixbot_move:()=>kr,mixbot_stop:()=>Hr,mouse_key:()=>Ml,number:()=>rr,rm_actuator_get_led_bright:()=>Er,rm_actuator_get_led_state:()=>Or,rm_actuator_led_bright:()=>mr,rm_actuator_led_brightness:()=>Rr,rm_motor:()=>yr,set_all_power_output:()=>pl,set_power_output:()=>_l,special_key:()=>ul});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>pd,ai_sensor_ailocal_class:()=>zl,ai_sensor_ailocal_class_result:()=>jl,ai_sensor_ailocal_train:()=>ql,ai_sensor_asr_recognize:()=>id,ai_sensor_audio_play:()=>$l,ai_sensor_audio_record:()=>Zl,ai_sensor_barcode:()=>xl,ai_sensor_circle:()=>Ul,ai_sensor_classifier_faces:()=>od,ai_sensor_color:()=>Wl,ai_sensor_color_chases:()=>Ql,ai_sensor_color_chases_result:()=>Jl,ai_sensor_config:()=>Yl,ai_sensor_face:()=>_d,ai_sensor_find_20objects:()=>ad,ai_sensor_find_barcodes:()=>bl,ai_sensor_find_circles:()=>wl,ai_sensor_find_colors:()=>Kl,ai_sensor_find_licenseplates:()=>sd,ai_sensor_find_lines:()=>Gl,ai_sensor_find_qrcodes:()=>vl,ai_sensor_find_rects:()=>Hl,ai_sensor_find_tags:()=>Vl,ai_sensor_licenseplate:()=>nd,ai_sensor_line:()=>Bl,ai_sensor_qrcode:()=>Fl,ai_sensor_qrcode_lite:()=>Pl,ai_sensor_rect:()=>kl,ai_sensor_rgb:()=>Xl,ai_sensor_tag:()=>yl,ai_sensor_use_uart_init:()=>fl,ai_sensor_yolo_recognize:()=>td,ai_sensor_yolo_recognize_result:()=>ed});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>ld,MICROPYTHON_AI_Speech_unit:()=>rd,MICROPYTHON_AI_client:()=>ud});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Ld,mpython_blynk_app_notify:()=>Od,mpython_blynk_email:()=>gd,mpython_blynk_get_timers:()=>Cd,mpython_blynk_on_connected:()=>hd,mpython_blynk_on_disconnected:()=>Md,mpython_blynk_run:()=>Ed,mpython_blynk_sensor_data_to_app:()=>Ad,mpython_blynk_set_property:()=>cd,mpython_blynk_setup:()=>Nd,mpython_blynk_stop_timers:()=>Rd,mpython_blynk_sync_virtual:()=>Td,mpython_blynk_terminal_widget_vpin:()=>Id,mpython_blynktimer:()=>Sd,mpython_blynktimer_run:()=>md});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>uI,communicate_bluetooth_connect:()=>II,communicate_bluetooth_disconnect:()=>TI,communicate_bluetooth_handle:()=>OI,communicate_bluetooth_is_connected:()=>hI,communicate_bluetooth_mac:()=>dI,communicate_bluetooth_peripheral_init:()=>rI,communicate_bluetooth_recv:()=>mI,communicate_bluetooth_recv_only:()=>EI,communicate_bluetooth_scan:()=>lI,communicate_bluetooth_send:()=>MI,communicate_espnow_init:()=>RI,communicate_espnow_init_new:()=>cI,communicate_i2c_available:()=>Wd,communicate_i2c_init:()=>Pd,communicate_i2c_master_read:()=>Hd,communicate_i2c_onboard:()=>fd,communicate_i2c_read:()=>vd,communicate_i2c_scan:()=>Xd,communicate_i2c_write:()=>Yd,communicate_ir_recv_init:()=>$d,communicate_ir_send_init:()=>sI,communicate_ow_init:()=>Jd,communicate_ow_read:()=>qd,communicate_ow_reset:()=>Zd,communicate_ow_scan:()=>Qd,communicate_ow_select:()=>jd,communicate_ow_write:()=>zd,communicate_spi_buffer:()=>yd,communicate_spi_init:()=>xd,communicate_spi_onboard:()=>Fd,communicate_spi_read:()=>Vd,communicate_spi_read_output:()=>Bd,communicate_spi_readinto:()=>Gd,communicate_spi_readinto_output:()=>Ud,communicate_spi_set:()=>bd,communicate_spi_write:()=>wd,communicate_spi_write_readinto:()=>kd,espnow_radio_channel:()=>NI,espnow_radio_channel_new:()=>fI,espnow_radio_on_off:()=>FI,espnow_radio_rec:()=>vI,espnow_radio_recv:()=>XI,espnow_radio_recv_certain_msg:()=>xI,espnow_radio_recv_certain_msg_new:()=>yI,espnow_radio_recv_msg:()=>YI,espnow_radio_recv_new:()=>bI,espnow_radio_send:()=>PI,espnow_radio_txpower:()=>DI,i2c_available:()=>_T,i2c_init:()=>WI,i2c_master_reader2:()=>sT,i2c_read:()=>KI,i2c_scan:()=>QI,i2c_slave_onreceive:()=>Kd,i2c_write:()=>JI,internal_variable:()=>tI,ir_recv_timeout:()=>nI,ir_transmit_busy:()=>aI,ir_transmit_conventional_data:()=>_I,ir_transmit_raw_code:()=>pI,ir_transmit_study_code:()=>oI,ir_whether_recv:()=>iI,lora_init:()=>VI,lora_packet:()=>BI,lora_recv:()=>UI,lora_send:()=>GI,network_espnow_info:()=>CI,network_espnow_mac:()=>gI,network_espnow_recv:()=>SI,network_espnow_recv_handle:()=>LI,network_espnow_send:()=>AI,recv_fun:()=>eI,spi_buffer:()=>jI,spi_init:()=>qI,spi_read:()=>ZI,spi_read_output:()=>$I,spi_readinto:()=>tT,spi_readinto_output:()=>eT,spi_set:()=>zI,spi_write:()=>iT,spi_write_readinto:()=>nT,urequests_attribute:()=>kI,urequests_get:()=>wI,urequests_method:()=>HI});var Y={};t.r(Y),t.d(Y,{display_animate:()=>xT,display_blink_rate:()=>PT,display_circle:()=>bT,display_color_seclet:()=>QT,display_draw_4strings:()=>AT,display_fill:()=>XT,display_get_screen_image:()=>FT,display_help:()=>VT,display_image_size:()=>LT,display_lcd_use_i2c_init:()=>tM,display_line:()=>DT,display_line_arbitrarily:()=>fT,display_matrix_extern_bright_point:()=>mT,display_matrix_extern_bright_screen:()=>OT,display_matrix_extern_clear:()=>RT,display_matrix_extern_get_pixel:()=>hT,display_matrix_extern_get_screen_pixel:()=>ET,display_matrix_extern_image_builtins:()=>cT,display_matrix_extern_scroll_string:()=>lT,display_matrix_extern_scroll_string_delay:()=>dT,display_matrix_extern_shift:()=>MT,display_matrix_extern_show_frame_string:()=>IT,display_matrix_extern_show_frame_string_delay:()=>TT,display_matrix_extern_show_image:()=>uT,display_matrix_extern_show_image_or_string_delay:()=>rT,display_matrix_use_i2c_init:()=>aT,display_oled_drawPixel:()=>GT,display_oled_showBitmap:()=>BT,display_oled_use_i2c_init:()=>_M,display_onoff:()=>YT,display_rect:()=>NT,display_rgb_color:()=>vT,display_tm1650_power:()=>wT,display_tm1650_set_brightness:()=>WT,display_tm1650_show_dot:()=>HT,display_tm1650_show_num:()=>kT,display_tm_use_i2c_init:()=>UT,display_triangle:()=>yT,display_use_i2c_init:()=>ST,extern_oled_bright_point:()=>hM,extern_oled_clear:()=>mM,extern_oled_get_pixel:()=>MM,extern_oled_hvline:()=>OM,extern_oled_line:()=>RM,extern_oled_scroll_string:()=>rM,extern_oled_scroll_string_delay:()=>lM,extern_oled_shape_rect:()=>EM,extern_oled_shift:()=>TM,extern_oled_show_frame_string:()=>dM,extern_oled_show_frame_string_delay:()=>IM,extern_oled_show_image:()=>oM,extern_oled_show_image_or_string_delay:()=>uM,extern_oled_show_image_xy:()=>pM,extern_oled_show_string:()=>aM,lcd_backlight:()=>nM,lcd_clear:()=>sM,lcd_print_string:()=>iM,lcd_show_image_or_string_delay:()=>eM,matrix_extern_image_arithmetic:()=>gT,matrix_extern_image_invert:()=>CT,tft_fill:()=>ZT,tft_line_arbitrarily:()=>$T,tft_scroll_string_delay:()=>zT,tft_show_frame_string_delay:()=>jT,tft_show_image_or_string_delay:()=>qT,tft_show_image_xy:()=>JT,tft_use_spi_init:()=>KT});var X={};t.r(X),t.d(X,{bitbot_display_image_create:()=>_h,display_bright_point:()=>xM,display_bright_screen:()=>yM,display_clear:()=>VM,display_get_pixel:()=>XM,display_get_screen_pixel:()=>bM,display_image_builtins:()=>fM,display_image_builtins_all:()=>FM,display_image_create:()=>DM,display_scroll_string:()=>SM,display_scroll_string_delay:()=>AM,display_shift:()=>YM,display_show_frame_string:()=>LM,display_show_frame_string_delay:()=>NM,display_show_image:()=>gM,display_show_image_or_string_delay:()=>CM,draw_pointer:()=>fh,image_arithmetic:()=>PM,image_invert:()=>vM,mixbot_display_bright_screen:()=>nh,mixbot_display_get_ambientbright:()=>ih,mixbot_display_get_screen_pixel:()=>eh,mixbot_display_image_create:()=>th,mixbot_display_rotate:()=>sh,mixgo_display_image_create_new:()=>UM,mixgome_display_font:()=>wM,mixgome_display_image_create:()=>BM,mixgomini_display_image_create:()=>GM,mpython_display_hvline:()=>jM,mpython_display_line:()=>ZM,mpython_display_shape_rect:()=>zM,mpython_pbm_image:()=>$M,onboard_oled_bright_point:()=>qM,onboard_oled_scroll_string_delay:()=>JM,onboard_oled_show_frame_string_delay:()=>QM,onboard_oled_show_image:()=>kM,onboard_oled_show_image_or_string_delay:()=>KM,onboard_oled_show_image_xy:()=>HM,onboard_oled_show_string:()=>WM,onboard_tft_bright_point:()=>Eh,onboard_tft_bright_screen:()=>ch,onboard_tft_clear:()=>Oh,onboard_tft_clock_clear:()=>Nh,onboard_tft_clock_draw:()=>Lh,onboard_tft_clock_get_rtctime:()=>Sh,onboard_tft_clock_init:()=>Ch,onboard_tft_clock_set_time:()=>Ah,onboard_tft_display_hvline:()=>Th,onboard_tft_display_line:()=>Mh,onboard_tft_display_shape_circle:()=>Dh,onboard_tft_display_shape_rect:()=>Ih,onboard_tft_fill:()=>gh,onboard_tft_get_pixel:()=>mh,onboard_tft_get_screen_pixel:()=>Rh,onboard_tft_scroll_string:()=>uh,onboard_tft_scroll_string_delay:()=>rh,onboard_tft_shift:()=>hh,onboard_tft_show_frame_string:()=>lh,onboard_tft_show_frame_string_delay:()=>dh,onboard_tft_show_image:()=>oh,onboard_tft_show_image_or_string_delay:()=>ah,onboard_tft_show_image_xy:()=>ph});var x={};t.r(x),t.d(x,{factory_block:()=>Gh,factory_block_return:()=>Uh,factory_block_return_with_textarea:()=>kh,factory_block_with_textarea:()=>wh,factory_callMethod_noreturn:()=>Vh,factory_callMethod_return:()=>Bh,factory_create_with_container:()=>Xh,factory_create_with_item:()=>xh,factory_declare:()=>yh,factory_from_import:()=>Ph,factory_function_noreturn:()=>Yh,factory_function_return:()=>bh,factory_import:()=>vh,folding_block:()=>Hh});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>dm,inout_analog_atten:()=>tm,inout_analog_read:()=>$h,inout_analog_read_init:()=>om,inout_analog_write:()=>zh,inout_analog_write_init:()=>_m,inout_analog_write_set:()=>jh,inout_analog_write_set_freq:()=>um,inout_digital_init:()=>nm,inout_digital_read:()=>Qh,inout_digital_write:()=>Jh,inout_highlow:()=>Kh,inout_pinMode:()=>am,inout_pin_attachInterrupt:()=>im,inout_pin_pressed:()=>em,inout_pin_pressed_init:()=>pm,inout_pwm_analog_write:()=>qh,inout_pwm_analog_write_init:()=>sm,inout_pwm_analog_write_set_freq:()=>Zh,pin_pressed:()=>lm,pin_pressed_init:()=>rm});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>bm,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>xm,IOT_EMQX_PING:()=>Ym,IOT_FORMATTING:()=>Pm,IOT_FORMAT_STRING:()=>vm,IOT_MIXIO_NTP:()=>Xm,IOT_MIXIO_PUBLISH:()=>Sm,IOT_MIXIO_SUBSCRIBE:()=>Am,iot_checkonenet:()=>Km,iot_client_onboard:()=>Vm,iot_create_with_item:()=>gm,iot_http_client:()=>Bm,iot_http_data:()=>Gm,iot_mixio_check:()=>Dm,iot_mixio_connect:()=>Cm,iot_mixio_connect_only:()=>Nm,iot_mixio_disconnect:()=>Lm,iot_mixio_format_msg:()=>Fm,iot_mixio_format_topic:()=>fm,iot_mixly_key:()=>ym,iot_mqtt_client:()=>Um,iot_mqtt_data:()=>wm,iot_onenet_check:()=>mm,iot_onenet_connect:()=>Mm,iot_onenet_disconnect:()=>hm,iot_onenet_publish:()=>Om,iot_onenet_publish_dict:()=>Em,iot_onenetconnect:()=>Hm,iot_onenetdisconnect:()=>Wm,iot_publish:()=>Jm,iot_publish_container:()=>Rm,iot_publish_item:()=>cm,iot_wifi_connect:()=>Tm,iot_wificonnect:()=>km});var V={};t.r(V),t.d(V,{network_ap_connect:()=>sE,network_connect:()=>$m,network_get_connect:()=>eE,network_get_wifi:()=>nE,network_init:()=>qm,network_is_active:()=>jm,network_open:()=>zm,network_scan:()=>Zm,network_server:()=>_E,network_socket_accept:()=>rE,network_socket_bind:()=>pE,network_socket_close:()=>ME,network_socket_connect:()=>aE,network_socket_init:()=>oE,network_socket_listen:()=>uE,network_socket_receive:()=>lE,network_socket_receive_from:()=>IE,network_socket_send:()=>dE,network_socket_send_to:()=>TE,network_stop:()=>iE,network_wifi_connect:()=>tE,ntptime_address:()=>RE,ntptime_time:()=>OE,requests_attribute:()=>mE,requests_attribute2:()=>SE,requests_get:()=>hE,requests_get2:()=>gE,requests_method:()=>EE,requests_post:()=>CE});var B={};t.r(B),t.d(B,{get_potential_num:()=>LE,nova_g1_motor:()=>NE,nova_g1_spk_en:()=>fE,nova_g1_usb:()=>DE});var G={};t.r(G),t.d(G,{pe_g1_battery_left:()=>vE,pe_g1_dc_motor:()=>YE,pe_g1_dc_motor_speed:()=>XE,pe_g1_servo_get_angle:()=>yE,pe_g1_servo_get_speed:()=>VE,pe_g1_servo_set_angle:()=>xE,pe_g1_servo_set_speed:()=>bE,pe_g1_use_i2c_init:()=>PE});var U={};t.r(U),t.d(U,{HCSR04:()=>BO,PS2_Button:()=>kO,PS2_Buttons:()=>WO,PS2_Buttons_new:()=>qO,PS2_State:()=>HO,PS2_init:()=>GO,PS2_init_new:()=>JO,PS2_stk:()=>KO,PS2_stk_new:()=>zO,PS2_vibration:()=>wO,PS2_vibration_new:()=>QO,esp32_s2_weather_init:()=>xO,esp32_s2_weather_rain:()=>yO,esp32_s2_weather_wd:()=>bO,esp32_s2_weather_ws:()=>VO,extern_rfid_read:()=>cO,extern_rfid_readcontent:()=>CO,extern_rfid_readid:()=>gO,extern_rfid_status:()=>LO,extern_rfid_write:()=>SO,extern_rfid_write_return:()=>AO,gnss_get_data:()=>tR,gnss_have_data:()=>$O,mixbot_sensor_extern_get_addr:()=>pR,mixbot_sensor_extern_set_addr:()=>aR,pm25_get_data:()=>ZO,robot_button_extern_get_value:()=>eR,robot_color_extern_get_value:()=>oR,robot_infrared_extern_get_value:()=>nR,robot_infrared_extern_grey_get_value:()=>sR,robot_potentiometer_extern_get_value:()=>_R,robot_sonar_extern_get_value:()=>uR,robot_sonar_extern_led:()=>rR,robot_touch_extern_get_value:()=>iR,sensor_APDS9960_extern:()=>nO,sensor_DS18X20:()=>$E,sensor_LTR308_extern:()=>sO,sensor_LTR390UV_extern:()=>oO,sensor_MAX30102_extern:()=>iO,sensor_QMC5883L_extern:()=>lO,sensor_VL530LX_extern:()=>pO,sensor_adxl345_get_acceleration:()=>WE,sensor_aht11_extern:()=>uO,sensor_bmp:()=>jE,sensor_compass_reset:()=>OO,sensor_dht11:()=>JE,sensor_hp203_extern:()=>rO,sensor_light_level:()=>KE,sensor_lm35:()=>tO,sensor_ltr381_extern:()=>_O,sensor_mixgo_extern_button_attachInterrupt:()=>kE,sensor_mixgo_extern_button_get_presses:()=>wE,sensor_mixgo_extern_button_is_pressed:()=>GE,sensor_mixgo_extern_button_was_pressed:()=>UE,sensor_mixgo_extern_light:()=>QE,sensor_mixgo_extern_pin_near:()=>zE,sensor_mixgo_extern_sound:()=>qE,sensor_mixgoce_hot_wheel_degrees:()=>XO,sensor_mixgoce_hot_wheel_is_touched:()=>YO,sensor_mpu9250_attachGestureInterrupt:()=>HE,sensor_mpu9250_calibrate_compass:()=>hO,sensor_mpu9250_field_strength:()=>EO,sensor_mpu9250_gesture:()=>dO,sensor_mpu9250_get_acceleration:()=>IO,sensor_mpu9250_get_gyro:()=>MO,sensor_mpu9250_get_magnetic:()=>TO,sensor_mpu9250_temperature:()=>mO,sensor_sht:()=>ZE,sensor_shtc3_extern:()=>aO,sensor_use_i2c_init:()=>eO,sensor_use_spi_init:()=>RO,sensor_use_uart_init:()=>jO,sensor_weather_solo_init:()=>lR,sensor_weather_solo_rain:()=>TR,sensor_weather_solo_wd:()=>dR,sensor_weather_solo_ws:()=>IR,weather_data:()=>NO,weather_have_data:()=>DO,weather_set_label:()=>FO,weather_set_label_container:()=>PO,weather_set_label_item:()=>vO,weather_uart_mixio:()=>fO});var w={};t.r(w),t.d(w,{HCSR04:()=>PR,RTC_set_date:()=>FR,RTC_set_time:()=>fR,bitbot_als_num:()=>yc,dht11:()=>Hc,number1:()=>YR,number2:()=>XR,number3:()=>xR,number4:()=>bR,number5:()=>yR,number6:()=>VR,number7:()=>BR,onboard_RTC_get_time:()=>KR,onboard_RTC_get_time_str:()=>ZR,onboard_RTC_get_timestamp:()=>JR,onboard_RTC_set_datetime:()=>zR,onboard_RTC_settime_string:()=>qR,onboard_RTC_timestamp_totuple:()=>QR,rfid_readcontent:()=>_c,rfid_readid:()=>sc,rfid_write:()=>oc,rfid_write_return:()=>pc,sensor_LTR308:()=>$R,sensor_aht11:()=>ec,sensor_bitbot_ALS:()=>bc,sensor_button_get_presses:()=>Gc,sensor_button_is_pressed:()=>Vc,sensor_button_was_pressed:()=>Bc,sensor_distance_hrsc04:()=>DR,sensor_eulerangles:()=>uc,sensor_field_strength:()=>Wc,sensor_get_acceleration:()=>ac,sensor_get_temperature:()=>ic,sensor_hp203:()=>nc,sensor_light:()=>kc,sensor_mixbot_get_gyro:()=>xc,sensor_mixbot_patrol_calibrate:()=>vc,sensor_mixbot_patrol_value:()=>Yc,sensor_mixbot_temperature:()=>Xc,sensor_mixgo_LTR308:()=>WR,sensor_mixgo_button_attachInterrupt:()=>OR,sensor_mixgo_button_get_presses:()=>ER,sensor_mixgo_button_is_pressed:()=>hR,sensor_mixgo_button_was_pressed:()=>mR,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Rc,sensor_mixgo_cc_mmc5603_get_angle:()=>Oc,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Ec,sensor_mixgo_light:()=>vR,sensor_mixgo_nova_LTR308:()=>HR,sensor_mixgo_nova_pin_near:()=>kR,sensor_mixgo_pin_near:()=>wR,sensor_mixgo_pin_near_double:()=>UR,sensor_mixgo_pin_near_single:()=>GR,sensor_mixgo_pin_pressed:()=>SR,sensor_mixgo_touch_slide:()=>NR,sensor_mixgocar42_button_attachInterrupt:()=>CR,sensor_mixgocar42_button_get_presses:()=>gR,sensor_mixgocar42_button_is_pressed:()=>RR,sensor_mixgocar42_button_was_pressed:()=>cR,sensor_mixgocar_battery_left:()=>Pc,sensor_mixgocar_pin_near:()=>fc,sensor_mixgocar_pin_near_line:()=>Dc,sensor_mixgocar_pin_near_state_change:()=>Fc,sensor_mixgoce_pin_pressed:()=>AR,sensor_mixgoce_temperature:()=>gc,sensor_mixgome_temperature:()=>cc,sensor_mpython_pin_pressed:()=>LR,sensor_mpython_qmi8658_get_gyro:()=>Cc,sensor_mpython_qmi8658_temperature:()=>Sc,sensor_onboard_compass_reset:()=>mc,sensor_onboard_mpu9250_calibrate_compass:()=>Tc,sensor_onboard_mpu9250_field_strength:()=>hc,sensor_onboard_mpu9250_gesture:()=>rc,sensor_onboard_mpu9250_get_acceleration:()=>lc,sensor_onboard_mpu9250_get_gyro:()=>Ic,sensor_onboard_mpu9250_get_magnetic:()=>dc,sensor_onboard_mpu9250_temperature:()=>Mc,sensor_pin_near:()=>wc,sensor_pin_pressed:()=>Uc,sensor_rm_acc:()=>Nc,sensor_rm_battery_left:()=>Lc,sensor_rm_pin_near_double:()=>Ac,sensor_rtc_init:()=>jR,sensor_sound:()=>tc,sensor_temperature:()=>Kc});var k={};t.r(k),t.d(k,{serial_any:()=>tg,serial_begin:()=>_g,serial_print:()=>qc,serial_print_byte:()=>Qc,serial_print_hex:()=>jc,serial_println:()=>zc,serial_read_from_ai:()=>Tg,serial_readline:()=>eg,serial_readstr:()=>$c,serial_readstr_until:()=>ig,serial_receive_data_event:()=>Zc,serial_send_to_ai:()=>Ig,serial_softserial:()=>sg,serial_softserial_new:()=>ng,system_input:()=>og,system_print:()=>pg,system_print_container:()=>lg,system_print_end:()=>ug,system_print_inline:()=>ag,system_print_item:()=>dg,system_print_many:()=>rg});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>Eg,Timer_init:()=>Pg,base_delay:()=>Xg,controls_delay:()=>mg,controls_delay_new:()=>hg,controls_millis:()=>Rg,controls_uname:()=>gg,raw_block:()=>cg,reset:()=>Og,system_bitbot_shutdown:()=>Fg,system_machine_reset:()=>fg,system_ticks_diff:()=>Ag,system_timer:()=>Sg,system_timer_init:()=>Lg,system_wdt_feed:()=>Dg,system_wdt_init:()=>Ng,time_ticks_diff:()=>Yg,timer:()=>Cg,timer2:()=>vg});var W={};t.r(W),t.d(W,{Air_daily_content:()=>Qg,Air_now_content:()=>Ug,Geo_moon_content:()=>zg,Geo_sun_content:()=>qg,Life_suggestion_content:()=>kg,Location_search_content:()=>Wg,Tide_daily_content:()=>Hg,WEATHER_DAILY:()=>yg,WEATHER_HOUR:()=>Vg,WEATHER_NOW:()=>bg,Weather_alarm_content:()=>wg,Weather_daily:()=>Kg,Weather_daily_content:()=>Jg,Weather_now:()=>Bg,Weather_now_content:()=>Gg});var K={};t.r(K),t.d(K,{actuator_extern_get_led_bright:()=>hC,actuator_extern_get_led_state:()=>mC,actuator_extern_led_bright:()=>MC,actuator_extern_led_brightness:()=>EC,actuator_ms32006_dcmotor:()=>sC,actuator_ms32006_init:()=>nC,actuator_ms32006_stepper:()=>_C,actuator_neopixel_init:()=>OC,actuator_neopixel_rgb:()=>gC,actuator_neopixel_rgb_all:()=>RC,actuator_neopixel_write:()=>cC,actuator_use_uart_init:()=>CC,esp32_music_get_tempo_extern:()=>lC,esp32_music_pitch:()=>pC,esp32_music_pitch_init:()=>oC,esp32_music_pitch_with_time:()=>aC,esp32_music_play_list:()=>dC,esp32_music_reset_extern:()=>IC,esp32_music_set_tempo_extern:()=>rC,esp32_music_stop:()=>uC,mixbot_actuator_extern_get_addr:()=>UC,mixbot_actuator_extern_set_addr:()=>wC,mixbot_addr_extern:()=>DC,robot_led_extern:()=>vC,robot_led_extern_get_value:()=>YC,robot_motor_extern:()=>fC,robot_motor_extern_get_speed:()=>FC,robot_servo_extern_absolute_run:()=>yC,robot_servo_extern_get_status:()=>XC,robot_servo_extern_relative_continue:()=>GC,robot_servo_extern_relative_origin:()=>VC,robot_servo_extern_relative_run:()=>BC,robot_servo_extern_stop:()=>bC,robot_servo_extern_stop_mode:()=>xC,robot_traffic_light_extern:()=>PC,servo_get_angle:()=>eC,servo_get_speed:()=>iC,servo_init:()=>jg,servo_move:()=>TC,servo_set_angle:()=>$g,servo_set_speed:()=>tC,servo_speed_360:()=>Zg,syn6288_builtin_voice:()=>LC,syn6288_get_voice:()=>AC,syn6288_set_voice:()=>SC,syn6288_tts_play:()=>NC});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>hS,actuator_dc_motor_stop:()=>mS,actuator_get_led_bright:()=>$C,actuator_get_led_state:()=>tS,actuator_led_bright:()=>ZC,actuator_led_brightness:()=>eS,actuator_mixbot_buzzer_on_off:()=>gS,actuator_mixgo_nova_mic_get:()=>NS,actuator_mixgo_nova_mic_set:()=>LS,actuator_mixgo_nova_onboard_music_pitch:()=>YS,actuator_mixgo_nova_onboard_music_stop:()=>XS,actuator_mixgo_nova_play_audio:()=>PS,actuator_mixgo_nova_play_online_audio:()=>vS,actuator_mixgo_nova_record_audio:()=>FS,actuator_mixgo_nova_voice_get:()=>fS,actuator_mixgo_nova_voice_set:()=>DS,actuator_mixgo_zero_led_color:()=>iS,actuator_onboard_neopixel_rgb:()=>uS,actuator_onboard_neopixel_rgb_all:()=>rS,actuator_onboard_neopixel_rgb_show_all_chase:()=>lS,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>dS,actuator_onboard_neopixel_write:()=>aS,actuator_stepper_keep:()=>TS,actuator_stepper_stop:()=>MS,analog_ble_keyboard_init:()=>WS,analog_ble_keyboard_input:()=>QS,analog_ble_keyboard_send_battery:()=>zS,analog_ble_keyboard_str:()=>qS,analog_ble_mouse_init:()=>jS,analog_ble_mouse_input:()=>tA,analog_ble_mouse_send_battery:()=>eA,analog_keyboard_input:()=>VS,analog_keyboard_str:()=>kS,analog_mouse_input:()=>US,bitbot_motor:()=>AS,bitbot_move:()=>CS,bitbot_stop:()=>SS,ble_keyboard_connect:()=>JS,ble_keyboard_get_mac:()=>KS,ble_mouse_connect:()=>$S,ble_mouse_get_mac:()=>ZS,cc_number:()=>nS,esp32_music_get_tempo:()=>HC,esp32_music_reset:()=>qC,esp32_music_set_tempo:()=>kC,esp32_onboard_music_pitch:()=>WC,esp32_onboard_music_pitch_with_time:()=>KC,esp32_onboard_music_play_list:()=>QC,esp32_onboard_music_stop:()=>JC,general_key:()=>GS,general_key_tuple:()=>HS,get_power_output:()=>bS,ledswitch:()=>jC,mixbot_motor:()=>cS,mixbot_motor_status:()=>ES,mixbot_move:()=>OS,mixbot_stop:()=>RS,mouse_key:()=>wS,number:()=>zC,rm_actuator_get_led_bright:()=>_S,rm_actuator_get_led_state:()=>oS,rm_actuator_led_bright:()=>sS,rm_actuator_led_brightness:()=>pS,rm_motor:()=>IS,set_all_power_output:()=>yS,set_power_output:()=>xS,special_key:()=>BS});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>XA,ai_sensor_ailocal_class:()=>CA,ai_sensor_ailocal_class_result:()=>SA,ai_sensor_ailocal_train:()=>gA,ai_sensor_asr_recognize:()=>fA,ai_sensor_audio_play:()=>LA,ai_sensor_audio_record:()=>AA,ai_sensor_barcode:()=>aA,ai_sensor_circle:()=>TA,ai_sensor_classifier_faces:()=>YA,ai_sensor_color:()=>EA,ai_sensor_color_chases:()=>cA,ai_sensor_color_chases_result:()=>RA,ai_sensor_config:()=>sA,ai_sensor_face:()=>vA,ai_sensor_find_20objects:()=>xA,ai_sensor_find_barcodes:()=>uA,ai_sensor_find_circles:()=>MA,ai_sensor_find_colors:()=>OA,ai_sensor_find_licenseplates:()=>PA,ai_sensor_find_lines:()=>IA,ai_sensor_find_qrcodes:()=>pA,ai_sensor_find_rects:()=>mA,ai_sensor_find_tags:()=>lA,ai_sensor_licenseplate:()=>FA,ai_sensor_line:()=>dA,ai_sensor_qrcode:()=>oA,ai_sensor_qrcode_lite:()=>nA,ai_sensor_rect:()=>hA,ai_sensor_rgb:()=>_A,ai_sensor_tag:()=>rA,ai_sensor_use_uart_init:()=>iA,ai_sensor_yolo_recognize:()=>NA,ai_sensor_yolo_recognize_result:()=>DA});var q={};t.r(q),t.d(q,{MICROPYTHON_AI_Speech_asr:()=>VA,MICROPYTHON_AI_Speech_unit:()=>yA,MICROPYTHON_AI_client:()=>bA});var z={};t.r(z),t.d(z,{mpython_blynk_app_data:()=>zA,mpython_blynk_app_notify:()=>WA,mpython_blynk_email:()=>jA,mpython_blynk_get_timers:()=>JA,mpython_blynk_on_connected:()=>wA,mpython_blynk_on_disconnected:()=>UA,mpython_blynk_run:()=>HA,mpython_blynk_sensor_data_to_app:()=>qA,mpython_blynk_set_property:()=>ZA,mpython_blynk_setup:()=>$A,mpython_blynk_stop_timers:()=>KA,mpython_blynk_sync_virtual:()=>GA,mpython_blynk_terminal_widget_vpin:()=>BA,mpython_blynktimer:()=>QA,mpython_blynktimer_run:()=>kA});var j={};t.r(j),t.d(j,{communicate_bluetooth_central_init:()=>XL,communicate_bluetooth_connect:()=>yL,communicate_bluetooth_disconnect:()=>VL,communicate_bluetooth_handle:()=>HL,communicate_bluetooth_is_connected:()=>GL,communicate_bluetooth_mac:()=>BL,communicate_bluetooth_peripheral_init:()=>xL,communicate_bluetooth_recv:()=>kL,communicate_bluetooth_recv_only:()=>wL,communicate_bluetooth_scan:()=>bL,communicate_bluetooth_send:()=>UL,communicate_espnow_init:()=>WL,communicate_espnow_init_new:()=>KL,communicate_i2c_available:()=>pL,communicate_i2c_init:()=>iL,communicate_i2c_master_read:()=>oL,communicate_i2c_onboard:()=>tL,communicate_i2c_read:()=>nL,communicate_i2c_scan:()=>_L,communicate_i2c_write:()=>sL,communicate_ir_recv_init:()=>SL,communicate_ir_send_init:()=>fL,communicate_ow_init:()=>EL,communicate_ow_read:()=>cL,communicate_ow_reset:()=>RL,communicate_ow_scan:()=>OL,communicate_ow_select:()=>CL,communicate_ow_write:()=>gL,communicate_spi_buffer:()=>lL,communicate_spi_init:()=>uL,communicate_spi_onboard:()=>eL,communicate_spi_read:()=>dL,communicate_spi_read_output:()=>IL,communicate_spi_readinto:()=>TL,communicate_spi_readinto_output:()=>ML,communicate_spi_set:()=>rL,communicate_spi_write:()=>hL,communicate_spi_write_readinto:()=>mL,espnow_radio_channel:()=>ZL,espnow_radio_channel_new:()=>tN,espnow_radio_on_off:()=>eN,espnow_radio_rec:()=>nN,espnow_radio_recv:()=>_N,espnow_radio_recv_certain_msg:()=>oN,espnow_radio_recv_certain_msg_new:()=>aN,espnow_radio_recv_msg:()=>sN,espnow_radio_recv_new:()=>pN,espnow_radio_send:()=>iN,espnow_radio_txpower:()=>$L,i2c_slave_onreceive:()=>aL,internal_variable:()=>AL,ir_recv_timeout:()=>DL,ir_transmit_busy:()=>YL,ir_transmit_conventional_data:()=>FL,ir_transmit_raw_code:()=>vL,ir_transmit_study_code:()=>PL,ir_whether_recv:()=>NL,lora_init:()=>uN,lora_packet:()=>rN,lora_recv:()=>dN,lora_send:()=>lN,network_espnow_info:()=>QL,network_espnow_mac:()=>JL,network_espnow_recv:()=>qL,network_espnow_recv_handle:()=>jL,network_espnow_send:()=>zL,recv_fun:()=>LL,urequests_attribute:()=>TN,urequests_get:()=>IN,urequests_method:()=>MN});var Z={};t.r(Z),t.d(Z,{display_animate:()=>GN,display_circle:()=>UN,display_color_seclet:()=>ZN,display_draw_4strings:()=>YN,display_fill:()=>BN,display_lcd_use_i2c_init:()=>sD,display_line:()=>bN,display_line_arbitrarily:()=>XN,display_matrix_extern_bright_point:()=>LN,display_matrix_extern_bright_screen:()=>DN,display_matrix_extern_clear:()=>CN,display_matrix_extern_get_pixel:()=>AN,display_matrix_extern_get_screen_pixel:()=>NN,display_matrix_extern_image_builtins:()=>fN,display_matrix_extern_scroll_string:()=>cN,display_matrix_extern_scroll_string_delay:()=>gN,display_matrix_extern_shift:()=>SN,display_matrix_extern_show_frame_string:()=>ON,display_matrix_extern_show_frame_string_delay:()=>RN,display_matrix_extern_show_image:()=>mN,display_matrix_extern_show_image_or_string_delay:()=>EN,display_matrix_use_i2c_init:()=>hN,display_oled_drawPixel:()=>HN,display_oled_showBitmap:()=>kN,display_oled_use_i2c_init:()=>uD,display_onoff:()=>yN,display_rect:()=>xN,display_tm1650_power:()=>KN,display_tm1650_set_brightness:()=>qN,display_tm1650_show_dot:()=>QN,display_tm1650_show_num:()=>JN,display_tm_use_i2c_init:()=>WN,display_triangle:()=>wN,display_use_i2c_init:()=>vN,extern_oled_bright_point:()=>cD,extern_oled_clear:()=>ED,extern_oled_get_pixel:()=>RD,extern_oled_hvline:()=>CD,extern_oled_line:()=>SD,extern_oled_scroll_string:()=>hD,extern_oled_scroll_string_delay:()=>mD,extern_oled_shape_rect:()=>gD,extern_oled_shift:()=>OD,extern_oled_show_frame_string:()=>TD,extern_oled_show_frame_string_delay:()=>MD,extern_oled_show_image:()=>rD,extern_oled_show_image_or_string_delay:()=>ID,extern_oled_show_image_xy:()=>lD,extern_oled_show_string:()=>dD,image_shift:()=>VN,lcd_backlight:()=>pD,lcd_clear:()=>aD,lcd_print_string:()=>oD,lcd_show_image_or_string_delay:()=>_D,matrix_extern_image_arithmetic:()=>FN,matrix_extern_image_invert:()=>PN,tft_fill:()=>iD,tft_line_arbitrarily:()=>nD,tft_scroll_string_delay:()=>eD,tft_show_frame_string_delay:()=>tD,tft_show_image_or_string_delay:()=>$N,tft_show_image_xy:()=>jN,tft_use_spi_init:()=>zN});var $={};t.r($),t.d($,{bitbot_display_image_create:()=>uf,display_bright_point:()=>BD,display_bright_screen:()=>UD,display_clear:()=>XD,display_get_pixel:()=>VD,display_get_screen_pixel:()=>GD,display_image_builtins:()=>PD,display_image_builtins_all:()=>vD,display_image_create:()=>YD,display_scroll_string:()=>fD,display_scroll_string_delay:()=>FD,display_shift:()=>yD,display_show_frame_string:()=>ND,display_show_frame_string_delay:()=>DD,display_show_image:()=>AD,display_show_image_or_string_delay:()=>LD,draw_pointer:()=>Yf,image_arithmetic:()=>xD,image_invert:()=>bD,mixbot_display_bright_screen:()=>pf,mixbot_display_get_ambientbright:()=>of,mixbot_display_get_screen_pixel:()=>_f,mixbot_display_image_create:()=>sf,mixbot_display_rotate:()=>af,mixgo_display_image_create_new:()=>WD,mixgome_display_font:()=>HD,mixgome_display_image_create:()=>wD,mixgomini_display_image_create:()=>kD,mpython_display_hvline:()=>ef,mpython_display_line:()=>nf,mpython_display_shape_rect:()=>tf,mpython_pbm_image:()=>KD,onboard_oled_bright_point:()=>$D,onboard_oled_scroll_string_delay:()=>ZD,onboard_oled_show_frame_string_delay:()=>jD,onboard_oled_show_image:()=>JD,onboard_oled_show_image_or_string_delay:()=>zD,onboard_oled_show_image_xy:()=>QD,onboard_oled_show_string:()=>qD,onboard_tft_bright_point:()=>Cf,onboard_tft_bright_screen:()=>Af,onboard_tft_clear:()=>Rf,onboard_tft_clock_clear:()=>Pf,onboard_tft_clock_draw:()=>Ff,onboard_tft_clock_get_rtctime:()=>Df,onboard_tft_clock_init:()=>Nf,onboard_tft_clock_set_time:()=>ff,onboard_tft_display_hvline:()=>Ef,onboard_tft_display_line:()=>Of,onboard_tft_display_shape_circle:()=>vf,onboard_tft_display_shape_rect:()=>mf,onboard_tft_fill:()=>Lf,onboard_tft_get_pixel:()=>gf,onboard_tft_get_screen_pixel:()=>Sf,onboard_tft_scroll_string:()=>Mf,onboard_tft_scroll_string_delay:()=>hf,onboard_tft_shift:()=>cf,onboard_tft_show_frame_string:()=>If,onboard_tft_show_frame_string_delay:()=>Tf,onboard_tft_show_image:()=>rf,onboard_tft_show_image_or_string_delay:()=>df,onboard_tft_show_image_xy:()=>lf});var tt={};t.r(tt),t.d(tt,{factory_block:()=>Uf,factory_block_return:()=>wf,factory_block_return_with_textarea:()=>Hf,factory_block_with_textarea:()=>kf,factory_callMethod_noreturn:()=>Bf,factory_callMethod_return:()=>Gf,factory_declare:()=>Vf,factory_from_import:()=>Xf,factory_function_noreturn:()=>bf,factory_function_return:()=>yf,factory_import:()=>xf,folding_block:()=>Wf});var et={};t.r(et),t.d(et,{inout_analog_atten:()=>oF,inout_analog_read:()=>$f,inout_analog_read_init:()=>_F,inout_analog_write:()=>zf,inout_analog_write_init:()=>sF,inout_analog_write_set:()=>jf,inout_digital_init:()=>iF,inout_digital_read:()=>Qf,inout_digital_write:()=>Jf,inout_highlow:()=>Kf,inout_pin_attachInterrupt:()=>eF,inout_pin_pressed:()=>tF,inout_pin_pressed_init:()=>pF,inout_pwm_analog_write:()=>qf,inout_pwm_analog_write_init:()=>nF,inout_pwm_analog_write_set_freq:()=>Zf});var it={};t.r(it),t.d(it,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>LF,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>SF,IOT_EMQX_PING:()=>NF,IOT_FORMATTING:()=>gF,IOT_FORMAT_STRING:()=>CF,IOT_MIXIO_NTP:()=>DF,IOT_MIXIO_PUBLISH:()=>MF,IOT_MIXIO_SUBSCRIBE:()=>hF,iot_client_onboard:()=>fF,iot_http_client:()=>FF,iot_http_data:()=>PF,iot_mixio_check:()=>OF,iot_mixio_connect:()=>TF,iot_mixio_connect_only:()=>EF,iot_mixio_disconnect:()=>mF,iot_mixio_format_msg:()=>cF,iot_mixio_format_topic:()=>RF,iot_mixly_key:()=>AF,iot_mqtt_client:()=>vF,iot_mqtt_data:()=>YF,iot_onenet_check:()=>dF,iot_onenet_connect:()=>uF,iot_onenet_disconnect:()=>rF,iot_onenet_publish:()=>IF,iot_onenet_publish_dict:()=>lF,iot_wifi_connect:()=>aF});var nt={};t.r(nt),t.d(nt,{network_ap_connect:()=>wF,network_connect:()=>xF,network_get_connect:()=>yF,network_get_wifi:()=>UF,network_init:()=>XF,network_is_active:()=>GF,network_open:()=>BF,network_scan:()=>kF,network_server:()=>HF,network_socket_accept:()=>qF,network_socket_bind:()=>KF,network_socket_close:()=>tP,network_socket_connect:()=>JF,network_socket_init:()=>WF,network_socket_listen:()=>QF,network_socket_receive:()=>zF,network_socket_receive_from:()=>ZF,network_socket_send:()=>jF,network_socket_send_to:()=>$F,network_stop:()=>VF,network_wifi_connect:()=>bF,ntptime_address:()=>_P,ntptime_time:()=>sP,requests_attribute:()=>iP,requests_attribute2:()=>pP,requests_get:()=>eP,requests_get2:()=>oP,requests_method:()=>nP,requests_post:()=>aP});var st={};t.r(st),t.d(st,{get_potential_num:()=>uP,nova_g1_motor:()=>rP,nova_g1_spk_en:()=>dP,nova_g1_usb:()=>lP});var _t={};t.r(_t),t.d(_t,{pe_g1_battery_left:()=>TP,pe_g1_dc_motor:()=>MP,pe_g1_dc_motor_speed:()=>hP,pe_g1_servo_get_angle:()=>OP,pe_g1_servo_get_speed:()=>RP,pe_g1_servo_set_angle:()=>mP,pe_g1_servo_set_speed:()=>EP,pe_g1_use_i2c_init:()=>IP});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>uv,PS2_Button:()=>dv,PS2_Buttons:()=>Iv,PS2_Buttons_new:()=>cv,PS2_State:()=>Tv,PS2_init:()=>rv,PS2_init_new:()=>Ov,PS2_stk:()=>Mv,PS2_stk_new:()=>gv,PS2_vibration:()=>lv,PS2_vibration_new:()=>Rv,RTC_get_time:()=>mv,RTC_set_date:()=>DP,RTC_set_datetime:()=>hv,RTC_set_time:()=>NP,esp32_s2_weather_init:()=>_v,esp32_s2_weather_rain:()=>pv,esp32_s2_weather_wd:()=>ov,esp32_s2_weather_ws:()=>av,extern_rfid_read:()=>JP,extern_rfid_readcontent:()=>qP,extern_rfid_readid:()=>QP,extern_rfid_status:()=>ZP,extern_rfid_write:()=>zP,extern_rfid_write_return:()=>jP,gnss_get_data:()=>Av,gnss_have_data:()=>Lv,mixbot_sensor_extern_get_addr:()=>xv,mixbot_sensor_extern_set_addr:()=>bv,pm25_get_data:()=>Sv,robot_button_extern_get_value:()=>Nv,robot_color_extern_get_value:()=>vv,robot_infrared_extern_get_value:()=>fv,robot_infrared_extern_grey_get_value:()=>Fv,robot_potentiometer_extern_get_value:()=>Pv,robot_sonar_extern_get_value:()=>Yv,robot_sonar_extern_led:()=>Xv,robot_touch_extern_get_value:()=>Dv,sensor_APDS9960_extern:()=>yP,sensor_DS18X20:()=>Uv,sensor_LTR308_extern:()=>VP,sensor_LTR390UV_extern:()=>UP,sensor_MAX30102_extern:()=>bP,sensor_QMC5883L_extern:()=>wP,sensor_VL530LX_extern:()=>WP,sensor_aht11_extern:()=>HP,sensor_bmp:()=>YP,sensor_dht11:()=>Ev,sensor_distance_hrsc04:()=>LP,sensor_hp203_extern:()=>BP,sensor_ltr381_extern:()=>GP,sensor_mixgo_extern_button_attachInterrupt:()=>SP,sensor_mixgo_extern_button_get_presses:()=>CP,sensor_mixgo_extern_button_is_pressed:()=>cP,sensor_mixgo_extern_button_was_pressed:()=>gP,sensor_mixgo_extern_light:()=>fP,sensor_mixgo_extern_pin_near:()=>PP,sensor_mixgo_extern_sound:()=>FP,sensor_mixgoce_hot_wheel_degrees:()=>sv,sensor_mixgoce_hot_wheel_is_touched:()=>nv,sensor_mpu9250_attachGestureInterrupt:()=>AP,sensor_rtc_init:()=>vP,sensor_sht:()=>XP,sensor_shtc3_extern:()=>kP,sensor_use_i2c_init:()=>xP,sensor_use_spi_init:()=>KP,sensor_use_uart_init:()=>Cv,sensor_weather_solo_init:()=>yv,sensor_weather_solo_rain:()=>Gv,sensor_weather_solo_wd:()=>Vv,sensor_weather_solo_ws:()=>Bv,weather_data:()=>$P,weather_have_data:()=>tv,weather_set_label:()=>iv,weather_uart_mixio:()=>ev});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>zv,bitbot_als_num:()=>MX,dht11:()=>CX,number1:()=>jv,number2:()=>Zv,number3:()=>$v,number4:()=>tY,number5:()=>eY,number6:()=>iY,number7:()=>nY,onboard_RTC_get_time:()=>KY,onboard_RTC_get_time_str:()=>qY,onboard_RTC_get_timestamp:()=>JY,onboard_RTC_set_datetime:()=>HY,onboard_RTC_settime_string:()=>WY,onboard_RTC_timestamp_totuple:()=>QY,rfid_readcontent:()=>EY,rfid_readid:()=>mY,rfid_write:()=>OY,rfid_write_return:()=>RY,sensor_LTR308:()=>dY,sensor_adxl345_get_acceleration:()=>fY,sensor_aht11:()=>MY,sensor_bitbot_ALS:()=>TX,sensor_button_get_presses:()=>EX,sensor_button_is_pressed:()=>hX,sensor_button_was_pressed:()=>mX,sensor_compass_reset:()=>xY,sensor_ds18x20:()=>rY,sensor_eulerangles:()=>gY,sensor_get_acceleration:()=>cY,sensor_get_temperature:()=>hY,sensor_hp203:()=>TY,sensor_light:()=>gX,sensor_lm35:()=>lY,sensor_mixbot_get_gyro:()=>IX,sensor_mixbot_patrol_calibrate:()=>rX,sensor_mixbot_patrol_value:()=>lX,sensor_mixbot_temperature:()=>dX,sensor_mixgo_LTR308:()=>aY,sensor_mixgo_button_attachInterrupt:()=>Wv,sensor_mixgo_button_get_presses:()=>Hv,sensor_mixgo_button_is_pressed:()=>wv,sensor_mixgo_button_was_pressed:()=>kv,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>ZY,sensor_mixgo_cc_mmc5603_get_angle:()=>jY,sensor_mixgo_cc_mmc5603_get_magnetic:()=>zY,sensor_mixgo_light:()=>cX,sensor_mixgo_nova_LTR308:()=>uY,sensor_mixgo_nova_pin_near:()=>pY,sensor_mixgo_pin_near:()=>oY,sensor_mixgo_pin_near_double:()=>_Y,sensor_mixgo_pin_near_single:()=>sY,sensor_mixgo_pin_pressed:()=>NY,sensor_mixgo_touch_slide:()=>LY,sensor_mixgocar42_button_attachInterrupt:()=>qv,sensor_mixgocar42_button_get_presses:()=>Qv,sensor_mixgocar42_button_is_pressed:()=>Kv,sensor_mixgocar42_button_was_pressed:()=>Jv,sensor_mixgocar_battery_left:()=>uX,sensor_mixgocar_pin_near:()=>pX,sensor_mixgocar_pin_near_line:()=>oX,sensor_mixgocar_pin_near_state_change:()=>aX,sensor_mixgoce_pin_pressed:()=>AY,sensor_mixgoce_temperature:()=>tX,sensor_mixgome_temperature:()=>$Y,sensor_mpu9250_calibrate_compass:()=>vY,sensor_mpu9250_field_strength:()=>XY,sensor_mpu9250_gesture:()=>CY,sensor_mpu9250_get_acceleration:()=>SY,sensor_mpu9250_get_gyro:()=>PY,sensor_mpu9250_get_magnetic:()=>FY,sensor_mpu9250_temperature:()=>YY,sensor_mpython_pin_pressed:()=>DY,sensor_mpython_qmi8658_get_gyro:()=>eX,sensor_mpython_qmi8658_temperature:()=>iX,sensor_onboard_compass_reset:()=>kY,sensor_onboard_mpu9250_calibrate_compass:()=>GY,sensor_onboard_mpu9250_field_strength:()=>wY,sensor_onboard_mpu9250_gesture:()=>bY,sensor_onboard_mpu9250_get_acceleration:()=>yY,sensor_onboard_mpu9250_get_gyro:()=>BY,sensor_onboard_mpu9250_get_magnetic:()=>VY,sensor_onboard_mpu9250_temperature:()=>UY,sensor_pin_near:()=>RX,sensor_pin_pressed:()=>OX,sensor_rm_acc:()=>_X,sensor_rm_battery_left:()=>sX,sensor_rm_pin_near_double:()=>nX,sensor_sound:()=>IY});var at={};t.r(at),t.d(at,{serial_any:()=>DX,serial_print:()=>SX,serial_print_byte:()=>AX,serial_print_hex:()=>NX,serial_println:()=>LX,serial_read_from_ai:()=>BX,serial_readline:()=>FX,serial_readstr:()=>fX,serial_send_to_ai:()=>VX,serial_softserial:()=>PX,serial_softserial_new:()=>vX,system_input:()=>YX,system_print:()=>XX,system_print_end:()=>bX,system_print_inline:()=>xX,system_print_many:()=>yX});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>jX,Timer_init:()=>dx,base_delay:()=>Mx,controls_delay:()=>ix,controls_delay_new:()=>nx,controls_end_program:()=>$X,controls_millis:()=>ZX,controls_uname:()=>ex,reset:()=>tx,system_bitbot_shutdown:()=>lx,system_device_name:()=>qX,system_device_serial_number:()=>zX,system_event_bus_source:()=>JX,system_event_bus_value:()=>QX,system_machine_reset:()=>rx,system_on_event:()=>HX,system_raise_event:()=>kX,system_reset:()=>UX,system_run_in_background:()=>GX,system_ticks_diff:()=>ox,system_timer:()=>_x,system_timer_init:()=>px,system_timestamp:()=>WX,system_value:()=>KX,system_wait:()=>wX,system_wdt_feed:()=>ux,system_wdt_init:()=>ax,time_ticks_diff:()=>Tx,timer:()=>sx,timer2:()=>Ix});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>Dx,Air_now_content:()=>cx,Geo_moon_content:()=>Fx,Geo_sun_content:()=>fx,Life_suggestion_content:()=>Cx,Location_search_content:()=>Ax,Tide_daily_content:()=>Sx,WEATHER_DAILY:()=>mx,WEATHER_HOUR:()=>Ex,WEATHER_NOW:()=>hx,Weather_alarm_content:()=>gx,Weather_daily:()=>Lx,Weather_daily_content:()=>Nx,Weather_now:()=>Ox,Weather_now_content:()=>Rx});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>jx,inout_analog_atten:()=>Gx,inout_analog_read:()=>Bx,inout_analog_read_init:()=>Wx,inout_analog_write:()=>yx,inout_analog_write_init:()=>Hx,inout_analog_write_set:()=>Vx,inout_analog_write_set_freq:()=>Jx,inout_digital_init:()=>kx,inout_digital_read:()=>bx,inout_digital_write:()=>xx,inout_highlow:()=>Xx,inout_pinMode:()=>Qx,inout_pin_attachInterrupt:()=>wx,inout_pin_pressed:()=>Ux,inout_pin_pressed_init:()=>Kx,pin_pressed:()=>zx,pin_pressed_init:()=>qx});var dt={};t.r(dt),t.d(dt,{analog_input:()=>ob,analog_output:()=>ab,espnow_channel:()=>nb,haskylens_model:()=>sb,i2c_A_pin:()=>ub,i2c_B_pin:()=>rb,pins_analog:()=>Mb,pins_analog_pin:()=>hb,pins_axis:()=>Yb,pins_brightness:()=>Xb,pins_builtinimg:()=>Lb,pins_builtinimg_extern:()=>Nb,pins_button:()=>Ob,pins_buttonB:()=>Rb,pins_dac:()=>mb,pins_dac_pin:()=>Eb,pins_digital:()=>$x,pins_digital_dot:()=>wb,pins_digital_pin:()=>tb,pins_exlcdh:()=>Pb,pins_exlcdv:()=>vb,pins_imglist:()=>Db,pins_input_pin:()=>eb,pins_one_more:()=>Ub,pins_output_pin:()=>ib,pins_playlist:()=>fb,pins_playlist_extern:()=>Fb,pins_pwm:()=>cb,pins_pwm_pin:()=>gb,pins_radio_datarate:()=>Gb,pins_radio_power:()=>Bb,pins_serial:()=>Ab,pins_tone_notes:()=>Vb,pins_touch:()=>Sb,pins_touch_pin:()=>Cb,pins_tts_bgmusic:()=>yb,pins_tts_builtin_music:()=>bb,pins_tts_voice:()=>xb,pwm_input:()=>_b,pwm_output:()=>pb,spi_A_pin:()=>lb,spi_B_pin:()=>db,spi_C_pin:()=>Ib,spi_D_pin:()=>Tb});var It={};t.r(It),t.d(It,{inout_analog_atten:()=>ty,inout_analog_read:()=>Qb,inout_analog_read_init:()=>$b,inout_analog_write:()=>Kb,inout_analog_write_init:()=>Zb,inout_analog_write_set:()=>Jb,inout_digital_init:()=>jb,inout_digital_read:()=>Wb,inout_digital_write:()=>Hb,inout_highlow:()=>kb,inout_pin_attachInterrupt:()=>zb,inout_pin_pressed:()=>qb,inout_pin_pressed_init:()=>ey});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>ly,analog_output:()=>Iy,espnow_channel:()=>uy,haskylens_model:()=>ry,i2c_A_pin:()=>Ty,i2c_B_pin:()=>My,pins_analog:()=>cy,pins_analog_pin:()=>Ry,pins_axis:()=>xy,pins_brightness:()=>Vy,pins_builtinimg:()=>Fy,pins_builtinimg_extern:()=>Py,pins_button:()=>ny,pins_buttonB:()=>sy,pins_dac:()=>Ay,pins_dac_pin:()=>Sy,pins_digital:()=>iy,pins_digital_dot:()=>Ky,pins_digital_pin:()=>_y,pins_exlcdh:()=>by,pins_exlcdv:()=>yy,pins_imglist:()=>vy,pins_input_pin:()=>oy,pins_interrupt:()=>Dy,pins_one_more:()=>Wy,pins_output_pin:()=>py,pins_playlist:()=>Yy,pins_playlist_extern:()=>Xy,pins_pwm:()=>Cy,pins_pwm_input:()=>ay,pins_pwm_pin:()=>gy,pins_radio_datarate:()=>Hy,pins_radio_power:()=>ky,pins_serial:()=>fy,pins_tone_notes:()=>wy,pins_touch:()=>Ny,pins_touch_pin:()=>Ly,pins_tts_bgmusic:()=>Uy,pins_tts_builtin_music:()=>Gy,pins_tts_voice:()=>By,pwm_output:()=>dy,spi_A_pin:()=>hy,spi_B_pin:()=>my,spi_C_pin:()=>Ey,spi_D_pin:()=>Oy});const Mt=Blockly,ht=Mixly,mt={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}},Et=mt; /** * @license * Visual Blocks Editor @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class Ot{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(ht.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(ht.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(ht.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(ht.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(ht.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(ht.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(vt),this.appendValueInput("FROM").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.PYTHON_RANGE).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Bt={init:function(){this.setColour(vt),this.appendValueInput("LIST").setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(ht.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return ht.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gt={init:function(){this.setColour(vt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(ht.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new ht.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(ht.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:ht.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:ht.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Ut={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(ht.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ht.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(ht.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(ht.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(ht.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(ht.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(ht.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(vt);var t=new ht.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(ht.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:ht.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:ht.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(ht.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},kt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new ht.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return ht.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ht={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new ht.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return ht.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Gt.OPERATORS=[[ht.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[ht.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],wt.OPERATORS=[[ht.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[ht.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Wt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(ht.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Kt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Jt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(ht.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(vt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},qt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(ht.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},zt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(ht.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},jt={init:function(){this.jsonInit({message0:ht.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:vt,tooltip:ht.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:ht.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Zt={init:function(){this.setColour(vt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(ht.Msg.MIXLY_STAT),this.setOutput(!0)}},$t={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},te={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(ht.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ee={init:function(){this.appendDummyInput().appendField(ht.Msg.CONTROLS_REPEAT_TITLE_REPEAT+ht.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(ht.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new ht.FieldDropdown([[ht.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[ht.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(vt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},ie={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ne={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},se={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},_e={init:function(){this.setColour(vt),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ht.Msg.PROCEDURES_DEFRETURN_RETURN+ht.Msg.MIXLY_GET_UNIQUE_IDEN)}},oe=230;ht.FieldTextInput.math_number_validator=function(t){return String(t)},ht.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 pe={init:function(){this.setColour(oe),this.appendDummyInput().appendField(new ht.FieldTextInput("0",ht.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MATH_NUMBER_TOOLTIP)}},ae={init:function(){this.setColour(oe);this.appendDummyInput("").appendField(ht.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new ht.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:ht.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:ht.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},ue={init:function(){this.setColour(oe);this.appendDummyInput("").appendField(ht.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new ht.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:ht.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:ht.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},re={init:function(){this.setColour(oe),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ht.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:ht.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:ht.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:ht.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:ht.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:ht.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:ht.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:ht.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},le={init:function(){this.setColour(oe),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ht.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:ht.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:ht.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:ht.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:ht.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:ht.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:ht.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:ht.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},de={init:function(){this.setColour(oe),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new ht.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ie={init:function(){this.setColour(oe),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new ht.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:ht.Msg.MATH_TRIG_TOOLTIP_SIN,COS:ht.Msg.MATH_TRIG_TOOLTIP_COS,TAN:ht.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:ht.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:ht.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:ht.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:ht.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Te={init:function(){var t=[[ht.Msg.MATH_BIN,"bin"],[ht.Msg.MATH_OCT,"oct"],[ht.Msg.MATH_HEX,"hex"]];this.setColour(oe),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new ht.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:ht.Msg.MATH_DEC_TOOLTIP_BIN,oct:ht.Msg.MATH_DEC_TOOLTIP_OCT,hex:ht.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},he={init:function(){var t=[[ht.Msg.LANG_MATH_TO_ROUND,"round"],[ht.Msg.LANG_MATH_TO_CEIL,"ceil"],[ht.Msg.LANG_MATH_TO_FLOOR,"floor"],[ht.Msg.MATH_ABS,"fabs"],[ht.Msg.MATH_SQRT,"sqrt"]];this.setColour(oe),this.appendValueInput("A").setCheck(Number).appendField(new ht.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:ht.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:ht.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:ht.Msg.MATH_SINGLE_TOOLTIP_SQ,round:ht.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:ht.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:ht.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Me={init:function(){var t=[[ht.Msg.MIXLY_MAX,"max"],[ht.Msg.MIXLY_MIN,"min"]];this.setColour(oe),this.appendValueInput("A").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(new ht.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(ht.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:ht.Msg.MIXLY_TOOLTIP_MATH_MAX,min:ht.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},me={init:function(){var t=[[ht.Msg.MATH_TWO,"two"],[ht.Msg.MATH_EIGHT,"eight"],[ht.Msg.MATH_TEN,"ten"],[ht.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(oe),this.appendDummyInput("").appendField(ht.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new ht.FieldDropdown(t),"OP").appendField(ht.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(ht.Msg.MATH_ZHW).appendField(new ht.FieldDropdown(t),"OP2").appendField(ht.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:ht.Msg.MATH_Before_two,eight:ht.Msg.MATH_Before_eight,ten:ht.Msg.MATH_Before_ten,sixteen:ht.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:ht.Msg.MATH_Behind_two,eight:ht.Msg.MATH_Behind_eight,ten:ht.Msg.MATH_Behind_ten,sixteen:ht.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Ee={init:function(){var t=[[ht.Msg.LANG_MATH_INT,"int"],[ht.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(oe),this.setOutput(!0,Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_RANDOM).appendField(new ht.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(ht.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:ht.Msg.LANG_MATH_INT,float:ht.Msg.LANG_MATH_FLOAT_RANDOM};return ht.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Oe={init:function(){this.setColour(oe),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(ht.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(ht.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(ht.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(ht.Msg.MATH_CONSTRAIN_TOOLTIP)}},Re={init:function(){this.setColour(oe),this.appendValueInput("NUM",Number).appendField(ht.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(ht.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(ht.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_MATH_MAP)}},ce={init:function(){this.setColour(oe),this.appendDummyInput().appendField(new ht.FieldTextInput("0",ht.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(ht.Msg.MATH_NUMBER_TOOLTIP)}},ge={init:function(){this.setColour(oe),this.appendValueInput("NUM").setCheck(Number).appendField(ht.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ce={init:function(){this.setColour(oe),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(ht.Msg.MATH_ROUND).appendField(ht.Msg.TEXT_KEEP),this.appendDummyInput().appendField(ht.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(ht.Msg.MATH_ROUND_NEW_TOOLTIP)}},Se={init:function(){var t=[[ht.Msg.MIXLY_TO_INT,"int"],[ht.Msg.MIXLY_TO_FLOAT,"float"],[ht.Msg.MIXLY_TO_BITES,"b"],[ht.Msg.LANG_MATH_BYTE+ht.Msg.MIXLY_TO_INT,"bti"]];this.setColour(oe),this.appendValueInput("VAR").appendField(new ht.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:ht.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:ht.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:ht.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Ae={init:function(){var t=[[ht.Msg.MIXLY_TO_INT,"int"],[ht.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(oe),this.appendValueInput("VAR").appendField(new ht.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:ht.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:ht.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Le=Re,Ne={init:function(){this.setColour(oe),this.appendValueInput("VAR").appendField(ht.Msg.LANG_MATH_BYTE+ht.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},De=160,fe={init:function(){this.setColour(De),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ht.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(ht.Msg.TEXT_TEXT_TOOLTIP)},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 ht.FieldImage(e,12,12,'"')}},Fe={init:function(){this.setColour(De),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ht.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(ht.Msg.TEXT_LINES_TOOLTIP)},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 ht.FieldImage(e,12,12,'"')}};ht.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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(De),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ht.FieldTextInput("",ht.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(ht.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new ht.FieldImage(e,7,12,'"')}},ve={init:function(){this.setColour(De),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(ht.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ye={init:function(){this.setColour(De),this.appendValueInput("VAR").setCheck(Number).appendField(ht.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},xe={init:function(){this.setColour(De),this.appendValueInput("VAR").setCheck(String).appendField(ht.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Xe={init:function(){this.setColour(De),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},be={init:function(){this.setColour(De),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ye={init:function(){this.WHERE_OPTIONS=[[ht.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[ht.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[ht.Msg.TEXT_GET_INDEX_RANDOM+1+ht.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(ht.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(De),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(ht.Msg.LISTS_GET_INDEX_GET,"MODE"),ht.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(ht.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=ht.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=ht.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=ht.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=ht.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+ht.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",ht.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:ht.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:ht.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:ht.Msg.TEXT_GET_INDEX_RANDOM};return ht.Msg.PROCEDURES_DEFRETURN_RETURN+ht.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+ht.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==ht.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),ht.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(ht.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new ht.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"),ht.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ve={init:function(){this.setHelpUrl(ht.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(De),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(ht.Msg.LISTS_GET_INDEX_GET+" "+ht.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(ht.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(ht.Msg.PROCEDURES_DEFRETURN_RETURN+ht.Msg.MIXLY_MICROBIT_TYPE_STRING+ht.Msg.LISTS_GET_INDEX_FROM_START+"n"+ht.Msg.TEXT_CHARAT2)}},Be={init:function(){this.setHelpUrl(ht.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(De),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(ht.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(ht.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Ge={init:function(){this.WHERE_OPTIONS_1=[[ht.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[ht.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[ht.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[ht.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[ht.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[ht.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(ht.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(De),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(ht.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(ht.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==ht.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==ht.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),ht.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(ht.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new ht.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"))}},Ue={init:function(){this.setHelpUrl(ht.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(De),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(ht.Msg.LISTS_GET_INDEX_GET+" "+ht.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(ht.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(ht.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(ht.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},we={init:function(){var t=[[ht.Msg.MIXLY_EQUALS,"==="],[ht.Msg.MIXLY_STARTSWITH,"startswith"],[ht.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(De),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new ht.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ke={init:function(){this.setColour(De),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(ht.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_COMPARETO_HELP)}},He={init:function(){var t=[[ht.Msg.TEXT_UPPER,"upper"],[ht.Msg.TEXT_TITLE,"title"],[ht.Msg.TEXT_CAPITALIZE,"capitalize"],[ht.Msg.TEXT_SWAPCASE,"swapcase"],[ht.Msg.TEXT_LOWER,"lower"]];this.setColour(De),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new ht.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:ht.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:ht.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:ht.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:ht.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:ht.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},We={init:function(){var t=[[ht.Msg.TEXT_LJUST,"ljust"],[ht.Msg.TEXT_CENTER,"center"],[ht.Msg.TEXT_RJUST,"rjust"]];this.setColour(De),this.appendValueInput("VAR").appendField(new ht.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(ht.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(ht.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ke={init:function(){this.setColour(De),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(ht.Msg.MIXLY_MID+ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(ht.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Je={init:function(){this.setColour(De),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(ht.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(ht.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Qe={init:function(){this.setColour(De),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(ht.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(ht.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},qe={init:function(){this.setColour(De),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(ht.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(ht.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(ht.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ze={init:function(){var t=[[ht.Msg.TEXT_TRIM_BOTH,"strip"],[ht.Msg.TEXT_TRIM_LEFT,"lstrip"],[ht.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(De),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ht.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new ht.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(ht.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:ht.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:ht.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:ht.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},je={init:function(){this.setColour(De),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new ht.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new ht.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(ht.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){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Hi={init:function(){this.setColour(wi),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ht.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Wi={init:function(){this.setColour(wi),this.appendDummyInput().appendField(ht.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Ki={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.DICT_KEYS),this.setTooltip(ht.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Ji={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ht.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(ht.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(ht.Msg.DICTS_GET_TOOLTIP)}},Qi={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ht.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(ht.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(ht.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(ht.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},qi={init:function(){this.setColour(wi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(ht.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(ht.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},zi={init:function(){this.setColour(wi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(ht.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(ht.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.DICTS_DELETE_TOOLTIP)}},ji={init:function(){this.setColour(wi),this.appendValueInput("DICT2").setCheck("Dict").appendField(ht.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(ht.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MID),this.setTooltip(ht.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zi={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.DICT_CLEAR),this.setTooltip(ht.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$i={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.DICT_ITEMS),this.setTooltip(ht.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},tn={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.DICT_VALUES),this.setTooltip(ht.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},en={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_LENGTH),this.setTooltip(ht.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},nn={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.DICT_DELDICT),this.setTooltip(ht.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sn={init:function(){this.MODE=[[ht.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[ht.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(ht.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(ht.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=ht.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=ht.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==ht.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 ht.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")}},_n={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(ht.Msg.DICTS_ADD_VALUE),this.setTooltip(ht.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},on={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ht.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(ht.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.DICTS_SETDEFAULT_TOOLTIP)}},pn={init:function(){this.setColour(wi),this.appendDummyInput("").appendField(new ht.FieldLabel(ht.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 ht.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(ht.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){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},an={init:function(){this.setColour(wi),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},un={init:function(){this.setColour(wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_TO_JSON),this.setTooltip(ht.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},rn={init:function(){this.setColour(wi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(ht.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},ln=210,dn={init:function(){var t=ht.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(ln),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ht.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:ht.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:ht.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:ht.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:ht.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:ht.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:ht.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},In={init:function(){var t=ht.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=ht.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(ln),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ht.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new ht.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Tn={init:function(){var t=[[ht.Msg.LOGIC_OPERATION_AND,"AND"],[ht.Msg.LOGIC_OPERATION_OR,"OR"],[ht.Msg.LOGIC_OPERATION_NOR,"NOR"],[ht.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(ln),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new ht.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:ht.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:ht.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:ht.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:ht.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},hn={init:function(){this.setColour(ln),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(ht.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(ht.Msg.LOGIC_NEGATE_TOOLTIP)}},Mn={init:function(){var t=[[ht.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[ht.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(ln),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new ht.FieldDropdown(t),"BOOL"),this.setTooltip(ht.Msg.LOGIC_BOOLEAN_TOOLTIP)}},mn={init:function(){this.setColour(ln),this.setOutput(!0),this.appendDummyInput().appendField(ht.Msg.LOGIC_NULL),this.setTooltip(ht.Msg.LOGIC_NULL_TOOLTIP)}},En={init:function(){this.setColour(ln),this.appendValueInput("A"),this.appendValueInput("B").appendField(ht.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(ht.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},On={init:function(){var t=[[ht.Msg.TEXT_APPEND_TO,"in"],[ht.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(ln),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new ht.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(ht.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ht.Msg.IN)}},Rn={init:function(){var t=[[ht.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[ht.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(ln),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ht.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},cn={init:function(){this.setColour(ln),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(ht.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},gn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(ht.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Cn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(ht.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=ht.Msg.MIXLY_USE,n=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=ht.Msg.MIXLY_BELONG;return i+{r:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ht.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=ht.Msg.MIXLY_USE,n=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=ht.Msg.MIXLY_BELONG,o=ht.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},An={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(ht.Msg.MIXPY_TEXT_ENCODE).appendField(new ht.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=ht.Msg.MIXLY_USE,n=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=ht.Msg.MIXLY_BELONG,o=ht.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Ln={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+ht.Msg.MIXLY_MICROBIT_TYPE_STRING+ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Nn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(ht.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=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},fn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(ht.Msg.MICROBIT_PYTHON_TYPE)}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ht.Msg.HTML_FILE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Yn={init:function(){this.setColour(0),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};ht.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const xn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[ht.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(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+ht.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(ht.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=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Vn={init:function(){this.setColour(0),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Bn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[ht.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 ht.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+ht.Msg.MIXLY_ESP32_SET+{mkdir:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(ht.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.HTML_FILE,"isfile"],[ht.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 ht.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+ht.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},kn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP+ht.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(ht.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(ht.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(ht.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Wn={};Wn.NAME_TYPE=ht.PROCEDURE_CATEGORY_NAME,Wn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(ht.Msg.MIXLY_AIP_ATTR).setAlign(ht.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gs={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ht.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Us={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ht.Msg.HTML_FORM_CONTENT).appendField(new ht.FieldDropdown([[ht.Msg.HTML_TEXT,"text"],[ht.Msg.HTML_EMAIL,"email"],[ht.Msg.HTML_NUMBER,"number"],[ht.Msg.HTML_PASSWORD,"password"],[ht.Msg.HTML_CHECKBOX,"checkbox"],[ht.Msg.HTML_RADIOBUTTON,"radiobutton"],[ht.Msg.HTML_BUTTON,"button"],[ht.Msg.HTML_COLOUR,"colour"],[ht.Msg.HTML_DATE,"date"],[ht.Msg.HTML_LOCALTIME,"local time"],[ht.Msg.HTML_FILE,"file"],[ht.Msg.HTML_HIDDEN,"hidden"],[ht.Msg.HTML_IMAGE,"image"],[ht.Msg.HTML_MONTH,"month"],[ht.Msg.HTML_RANGE,"range"],[ht.Msg.HTML_RESET,"reset"],[ht.Msg.HTML_SEARCH,"search"],[ht.Msg.HTML_SUBMIT,"submit"],[ht.Msg.HTML_TELEPHONENUMBER,"telephone number"],[ht.Msg.HTML_TIME,"time"],[ht.Msg.HTML_URL,"url"],[ht.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(ht.Msg.HTML_NAME).appendField(new ht.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(ht.Msg.HTML_VALUE).appendField(new ht.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(ht.Msg.MIXLY_AIP_ATTR).setAlign(ht.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new ht.FieldTextInput("property"),"KEY").appendField(":").appendField(new ht.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new ht.FieldTextInput("property"),"KEY").appendField(":").appendField(new ht.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hs={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ht.Msg.HTML_TEXT).appendField(new ht.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws=160,Ks={init:function(){this.setColour(Ws),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new ht.FieldTable(""),"TEXT")}},Js={init:function(){this.setColour(Ws),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new ht.FieldMultilineInput(""),"TEXT")}},Qs={init:function(){this.setColour(Ws),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new ht.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},qs={init:function(){this.setColour(Ws),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},zs={init:function(){this.setColour(Ws),this.appendDummyInput().appendTitle("Comment:").appendTitle(new ht.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},js={init:function(){this.setColour(Ws),this.appendValueInput("VALUE").appendField(ht.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Zs={init:function(){this.setColour(Ws),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ht.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(ht.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=ht.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+")"},ht.isNumber(n)&&ht.isNumber(s)&&ht.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 Vp=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]},Bp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Gp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Up=function(t,e){return["None",e.ORDER_ATOMIC]},wp=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]},kp=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]},Hp=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]},Wp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Kp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Jp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Qp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},qp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},zp=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},jp=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Zp=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]},$p=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]},ea=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ia=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},na=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"},_a=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},pa=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"},aa=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]},ra=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},la=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"},da=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]},Ia=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"},Ta=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"},ha=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),ht.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]},qa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},za=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},ja=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"},$a=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},tu=function(t,e){return'"},eu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},iu=function(){return this.getFieldValue("TEXT")+"\n"},nu=function(t){return t.getFieldValue("TEXT")+"\n"},su=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},_u=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},ou=function(){return""},pu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},au=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},ru.scrubNakedValue=function(t){return t+"\n"},ru.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},ru.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},ru.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=ht.utils.string.wrap(_,ru.COMMENT_WRAP-3),n+=ru.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const lu="#74A55B",du={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_RGB_PIN_COUNT)}},Iu={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ht.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Tu={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ht.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(ht.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},hu={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(ht.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Mu={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(ht.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(ht.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(ht.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},mu={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Eu={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_RESET)}},Ou={init:function(){this.setColour(lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ru={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING).appendField(ht.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},cu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},gu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Cu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING).appendField(ht.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Su={init:function(){this.setColour(lu),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_SETUP+ht.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Au={init:function(){this.setColour(lu),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_SERVO).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SERVO_MOVE)}},Lu={init:function(){this.setColour(lu),this.appendValueInput("VAR").appendField("360°"+ht.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_SETTING+ht.Msg.blockpy_turtle_rotate+ht.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},Nu={init:function(){this.setColour(lu),this.appendValueInput("PIN",Number).appendField("180°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SERVO_MOVE)}},Du={init:function(){this.setColour(lu),this.appendValueInput("PIN",Number).appendField("360°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},fu={init:function(){this.setColour(lu),this.appendValueInput("PIN",Number).appendField("180°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Fu={init:function(){this.setColour(lu),this.appendValueInput("PIN",Number).appendField("360°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new ht.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(ht.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},vu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"ms32006.MOT_CW"],[ht.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[ht.Msg.MOTOR_N,"ms32006.MOT_N"],[ht.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},Yu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new ht.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"ms32006.MOT_CW"],[ht.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},xu={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_RGB_PIN_COUNT)}},Xu={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},bu={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ht.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},yu={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_WRI)}},Vu={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new ht.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP+ht.Msg.LISTS_SET_INDEX_INPUT_TO+"SYN6288"+ht.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Bu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(ht.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Gu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Uu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(ht.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(ht.Msg.MIXLY_PROGRAM_BLOCK).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},wu={init:function(){this.setColour(lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(ht.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(ht.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(ht.Msg.MIXLY_PROGRAM_BLOCK).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},ku={init:function(){this.setColour(lu),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Hu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_MOTOR).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Wu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_MOTOR).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ku={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_TRAFFIC_LIGHT).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.LISTS_SET_INDEX_SET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[ht.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[ht.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[ht.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[ht.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[ht.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[ht.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ju={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN).appendField(new ht.FieldDropdown([[ht.Msg.COLOUR_RGB_WHITE,"W"],[ht.Msg.COLOUR_RGB_RED,"R"],[ht.Msg.COLOUR_RGB_YELLOW,"Y"],[ht.Msg.COLOUR_RGB_GREEN,"G"],[ht.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN).appendField(new ht.FieldDropdown([[ht.Msg.COLOUR_RGB_WHITE,"W"],[ht.Msg.COLOUR_RGB_RED,"R"],[ht.Msg.COLOUR_RGB_YELLOW,"Y"],[ht.Msg.COLOUR_RGB_GREEN,"G"],[ht.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},qu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[ht.Msg.MIXLY_SPEED,"[1]"],[ht.Msg.MATH_SINGLE_OP_ABSOLUTE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[ht.Msg.MIXLY_RELATIVE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[ht.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[ht.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[ht.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},zu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[ht.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[ht.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ju={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.MATH_SINGLE_OP_ABSOLUTE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ht.Msg.MSG.run).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MODE).setAlign(ht.inputs.Align.RIGHT).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_SPEED+ht.Msg.MIXLY_MODE,"0"],[ht.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ht.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ht.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(ht.inputs.Align.RIGHT).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"0"],[ht.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[ht.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},$u={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.MIXLY_RELATIVE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ht.Msg.MSG.run).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tr={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.MIXLY_RELATIVE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ht.Msg.MSG.run).appendField("("+ht.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MODE).setAlign(ht.inputs.Align.RIGHT).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_SPEED+ht.Msg.MIXLY_MODE,"0"],[ht.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ht.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ht.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},er={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.ME_GO_MOTOR_EXTERN+ht.Msg.MIXLY_SERVO_MOTOR).appendField(ht.Msg.MIXLY_RELATIVE+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ht.Msg.MSG.run).appendField("("+ht.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LEFT,"0"],[ht.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MODE).setAlign(ht.inputs.Align.RIGHT).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_SPEED+ht.Msg.MIXLY_MODE,"0"],[ht.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ht.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ht.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(ht.inputs.Align.RIGHT).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"0"],[ht.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ir={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.MIXBOT).appendField(ht.Msg.ME_GO_MOTOR_EXTERN).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MOTOR,"ext_motor"],[ht.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[ht.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[ht.Msg.COLOUR_RGB_RED+"LED","R_LED"],[ht.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[ht.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[ht.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[ht.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},nr={init:function(){this.setColour(lu),this.appendDummyInput().appendField(ht.Msg.MIXBOT).appendField(ht.Msg.ME_GO_MOTOR_EXTERN).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MOTOR,"ext_motor"],[ht.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[ht.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[ht.Msg.COLOUR_RGB_RED+"LED","R_LED"],[ht.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[ht.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[ht.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[ht.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sr="#6C9858",_r={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(new ht.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},or={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_ESP32_ON,"1"],[ht.Msg.MIXLY_ESP32_OFF,"0"],[ht.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},pr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ht.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_SETONOFF)}},ar={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(ht.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(ht.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_GETONOFF)}},ur={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(ht.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(ht.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_GETONOFF)}},rr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ht.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_SETTING+ht.Msg.MIXLY_BUILDIN_LED+ht.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},lr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ht.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(ht.Msg.MIXLY_LCD_SETCOLOR).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_LIGHT_RED,"1"],[ht.Msg.MIXLY_LIGHT_GREEN,"2"],[ht.Msg.MIXLY_LIGHT_BLUE,"3"],[ht.Msg.MIXLY_LIGHT_YELLOW,"4"],[ht.Msg.MIXLY_LIGHT_CYAN,"5"],[ht.Msg.MIXLY_LIGHT_PURPLE,"6"],[ht.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},dr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING).appendField(ht.Msg.MIXLY_BUILDIN_LED).appendField(new ht.FieldDropdown([[ht.Msg.COLOUR_RGB_RED,"r"],[ht.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_SETONOFF)}},Ir={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_BUILDIN_LED).appendField(new ht.FieldDropdown([[ht.Msg.COLOUR_RGB_RED,"r"],[ht.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(ht.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_GETONOFF)}},Tr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_BUILDIN_LED).appendField(new ht.FieldDropdown([[ht.Msg.COLOUR_RGB_RED,"r"],[ht.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(ht.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_GETONOFF)}},hr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETTING).appendField(ht.Msg.MIXLY_BUILDIN_LED).appendField(new ht.FieldDropdown([[ht.Msg.COLOUR_RGB_RED,"r"],[ht.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_SETTING+ht.Msg.MIXLY_BUILDIN_LED+ht.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Mr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(new ht.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},mr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Mt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Er={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ht.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Or={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(ht.Msg.MIXLY_DURATION).appendField(ht.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Rr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ht.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ht.Msg.PYTHON_RANGE_STEP).appendField(ht.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},cr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_WRI)}},gr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Mt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(ht.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Cr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ht.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Sr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ht.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ht.Msg.PYTHON_RANGE_STEP).appendField(ht.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Ar={init:function(){this.setColour(sr),this.appendValueInput("TICKS").setCheck(Number).appendField(ht.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(ht.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(ht.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Lr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Nr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_RESET)}},Dr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ht.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},fr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ht.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(ht.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Fr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pr={init:function(){this.setColour(sr),this.appendValueInput("LIST").appendField(ht.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},vr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MOTOR_DC).appendField(new ht.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"CW"],[ht.Msg.ANTI_CLOCKWISE,"CCW"],[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(sr),this.appendDummyInput().appendField("MixGo Car").appendField(new ht.FieldDropdown([[ht.Msg.blockpy_forward,"F"],[ht.Msg.blockpy_backward,"B"],[ht.Msg.blockpy_left,"L"],[ht.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(sr),this.appendDummyInput("").appendField("MixGo Car").appendField(new ht.FieldDropdown([[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Xr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MOTOR_DC).appendField(new ht.FieldDropdown([[ht.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[ht.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"CW"],[ht.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MOTOR_DC).appendField(new ht.FieldDropdown([[ht.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[ht.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(ht.Msg.MIXLY_STOP).appendField(new ht.FieldDropdown([[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Vr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXBOT).appendField(new ht.FieldDropdown([[ht.Msg.blockpy_forward,"F"],[ht.Msg.blockpy_backward,"B"],[ht.Msg.blockpy_left,"L"],[ht.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[ht.Msg.MIXLY_SPEED,"SPEED"],[ht.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Br={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXBOT).appendField(new ht.FieldDropdown([[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXBOT).appendField(ht.Msg.MIXLY_MOTOR).appendField(new ht.FieldDropdown([[ht.Msg.TEXT_TRIM_LEFT,"1"],[ht.Msg.TEXT_TRIM_RIGHT,"2"],[ht.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[ht.Msg.MIXLY_SPEED,"SPEED"],[ht.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ur={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[ht.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},wr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.BITBOT).appendField(new ht.FieldDropdown([[ht.Msg.blockpy_forward,"F"],[ht.Msg.blockpy_backward,"B"],[ht.Msg.blockpy_left,"L"],[ht.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},kr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.BITBOT).appendField(new ht.FieldDropdown([[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Hr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.BITBOT).appendField(ht.Msg.MIXLY_MOTOR).appendField(new ht.FieldDropdown([[ht.Msg.TEXT_TRIM_LEFT,"0"],[ht.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"CW"],[ht.Msg.ANTI_CLOCKWISE,"CCW"],[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wr={init:function(){this.setColour(sr),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_SETONOFF)}},Kr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_GETONOFF)}},Jr={init:function(){this.setColour(sr),this.appendValueInput("bright").appendField(ht.Msg.MIXLY_SETTING+ht.Msg.MIXLY_MIXBOT_BUZZER+ht.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_SETONOFF)}},Qr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_MIXBOT_BUZZER+ht.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_LED_GETONOFF)}},qr={init:function(){this.setColour(sr),this.appendValueInput("PATH").appendField(ht.Msg.MIXLY_RECORD_AUDIO).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(ht.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},zr={init:function(){this.setColour(sr),this.appendValueInput("PATH").appendField(ht.Msg.MIXLY_PLAY_AUDIO).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},jr={init:function(){this.setColour(sr),this.appendValueInput("PATH").appendField(ht.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Zr={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ht.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},$r={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tl={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.LISTS_SET_INDEX_SET+ht.Msg.ME_GO_MOTOR_EXTERN).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.blynk_IOT_IR_POWER+ht.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},el={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.ME_GO_MOTOR_EXTERN).appendField(ht.Msg.PIN_NUMBERING).appendField(new ht.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.blynk_IOT_IR_POWER+ht.Msg.MIXLY_PINMODEOUT+ht.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},il={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.LISTS_SET_INDEX_SET+ht.Msg.ME_GO_MOTOR_EXTERN).appendField(ht.Msg.MIXLY_ALL+ht.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(ht.ALIGN_RIGHT).appendField(ht.Msg.blynk_IOT_IR_POWER+ht.Msg.MIXLY_PINMODEOUT+ht.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},nl={init:function(){this.setColour(sr),this.appendDummyInput().appendField(ht.Msg.ANALOG+ht.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(ht.Msg.MIXLY_RELEASE).appendField(new ht.FieldDropdown([[ht.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ht.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.ANALOG+ht.Msg.MIXLY_KEYBOARD_INPUT)}},sl={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SPECIAL_KEY).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[ht.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[ht.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[ht.Msg.MIXLY_SPECIAL_KEY1,"0x04"],[ht.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[ht.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[ht.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[ht.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[ht.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},_l={init:function(){this.setColour(sr),this.appendDummyInput("").appendField(ht.Msg.MIXLY_GENERAL_KEY).appendField(new ht.FieldDropdown([[ht.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)}},ol={init:function(){this.setColour(sr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new ht.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(ht.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;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},hm={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ht.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Mm={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},mm={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Em={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(ht.Msg.MIXLY_EMQX_SERVER).setAlign(ht.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(ht.Msg.MIXLY_WIFI_USERNAME).setAlign(ht.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(ht.Msg.MIXLY_IOT_PASSWORD).setAlign(ht.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(ht.Msg.MIXLY_EMQX_PROJECT).setAlign(ht.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Om={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(ht.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(ht.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(ht.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},Rm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(ht.Msg.MIXLY_EMQX_SUBSCRIBE+ht.Msg.MIXLY_MICROBIT_MSG).appendField(ht.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(ht.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},cm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ht.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sm={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ht.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Am={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ht.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Lm={init:function(){this.setColour(am),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},Nm={init:function(){this.setColour(am),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Dm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ht.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},fm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO").appendField(ht.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(ht.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},Fm={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(ht.Msg.MIXLY_EMQX_SERVER).setAlign(ht.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+ht.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(ht.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pm={init:function(){this.setColour(am),this.appendDummyInput().appendField(ht.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(ht.Msg.MIXLY_EMQX_SERVER).setAlign(ht.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(ht.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vm={init:function(){this.VISITOR_ID=Mt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(am),this.appendDummyInput("").appendField(new ht.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")}},Ym={init:function(){this.setColour(am),this.appendDummyInput().appendField("MixIO").appendField(ht.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},xm={init:function(){this.setColour(am),this.appendDummyInput().appendField("HTTP"+ht.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(ht.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(ht.Msg.MIXLY_REQUESTS_GET).appendField(ht.Msg.MIXLY_GET_CURRENT_TIME).appendField(ht.Msg.MIXLY_OPEN_DEBUG).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xm={init:function(){this.setColour(am),this.appendDummyInput().appendField("HTTP"+ht.Msg.MIXLY_Client).appendField(ht.Msg.MIXLY_GET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_REQUESTS_LEN,"client_len"],[ht.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[ht.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},bm={init:function(){this.setColour(am),this.appendDummyInput().appendField("MQTT"+ht.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(ht.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(ht.Msg.MIXLY_INIT_SUBSCRIBE).appendField(ht.Msg.MQTT_Topic).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(ht.Msg.MIXLY_OPEN_DEBUG).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ht.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ym={init:function(){this.setColour(am),this.appendDummyInput().appendField("MQTT"+ht.Msg.MIXLY_Client).appendField(ht.Msg.MIXLY_GET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_REQUESTS_LEN,"client_len"],[ht.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[ht.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},Vm=um,Bm=rm,Gm=lm,Um=dm,wm=Tm,km=225,Hm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(ht.Msg.MIXLY_NETWORK_MODE).appendField(new ht.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},Wm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[ht.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(ht.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=ht.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:ht.Msg.MIXLY_NETWORK_WIFI_OPEN,False:ht.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},Km={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},Jm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return ht.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:ht.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},Qm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(ht.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(ht.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},qm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_NETWORK_WIFI_CONNECT+ht.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},zm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[ht.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[ht.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 ht.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:ht.Msg.MIXLY_ESP32_NETWORK_IP,1:ht.Msg.MIXLY_ESP32_NETWORK_MASK,2:ht.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},jm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},Zm={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[ht.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},$m={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(ht.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(ht.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},tE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},eE={init:function(){this.setColour(km),this.appendValueInput("VAR").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new ht.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 ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},iE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},nE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},sE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},_E={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},oE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},pE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},aE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},uE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},rE={init:function(){this.setColour(km),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},lE={init:function(){this.setColour(km),this.appendValueInput("DOMAIN").appendField(ht.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ht.Msg.blockpy_REQUESTS_GET).appendField(new ht.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},dE={init:function(){this.appendValueInput("VAL");var t=[[ht.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[ht.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[ht.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[ht.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]];this.setColour(km),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ht.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:ht.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:ht.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:ht.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},IE={init:function(){this.appendValueInput("VAR").appendField(ht.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(km),this.appendDummyInput("").appendField(ht.Msg.blockpy_CONDUCT).appendField(new ht.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(ht.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:ht.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:ht.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},TE={init:function(){this.setColour(km),this.appendDummyInput("").appendField(ht.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(ht.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},hE={init:function(){this.setColour(km),this.appendDummyInput("").appendField(new ht.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)}},ME="#3288dd",mE={init:function(){this.setColour(ME),this.appendValueInput("URL").appendField(ht.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ht.Msg.blockpy_CONDUCT).appendField(new ht.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(ht.Msg.blockpy_REQUESTS).appendField(ht.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},EE={init:function(){this.setColour(ME),this.appendValueInput("URL").appendField(ht.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ht.Msg.blockpy_CONDUCT).appendField(new ht.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(ht.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(ht.Msg.blockpy_REQUESTS+ht.Msg.OLED_STRING),this.appendDummyInput("").appendField(ht.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},OE={init:function(){this.appendValueInput("VAL");var t=[[ht.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[ht.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[ht.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[ht.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[ht.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(ME),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ht.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},RE=100,cE={init:function(){if("mixgo_nova"==Mt.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(RE),this.appendDummyInput().appendField(t).appendField(ht.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},gE={init:function(){if("mixgo_nova"==Mt.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(RE),this.appendValueInput("PIN").appendField(t).appendField(ht.Msg.MOTOR_DC).appendField(ht.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"CW"],[ht.Msg.ANTI_CLOCKWISE,"CCW"],[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},CE={init:function(){if("mixgo_nova"==Mt.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(RE),this.appendValueInput("PIN").appendField(t).appendField(ht.Msg.SET_USB),this.appendValueInput("percent").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_POWER_SUPPLY),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},SE={init:function(){if("mixgo_nova"==Mt.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(RE),this.appendDummyInput().appendField(t).appendField(ht.Msg.MIXLY_SPK_STATE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_ON,"True"],[ht.Msg.MIXLY_OFF,"False"]]),"state"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},AE=100,LE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("I2CSUB").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP+ht.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},NE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},DE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(ht.Msg.MOTOR_DC).appendField(ht.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Direction).appendField(new ht.FieldDropdown([[ht.Msg.CLOCKWISE,"CW"],[ht.Msg.ANTI_CLOCKWISE,"CCW"],[ht.Msg.MOTOR_P,"P"],[ht.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(ht.Msg.MOTOR_DC).appendField(ht.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(ht.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},FE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SERVO_MOVE)}},PE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ht.inputs.Align.RIGHT).appendField(ht.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},vE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+ht.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},YE={init:function(){var t=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+ht.Msg.MIXLY_SERVO).appendField(ht.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET+ht.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},xE="#A58C5B",XE={init:function(){this.setColour(xE),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_BUTTON).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(ht.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_SENOR_IS_PRESSED)}},bE={init:function(){this.setColour(xE),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_BUTTON).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(ht.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_SENOR_WAS_PRESSED)}},yE={init:function(){this.setColour(xE),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_BUTTON).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(ht.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.PROCEDURES_DEFRETURN_RETURN+ht.Msg.MIXLY_BUTTON+ht.Msg.MIXLY_GET_PRESSES)}},VE={init:function(){this.setColour(xE),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_BUTTON).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[ht.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[ht.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},BE={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_shake,"shake"],[ht.Msg.MIXLY_UP,"up"],[ht.Msg.MIXLY_DOWN,"down"],[ht.Msg.MIXLY_LEFT,"left"],[ht.Msg.MIXLY_RIGHT,"right"],[ht.Msg.MIXLY_MICROBIT_face_up,"face up"],[ht.Msg.MIXLY_MICROBIT_face_down,"face down"],[ht.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=ht.Msg.MIXLY_MICROBIT_JS_CURRENT,n=ht.Msg.MSG.catSensor,s=ht.Msg.MIXLY_MICROBIT_JS_STATE,_=ht.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:ht.Msg.MIXLY_MICROBIT_shake,up:ht.Msg.MIXLY_UP,down:ht.Msg.MIXLY_DOWN,left:ht.Msg.MIXLY_LEFT,right:ht.Msg.MIXLY_RIGHT,"face up":ht.Msg.MIXLY_MICROBIT_face_up,"face down":ht.Msg.MIXLY_MICROBIT_face_down,freefall:ht.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},GE={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new ht.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ht.Msg.MIXLY_MICROBIT_Direction,s=ht.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":ht.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},UE={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},wE={init:function(){var t=[[ht.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ht.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(xE),this.appendValueInput("PIN",Number).appendField(new ht.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new ht.FieldDropdown(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:ht.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))}},kE={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},HE={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},WE={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new ht.FieldDropdown([[ht.Msg.TEXT_TRIM_LEFT,"left"],[ht.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(ht.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=ht.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=ht.Msg.MIXLY_ESP32_NEAR;return i+{left:ht.Msg.TEXT_TRIM_LEFT,right:ht.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},KE={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[ht.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()":ht.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":ht.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},JE={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[ht.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()":ht.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":ht.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},QE={init:function(){this.setColour(xE),this.appendValueInput("PIN",Number).appendField("DS18X20 "+ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ht.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},qE={init:function(){this.setColour(xE),this.appendDummyInput("").appendField("LM35"+ht.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ht.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_TOOLTIP_LM35)}},zE={init:function(){this.setColour(xE),this.appendValueInput("I2CSUB").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP+ht.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ht.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},jE={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[ht.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[ht.Msg.MIXLY_ESP32_MAX30102_IR+","+ht.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ZE={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[ht.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[ht.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},$E={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},tO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.HTML_COLOUR+ht.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GET+ht.Msg.HTML_COLOUR,"[2]"],[ht.Msg.MIXLY_GET+ht.Msg.MIXLY_IR_STRENGTH,"[1]"],[ht.Msg.MIXLY_GET+ht.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},eO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GET_ENV_LIGHT,"E"],[ht.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},iO={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},nO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ht.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:ht.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:ht.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},sO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ht.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:ht.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:ht.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},_O={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_Altitude+ht.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_GETPRESSURE,"pressure()"],[ht.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ht.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},oO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_MIXGOPE_FIELD+ht.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[ht.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},pO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_shake,"shake"],[ht.Msg.MIXLY_UP,"up"],[ht.Msg.MIXLY_DOWN,"down"],[ht.Msg.MIXLY_LEFT,"left"],[ht.Msg.MIXLY_RIGHT,"right"],[ht.Msg.MIXLY_MICROBIT_face_up,"face up"],[ht.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=ht.Msg.MIXLY_MICROBIT_JS_CURRENT,n=ht.Msg.MSG.catSensor,s=ht.Msg.MIXLY_MICROBIT_JS_STATE,_=ht.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:ht.Msg.MIXLY_MICROBIT_shake,up:ht.Msg.MIXLY_UP,down:ht.Msg.MIXLY_DOWN,left:ht.Msg.MIXLY_LEFT,right:ht.Msg.MIXLY_RIGHT,"face up":ht.Msg.MIXLY_MICROBIT_face_up,"face down":ht.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},aO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new ht.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ht.Msg.MIXLY_MICROBIT_Direction,s=ht.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":ht.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},uO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_GET+ht.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new ht.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=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ht.Msg.MIXLY_MICROBIT_Direction,s=ht.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":ht.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},rO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ht.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new ht.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=ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ht.Msg.MIXLY_MICROBIT_Direction,s=ht.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":ht.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},lO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},dO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_GETTEMPERATUE)}},IO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[ht.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 ht.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:ht.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:ht.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},TO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},hO={init:function(){this.setColour(xE),this.appendValueInput("SPISUB").appendField(ht.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(ht.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP+ht.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ht.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},MO={init:function(){this.setColour(xE),this.appendDummyInput().appendField("RFID"+ht.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ht.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[ht.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mO={init:function(){this.setColour(xE),this.appendDummyInput().appendField("RFID"+ht.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},EO={init:function(){this.setColour(xE),this.appendDummyInput().appendField("RFID"+ht.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ht.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},OO={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ht.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(ht.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},RO={init:function(){this.setColour(xE),this.appendDummyInput().appendField(ht.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ht.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(ht.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(ht.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},cO={init:function(){this.setColour(xE),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_RFID_SCAN_OK,"0"],[ht.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[ht.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},gO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ht.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)")}},CO={init:function(){this.setColour(xE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},SO={init:function(){this.setColour(xE),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)}},AO={init:function(){this.setColour(xE),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 ht.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_zero"].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},dN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},IN=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"},TN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},hN=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"},MN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},mN=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"},EN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},ON=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},RN=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]},cN=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"},gN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},CN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},SN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},AN=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]},LN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},NN=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"},DN=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"},fN=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"},FN=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"}},PN=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"},vN=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},YN=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]},xN=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"},XN=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},bN=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"}},yN=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"}},VN=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"},BN=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"},GN=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},UN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},wN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},kN=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"},HN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},WN=function(t,e){e.definitions_.import_st7789="import st7789";var i=Mt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_zero"].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"},KN=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},JN=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]},QN=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},qN=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},zN=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},jN=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},ZN=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},$N=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"},tD=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"},eD=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"},iD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},nD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},sD=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),_=Mt.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},_D=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"},oD=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"},pD=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"},aD=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"},uD=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"},rD=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"},lD=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"},dD=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"},ID=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"},TD=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"},hD=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]},MD=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"},mD=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"},ED=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"},OD=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"},RD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},cD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},gD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},CD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},SD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},AD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},LD=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},ND=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},DD=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},pf=function(t,e){var i=Mt.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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},af=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},uf=function(t,e){var i=Mt.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},rf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},lf=function(t,e){var i=Mt.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},df=function(t,e){var i=Mt.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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},If=function(t,e){var i=Mt.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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},Tf=function(t,e){var i=Mt.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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},hf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},Mf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},mf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},Ef=function(t,e){var i=Mt.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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},Of=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},Rf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},cf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},gf=function(t,e){var i=Mt.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},Cf=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Sf=function(t,e){var i=Mt.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"},Af=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},Lf=function(t,e){var i=Mt.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 _},Nf=function(t,e){var i=Mt.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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},Df=function(t,e){var i=Mt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},ff=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Ff=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Pf=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},bx=function(){return"control.reset()\n"},yx=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},Vx=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"},Bx=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"},Gx=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},Ux=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},wx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},kx=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Hx=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},Wx=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},Kx=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Jx=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]}},Qx=function(){return"while True:\n pass\n"},qx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},zx=function(t,e){return e.definitions_.import_os="import os","os.uname()"},jx=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"}},Zx=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"}},$x=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"},tX=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"},eX=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]},iX=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},nX=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},sX=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},_X=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},oX=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},pX=iX,aX=tX,uX=eX,rX=jx,lX=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]},dX=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]},IX=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]},TX=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"},hX=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]},MX=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]},mX=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]},EX=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]},OX=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]},RX=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]},cX=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"},gX=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]},CX=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]},SX=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]},AX=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]},LX={};LX["元控青春"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Mt.Profile.generate(["0-18","21","33-48"]),input_pin:Mt.Profile.generate(["0-18","21","33-48"]),output_pin:Mt.Profile.generate(["0-18","21","33-48"]),pwm_input:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Mt.Profile.generate(["1-18"],"adc","adc"),pwm_output:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Mt.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Mt.Profile.generate(["1-13"]),haskylens_model:Mt.Profile.generate(["0-4"]),digital:Mt.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Mt.Profile.generate(["0-18","21","33-48"]),pwm:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Mt.Profile.generate(["1-18"]),analog:Mt.Profile.generate(["1-18"],"adc","adc"),touch:Mt.Profile.generate(["1-14"],"tc","tc"),touch_pin:Mt.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Mt.Profile.generate(["0-4"]),exlcdh:Mt.Profile.generate(["0-15"]),exlcdv:Mt.Profile.generate(["0-7"]),brightness:Mt.Profile.generate(["0-9"]),tts_voice:Mt.Profile.generate(["0-16"]),tts_builtin_music:Mt.Profile.generate(["0-47"]),tts_bgmusic:Mt.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","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"]]},LX["元控"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Mt.Profile.generate(["0-18","21","33-48"]),input_pin:Mt.Profile.generate(["0-18","21","33-48"]),output_pin:Mt.Profile.generate(["0-18","21","33-48"]),pwm_input:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Mt.Profile.generate(["1-18"],"adc","adc"),pwm_output:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Mt.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Mt.Profile.generate(["1-13"]),haskylens_model:Mt.Profile.generate(["0-4"]),digital:Mt.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Mt.Profile.generate(["0-18","21","33-48"]),pwm:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Mt.Profile.generate(["1-18"]),analog:Mt.Profile.generate(["1-18"],"adc","adc"),touch:Mt.Profile.generate(["1-14"],"tc","tc"),touch_pin:Mt.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Mt.Profile.generate(["0-4"]),exlcdh:Mt.Profile.generate(["0-15"]),exlcdv:Mt.Profile.generate(["0-7"]),brightness:Mt.Profile.generate(["0-9"]),tts_voice:Mt.Profile.generate(["0-16"]),tts_builtin_music:Mt.Profile.generate(["0-47"]),tts_bgmusic:Mt.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","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"]]},LX["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Mt.Profile.generate(["0-18","21","33-48"]),input_pin:Mt.Profile.generate(["0-18","21","33-48"]),output_pin:Mt.Profile.generate(["0-18","21","33-48"]),pwm_input:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Mt.Profile.generate(["1-18"],"adc","adc"),pwm_output:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Mt.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Mt.Profile.generate(["1-13"]),haskylens_model:Mt.Profile.generate(["0-4"]),digital:Mt.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Mt.Profile.generate(["0-18","21","33-48"]),pwm:Mt.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Mt.Profile.generate(["1-18"]),analog:Mt.Profile.generate(["1-18"],"adc","adc"),touch:Mt.Profile.generate(["1-14"],"tc","tc"),touch_pin:Mt.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Mt.Profile.generate(["0-4"]),exlcdh:Mt.Profile.generate(["0-15"]),exlcdv:Mt.Profile.generate(["0-7"]),brightness:Mt.Profile.generate(["0-9"]),tts_voice:Mt.Profile.generate(["0-16"]),tts_builtin_music:Mt.Profile.generate(["0-47"]),tts_bgmusic:Mt.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",".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 NX=LX,DX=20,fX={init:function(){this.setColour(DX),this.appendDummyInput("").appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_HIGH,"HIGH"],[ht.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},FX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(ht.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},PX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},vX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField("PWM"+ht.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(ht.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_TOOLTIP)}},YX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField("DAC"+ht.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(ht.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},xX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_mSecond,"period"],[ht.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(ht.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},XX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField("PWM"+ht.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(ht.Msg.MIXLY_FREQUENCY+ht.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},bX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},yX={init:function(){this.setColour(DX),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_REF_VOLTAGE+ht.Msg.MIXLY_STAT).appendField(new ht.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(ht.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},VX={init:function(){this.setColour(DX),this.appendValueInput("pin").appendField(ht.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ht.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(ht.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},BX={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MODE).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[ht.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[ht.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(ht.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},GX={init:function(){this.setColour(20),this.appendDummyInput().appendField(ht.Msg.MIXLY_SETUP).appendField(new ht.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(ht.Msg.MIXLY_MICROPYTHON_AS).appendField(new ht.FieldDropdown([[ht.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[ht.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[ht.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[ht.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},UX={init:function(){this.setColour(DX),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP).appendField(new ht.FieldTextInput("pwm#"),"PIN_OBJ").appendField(ht.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("PWM"+ht.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["pwm#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},wX={init:function(){this.setColour(DX),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP).appendField(new ht.FieldTextInput("dac#"),"PIN_OBJ").appendField(ht.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+ht.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.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){ht.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},kX={init:function(){this.setColour(DX),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP).appendField(new ht.FieldTextInput("adc#"),"PIN_OBJ").appendField(ht.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(ht.Msg.MIXLY_Analog_PINMODEIN),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){ht.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},HX={init:function(){this.setColour(DX),this.appendDummyInput("").appendField(ht.Msg.MIXLY_SETUP).appendField(new ht.FieldTextInput("tc#"),"PIN_OBJ").appendField(ht.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(ht.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(ht.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ht.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){ht.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},WX=GX,KX=XX,JX=HX,QX=VX,qX=BX,zX=230,jX={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.digital),"PIN"),this.setOutput(!0)}},ZX={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},$X={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},tb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},eb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},sb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},_b={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},ob={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},pb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},ab={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},ub={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},rb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},lb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},db={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},Ib={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.analog),"PIN"),this.setOutput(!0)}},Tb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},hb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.dac),"PIN"),this.setOutput(!0)}},Mb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},mb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Eb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},Ob={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},Rb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},cb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},gb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.touch),"PIN"),this.setOutput(!0)}},Cb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},Sb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Ab={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Lb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},Nb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},Db={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},fb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},Fb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},Pb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},vb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Yb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},xb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},Xb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},bb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},yb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},Vb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Bb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},Gb={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ht.FieldDropdown(Mt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},Ub=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},wb=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"},kb=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Hb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".duty("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Wb=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"},Kb=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"},Jb=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".freq("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Qb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},qb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},zb=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"},jb=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,ht.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},Zb=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pwm#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("pwm#"==i?"pwm"+n:e.variableDB_.getName(i,ht.Variables.NAME_TYPE))+" = machine.PWM(machine.Pin("+n+"))\n"},$b=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,ht.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},ty=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,ht.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},ey=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},iy=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,ht.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},ny=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},sy=ny,_y=ny,oy=ny,py=ny,ay=ny,uy=ny,ry=ny,ly=ny,dy=ny,Iy=ny,Ty=ny,hy=ny,My=ny,my=ny,Ey=ny,Oy=ny,Ry=ny,cy=ny,gy=ny,Cy=ny,Sy=ny,Ay=ny,Ly=ny,Ny=ny,Dy=ny,fy=ny,Fy=ny,Py=ny,vy=ny,Yy=ny,xy=ny,Xy=ny,by=ny,yy=ny,Vy=ny,By=ny,Gy=ny,Uy=ny,wy=ny,ky=ny,Hy=ny,Wy=ny,Ky=ny,Jy=ny;Object.assign(ht.Variables,Et),Object.assign(ht.Procedures,Kn),ht.Python=ru,ht.generator=ru,Mt.Profile.default={},Object.assign(Mt.Profile,NX),Object.assign(Mt.Profile.default,NX["MixGo CE"]),Object.assign(ht.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,b,H,k,v,y,W,f,w,U,G,V,F,D,N,x,Y,X,P,B,lt,dt),Object.assign(ht.Python.forBlock,T,h,M,m,E,O,R,c,g,C,S,A,L,et,ut,at,j,it,rt,Q,pt,ot,_t,nt,q,J,K,$,Z,tt,z,st,It,Tt)})(); \ No newline at end of file +class Ot{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")}},Vt={init:function(){this.setColour(vt),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)}},Bt={init:function(){this.setColour(vt),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")}},Gt={init:function(){this.setColour(vt),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]}))}},Ut={init:function(){this.setColour(vt),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")}},wt={init:function(){this.setColour(vt);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)}}},kt={init:function(){this.setColour(vt),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")}},Ht={init:function(){this.setColour(vt),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")}};Gt.OPERATORS=[[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],wt.OPERATORS=[[Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Wt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(Mt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Kt={init:function(){this.setColour(vt),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}},Jt={init:function(){this.setColour(vt),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(vt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},qt={init:function(){this.setColour(vt),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)}},zt={init:function(){this.setColour(vt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Mt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},jt={init:function(){this.jsonInit({message0:Mt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:vt,tooltip:Mt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Mt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Zt={init:function(){this.setColour(vt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Mt.Msg.MIXLY_STAT),this.setOutput(!0)}},$t={init:function(){this.setColour(vt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},te={init:function(){this.setColour(vt),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)}},ee={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(vt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},ie={init:function(){this.setColour(vt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ne={init:function(){this.setColour(vt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},se={init:function(){this.setColour(vt),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},_e={init:function(){this.setColour(vt),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)}},oe={init:function(){this.setColour(vt),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)}},pe=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 ae={init:function(){this.setColour(pe),this.appendDummyInput().appendField(new Mt.FieldTextInput("0",Mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MATH_NUMBER_TOOLTIP)}},ue={init:function(){this.setColour(pe);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]}))}},re={init:function(){this.setColour(pe);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]}))}},le={init:function(){this.setColour(pe),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]}))}},de={init:function(){this.setColour(pe),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]}))}},Ie={init:function(){this.setColour(pe),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Te={init:function(){this.setColour(pe),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]}))}},Me={init:function(){var t=[[Mt.Msg.MATH_BIN,"bin"],[Mt.Msg.MATH_OCT,"oct"],[Mt.Msg.MATH_HEX,"hex"]];this.setColour(pe),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]}))}},he={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(pe),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]}))}},me={init:function(){var t=[[Mt.Msg.MIXLY_MAX,"max"],[Mt.Msg.MIXLY_MIN,"min"]];this.setColour(pe),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]}))}},Ee={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(pe),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]}))}},Oe={init:function(){var t=[[Mt.Msg.LANG_MATH_INT,"int"],[Mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(pe),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]}))}},Re={init:function(){this.setColour(pe),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)}},ce={init:function(){this.setColour(pe),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)}},ge={init:function(){this.setColour(pe),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)}},Ce={init:function(){this.setColour(pe),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)}},Se={init:function(){this.setColour(pe),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)}},Ae={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(pe),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]}))}},Le={init:function(){var t=[[Mt.Msg.MIXLY_TO_INT,"int"],[Mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(pe),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]}))}},Ne=ce,De={init:function(){this.setColour(pe),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)}},fe=160,Fe={init:function(){this.setColour(fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Mt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Mt.Msg.TEXT_TEXT_TOOLTIP)},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 Mt.FieldImage(e,12,12,'"')}},Pe={init:function(){this.setColour(fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Mt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Mt.Msg.TEXT_LINES_TOOLTIP)},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 Mt.FieldImage(e,12,12,'"')}};Mt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 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,'"')}},Ye={init:function(){this.setColour(fe),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)}},Xe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(Number).appendField(Mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},xe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(String).appendField(Mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},be={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ye={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ve={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(fe),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)}},Be={init:function(){this.setHelpUrl(Mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),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)}},Ge={init:function(){this.setHelpUrl(Mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Ue={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(fe),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"))}},we={init:function(){this.setHelpUrl(Mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(fe),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)}},ke={init:function(){var t=[[Mt.Msg.MIXLY_EQUALS,"==="],[Mt.Msg.MIXLY_STARTSWITH,"startswith"],[Mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},He={init:function(){this.setColour(fe),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)}},We={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(fe),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]}))}},Ke={init:function(){var t=[[Mt.Msg.TEXT_LJUST,"ljust"],[Mt.Msg.TEXT_CENTER,"center"],[Mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(fe),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)}},Je={init:function(){this.setColour(fe),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)}},Qe={init:function(){this.setColour(fe),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)}},qe={init:function(){this.setColour(fe),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)}},ze={init:function(){this.setColour(fe),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)}},je={init:function(){var t=[[Mt.Msg.TEXT_TRIM_BOTH,"strip"],[Mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(fe),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]}))}},Ze={init:function(){this.setColour(fe),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")}},Ji={init:function(){this.setColour(Wi),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Qi={init:function(){this.setColour(Wi),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}},qi={init:function(){this.setColour(Wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_KEYS),this.setTooltip(Mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},zi={init:function(){this.setColour(Wi),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)}},ji={init:function(){this.setColour(Wi),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)}},Zi={init:function(){this.setColour(Wi),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)}},$i={init:function(){this.setColour(Wi),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)}},tn={init:function(){this.setColour(Wi),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)}},en={init:function(){this.setColour(Wi),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)}},nn={init:function(){this.setColour(Wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_ITEMS),this.setTooltip(Mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour(Wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.DICT_VALUES),this.setTooltip(Mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},_n={init:function(){this.setColour(Wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_LENGTH),this.setTooltip(Mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},on={init:function(){this.setColour(Wi),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)}},pn={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(Wi),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")}},an={init:function(){this.setColour(Wi),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)}},un={init:function(){this.setColour(Wi),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)}},rn={init:function(){this.setColour(Wi),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")}},ln={init:function(){this.setColour(Wi),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},dn={init:function(){this.setColour(Wi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_TO_JSON),this.setTooltip(Mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},In={init:function(){this.setColour(Wi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn=210,Mn={init:function(){var t=Mt.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 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]}},hn={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(Tn),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)}},mn={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(Tn),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]}))}},En={init:function(){this.setColour(Tn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Mt.Msg.LOGIC_NEGATE_TOOLTIP)}},On={init:function(){var t=[[Mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Tn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Mt.FieldDropdown(t),"BOOL"),this.setTooltip(Mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Rn={init:function(){this.setColour(Tn),this.setOutput(!0),this.appendDummyInput().appendField(Mt.Msg.LOGIC_NULL),this.setTooltip(Mt.Msg.LOGIC_NULL_TOOLTIP)}},cn={init:function(){this.setColour(Tn),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)}},gn={init:function(){var t=[[Mt.Msg.TEXT_APPEND_TO,"in"],[Mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Tn),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)}},Cn={init:function(){var t=[[Mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Tn),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)}},Sn={init:function(){this.setColour(Tn),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},An={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)}},Ln={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")}},Nn={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}))}},Dn={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}))}},fn={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)}},Fn={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)}},Pn={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}))}},vn={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)}},Yn={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)}},Xn={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)}},xn={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)}},bn={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 yn={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)}},Vn={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)}},Bn={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)}},Gn={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}))}},Un={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)}},wn={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]}))}},kn={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)}},Hn={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)}},Wn={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]}))}},Kn={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)}},Jn={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()}},Qn={};Qn.NAME_TYPE=Mt.PROCEDURE_CATEGORY_NAME,Qn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},ks={init:function(){this.setColour(ys),this.appendDummyInput().appendField(Mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Hs={init:function(){this.setColour(ys),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)}},Ws={init:function(){this.setColour(ys),this.appendDummyInput().appendField(new Mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(ys),this.appendDummyInput().appendField(new Mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(ys),this.appendDummyInput().appendField(Mt.Msg.HTML_TEXT).appendField(new Mt.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 Mt.FieldTable(""),"TEXT")}},zs={init:function(){this.setColour(Qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Mt.FieldMultilineInput(""),"TEXT")}},js={init:function(){this.setColour(Qs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Zs={init:function(){this.setColour(Qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},$s={init:function(){this.setColour(Qs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},t_={init:function(){this.setColour(Qs),this.appendValueInput("VALUE").appendField(Mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},e_={init:function(){this.setColour(Qs),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 kp=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]},Hp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Wp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Kp=function(t,e){return["None",e.ORDER_ATOMIC]},Jp=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]},Qp=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]},qp=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]},zp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},jp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Zp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},$p=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ta=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"},ia=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},na=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]},_a=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},pa=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]},ua=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ra=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]},da=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"},Ia=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ta=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ma=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},ha=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"},ma=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]},Ea=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"},Oa=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"},Ra=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]},tu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},eu=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},iu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},nu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},su=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},_u=function(t,e){return'"},ou=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},pu=function(){return this.getFieldValue("TEXT")+"\n"},au=function(t){return t.getFieldValue("TEXT")+"\n"},uu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},ru=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},lu=function(){return""},du=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Iu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+_.join("")+o.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+o.join("\n")},Mu.scrubNakedValue=function(t){return t+"\n"},Mu.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},Mu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Mu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Mt.utils.string.wrap(_,Mu.COMMENT_WRAP-3),n+=Mu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const hu="#74A55B",mu={init:function(){this.setColour(hu),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)}},Eu={init:function(){this.setColour(hu),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)}},Ou={init:function(){this.setColour(hu),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)}},Ru={init:function(){this.setColour(hu),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)}},cu={init:function(){this.setColour(hu),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(hu),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)}},Cu={init:function(){this.setColour(hu),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)}},Su={init:function(){this.setColour(hu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Au={init:function(){this.setColour(hu),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)}},Lu={init:function(){this.setColour(hu),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)}},Nu={init:function(){this.setColour(hu),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)}},Du={init:function(){this.setColour(hu),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)}},fu={init:function(){this.setColour(hu),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)}},Fu={init:function(){this.setColour(hu),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)}},Pu={init:function(){this.setColour(hu),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)}},vu={init:function(){this.setColour(hu),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)}},Yu={init:function(){this.setColour(hu),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)}},Xu={init:function(){this.setColour(hu),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)}},xu={init:function(){this.setColour(hu),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)}},bu={init:function(){this.setColour(hu),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通信")}},yu={init:function(){this.setColour(hu),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)")}},Vu={init:function(){this.setColour(hu),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)")}},Bu={init:function(){this.setColour(hu),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)}},Gu={init:function(){this.setColour(hu),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)}},Uu={init:function(){this.setColour(hu),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)}},wu={init:function(){this.setColour(hu),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)}},ku={init:function(){this.setColour(hu),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+"SYN6288"+Mt.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Hu={init:function(){this.setColour(hu),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)}},Wu={init:function(){this.setColour(hu),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)}},Ku={init:function(){this.setColour(hu),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)}},Ju={init:function(){this.setColour(hu),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)}},Qu={init:function(){this.setColour(hu),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},qu={init:function(){this.setColour(hu),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)}},zu={init:function(){this.setColour(hu),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)}},ju={init:function(){this.setColour(hu),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)}},Zu={init:function(){this.setColour(hu),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)}},$u={init:function(){this.setColour(hu),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)}},tr={init:function(){this.setColour(hu),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)}},er={init:function(){this.setColour(hu),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)}},ir={init:function(){this.setColour(hu),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)}},nr={init:function(){this.setColour(hu),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)}},sr={init:function(){this.setColour(hu),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)}},_r={init:function(){this.setColour(hu),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)}},or={init:function(){this.setColour(hu),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)}},pr={init:function(){this.setColour(hu),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)}},ar={init:function(){this.setColour(hu),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)}},ur="#6C9858",rr={init:function(){this.setColour(ur),this.appendDummyInput("").appendField(new Mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},lr={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)}},dr={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)}},Ir={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)}},Tr={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)}},Mr={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%)")}},hr={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()}},mr={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)}},Er={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)}},Or={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)}},Rr={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)")}},cr={init:function(){this.setColour(ur),this.appendDummyInput("").appendField(new Mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},gr={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(ht.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)}}},Cr={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)}},Sr={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("")}},Ar={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("")}},Lr={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)}},Nr={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(ht.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)}}},Dr={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)}},fr={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("")}},Fr={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)}},Pr={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)}},vr={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)}},Yr={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)}},Xr={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)}},xr={init:function(){this.setColour(ur),this.appendDummyInput().appendField(Mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},br={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)}},yr={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)}},Vr={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)}},Br={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("")}},Gr={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)}},Ur={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)}},wr={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)}},kr={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)}},Hr={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)}},Wr={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)}},Kr={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)}},Jr={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)}},Qr={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)}},qr={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)}},zr={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)}},jr={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)}},Zr={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)}},$r={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)}},tl={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)}},el={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)}},il={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)}},nl={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)}},sl={init:function(){this.setColour(ur),this.appendDummyInput().appendField(Mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_l={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"]]),"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()}},ol={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)}},pl={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)}},al={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_KEY1,"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)}},rl={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)}},ll={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;ne?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")}},Rm={init:function(){this.setColour(Im),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},cm={init:function(){this.setColour(Im),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}},gm={init:function(){this.setColour(Im),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}},Cm={init:function(){this.setColour(Im),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)}},Sm={init:function(){this.setColour(Im),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)}},Am={init:function(){this.setColour(Im),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)}},Lm={init:function(){this.setColour(Im),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nm={init:function(){this.setColour(Im),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Dm={init:function(){this.setColour(Im),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fm={init:function(){this.setColour(Im),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Fm={init:function(){this.setColour(Im),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Pm={init:function(){this.setColour(Im),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},vm={init:function(){this.setColour(Im),this.appendValueInput("VAR").appendField(Mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Ym={init:function(){this.setColour(Im),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)}},Xm={init:function(){this.setColour(Im),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)}},xm={init:function(){this.setColour(Im),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)}},bm={init:function(){this.setColour(Im),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)}},ym={init:function(){this.VISITOR_ID=ht.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Im),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")}},Vm={init:function(){this.setColour(Im),this.appendDummyInput().appendField("MixIO").appendField(Mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Bm={init:function(){this.setColour(Im),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)}},Gm={init:function(){this.setColour(Im),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)}},Um={init:function(){this.setColour(Im),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)}},wm={init:function(){this.setColour(Im),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)}},km=Tm,Hm=Mm,Wm=hm,Km=mm,Jm=Om,Qm=225,qm={init:function(){this.setColour(Qm),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)}},zm={init:function(){this.setColour(Qm),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}))}},jm={init:function(){this.setColour(Qm),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)}},Zm={init:function(){this.setColour(Qm),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}))}},$m={init:function(){this.setColour(Qm),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)}},tE={init:function(){this.setColour(Qm),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)}},eE={init:function(){this.setColour(Qm),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]}))}},iE={init:function(){this.setColour(Qm),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)}},nE={init:function(){this.setColour(Qm),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)}},sE={init:function(){this.setColour(Qm),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)}},_E={init:function(){this.setColour(Qm),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)}},oE={init:function(){this.setColour(Qm),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]}))}},pE={init:function(){this.setColour(Qm),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)}},aE={init:function(){this.setColour(Qm),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)}},uE={init:function(){this.setColour(Qm),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)}},rE={init:function(){this.setColour(Qm),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)}},lE={init:function(){this.setColour(Qm),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)}},dE={init:function(){this.setColour(Qm),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)}},IE={init:function(){this.setColour(Qm),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)}},TE={init:function(){this.setColour(Qm),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)}},ME={init:function(){this.setColour(Qm),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)}},hE={init:function(){this.setColour(Qm),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")}},mE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(Qm),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:Mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},EE={init:function(){this.appendValueInput("VAR").appendField(Mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(Qm),this.appendDummyInput("").appendField(Mt.Msg.blockpy_CONDUCT).appendField(new Mt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},OE={init:function(){this.setColour(Qm),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)}},RE={init:function(){this.setColour(Qm),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)}},cE="#3288dd",gE={init:function(){this.setColour(cE),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("")}},CE={init:function(){this.setColour(cE),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("")}},SE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(cE),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Mt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},AE=100,LE={init:function(){if("mixgo_nova"==ht.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(AE),this.appendDummyInput().appendField(t).appendField(Mt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},NE={init:function(){if("mixgo_nova"==ht.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(AE),this.appendValueInput("PIN").appendField(t).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)}},DE={init:function(){if("mixgo_nova"==ht.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(AE),this.appendValueInput("PIN").appendField(t).appendField(Mt.Msg.SET_USB),this.appendValueInput("percent").setCheck(Number).setAlign(Mt.inputs.Align.RIGHT).appendField(Mt.Msg.MIXLY_POWER_SUPPLY),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fE={init:function(){if("mixgo_nova"==ht.Boards.getSelectedBoardKey().split(":")[2])var t="Nova G1";this.setColour(AE),this.appendDummyInput().appendField(t).appendField(Mt.Msg.MIXLY_SPK_STATE).appendField(new Mt.FieldDropdown([[Mt.Msg.MIXLY_ON,"True"],[Mt.Msg.MIXLY_OFF,"False"]]),"state"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},FE=100,PE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},vE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},YE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},XE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},xE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},bE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},yE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},VE={init:function(){var t=ht.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(FE),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)}},BE="#A58C5B",GE={init:function(){this.setColour(BE),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)}},UE={init:function(){this.setColour(BE),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)}},wE={init:function(){this.setColour(BE),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)}},kE={init:function(){this.setColour(BE),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)}},HE={init:function(){this.setColour(BE),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]+_}))}},WE={init:function(){this.setColour(BE),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}))}},KE={init:function(){this.setColour(BE),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)}},JE={init:function(){var t=[[Mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Mt.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(BE),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},QE={init:function(){this.setColour(BE),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)}},qE={init:function(){this.setColour(BE),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)}},zE={init:function(){this.setColour(BE),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}))}},jE={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("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]}))}},ZE={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("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]}))}},$E={init:function(){this.setColour(BE),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)}},tO={init:function(){this.setColour(BE),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)}},eO={init:function(){this.setColour(BE),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},iO={init:function(){this.setColour(BE),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)}},nO={init:function(){this.setColour(BE),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)}},sO={init:function(){this.setColour(BE),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},_O={init:function(){this.setColour(BE),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)}},oO={init:function(){this.setColour(BE),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)}},pO={init:function(){this.setColour(BE),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)}},aO={init:function(){this.setColour(BE),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]}))}},uO={init:function(){this.setColour(BE),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]}))}},rO={init:function(){this.setColour(BE),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)}},lO={init:function(){this.setColour(BE),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)}},dO={init:function(){this.setColour(BE),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]+_}))}},IO={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("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}))}},TO={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("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}))}},MO={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("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}))}},hO={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("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)}},mO={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Mt.Msg.MIXLY_GETTEMPERATUE)}},EO={init:function(){this.setColour(BE),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]}))}},OO={init:function(){this.setColour(BE),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)}},RO={init:function(){this.setColour(BE),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")}},cO={init:function(){this.setColour(BE),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)}},gO={init:function(){this.setColour(BE),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)}},CO={init:function(){this.setColour(BE),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)}},SO={init:function(){this.setColour(BE),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)}},AO={init:function(){this.setColour(BE),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)}},LO={init:function(){this.setColour(BE),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)}},NO={init:function(){this.setColour(BE),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)")}},DO={init:function(){this.setColour(BE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},fO={init:function(){this.setColour(BE),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)}},FO={init:function(){this.setColour(BE),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_zero"].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},mN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},EN=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"},ON=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},RN=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"},cN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},gN=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"},CN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},SN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},AN=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]},LN=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"},NN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},DN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},fN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},FN=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]},PN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},vN=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"},YN=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"},XN=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"},xN=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"}},bN=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"},yN=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},VN=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]},BN=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"},GN=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},UN=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"}},wN=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"}},kN=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"},HN=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"},WN=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},KN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},JN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},QN=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"},qN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},zN=function(t,e){e.definitions_.import_st7789="import st7789";var i=ht.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_zero"].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"},jN=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},ZN=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]},$N=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},tD=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},eD=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},iD=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},nD=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},sD=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"},_D=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"},oD=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"},pD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},aD=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},uD=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),_=ht.Boards.getSelectedBoardKey().split(":")[2],o="";return o=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_zero"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+o+")\n"},rD=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"},lD=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"},dD=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"},ID=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"},TD=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"},MD=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"},hD=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"},mD=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"},ED=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"},OD=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"},RD=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]},cD=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"},gD=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"},CD=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"},SD=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"},AD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},LD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+_+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+_+")\n")},ND=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},DD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},fD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},FD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},PD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},vD=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},YD=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},df=function(t,e){var i=ht.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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+_+",size = "+o+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},If=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},Tf=function(t,e){var i=ht.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},Mf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},hf=function(t,e){var i=ht.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},mf=function(t,e){var i=ht.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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},Ef=function(t,e){var i=ht.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");if("0x"==o.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},Of=function(t,e){var i=ht.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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},Rf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},cf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},gf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},Cf=function(t,e){var i=ht.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);if("0x"==_.slice(0,2))var o="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return o},Sf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},Af=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},Lf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},Nf=function(t,e){var i=ht.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},Df=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},ff=function(t,e){var i=ht.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"},Ff=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},Pf=function(t,e){var i=ht.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 _},vf=function(t,e){var i=ht.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");if("0x"==o.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+","+p+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},Yf=function(t,e){var i=ht.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},Xf=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},xf=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},bf=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},UX=function(){return"control.reset()\n"},wX=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||ht.Profile.default.serial)+")\n"},kX=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||ht.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||ht.Profile.default.serial)+")\n"},HX=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||ht.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||ht.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},WX=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},KX=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},JX=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},QX=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},qX=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},zX=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},jX=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},ZX=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]}},$X=function(){return"while True:\n pass\n"},tx=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},ex=function(t,e){return e.definitions_.import_os="import os","os.uname()"},ix=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"}},nx=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"}},sx=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"},_x=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"},ox=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]},px=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},ax=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},ux=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},rx=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},lx=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},dx=px,Ix=_x,Tx=ox,Mx=ix,hx=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]},mx=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]},Ex=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]},Ox=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"},Rx=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]},cx=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]},gx=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]},Cx=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]},Sx=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]},Ax=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]},Lx=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"},Nx=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]},Dx=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]},fx=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]},Fx=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]},Px={};Px["元控青春"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:ht.Profile.generate(["0-18","21","33-48"]),input_pin:ht.Profile.generate(["0-18","21","33-48"]),output_pin:ht.Profile.generate(["0-18","21","33-48"]),pwm_input:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:ht.Profile.generate(["1-18"],"adc","adc"),pwm_output:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:ht.Profile.generate(["1-18"],"adc","adc"),espnow_channel:ht.Profile.generate(["1-13"]),haskylens_model:ht.Profile.generate(["0-4"]),digital:ht.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:ht.Profile.generate(["0-18","21","33-48"]),pwm:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:ht.Profile.generate(["1-18"]),analog:ht.Profile.generate(["1-18"],"adc","adc"),touch:ht.Profile.generate(["1-14"],"tc","tc"),touch_pin:ht.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:ht.Profile.generate(["0-4"]),exlcdh:ht.Profile.generate(["0-15"]),exlcdv:ht.Profile.generate(["0-7"]),brightness:ht.Profile.generate(["0-9"]),tts_voice:ht.Profile.generate(["0-16"]),tts_builtin_music:ht.Profile.generate(["0-47"]),tts_bgmusic:ht.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","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"]]},Px["元控"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:ht.Profile.generate(["0-18","21","33-48"]),input_pin:ht.Profile.generate(["0-18","21","33-48"]),output_pin:ht.Profile.generate(["0-18","21","33-48"]),pwm_input:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:ht.Profile.generate(["1-18"],"adc","adc"),pwm_output:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:ht.Profile.generate(["1-18"],"adc","adc"),espnow_channel:ht.Profile.generate(["1-13"]),haskylens_model:ht.Profile.generate(["0-4"]),digital:ht.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:ht.Profile.generate(["0-18","21","33-48"]),pwm:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:ht.Profile.generate(["1-18"]),analog:ht.Profile.generate(["1-18"],"adc","adc"),touch:ht.Profile.generate(["1-14"],"tc","tc"),touch_pin:ht.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:ht.Profile.generate(["0-4"]),exlcdh:ht.Profile.generate(["0-15"]),exlcdv:ht.Profile.generate(["0-7"]),brightness:ht.Profile.generate(["0-9"]),tts_voice:ht.Profile.generate(["0-16"]),tts_builtin_music:ht.Profile.generate(["0-47"]),tts_bgmusic:ht.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","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"]]},Px["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:ht.Profile.generate(["0-18","21","33-48"]),input_pin:ht.Profile.generate(["0-18","21","33-48"]),output_pin:ht.Profile.generate(["0-18","21","33-48"]),pwm_input:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:ht.Profile.generate(["1-18"],"adc","adc"),pwm_output:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:ht.Profile.generate(["1-18"],"adc","adc"),espnow_channel:ht.Profile.generate(["1-13"]),haskylens_model:ht.Profile.generate(["0-4"]),digital:ht.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:ht.Profile.generate(["0-18","21","33-48"]),pwm:ht.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:ht.Profile.generate(["1-18"]),analog:ht.Profile.generate(["1-18"],"adc","adc"),touch:ht.Profile.generate(["1-14"],"tc","tc"),touch_pin:ht.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:ht.Profile.generate(["0-4"]),exlcdh:ht.Profile.generate(["0-15"]),exlcdv:ht.Profile.generate(["0-7"]),brightness:ht.Profile.generate(["0-9"]),tts_voice:ht.Profile.generate(["0-16"]),tts_builtin_music:ht.Profile.generate(["0-47"]),tts_bgmusic:ht.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",".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 vx=Px,Yx=20,Xx={init:function(){this.setColour(Yx),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)}},xx={init:function(){this.setColour(Yx),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)}},bx={init:function(){this.setColour(Yx),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)}},yx={init:function(){this.setColour(Yx),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)}},Vx={init:function(){this.setColour(Yx),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)}},Bx={init:function(){this.setColour(Yx),this.appendValueInput("PIN",Number).appendField(Mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Mt.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_TOOLTIP)}},Gx={init:function(){this.setColour(Yx),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)}},Ux={init:function(){this.setColour(Yx),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)}},wx={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)}},kx={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")}},Hx={init:function(){this.setColour(Yx),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")}},Wx={init:function(){this.setColour(Yx),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_SETUP).appendField(new Mt.FieldTextInput("adc#"),"PIN_OBJ").appendField(Mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Mt.Msg.MIXLY_Analog_PINMODEIN),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_READ_INIT_TOOLTIP)},getVars:function(){return["adc#"==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")}},Kx={init:function(){this.setColour(Yx),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")}},Jx={init:function(){this.setColour(Yx),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)}},Qx=kx,qx=Kx,zx=Ux,jx=wx,Zx=230,$x={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.digital),"PIN"),this.setOutput(!0)}},tb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},eb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},ib={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},nb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},sb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},_b={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},ob={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},pb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},ab={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},ub={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},rb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},lb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},db={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},Ib={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Tb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},Mb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.analog),"PIN"),this.setOutput(!0)}},hb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},mb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.dac),"PIN"),this.setOutput(!0)}},Eb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Ob={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Rb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},cb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.pwm),"PIN"),this.setOutput(!0)}},gb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},Cb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},Sb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.touch),"PIN"),this.setOutput(!0)}},Ab={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},Lb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Nb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Db={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.imglist),"PIN"),this.setOutput(!0)}},fb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.playlist),"PIN"),this.setOutput(!0)}},Fb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},Pb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},vb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},Yb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},Xb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},xb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},bb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},yb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},Vb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},Bb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},Gb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Ub={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.one_more),"PIN"),this.setOutput(!0)}},wb={init:function(){this.setColour(Zx),this.appendDummyInput("").appendField(new Mt.FieldDropdown(ht.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},kb=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},Hb=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"},Wb=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Kb=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"},Jb=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"},Qb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},qb=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},zb=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"},jb=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"},Zb=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"},$b=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"adc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("adc#"==i?"adc"+n:e.variableDB_.getName(i,Mt.Variables.NAME_TYPE))+" = machine.ADC(machine.Pin("+n+"))\n"},ty=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},ey=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"},iy=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},ny=iy,sy=iy,_y=iy,oy=iy,py=iy,ay=iy,uy=iy,ry=iy,ly=iy,dy=iy,Iy=iy,Ty=iy,My=iy,hy=iy,my=iy,Ey=iy,Oy=iy,Ry=iy,cy=iy,gy=iy,Cy=iy,Sy=iy,Ay=iy,Ly=iy,Ny=iy,Dy=iy,fy=iy,Fy=iy,Py=iy,vy=iy,Yy=iy,Xy=iy,xy=iy,by=iy,yy=iy,Vy=iy,By=iy,Gy=iy,Uy=iy,wy=iy,ky=iy,Hy=iy,Wy=iy,Ky=iy;Object.assign(Mt.Variables,Et),Object.assign(Mt.Procedures,qn),Mt.Python=Mu,Mt.generator=Mu,ht.Profile.default={},Object.assign(ht.Profile,vx),Object.assign(ht.Profile.default,vx["MixGo CE"]),Object.assign(Mt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,b,H,k,v,y,W,f,w,U,G,V,F,D,N,X,Y,x,P,B,lt,dt),Object.assign(Mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,et,ut,at,j,it,rt,Q,pt,ot,_t,nt,q,J,K,$,Z,tt,z,st,It,Tt)})(); \ No newline at end of file diff --git a/boards/default/micropython_k210_mixgoai/main.bundle.js b/boards/default/micropython_k210_mixgoai/main.bundle.js index d538cc49..5306faf7 100644 --- a/boards/default/micropython_k210_mixgoai/main.bundle.js +++ b/boards/default/micropython_k210_mixgoai/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>ft,variables_get:()=>Dt,variables_global:()=>Lt,variables_set:()=>Nt});var i={};t.r(i),t.d(i,{base_setup:()=>xt,controls_delay:()=>Xt,controls_end_program:()=>Gt,controls_except:()=>$t,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>Qt,controls_forEach:()=>wt,controls_for_range:()=>jt,controls_if:()=>Ht,controls_if_else:()=>zt,controls_if_elseif:()=>Jt,controls_if_if:()=>qt,controls_lambda:()=>ie,controls_main:()=>kt,controls_pass:()=>ne,controls_range:()=>Ut,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>Bt,do_while:()=>oe,garbage_collection:()=>pe,get_mem_alloc:()=>ue,get_mem_free:()=>ae,get_unique_identifier:()=>le});var n={};t.r(n),t.d(n,{base_map:()=>Fe,math_arithmetic:()=>Te,math_bit:()=>me,math_constant:()=>de,math_constant_mp:()=>Ie,math_constrain:()=>Ae,math_dec:()=>Oe,math_indexer_number:()=>Se,math_map:()=>ge,math_max_min:()=>Me,math_number:()=>re,math_number_base_conversion:()=>Ee,math_random:()=>Ce,math_random_seed:()=>De,math_round:()=>Ne,math_selfcalcu:()=>he,math_to_int:()=>Re,math_trig:()=>ce,text_to_number:()=>fe,text_to_number_skulpt:()=>Le,turn_to_int:()=>ve});var s={};t.r(s),t.d(s,{ascii_to_char:()=>ke,char_to_ascii:()=>xe,number_to_text:()=>Xe,os_system:()=>_i,text:()=>Ve,text_capital:()=>je,text_center:()=>qe,text_char:()=>Ye,text_char_at:()=>Ue,text_char_at2:()=>He,text_char_at3:()=>pi,text_compareTo:()=>oi,text_compare_to:()=>Qe,text_create_with_container:()=>ii,text_create_with_item:()=>ni,text_encode:()=>ai,text_equals_starts_ends:()=>Ke,text_eval:()=>li,text_find:()=>Je,text_format:()=>ei,text_format_noreturn:()=>ui,text_join:()=>be,text_join_seq:()=>ze,text_length:()=>Ge,text_random_char:()=>we,text_replace:()=>Ze,text_split:()=>$e,text_strip:()=>ti,text_substring:()=>We,text_substring2:()=>Be,text_substring3:()=>si,text_textarea:()=>ye});var o={};t.r(o),t.d(o,{list_many_input:()=>Vi,list_tolist:()=>ki,list_tolist2:()=>Wi,list_trig:()=>Fi,lists_2d_get_col_row_data:()=>hi,lists_2d_get_data_with_col_row:()=>Ti,lists_append_extend:()=>Ei,lists_change_to:()=>Pi,lists_change_to_general:()=>Yi,lists_clear:()=>Di,lists_create_with:()=>mi,lists_create_with2:()=>xi,lists_create_with_container:()=>Oi,lists_create_with_item:()=>Ri,lists_create_with_noreturn:()=>yi,lists_create_with_text:()=>ci,lists_create_with_text2:()=>Xi,lists_del_general:()=>bi,lists_find:()=>Li,lists_getIndex3:()=>Gi,lists_getSublist3:()=>Hi,lists_get_index:()=>di,lists_get_random_item:()=>Ci,lists_get_random_sublist:()=>Ai,lists_get_sublist:()=>Ii,lists_insert_value:()=>gi,lists_insert_value2:()=>wi,lists_pop:()=>fi,lists_remove_at:()=>Ni,lists_remove_at2:()=>Bi,lists_reverse:()=>Si,lists_setIndex3:()=>Ui,lists_set_index:()=>Mi,lists_sort:()=>vi});var p={};t.r(p),t.d(p,{dicts_add_change_del:()=>an,dicts_add_or_change:()=>$i,dicts_clear:()=>nn,dicts_create_with:()=>Qi,dicts_create_with_container:()=>ji,dicts_create_with_item:()=>qi,dicts_create_with_noreturn:()=>rn,dicts_deldict:()=>un,dicts_delete:()=>tn,dicts_get:()=>zi,dicts_get_default:()=>Zi,dicts_items:()=>sn,dicts_keys:()=>Ji,dicts_length:()=>pn,dicts_pop:()=>ln,dicts_setdefault:()=>_n,dicts_to_json:()=>In,dicts_todict:()=>dn,dicts_update:()=>en,dicts_values:()=>on,json_to_dicts:()=>Tn});var u={};t.r(u),t.d(u,{logic_boolean:()=>Mn,logic_compare:()=>mn,logic_compare_continous:()=>cn,logic_is:()=>gn,logic_is_in:()=>An,logic_negate:()=>Rn,logic_null:()=>En,logic_operation:()=>On,logic_tobool:()=>Sn,logic_true_or_false:()=>Cn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>jn,sdcard_use_spi_init:()=>Qn,storage_can_write_ornot:()=>yn,storage_change_dir:()=>Wn,storage_close_file:()=>bn,storage_delete_file:()=>xn,storage_file_seek:()=>Hn,storage_file_tell:()=>Gn,storage_file_write:()=>Fn,storage_fileopen:()=>Nn,storage_fileopen_new:()=>fn,storage_fileopen_new_encoding:()=>Ln,storage_get_a_line:()=>Vn,storage_get_contents:()=>Pn,storage_get_contents_without_para:()=>vn,storage_get_current_dir:()=>Un,storage_get_file_size:()=>Xn,storage_get_filename:()=>Yn,storage_is_file:()=>Kn,storage_list_all_files:()=>kn,storage_make_dir:()=>wn,storage_open_file_with_os:()=>Dn,storage_rename:()=>Bn});var l={};t.r(l),t.d(l,{procedures_callnoreturn:()=>es,procedures_callreturn:()=>is,procedures_defnoreturn:()=>zn,procedures_defreturn:()=>Zn,procedures_ifreturn:()=>ns,procedures_mutatorarg:()=>ts,procedures_mutatorcontainer:()=>$n,procedures_return:()=>ss});var _={};t.r(_),t.d(_,{tuple_change_to:()=>ms,tuple_create_with:()=>ps,tuple_create_with_container:()=>us,tuple_create_with_item:()=>as,tuple_create_with_noreturn:()=>Ms,tuple_create_with_text2:()=>ls,tuple_create_with_text_return:()=>_s,tuple_del:()=>Is,tuple_find:()=>cs,tuple_getIndex:()=>rs,tuple_getSublist:()=>Rs,tuple_get_random_item:()=>Cs,tuple_get_sublist:()=>Es,tuple_join:()=>Ts,tuple_length:()=>ds,tuple_max:()=>hs,tuple_totuple:()=>As,tuple_trig:()=>Os});var r={};t.r(r),t.d(r,{set_add_discard:()=>Vs,set_clear:()=>Fs,set_create_with:()=>Ss,set_create_with_container:()=>Ds,set_create_with_item:()=>Ns,set_create_with_text_return:()=>bs,set_length:()=>fs,set_operate:()=>vs,set_operate_update:()=>Ps,set_pop:()=>Ls,set_sub:()=>ys,set_toset:()=>ks,set_update:()=>Ys});var d={};t.r(d),t.d(d,{html_content:()=>Us,html_content_more:()=>ws,html_document:()=>Xs,html_form:()=>Ws,html_head_body:()=>Hs,html_style:()=>Bs,html_style_color:()=>Qs,html_style_content:()=>Ks,html_text:()=>js,html_title:()=>Gs});var I={};t.r(I),t.d(I,{attribute_access:()=>ao,function_call:()=>oo,function_call_container:()=>po,function_call_item:()=>uo,raw_block:()=>zs,raw_empty:()=>$s,raw_expression:()=>Zs,raw_table:()=>Js,text_comment:()=>to,text_print_multiple:()=>io,text_print_multiple_container:()=>no,text_print_multiple_item:()=>so,type_check:()=>eo});var T={};t.r(T),t.d(T,{controls_type:()=>To,controls_typeLists:()=>ho,lists_zip:()=>mo,unpack_iterable_object:()=>co,variables_change:()=>ro,variables_get:()=>lo,variables_global:()=>Io,variables_set:()=>_o});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>No,base_setup:()=>Ro,controls_delay:()=>Do,controls_flow_statements:()=>So,controls_for:()=>Co,controls_forEach:()=>Po,controls_for_range:()=>Ao,controls_if:()=>Mo,controls_interrupts:()=>Fo,controls_lambda:()=>yo,controls_main:()=>Oo,controls_millis:()=>fo,controls_nointerrupts:()=>vo,controls_pass:()=>bo,controls_range:()=>Vo,controls_repeat:()=>Bo,controls_repeat_ext:()=>Xo,controls_thread:()=>ko,controls_try_finally:()=>Eo,controls_whileUntil:()=>go,do_while:()=>xo,garbage_collection:()=>Go,get_mem_alloc:()=>Ho,get_mem_free:()=>Uo,get_unique_identifier:()=>wo,reset:()=>Lo,time_sleep:()=>Yo});var m={};t.r(m),t.d(m,{base_map:()=>rp,math_arithmetic:()=>qo,math_bit:()=>jo,math_constant:()=>Ko,math_constant_mp:()=>Qo,math_constrain:()=>sp,math_dec:()=>$o,math_indexer_number:()=>up,math_map:()=>np,math_max_min:()=>ep,math_number:()=>Wo,math_number_base_conversion:()=>op,math_random:()=>ip,math_random_seed:()=>pp,math_round:()=>ap,math_selfcalcu:()=>Jo,math_single:()=>zo,math_to_int:()=>tp,math_trig:()=>Zo,text_to_number:()=>lp,text_to_number_skulpt:()=>_p,turn_to_int:()=>dp});var c={};t.r(c),t.d(c,{ascii_to_char:()=>cp,char_to_ascii:()=>Op,number_to_text:()=>Rp,os_system:()=>Up,text:()=>Ip,text_capital:()=>fp,text_center:()=>Lp,text_char:()=>hp,text_char_at:()=>Cp,text_char_at2:()=>Ep,text_char_at3:()=>Xp,text_compareTo:()=>xp,text_compare_to:()=>Sp,text_encode:()=>Gp,text_equals_starts_ends:()=>gp,text_eval:()=>Hp,text_find:()=>Fp,text_format:()=>Yp,text_format_noreturn:()=>bp,text_join:()=>mp,text_join_seq:()=>vp,text_length:()=>Mp,text_random_char:()=>Ap,text_replace:()=>Pp,text_split:()=>Vp,text_strip:()=>yp,text_substring:()=>Np,text_substring2:()=>Dp,text_substring3:()=>kp,text_textarea:()=>Tp});var O={};t.r(O),t.d(O,{list_many_input:()=>au,list_tolist:()=>Ru,list_tolist2:()=>Mu,list_trig:()=>ou,lists_2d_get_col_row_data:()=>Wp,lists_2d_get_data_with_col_row:()=>Bp,lists_append_extend:()=>Jp,lists_change_to:()=>uu,lists_change_to_general:()=>_u,lists_clear:()=>eu,lists_create_with:()=>Kp,lists_create_with2:()=>du,lists_create_with_noreturn:()=>lu,lists_create_with_text:()=>Qp,lists_create_with_text2:()=>Iu,lists_del_general:()=>ru,lists_find:()=>iu,lists_getIndex3:()=>Tu,lists_getSublist3:()=>hu,lists_get_index:()=>jp,lists_get_random_item:()=>zp,lists_get_random_sublist:()=>Zp,lists_get_sublist:()=>wp,lists_insert_value:()=>$p,lists_insert_value2:()=>cu,lists_pop:()=>su,lists_remove_at:()=>nu,lists_remove_at2:()=>Ou,lists_reverse:()=>tu,lists_setIndex3:()=>mu,lists_set_index:()=>qp,lists_sort:()=>pu});var R={};t.r(R),t.d(R,{dicts_add_change_del:()=>Vu,dicts_add_or_change:()=>Su,dicts_clear:()=>fu,dicts_create_with:()=>Eu,dicts_create_with_noreturn:()=>bu,dicts_deldict:()=>Pu,dicts_delete:()=>Du,dicts_get:()=>Au,dicts_get_default:()=>gu,dicts_items:()=>Lu,dicts_keys:()=>Cu,dicts_length:()=>vu,dicts_pop:()=>yu,dicts_setdefault:()=>Yu,dicts_to_json:()=>xu,dicts_todict:()=>ku,dicts_update:()=>Nu,dicts_values:()=>Fu,json_to_dicts:()=>Xu});var M={};t.r(M),t.d(M,{logic_boolean:()=>Bu,logic_compare:()=>Gu,logic_compare_continous:()=>Hu,logic_is:()=>ju,logic_is_in:()=>Qu,logic_negate:()=>wu,logic_null:()=>Wu,logic_operation:()=>Uu,logic_tobool:()=>qu,logic_true_or_false:()=>Ku});var E={};t.r(E),t.d(E,{sdcard_mount:()=>Oa,sdcard_use_spi_init:()=>ca,storage_can_write_ornot:()=>sa,storage_change_dir:()=>da,storage_close_file:()=>pa,storage_delete_file:()=>aa,storage_file_seek:()=>ra,storage_file_tell:()=>_a,storage_file_write:()=>ta,storage_fileopen:()=>zu,storage_fileopen_new:()=>Zu,storage_fileopen_new_encoding:()=>$u,storage_get_a_line:()=>na,storage_get_contents:()=>ia,storage_get_contents_without_para:()=>ea,storage_get_current_dir:()=>Ia,storage_get_file_size:()=>la,storage_get_filename:()=>oa,storage_is_file:()=>ma,storage_list_all_files:()=>ua,storage_make_dir:()=>Ta,storage_open_file_with_os:()=>Ju,storage_rename:()=>ha});var C={};t.r(C),t.d(C,{procedures_callnoreturn:()=>Ca,procedures_callreturn:()=>Ea,procedures_defnoreturn:()=>Ma,procedures_defreturn:()=>Ra,procedures_ifreturn:()=>Aa,procedures_return:()=>ga});var A={};t.r(A),t.d(A,{tuple_change_to:()=>Va,tuple_create_with:()=>Sa,tuple_create_with_noreturn:()=>ka,tuple_create_with_text2:()=>Da,tuple_create_with_text_return:()=>Na,tuple_del:()=>Fa,tuple_find:()=>ya,tuple_getIndex:()=>fa,tuple_getSublist:()=>ba,tuple_get_random_item:()=>Xa,tuple_get_sublist:()=>xa,tuple_join:()=>va,tuple_length:()=>La,tuple_max:()=>Pa,tuple_totuple:()=>Ga,tuple_trig:()=>Ya});var g={};t.r(g),t.d(g,{set_add_discard:()=>Qa,set_clear:()=>Ba,set_create_with:()=>Ha,set_create_with_text_return:()=>Ja,set_length:()=>Ua,set_operate:()=>Wa,set_operate_update:()=>Ka,set_pop:()=>wa,set_sub:()=>ja,set_toset:()=>za,set_update:()=>qa});var S={};t.r(S),t.d(S,{html_content:()=>el,html_content_more:()=>il,html_document:()=>Za,html_form:()=>sl,html_head_body:()=>tl,html_style:()=>nl,html_style_content:()=>ol,html_text:()=>pl,html_title:()=>$a});var D={};t.r(D),t.d(D,{attribute_access:()=>Il,function_call:()=>dl,raw_block:()=>ul,raw_empty:()=>ll,raw_expression:()=>al,raw_table:()=>_l,type_check:()=>rl});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Ml,actuator_extern_led_bright:()=>Rl,actuator_extern_led_brightness:()=>El,actuator_get_led_bright:()=>Al,actuator_led_bright:()=>Cl,actuator_led_brightness:()=>gl,actuator_neopixel_init:()=>kl,actuator_neopixel_rgb:()=>xl,actuator_neopixel_write:()=>Xl,actuator_onboard_neopixel_rgb:()=>Gl,actuator_onboard_neopixel_rgb_all:()=>Hl,actuator_onboard_neopixel_write:()=>Ul,esp32_mixgo_music_play_list_show:()=>bl,esp32_music_get_tempo:()=>Ll,esp32_music_pitch:()=>Sl,esp32_music_pitch_with_time:()=>Dl,esp32_music_play_list:()=>Yl,esp32_music_reset:()=>Fl,esp32_music_set_tempo:()=>fl,esp32_music_stop:()=>Nl,esp32_onboard_music_pitch:()=>vl,esp32_onboard_music_pitch_with_time:()=>Pl,esp32_onboard_music_play_list:()=>yl,esp32_onboard_music_stop:()=>Vl,get_led_bright:()=>Bl,led_brightness:()=>Wl,led_light:()=>wl,ledswitch:()=>Ol,number:()=>cl,servo_move:()=>ml});var f={};t.r(f),t.d(f,{mpython_blynk_app_data:()=>p_,mpython_blynk_app_notify:()=>$l,mpython_blynk_email:()=>i_,mpython_blynk_get_timers:()=>n_,mpython_blynk_on_connected:()=>Jl,mpython_blynk_on_disconnected:()=>ql,mpython_blynk_run:()=>Zl,mpython_blynk_sensor_data_to_app:()=>o_,mpython_blynk_set_property:()=>e_,mpython_blynk_setup:()=>u_,mpython_blynk_stop_timers:()=>t_,mpython_blynk_sync_virtual:()=>jl,mpython_blynk_terminal_widget_vpin:()=>Ql,mpython_blynktimer:()=>s_,mpython_blynktimer_run:()=>zl});var L={};t.r(L),t.d(L,{display_animate:()=>tr,display_blink_rate:()=>U_,display_bright_point:()=>I_,display_bright_screen:()=>H_,display_circle:()=>er,display_clear:()=>r_,display_draw_4strings:()=>y_,display_fill:()=>q_,display_get_pixel:()=>d_,display_get_screen_image:()=>G_,display_get_screen_pixel:()=>X_,display_help:()=>nr,display_image_builtins:()=>g_,display_image_create:()=>S_,display_image_size:()=>Y_,display_line:()=>k_,display_line_arbitrarily:()=>x_,display_matrix_use_i2c_init:()=>pr,display_oled_drawPixel:()=>or,display_oled_showBitmap:()=>sr,display_onoff:()=>j_,display_rect:()=>b_,display_rgb_color:()=>w_,display_scroll_string:()=>W_,display_scroll_string_delay:()=>Q_,display_scroll_string_extern:()=>ar,display_show_image:()=>ur,display_show_image_or_string:()=>B_,display_show_image_or_string_delay:()=>K_,display_show_static:()=>m_,display_tm1650_power:()=>z_,display_tm1650_show_dot:()=>$_,display_tm1650_show_num:()=>Z_,display_tm_use_i2c_init:()=>J_,display_triangle:()=>ir,display_use_i2c_init:()=>V_,esp32_display_is_on:()=>A_,esp32_display_off:()=>C_,esp32_display_on:()=>E_,esp32_display_scroll:()=>M_,esp32_display_show_animation:()=>R_,esp32_display_show_default_image:()=>O_,esp32_display_show_string:()=>f_,group_lcd_init:()=>F_,group_lcd_power:()=>P_,group_lcd_print:()=>L_,group_lcd_print2:()=>v_,image_arithmetic:()=>N_,image_shift:()=>D_,microbit_display_show_image:()=>c_,monitor_show_scroll_string:()=>h_,monitor_show_string:()=>T_});var F={};t.r(F),t.d(F,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Pr,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>vr,IOT_EMQX_PING:()=>Lr,IOT_FORMATTING:()=>Nr,IOT_FORMAT_STRING:()=>fr,IOT_MIXIO_NTP:()=>Fr,IOT_MIXIO_PUBLISH:()=>Mr,IOT_MIXIO_SUBSCRIBE:()=>Er,iot_checkonenet:()=>Ur,iot_client_onboard:()=>yr,iot_create_with_item:()=>Or,iot_http_client:()=>Yr,iot_http_data:()=>br,iot_mixio_check:()=>gr,iot_mixio_connect:()=>Rr,iot_mixio_connect_only:()=>Ar,iot_mixio_disconnect:()=>Cr,iot_mixio_format_msg:()=>Dr,iot_mixio_format_topic:()=>Sr,iot_mixly_key:()=>Vr,iot_mqtt_client:()=>kr,iot_mqtt_data:()=>xr,iot_onenet_check:()=>Ir,iot_onenet_connect:()=>rr,iot_onenet_disconnect:()=>dr,iot_onenet_publish:()=>hr,iot_onenet_publish_dict:()=>Tr,iot_onenetconnect:()=>Gr,iot_onenetdisconnect:()=>Hr,iot_publish:()=>wr,iot_publish_container:()=>mr,iot_publish_item:()=>cr,iot_wifi_connect:()=>_r,iot_wificonnect:()=>Xr});var v={};t.r(v),t.d(v,{actuator_extern_get_led_bright:()=>pd,actuator_extern_led_bright:()=>od,actuator_extern_led_brightness:()=>ud,actuator_get_led_bright:()=>ld,actuator_led_bright:()=>ad,actuator_led_brightness:()=>_d,actuator_neopixel_init:()=>rd,actuator_neopixel_rgb:()=>Id,actuator_neopixel_write:()=>dd,actuator_onboard_neopixel_rgb:()=>hd,actuator_onboard_neopixel_rgb_all:()=>md,actuator_onboard_neopixel_write:()=>Td,esp32_mixgo_music_play_list_show:()=>td,esp32_music_get_tempo:()=>jr,esp32_music_pitch:()=>Br,esp32_music_pitch_with_time:()=>Wr,esp32_music_play_list:()=>$r,esp32_music_reset:()=>ed,esp32_music_set_tempo:()=>Qr,esp32_music_stop:()=>Kr,esp32_onboard_music_pitch:()=>qr,esp32_onboard_music_pitch_with_time:()=>Jr,esp32_onboard_music_play_list:()=>Zr,esp32_onboard_music_stop:()=>zr,get_led_bright:()=>Od,led_brightness:()=>Rd,led_light:()=>cd,ledswitch:()=>sd,number:()=>nd,servo_move:()=>id});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>vd,mpython_blynk_app_notify:()=>Dd,mpython_blynk_email:()=>Pd,mpython_blynk_get_timers:()=>fd,mpython_blynk_on_connected:()=>Ad,mpython_blynk_on_disconnected:()=>Cd,mpython_blynk_run:()=>Sd,mpython_blynk_sensor_data_to_app:()=>Fd,mpython_blynk_set_property:()=>Vd,mpython_blynk_setup:()=>yd,mpython_blynk_stop_timers:()=>Nd,mpython_blynk_sync_virtual:()=>Ed,mpython_blynk_terminal_widget_vpin:()=>Md,mpython_blynktimer:()=>Ld,mpython_blynktimer_run:()=>gd});var V={};t.r(V),t.d(V,{display_animate:()=>aI,display_blink_rate:()=>Qd,display_bright_point:()=>wd,display_bright_screen:()=>Kd,display_circle:()=>lI,display_clear:()=>jd,display_draw_4strings:()=>Jd,display_fill:()=>nI,display_get_pixel:()=>Ud,display_get_screen_image:()=>Wd,display_get_screen_pixel:()=>Bd,display_image_builtins:()=>Hd,display_image_create:()=>Gd,display_line:()=>tI,display_line_arbitrarily:()=>zd,display_matrix_use_i2c_init:()=>II,display_oled_drawPixel:()=>dI,display_oled_showBitmap:()=>rI,display_onoff:()=>eI,display_rect:()=>Zd,display_scroll_string:()=>bd,display_scroll_string_delay:()=>Xd,display_scroll_string_extern:()=>hI,display_show_image:()=>TI,display_show_image_or_string:()=>Yd,display_show_image_or_string_delay:()=>xd,display_show_static:()=>kd,display_tm1650_power:()=>oI,display_tm1650_show_dot:()=>uI,display_tm1650_show_num:()=>pI,display_tm_use_i2c_init:()=>sI,display_triangle:()=>_I,display_use_i2c_init:()=>qd,image_arithmetic:()=>$d,image_shift:()=>iI});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>yI,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>PI,IOT_EMQX_PING:()=>YI,IOT_FORMATTING:()=>FI,IOT_FORMAT_STRING:()=>vI,IOT_MIXIO_NTP:()=>bI,IOT_MIXIO_PUBLISH:()=>AI,IOT_MIXIO_SUBSCRIBE:()=>gI,iot_client_onboard:()=>kI,iot_http_client:()=>xI,iot_http_data:()=>XI,iot_mixio_check:()=>NI,iot_mixio_connect:()=>CI,iot_mixio_connect_only:()=>DI,iot_mixio_disconnect:()=>SI,iot_mixio_format_msg:()=>LI,iot_mixio_format_topic:()=>fI,iot_mixly_key:()=>VI,iot_mqtt_client:()=>GI,iot_mqtt_data:()=>HI,iot_onenet_check:()=>MI,iot_onenet_connect:()=>cI,iot_onenet_disconnect:()=>OI,iot_onenet_publish:()=>EI,iot_onenet_publish_dict:()=>RI,iot_wifi_connect:()=>mI});var Y={};t.r(Y),t.d(Y,{PID_get_pid:()=>iT,PID_init:()=>eT,actuator_PAC9685_Servo:()=>jI,actuator_PAC9685_init:()=>QI,actuator_Servo:()=>KI,actuator_Servo_init:()=>WI,actuator_ms32006_dcmotor:()=>$I,actuator_ms32006_init:()=>ZI,actuator_ms32006_stepper:()=>tT,actuator_rgb_display:()=>zI,actuator_rgb_init:()=>qI,actuator_rgb_set:()=>JI});var b={};t.r(b),t.d(b,{KPU_analysis:()=>rT,KPU_forward:()=>_T,KPU_init_yolo2:()=>aT,KPU_load:()=>pT,KPU_load1:()=>uT,KPU_run_yolo2:()=>lT,ai_face_info:()=>MT,ai_face_init:()=>OT,ai_face_train:()=>RT,ailocal_loading:()=>mT,ailocal_predict:()=>cT,ailocal_training:()=>hT,aionenet_API:()=>TT,aionenet_nic_init:()=>dT,aionenet_token:()=>IT,tuple_anchor:()=>sT,tuple_calss:()=>oT});var k={};t.r(k),t.d(k,{audio_play:()=>gT,audio_record:()=>ST,mic_init:()=>AT,spk_init:()=>CT,video_play:()=>DT,video_record:()=>NT});var x={};t.r(x),t.d(x,{camera_getinfo:()=>UT,camera_init:()=>vT,camera_reset:()=>PT,camera_run:()=>YT,camera_set_colorbar:()=>HT,camera_set_framesize:()=>yT,camera_set_hmirror:()=>XT,camera_set_pixformat:()=>VT,camera_set_vflip:()=>GT,camera_set_windowing:()=>BT,camera_setmun:()=>wT,camera_shutdown:()=>xT,camera_skip_frames:()=>bT,camera_snapshot:()=>kT,mode:()=>LT,size:()=>FT});var X={};t.r(X),t.d(X,{communicate_i2c_available:()=>ah,communicate_i2c_init:()=>QT,communicate_i2c_master_read:()=>uh,communicate_i2c_read:()=>qT,communicate_i2c_scan:()=>zT,communicate_i2c_write:()=>JT,communicate_i2s_init:()=>jT,communicate_ir_recv:()=>KT,communicate_ow_init:()=>_h,communicate_ow_read:()=>dh,communicate_ow_reset:()=>hh,communicate_ow_scan:()=>rh,communicate_ow_select:()=>Th,communicate_ow_write:()=>Ih,communicate_spi_buffer:()=>th,communicate_spi_init:()=>ZT,communicate_spi_read:()=>eh,communicate_spi_read_output:()=>ih,communicate_spi_readinto:()=>nh,communicate_spi_readinto_output:()=>sh,communicate_spi_set:()=>$T,communicate_spi_write:()=>oh,communicate_spi_write_readinto:()=>ph,i2c_available:()=>Fh,i2c_init:()=>mh,i2c_master_reader2:()=>Lh,i2c_read:()=>ch,i2c_scan:()=>Rh,i2c_slave_onreceive:()=>lh,i2c_write:()=>Oh,spi_buffer:()=>Ch,spi_init:()=>Mh,spi_read:()=>Ah,spi_read_output:()=>gh,spi_readinto:()=>Sh,spi_readinto_output:()=>Dh,spi_set:()=>Eh,spi_write:()=>Nh,spi_write_readinto:()=>fh});var G={};t.r(G),t.d(G,{angle:()=>Ph,lcd_clear:()=>Xh,lcd_color:()=>Vh,lcd_colour:()=>kh,lcd_display:()=>xh,lcd_draw_string:()=>Uh,lcd_init:()=>Yh,lcd_mirror:()=>Hh,lcd_rotation:()=>Gh,lcd_width:()=>bh,on_off:()=>yh,touch_calibrate:()=>Bh,touch_info:()=>Kh,touch_init:()=>wh,touch_read:()=>Wh});var H={};t.r(H),t.d(H,{factory_block:()=>nm,factory_block_notes:()=>um,factory_block_return:()=>sm,factory_block_return_with_textarea:()=>pm,factory_block_with_textarea:()=>om,factory_callMethod_noreturn:()=>em,factory_callMethod_return:()=>im,factory_create_with_container:()=>zh,factory_create_with_item:()=>Zh,factory_declare:()=>tm,factory_from_import:()=>jh,factory_function_noreturn:()=>Jh,factory_function_return:()=>$h,factory_import:()=>qh});var U={};t.r(U),t.d(U,{asrloca_config:()=>_m,asrloca_del:()=>dm,asrloca_init:()=>lm,asrloca_recognize:()=>rm});var w={};t.r(w),t.d(w,{image_Histogram:()=>dc,image_Image:()=>hm,image_Image1:()=>mm,image_RGB:()=>Mm,image_apriltag:()=>ac,image_barcode:()=>uc,image_binary:()=>ec,image_blob:()=>rc,image_cartoon:()=>jm,image_circle:()=>Bm,image_clear:()=>Cm,image_compress:()=>Em,image_copy:()=>Rm,image_dilate:()=>Jm,image_draw_arrow:()=>Pm,image_draw_circle:()=>ym,image_draw_cross:()=>Vm,image_draw_image:()=>km,image_draw_keypoints:()=>bm,image_draw_line:()=>vm,image_draw_rectangle:()=>Ym,image_draw_string:()=>Fm,image_draw_string_UTF:()=>Lm,image_draw_string_flash:()=>fm,image_erode:()=>qm,image_find_apriltags:()=>oc,image_find_barcodes:()=>nc,image_find_blobs:()=>lc,image_find_circles:()=>Gm,image_find_hog:()=>Rc,image_find_keypoints:()=>Mc,image_find_line_segments:()=>Xm,image_find_lines:()=>xm,image_find_qrcodes:()=>sc,image_find_rects:()=>Hm,image_flood_fill:()=>zm,image_font_free:()=>Nm,image_font_load:()=>Dm,image_get_histogram:()=>_c,image_get_pixel:()=>Sm,image_get_regression:()=>Um,image_getinfo:()=>cm,image_grayscale_to_rgb:()=>Oc,image_histeq:()=>Km,image_invert:()=>$m,image_kptmatch:()=>Cc,image_lab_to_rgb:()=>hc,image_lens_corr:()=>tc,image_line:()=>wm,image_linpolar:()=>Zm,image_match_descriptor:()=>Ec,image_mean:()=>Qm,image_morph:()=>ic,image_percentile:()=>Ic,image_qrcode:()=>pc,image_rect:()=>Wm,image_rgb_to_grayscale:()=>cc,image_rgb_to_lab:()=>mc,image_save:()=>Om,image_set_pixel:()=>gm,image_threshold:()=>Tc,image_tonew:()=>Am,true_false:()=>Tm});var B={};t.r(B),t.d(B,{inout_digital_init:()=>Sc,inout_digital_read:()=>Nc,inout_digital_write:()=>Dc,inout_highlow:()=>gc,inout_pin_attachInterrupt:()=>Fc,inout_pin_disirq:()=>vc,inout_pwm_init:()=>fc,inout_pwm_write:()=>Lc});var W={};t.r(W),t.d(W,{iot_checkonenet:()=>Wc,iot_create_with_item:()=>Hc,iot_onenet_check:()=>bc,iot_onenet_connect:()=>yc,iot_onenet_disconnect:()=>Yc,iot_onenet_publish:()=>xc,iot_onenet_publish_dict:()=>kc,iot_onenetconnect:()=>wc,iot_onenetdisconnect:()=>Bc,iot_publish:()=>Kc,iot_publish_container:()=>Xc,iot_publish_item:()=>Gc,iot_wifi_connect:()=>Vc,iot_wificonnect:()=>Uc});var K={};t.r(K),t.d(K,{base_map:()=>lO,math_arithmetic:()=>Jc,math_bit:()=>Zc,math_constant:()=>qc,math_constrain:()=>oO,math_indexer_number:()=>uO,math_map:()=>pO,math_max_min:()=>eO,math_max_min1:()=>iO,math_number:()=>jc,math_number_base_conversion:()=>nO,math_random:()=>sO,math_random_seed:()=>aO,math_selfcalcu:()=>zc,math_to_int:()=>tO,math_trig:()=>$c});var Q={};t.r(Q),t.d(Q,{nes_joystick_init:()=>rO,nes_keyboard_init:()=>dO,nes_run:()=>IO});var j={};t.r(j),t.d(j,{network_connect:()=>cO,network_disable_ap:()=>EO,network_disconnect:()=>RO,network_enable_ap:()=>MO,network_ifconfig:()=>OO,network_init:()=>hO,network_scan:()=>mO,network_socket_close:()=>fO,network_socket_connect:()=>gO,network_socket_getaddrinfo:()=>AO,network_socket_init:()=>CO,network_socket_receive:()=>NO,network_socket_send:()=>DO,network_socket_settimeout:()=>SO});var q={};t.r(q),t.d(q,{pins_analog:()=>PO,pins_analog_pin:()=>VO,pins_axis:()=>QO,pins_brightness:()=>jO,pins_builtinimg:()=>UO,pins_button:()=>bO,pins_dac:()=>yO,pins_dac_pin:()=>YO,pins_digital:()=>FO,pins_digital_dot:()=>$O,pins_digital_pin:()=>vO,pins_exlcdh:()=>WO,pins_exlcdv:()=>KO,pins_imglist:()=>wO,pins_one_more:()=>ZO,pins_playlist:()=>BO,pins_pwm:()=>kO,pins_pwm_pin:()=>xO,pins_radio_datarate:()=>zO,pins_radio_power:()=>JO,pins_serial:()=>HO,pins_tone_notes:()=>qO,pins_touch:()=>GO,pins_touch_pin:()=>XO});var J={};t.r(J),t.d(J,{HCSR04:()=>oR,KEY_SELET:()=>eR,sensor_adxl345_get_acceleration:()=>IR,sensor_bmp:()=>aR,sensor_button_init:()=>iR,sensor_button_read:()=>nR,sensor_dht11:()=>sR,sensor_mpu9250_get_acceleration:()=>pR,sensor_mpu9250_get_gyro:()=>rR,sensor_mpu9250_get_magnetic:()=>_R,sensor_mpu9250_temperature:()=>dR,sensor_sht:()=>lR,sensor_use_i2c_init:()=>uR});var z={};t.r(z),t.d(z,{serial_any:()=>MR,serial_print:()=>hR,serial_print_hex:()=>cR,serial_println:()=>mR,serial_read_from_mixgoce:()=>PR,serial_readline:()=>ER,serial_readstr:()=>RR,serial_readstr_until:()=>CR,serial_receive_data_event:()=>OR,serial_send_to_mixgoce:()=>vR,serial_softserial1:()=>AR,system_input:()=>gR,system_print:()=>SR,system_print_container:()=>LR,system_print_end:()=>NR,system_print_inline:()=>DR,system_print_item:()=>FR,system_print_many:()=>fR});var Z={};t.r(Z),t.d(Z,{Panic_with_status_code:()=>bR,TIM_SELET:()=>yR,Timer_init:()=>WR,base_delay:()=>jR,controls_delay:()=>YR,controls_millis:()=>kR,controls_uname:()=>XR,raw_block:()=>xR,system_gc_collect:()=>UR,system_reset:()=>HR,system_ticks_diff:()=>wR,system_timer:()=>GR,system_timer_init:()=>BR,time_ticks_diff:()=>QR,timer2:()=>KR});var $={};t.r($),t.d($,{LCD_color_seclet:()=>ZR,lists_create_with_text1:()=>JR,tuple_create_with_text3:()=>zR});var tt={};t.r(tt),t.d(tt,{PID_get_pid:()=>_M,PID_init:()=>lM,actuator_PAC9685_Servo:()=>iM,actuator_PAC9685_init:()=>eM,actuator_Servo:()=>tM,actuator_Servo_init:()=>$R,actuator_ms32006_dcmotor:()=>uM,actuator_ms32006_init:()=>pM,actuator_ms32006_stepper:()=>aM,actuator_rgb_display:()=>oM,actuator_rgb_init:()=>nM,actuator_rgb_set:()=>sM});var et={};t.r(et),t.d(et,{KPU_analysis:()=>OM,KPU_forward:()=>cM,KPU_init_yolo2:()=>hM,KPU_load:()=>IM,KPU_load1:()=>TM,KPU_run_yolo2:()=>mM,ai_face_info:()=>NM,ai_face_init:()=>SM,ai_face_train:()=>DM,ailocal_loading:()=>AM,ailocal_predict:()=>gM,ailocal_training:()=>CM,aionenet_API:()=>EM,aionenet_nic_init:()=>RM,aionenet_token:()=>MM,tuple_anchor:()=>rM,tuple_calss:()=>dM});var it={};t.r(it),t.d(it,{audio_play:()=>FM,audio_record:()=>vM,mic_init:()=>LM,spk_init:()=>fM,video_play:()=>PM,video_record:()=>VM});var nt={};t.r(nt),t.d(nt,{camera_getinfo:()=>QM,camera_init:()=>bM,camera_reset:()=>kM,camera_run:()=>GM,camera_set_colorbar:()=>KM,camera_set_framesize:()=>XM,camera_set_hmirror:()=>BM,camera_set_pixformat:()=>xM,camera_set_vflip:()=>WM,camera_set_windowing:()=>qM,camera_setmun:()=>jM,camera_shutdown:()=>wM,camera_skip_frames:()=>HM,camera_snapshot:()=>UM,mode:()=>yM,size:()=>YM});var st={};t.r(st),t.d(st,{communicate_i2c_available:()=>nE,communicate_i2c_init:()=>zM,communicate_i2c_master_read:()=>iE,communicate_i2c_read:()=>$M,communicate_i2c_scan:()=>eE,communicate_i2c_write:()=>tE,communicate_i2s_init:()=>ZM,communicate_ir_recv:()=>JM,communicate_ow_init:()=>TE,communicate_ow_read:()=>cE,communicate_ow_reset:()=>mE,communicate_ow_scan:()=>hE,communicate_ow_select:()=>RE,communicate_ow_write:()=>OE,communicate_spi_buffer:()=>uE,communicate_spi_init:()=>oE,communicate_spi_read:()=>aE,communicate_spi_read_output:()=>lE,communicate_spi_readinto:()=>_E,communicate_spi_readinto_output:()=>rE,communicate_spi_set:()=>pE,communicate_spi_write:()=>dE,communicate_spi_write_readinto:()=>IE,i2c_slave_onreceive:()=>sE});var ot={};t.r(ot),t.d(ot,{angle:()=>ME,lcd_clear:()=>NE,lcd_color:()=>EE,lcd_colour:()=>gE,lcd_display:()=>DE,lcd_draw_string:()=>FE,lcd_init:()=>AE,lcd_mirror:()=>LE,lcd_rotation:()=>fE,lcd_width:()=>SE,on_off:()=>CE,touch_calibrate:()=>PE,touch_info:()=>yE,touch_init:()=>vE,touch_read:()=>VE});var pt={};t.r(pt),t.d(pt,{factory_block:()=>UE,factory_block_notes:()=>KE,factory_block_return:()=>wE,factory_block_return_with_textarea:()=>WE,factory_block_with_textarea:()=>BE,factory_callMethod_noreturn:()=>GE,factory_callMethod_return:()=>HE,factory_declare:()=>XE,factory_from_import:()=>YE,factory_function_noreturn:()=>kE,factory_function_return:()=>xE,factory_import:()=>bE});var ut={};t.r(ut),t.d(ut,{asrloca_config:()=>jE,asrloca_del:()=>JE,asrloca_init:()=>QE,asrloca_recognize:()=>qE});var at={};t.r(at),t.d(at,{image_Histogram:()=>qC,image_Image:()=>$E,image_Image1:()=>tC,image_RGB:()=>ZE,image_apriltag:()=>WC,image_barcode:()=>wC,image_binary:()=>xC,image_blob:()=>jC,image_cartoon:()=>vC,image_circle:()=>NC,image_clear:()=>_C,image_compress:()=>lC,image_copy:()=>aC,image_dilate:()=>VC,image_draw_arrow:()=>hC,image_draw_circle:()=>cC,image_draw_cross:()=>mC,image_draw_image:()=>MC,image_draw_keypoints:()=>RC,image_draw_line:()=>TC,image_draw_rectangle:()=>OC,image_draw_string:()=>uC,image_draw_string_UTF:()=>pC,image_draw_string_flash:()=>oC,image_erode:()=>PC,image_find_apriltags:()=>UC,image_find_barcodes:()=>GC,image_find_blobs:()=>KC,image_find_circles:()=>AC,image_find_hog:()=>iA,image_find_keypoints:()=>nA,image_find_line_segments:()=>CC,image_find_lines:()=>EC,image_find_qrcodes:()=>HC,image_find_rects:()=>gC,image_flood_fill:()=>yC,image_font_free:()=>nC,image_font_load:()=>sC,image_get_histogram:()=>QC,image_get_pixel:()=>IC,image_get_regression:()=>SC,image_getinfo:()=>eC,image_grayscale_to_rgb:()=>eA,image_histeq:()=>LC,image_invert:()=>bC,image_kptmatch:()=>oA,image_lab_to_rgb:()=>ZC,image_lens_corr:()=>kC,image_line:()=>DC,image_linpolar:()=>YC,image_match_descriptor:()=>sA,image_mean:()=>FC,image_morph:()=>XC,image_percentile:()=>JC,image_qrcode:()=>BC,image_rect:()=>fC,image_rgb_to_grayscale:()=>tA,image_rgb_to_lab:()=>$C,image_save:()=>iC,image_set_pixel:()=>dC,image_threshold:()=>zC,image_tonew:()=>rC,true_false:()=>zE});var lt={};t.r(lt),t.d(lt,{PGA_SELET:()=>pA,inout_adc_Vread:()=>hA,inout_adc_init:()=>IA,inout_adc_read:()=>TA,inout_digital_init:()=>aA,inout_digital_read:()=>_A,inout_digital_write:()=>lA,inout_highlow:()=>uA,inout_pin_attachInterrupt:()=>mA,inout_pin_disirq:()=>cA,inout_pwm_init:()=>rA,inout_pwm_write:()=>dA});var _t={};t.r(_t),t.d(_t,{iot_onenet_check:()=>CA,iot_onenet_connect:()=>RA,iot_onenet_disconnect:()=>MA,iot_onenet_publish:()=>AA,iot_onenet_publish_dict:()=>EA,iot_wifi_connect:()=>OA});var rt={};t.r(rt),t.d(rt,{base_map:()=>GA,math_arithmetic:()=>NA,math_bit:()=>DA,math_constant:()=>SA,math_constrain:()=>bA,math_indexer_number:()=>XA,math_map:()=>YA,math_max_min:()=>PA,math_max_min1:()=>VA,math_number:()=>gA,math_number_base_conversion:()=>kA,math_random:()=>yA,math_random_seed:()=>xA,math_selfcalcu:()=>fA,math_single:()=>LA,math_to_int:()=>vA,math_trig:()=>FA});var dt={};t.r(dt),t.d(dt,{nes_joystick_init:()=>HA,nes_keyboard_init:()=>UA,nes_run:()=>wA});var It={};t.r(It),t.d(It,{network_connect:()=>KA,network_disable_ap:()=>JA,network_disconnect:()=>jA,network_enable_ap:()=>qA,network_ifconfig:()=>QA,network_init:()=>BA,network_scan:()=>WA,network_server:()=>zA,network_socket_close:()=>sg,network_socket_connect:()=>tg,network_socket_getaddrinfo:()=>$A,network_socket_init:()=>ZA,network_socket_receive:()=>ig,network_socket_send:()=>ng,network_socket_settimeout:()=>eg});var Tt={};t.r(Tt),t.d(Tt,{pins_analog:()=>lg,pins_analog_pin:()=>ag,pins_axis:()=>Eg,pins_brightness:()=>gg,pins_builtinimg:()=>Og,pins_button:()=>pg,pins_dac:()=>Ig,pins_dac_pin:()=>dg,pins_digital:()=>og,pins_digital_dot:()=>Lg,pins_digital_pin:()=>ug,pins_exlcdh:()=>Cg,pins_exlcdv:()=>Ag,pins_imglist:()=>Rg,pins_interrupt:()=>mg,pins_one_more:()=>fg,pins_playlist:()=>Mg,pins_pwm:()=>rg,pins_pwm_pin:()=>_g,pins_radio_datarate:()=>Ng,pins_radio_power:()=>Dg,pins_serial:()=>cg,pins_tone_notes:()=>Sg,pins_touch:()=>hg,pins_touch_pin:()=>Tg});var ht={};t.r(ht),t.d(ht,{HCSR04:()=>yg,KEY_SELET:()=>Fg,sensor_adxl345_get_acceleration:()=>xg,sensor_bmp:()=>Kg,sensor_button_init:()=>vg,sensor_button_read:()=>Pg,sensor_compass_reset:()=>Bg,sensor_dht11:()=>Vg,sensor_mpu9250_attachGestureInterrupt:()=>Yg,sensor_mpu9250_calibrate_compass:()=>Hg,sensor_mpu9250_field_strength:()=>wg,sensor_mpu9250_gesture:()=>bg,sensor_mpu9250_get_acceleration:()=>kg,sensor_mpu9250_get_gyro:()=>Gg,sensor_mpu9250_get_magnetic:()=>Xg,sensor_mpu9250_temperature:()=>Ug,sensor_sht:()=>Qg,sensor_use_i2c_init:()=>Wg});var mt={};t.r(mt),t.d(mt,{UART_SELET:()=>jg,serial_any:()=>Zg,serial_print:()=>qg,serial_print_hex:()=>zg,serial_println:()=>Jg,serial_read_from_mixgoce:()=>aS,serial_readline:()=>tS,serial_readstr:()=>$g,serial_send_to_mixgoce:()=>uS,serial_softserial1:()=>eS,system_input:()=>iS,system_print:()=>nS,system_print_end:()=>oS,system_print_inline:()=>sS,system_print_many:()=>pS});var ct={};t.r(ct),t.d(ct,{Panic_with_status_code:()=>MS,TIM_SELET:()=>lS,Timer_init:()=>vS,base_delay:()=>yS,controls_delay:()=>NS,controls_end_program:()=>CS,controls_millis:()=>ES,controls_uname:()=>DS,reset:()=>AS,system_device_name:()=>OS,system_device_serial_number:()=>RS,system_event_bus_source:()=>mS,system_event_bus_value:()=>cS,system_gc_collect:()=>SS,system_on_event:()=>IS,system_raise_event:()=>dS,system_reset:()=>gS,system_run_in_background:()=>_S,system_ticks_diff:()=>LS,system_timer:()=>fS,system_timer_init:()=>FS,system_timestamp:()=>TS,system_value:()=>hS,system_wait:()=>rS,time_ticks_diff:()=>VS,timer2:()=>PS});var Ot={};t.r(Ot),t.d(Ot,{LCD_color_seclet:()=>xS,LCD_color_seclet1:()=>kS,lists_create_with_text1:()=>YS,tuple_create_with_text3:()=>bS});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; +(()=>{"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:()=>ft,variables_get:()=>Dt,variables_global:()=>Lt,variables_set:()=>Nt});var i={};t.r(i),t.d(i,{base_setup:()=>xt,controls_delay:()=>Xt,controls_end_program:()=>Gt,controls_except:()=>$t,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>Qt,controls_forEach:()=>wt,controls_for_range:()=>jt,controls_if:()=>Ht,controls_if_else:()=>zt,controls_if_elseif:()=>Jt,controls_if_if:()=>qt,controls_lambda:()=>ie,controls_main:()=>kt,controls_pass:()=>ne,controls_range:()=>Ut,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>Bt,datetime_fromtimestamp:()=>_e,do_while:()=>oe,garbage_collection:()=>pe,get_mem_alloc:()=>ue,get_mem_free:()=>ae,get_unique_identifier:()=>le});var n={};t.r(n),t.d(n,{base_map:()=>ve,math_arithmetic:()=>he,math_bit:()=>ce,math_constant:()=>Ie,math_constant_mp:()=>Te,math_constrain:()=>ge,math_dec:()=>Re,math_indexer_number:()=>De,math_map:()=>Se,math_max_min:()=>Ee,math_number:()=>de,math_number_base_conversion:()=>Ce,math_random:()=>Ae,math_random_seed:()=>Ne,math_round:()=>fe,math_selfcalcu:()=>me,math_to_int:()=>Me,math_trig:()=>Oe,text_to_number:()=>Le,text_to_number_skulpt:()=>Fe,turn_to_int:()=>Pe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>xe,char_to_ascii:()=>Xe,number_to_text:()=>Ge,os_system:()=>ri,text:()=>ye,text_capital:()=>qe,text_center:()=>Je,text_char:()=>be,text_char_at:()=>we,text_char_at2:()=>Ue,text_char_at3:()=>ui,text_compareTo:()=>pi,text_compare_to:()=>je,text_create_with_container:()=>ni,text_create_with_item:()=>si,text_encode:()=>li,text_equals_starts_ends:()=>Qe,text_eval:()=>_i,text_find:()=>ze,text_format:()=>ii,text_format_noreturn:()=>ai,text_join:()=>ke,text_join_seq:()=>Ze,text_length:()=>He,text_random_char:()=>Be,text_replace:()=>$e,text_split:()=>ti,text_strip:()=>ei,text_substring:()=>Ke,text_substring2:()=>We,text_substring3:()=>oi,text_textarea:()=>Ye});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Qi,enumerate:()=>ji,list_many_input:()=>yi,list_tolist:()=>xi,list_tolist2:()=>Ki,list_trig:()=>vi,lists_2d_get_col_row_data:()=>mi,lists_2d_get_data_with_col_row:()=>hi,lists_append_extend:()=>Ci,lists_change_to:()=>Vi,lists_change_to_general:()=>bi,lists_clear:()=>Ni,lists_create_with:()=>ci,lists_create_with2:()=>Xi,lists_create_with_container:()=>Ri,lists_create_with_item:()=>Mi,lists_create_with_noreturn:()=>Yi,lists_create_with_text:()=>Oi,lists_create_with_text2:()=>Gi,lists_del_general:()=>ki,lists_find:()=>Fi,lists_getIndex3:()=>Hi,lists_getSublist3:()=>Ui,lists_get_index:()=>Ii,lists_get_random_item:()=>Ai,lists_get_random_sublist:()=>gi,lists_get_sublist:()=>Ti,lists_insert_value:()=>Si,lists_insert_value2:()=>Bi,lists_pop:()=>Li,lists_remove_at:()=>fi,lists_remove_at2:()=>Wi,lists_reverse:()=>Di,lists_setIndex3:()=>wi,lists_set_index:()=>Ei,lists_sort:()=>Pi});var p={};t.r(p),t.d(p,{dicts_add_change_del:()=>rn,dicts_add_or_change:()=>nn,dicts_clear:()=>pn,dicts_create_with:()=>Ji,dicts_create_with_container:()=>zi,dicts_create_with_item:()=>Zi,dicts_create_with_noreturn:()=>Tn,dicts_deldict:()=>_n,dicts_delete:()=>sn,dicts_get:()=>tn,dicts_get_default:()=>en,dicts_items:()=>un,dicts_keys:()=>$i,dicts_length:()=>ln,dicts_pop:()=>dn,dicts_setdefault:()=>In,dicts_to_json:()=>mn,dicts_todict:()=>hn,dicts_update:()=>on,dicts_values:()=>an,json_to_dicts:()=>cn});var u={};t.r(u),t.d(u,{logic_boolean:()=>An,logic_compare:()=>Rn,logic_compare_continous:()=>Mn,logic_is:()=>Nn,logic_is_in:()=>Dn,logic_negate:()=>Cn,logic_null:()=>gn,logic_operation:()=>En,logic_tobool:()=>fn,logic_true_or_false:()=>Sn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>zn,sdcard_use_spi_init:()=>Jn,storage_can_write_ornot:()=>kn,storage_change_dir:()=>jn,storage_close_file:()=>Xn,storage_delete_file:()=>Hn,storage_file_seek:()=>Bn,storage_file_tell:()=>wn,storage_file_write:()=>Vn,storage_fileopen:()=>Fn,storage_fileopen_new:()=>vn,storage_fileopen_new_encoding:()=>Pn,storage_get_a_line:()=>bn,storage_get_contents:()=>Yn,storage_get_contents_without_para:()=>yn,storage_get_current_dir:()=>Wn,storage_get_file_size:()=>Un,storage_get_filename:()=>xn,storage_is_file:()=>qn,storage_list_all_files:()=>Gn,storage_make_dir:()=>Kn,storage_open_file_with_os:()=>Ln,storage_rename:()=>Qn});var l={};t.r(l),t.d(l,{procedures_callnoreturn:()=>ss,procedures_callreturn:()=>os,procedures_defnoreturn:()=>ts,procedures_defreturn:()=>es,procedures_ifreturn:()=>ps,procedures_mutatorarg:()=>ns,procedures_mutatorcontainer:()=>is,procedures_return:()=>us});var _={};t.r(_),t.d(_,{tuple_change_to:()=>Rs,tuple_create_with:()=>ls,tuple_create_with_container:()=>_s,tuple_create_with_item:()=>rs,tuple_create_with_noreturn:()=>As,tuple_create_with_text2:()=>ds,tuple_create_with_text_return:()=>Is,tuple_del:()=>ms,tuple_find:()=>Ms,tuple_getIndex:()=>Ts,tuple_getSublist:()=>Cs,tuple_get_random_item:()=>Ss,tuple_get_sublist:()=>gs,tuple_join:()=>cs,tuple_length:()=>hs,tuple_max:()=>Os,tuple_totuple:()=>Ds,tuple_trig:()=>Es});var r={};t.r(r),t.d(r,{set_add_discard:()=>bs,set_clear:()=>Vs,set_create_with:()=>fs,set_create_with_container:()=>Ls,set_create_with_item:()=>Fs,set_create_with_text_return:()=>Xs,set_length:()=>vs,set_operate:()=>ys,set_operate_update:()=>Ys,set_pop:()=>Ps,set_sub:()=>ks,set_toset:()=>Gs,set_update:()=>xs});var d={};t.r(d),t.d(d,{html_content:()=>Ws,html_content_more:()=>Ks,html_document:()=>Us,html_form:()=>js,html_head_body:()=>Bs,html_style:()=>Qs,html_style_color:()=>Js,html_style_content:()=>qs,html_text:()=>zs,html_title:()=>ws});var I={};t.r(I),t.d(I,{attribute_access:()=>ro,function_call:()=>ao,function_call_container:()=>lo,function_call_item:()=>_o,raw_block:()=>to,raw_empty:()=>io,raw_expression:()=>eo,raw_table:()=>$s,text_comment:()=>no,text_print_multiple:()=>oo,text_print_multiple_container:()=>po,text_print_multiple_item:()=>uo,type_check:()=>so});var T={};t.r(T),t.d(T,{controls_type:()=>co,controls_typeLists:()=>Oo,lists_zip:()=>Ro,unpack_iterable_object:()=>Mo,variables_change:()=>ho,variables_get:()=>Io,variables_global:()=>mo,variables_set:()=>To});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>Fo,base_setup:()=>Co,controls_delay:()=>Lo,controls_flow_statements:()=>fo,controls_for:()=>So,controls_forEach:()=>Yo,controls_for_range:()=>Do,controls_if:()=>Ao,controls_interrupts:()=>Vo,controls_lambda:()=>ko,controls_main:()=>Eo,controls_millis:()=>vo,controls_nointerrupts:()=>yo,controls_pass:()=>Xo,controls_range:()=>bo,controls_repeat:()=>Qo,controls_repeat_ext:()=>Uo,controls_thread:()=>Go,controls_try_finally:()=>go,controls_whileUntil:()=>No,datetime_fromtimestamp:()=>jo,do_while:()=>Ho,garbage_collection:()=>wo,get_mem_alloc:()=>Bo,get_mem_free:()=>Wo,get_unique_identifier:()=>Ko,reset:()=>Po,time_sleep:()=>xo});var m={};t.r(m),t.d(m,{base_map:()=>hp,math_arithmetic:()=>$o,math_bit:()=>Zo,math_constant:()=>Jo,math_constant_mp:()=>zo,math_constrain:()=>ap,math_dec:()=>np,math_indexer_number:()=>rp,math_map:()=>up,math_max_min:()=>op,math_number:()=>qo,math_number_base_conversion:()=>lp,math_random:()=>pp,math_random_seed:()=>_p,math_round:()=>dp,math_selfcalcu:()=>tp,math_single:()=>ep,math_to_int:()=>sp,math_trig:()=>ip,text_to_number:()=>Ip,text_to_number_skulpt:()=>Tp,turn_to_int:()=>mp});var c={};t.r(c),t.d(c,{ascii_to_char:()=>Ep,char_to_ascii:()=>Cp,number_to_text:()=>Ap,os_system:()=>Kp,text:()=>cp,text_capital:()=>Pp,text_center:()=>Vp,text_char:()=>Rp,text_char_at:()=>Dp,text_char_at2:()=>Sp,text_char_at3:()=>wp,text_compareTo:()=>Up,text_compare_to:()=>Lp,text_encode:()=>Bp,text_equals_starts_ends:()=>fp,text_eval:()=>Wp,text_find:()=>yp,text_format:()=>Xp,text_format_noreturn:()=>Gp,text_join:()=>Mp,text_join_seq:()=>Yp,text_length:()=>gp,text_random_char:()=>Np,text_replace:()=>bp,text_split:()=>kp,text_strip:()=>xp,text_substring:()=>vp,text_substring2:()=>Fp,text_substring3:()=>Hp,text_textarea:()=>Op});var O={};t.r(O),t.d(O,{enumerate:()=>Su,list_many_input:()=>du,list_tolist:()=>Au,list_tolist2:()=>gu,list_trig:()=>lu,lists_2d_get_col_row_data:()=>qp,lists_2d_get_data_with_col_row:()=>jp,lists_append_extend:()=>tu,lists_change_to:()=>ru,lists_change_to_general:()=>Tu,lists_clear:()=>ou,lists_create_with:()=>Jp,lists_create_with2:()=>mu,lists_create_with_noreturn:()=>Iu,lists_create_with_text:()=>zp,lists_create_with_text2:()=>cu,lists_del_general:()=>hu,lists_find:()=>pu,lists_getIndex3:()=>Ou,lists_getSublist3:()=>Ru,lists_get_index:()=>Zp,lists_get_random_item:()=>eu,lists_get_random_sublist:()=>iu,lists_get_sublist:()=>Qp,lists_insert_value:()=>nu,lists_insert_value2:()=>Eu,lists_pop:()=>au,lists_remove_at:()=>uu,lists_remove_at2:()=>Cu,lists_reverse:()=>su,lists_setIndex3:()=>Mu,lists_set_index:()=>$p,lists_sort:()=>_u});var R={};t.r(R),t.d(R,{dicts_add_change_del:()=>xu,dicts_add_or_change:()=>Fu,dicts_clear:()=>Vu,dicts_create_with:()=>Du,dicts_create_with_noreturn:()=>Hu,dicts_deldict:()=>ku,dicts_delete:()=>vu,dicts_get:()=>fu,dicts_get_default:()=>Lu,dicts_items:()=>yu,dicts_keys:()=>Nu,dicts_length:()=>bu,dicts_pop:()=>Xu,dicts_setdefault:()=>Gu,dicts_to_json:()=>wu,dicts_todict:()=>Uu,dicts_update:()=>Pu,dicts_values:()=>Yu,json_to_dicts:()=>Bu});var M={};t.r(M),t.d(M,{logic_boolean:()=>qu,logic_compare:()=>Wu,logic_compare_continous:()=>Ku,logic_is:()=>$u,logic_is_in:()=>Zu,logic_negate:()=>ju,logic_null:()=>Ju,logic_operation:()=>Qu,logic_tobool:()=>ta,logic_true_or_false:()=>zu});var E={};t.r(E),t.d(E,{sdcard_mount:()=>Aa,sdcard_use_spi_init:()=>Ca,storage_can_write_ornot:()=>la,storage_change_dir:()=>ca,storage_close_file:()=>ra,storage_delete_file:()=>Ia,storage_file_seek:()=>ma,storage_file_tell:()=>ha,storage_file_write:()=>oa,storage_fileopen:()=>ia,storage_fileopen_new:()=>na,storage_fileopen_new_encoding:()=>sa,storage_get_a_line:()=>aa,storage_get_contents:()=>ua,storage_get_contents_without_para:()=>pa,storage_get_current_dir:()=>Oa,storage_get_file_size:()=>Ta,storage_get_filename:()=>_a,storage_is_file:()=>Ea,storage_list_all_files:()=>da,storage_make_dir:()=>Ra,storage_open_file_with_os:()=>ea,storage_rename:()=>Ma});var C={};t.r(C),t.d(C,{procedures_callnoreturn:()=>Na,procedures_callreturn:()=>Da,procedures_defnoreturn:()=>Sa,procedures_defreturn:()=>ga,procedures_ifreturn:()=>fa,procedures_return:()=>La});var A={};t.r(A),t.d(A,{tuple_change_to:()=>xa,tuple_create_with:()=>Fa,tuple_create_with_noreturn:()=>Ua,tuple_create_with_text2:()=>va,tuple_create_with_text_return:()=>Pa,tuple_del:()=>Ya,tuple_find:()=>Xa,tuple_getIndex:()=>Va,tuple_getSublist:()=>Ha,tuple_get_random_item:()=>Ba,tuple_get_sublist:()=>wa,tuple_join:()=>ba,tuple_length:()=>ya,tuple_max:()=>ka,tuple_totuple:()=>Wa,tuple_trig:()=>Ga});var g={};t.r(g),t.d(g,{set_add_discard:()=>Za,set_clear:()=>qa,set_create_with:()=>Ka,set_create_with_text_return:()=>el,set_length:()=>Qa,set_operate:()=>Ja,set_operate_update:()=>za,set_pop:()=>ja,set_sub:()=>$a,set_toset:()=>il,set_update:()=>tl});var S={};t.r(S),t.d(S,{html_content:()=>pl,html_content_more:()=>ul,html_document:()=>nl,html_form:()=>ll,html_head_body:()=>ol,html_style:()=>al,html_style_content:()=>_l,html_text:()=>rl,html_title:()=>sl});var D={};t.r(D),t.d(D,{attribute_access:()=>Ol,function_call:()=>cl,raw_block:()=>dl,raw_empty:()=>Tl,raw_expression:()=>Il,raw_table:()=>hl,type_check:()=>ml});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Sl,actuator_extern_led_bright:()=>gl,actuator_extern_led_brightness:()=>Dl,actuator_get_led_bright:()=>fl,actuator_led_bright:()=>Nl,actuator_led_brightness:()=>Ll,actuator_neopixel_init:()=>Ul,actuator_neopixel_rgb:()=>wl,actuator_neopixel_write:()=>Bl,actuator_onboard_neopixel_rgb:()=>Wl,actuator_onboard_neopixel_rgb_all:()=>Kl,actuator_onboard_neopixel_write:()=>Ql,esp32_mixgo_music_play_list_show:()=>Hl,esp32_music_get_tempo:()=>yl,esp32_music_pitch:()=>Fl,esp32_music_pitch_with_time:()=>vl,esp32_music_play_list:()=>Gl,esp32_music_reset:()=>Yl,esp32_music_set_tempo:()=>Vl,esp32_music_stop:()=>Pl,esp32_onboard_music_pitch:()=>bl,esp32_onboard_music_pitch_with_time:()=>kl,esp32_onboard_music_play_list:()=>Xl,esp32_onboard_music_stop:()=>xl,get_led_bright:()=>ql,led_brightness:()=>Jl,led_light:()=>jl,ledswitch:()=>Al,number:()=>Cl,servo_move:()=>El});var f={};t.r(f),t.d(f,{mpython_blynk_app_data:()=>r_,mpython_blynk_app_notify:()=>s_,mpython_blynk_email:()=>u_,mpython_blynk_get_timers:()=>a_,mpython_blynk_on_connected:()=>e_,mpython_blynk_on_disconnected:()=>t_,mpython_blynk_run:()=>n_,mpython_blynk_sensor_data_to_app:()=>__,mpython_blynk_set_property:()=>p_,mpython_blynk_setup:()=>d_,mpython_blynk_stop_timers:()=>o_,mpython_blynk_sync_virtual:()=>$l,mpython_blynk_terminal_widget_vpin:()=>Zl,mpython_blynktimer:()=>l_,mpython_blynktimer_run:()=>i_});var L={};t.r(L),t.d(L,{display_animate:()=>or,display_blink_rate:()=>Q_,display_bright_point:()=>O_,display_bright_screen:()=>K_,display_circle:()=>pr,display_clear:()=>m_,display_draw_4strings:()=>X_,display_fill:()=>tr,display_get_pixel:()=>c_,display_get_screen_image:()=>W_,display_get_screen_pixel:()=>B_,display_help:()=>ar,display_image_builtins:()=>L_,display_image_create:()=>F_,display_image_size:()=>G_,display_line:()=>U_,display_line_arbitrarily:()=>w_,display_matrix_use_i2c_init:()=>rr,display_oled_drawPixel:()=>_r,display_oled_showBitmap:()=>lr,display_onoff:()=>$_,display_rect:()=>H_,display_rgb_color:()=>j_,display_scroll_string:()=>J_,display_scroll_string_delay:()=>Z_,display_scroll_string_extern:()=>Ir,display_show_image:()=>dr,display_show_image_or_string:()=>q_,display_show_image_or_string_delay:()=>z_,display_show_static:()=>E_,display_tm1650_power:()=>ir,display_tm1650_show_dot:()=>sr,display_tm1650_show_num:()=>nr,display_tm_use_i2c_init:()=>er,display_triangle:()=>ur,display_use_i2c_init:()=>x_,esp32_display_is_on:()=>f_,esp32_display_off:()=>N_,esp32_display_on:()=>D_,esp32_display_scroll:()=>S_,esp32_display_show_animation:()=>g_,esp32_display_show_default_image:()=>A_,esp32_display_show_string:()=>V_,group_lcd_init:()=>Y_,group_lcd_power:()=>k_,group_lcd_print:()=>y_,group_lcd_print2:()=>b_,image_arithmetic:()=>P_,image_shift:()=>v_,microbit_display_show_image:()=>C_,monitor_show_scroll_string:()=>M_,monitor_show_string:()=>R_});var F={};t.r(F),t.d(F,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>kr,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>br,IOT_EMQX_PING:()=>yr,IOT_FORMATTING:()=>Pr,IOT_FORMAT_STRING:()=>Vr,IOT_MIXIO_NTP:()=>Yr,IOT_MIXIO_PUBLISH:()=>Sr,IOT_MIXIO_SUBSCRIBE:()=>Dr,iot_checkonenet:()=>Qr,iot_client_onboard:()=>Xr,iot_create_with_item:()=>Ar,iot_http_client:()=>Gr,iot_http_data:()=>Hr,iot_mixio_check:()=>Lr,iot_mixio_connect:()=>gr,iot_mixio_connect_only:()=>fr,iot_mixio_disconnect:()=>Nr,iot_mixio_format_msg:()=>vr,iot_mixio_format_topic:()=>Fr,iot_mixly_key:()=>xr,iot_mqtt_client:()=>Ur,iot_mqtt_data:()=>wr,iot_onenet_check:()=>Or,iot_onenet_connect:()=>mr,iot_onenet_disconnect:()=>cr,iot_onenet_publish:()=>Mr,iot_onenet_publish_dict:()=>Rr,iot_onenetconnect:()=>Wr,iot_onenetdisconnect:()=>Kr,iot_publish:()=>jr,iot_publish_container:()=>Er,iot_publish_item:()=>Cr,iot_wifi_connect:()=>hr,iot_wificonnect:()=>Br});var v={};t.r(v),t.d(v,{actuator_extern_get_led_bright:()=>rd,actuator_extern_led_bright:()=>_d,actuator_extern_led_brightness:()=>dd,actuator_get_led_bright:()=>Td,actuator_led_bright:()=>Id,actuator_led_brightness:()=>hd,actuator_neopixel_init:()=>md,actuator_neopixel_rgb:()=>Od,actuator_neopixel_write:()=>cd,actuator_onboard_neopixel_rgb:()=>Md,actuator_onboard_neopixel_rgb_all:()=>Ed,actuator_onboard_neopixel_write:()=>Rd,esp32_mixgo_music_play_list_show:()=>od,esp32_music_get_tempo:()=>$r,esp32_music_pitch:()=>qr,esp32_music_pitch_with_time:()=>Jr,esp32_music_play_list:()=>sd,esp32_music_reset:()=>pd,esp32_music_set_tempo:()=>Zr,esp32_music_stop:()=>zr,esp32_onboard_music_pitch:()=>td,esp32_onboard_music_pitch_with_time:()=>ed,esp32_onboard_music_play_list:()=>nd,esp32_onboard_music_stop:()=>id,get_led_bright:()=>Ad,led_brightness:()=>gd,led_light:()=>Cd,ledswitch:()=>ld,number:()=>ad,servo_move:()=>ud});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>bd,mpython_blynk_app_notify:()=>vd,mpython_blynk_email:()=>kd,mpython_blynk_get_timers:()=>Vd,mpython_blynk_on_connected:()=>fd,mpython_blynk_on_disconnected:()=>Nd,mpython_blynk_run:()=>Fd,mpython_blynk_sensor_data_to_app:()=>Yd,mpython_blynk_set_property:()=>xd,mpython_blynk_setup:()=>Xd,mpython_blynk_stop_timers:()=>Pd,mpython_blynk_sync_virtual:()=>Dd,mpython_blynk_terminal_widget_vpin:()=>Sd,mpython_blynktimer:()=>yd,mpython_blynktimer_run:()=>Ld});var V={};t.r(V),t.d(V,{display_animate:()=>II,display_blink_rate:()=>Zd,display_bright_point:()=>jd,display_bright_screen:()=>zd,display_circle:()=>TI,display_clear:()=>$d,display_draw_4strings:()=>eI,display_fill:()=>aI,display_get_pixel:()=>Qd,display_get_screen_image:()=>Jd,display_get_screen_pixel:()=>qd,display_image_builtins:()=>Kd,display_image_create:()=>Wd,display_line:()=>oI,display_line_arbitrarily:()=>iI,display_matrix_use_i2c_init:()=>OI,display_oled_drawPixel:()=>cI,display_oled_showBitmap:()=>mI,display_onoff:()=>pI,display_rect:()=>nI,display_scroll_string:()=>Hd,display_scroll_string_delay:()=>Bd,display_scroll_string_extern:()=>MI,display_show_image:()=>RI,display_show_image_or_string:()=>Gd,display_show_image_or_string_delay:()=>wd,display_show_static:()=>Ud,display_tm1650_power:()=>_I,display_tm1650_show_dot:()=>dI,display_tm1650_show_num:()=>rI,display_tm_use_i2c_init:()=>lI,display_triangle:()=>hI,display_use_i2c_init:()=>tI,image_arithmetic:()=>sI,image_shift:()=>uI});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>XI,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>kI,IOT_EMQX_PING:()=>GI,IOT_FORMATTING:()=>YI,IOT_FORMAT_STRING:()=>bI,IOT_MIXIO_NTP:()=>HI,IOT_MIXIO_PUBLISH:()=>fI,IOT_MIXIO_SUBSCRIBE:()=>LI,iot_client_onboard:()=>UI,iot_http_client:()=>wI,iot_http_data:()=>BI,iot_mixio_check:()=>PI,iot_mixio_connect:()=>NI,iot_mixio_connect_only:()=>vI,iot_mixio_disconnect:()=>FI,iot_mixio_format_msg:()=>yI,iot_mixio_format_topic:()=>VI,iot_mixly_key:()=>xI,iot_mqtt_client:()=>WI,iot_mqtt_data:()=>KI,iot_onenet_check:()=>SI,iot_onenet_connect:()=>CI,iot_onenet_disconnect:()=>AI,iot_onenet_publish:()=>DI,iot_onenet_publish_dict:()=>gI,iot_wifi_connect:()=>EI});var Y={};t.r(Y),t.d(Y,{PID_get_pid:()=>uT,PID_init:()=>pT,actuator_PAC9685_Servo:()=>$I,actuator_PAC9685_init:()=>ZI,actuator_Servo:()=>zI,actuator_Servo_init:()=>JI,actuator_ms32006_dcmotor:()=>sT,actuator_ms32006_init:()=>nT,actuator_ms32006_stepper:()=>oT,actuator_rgb_display:()=>iT,actuator_rgb_init:()=>tT,actuator_rgb_set:()=>eT});var b={};t.r(b),t.d(b,{KPU_analysis:()=>mT,KPU_forward:()=>hT,KPU_init_yolo2:()=>IT,KPU_load:()=>rT,KPU_load1:()=>dT,KPU_run_yolo2:()=>TT,ai_face_info:()=>ST,ai_face_init:()=>AT,ai_face_train:()=>gT,ailocal_loading:()=>ET,ailocal_predict:()=>CT,ailocal_training:()=>MT,aionenet_API:()=>RT,aionenet_nic_init:()=>cT,aionenet_token:()=>OT,tuple_anchor:()=>lT,tuple_calss:()=>_T});var k={};t.r(k),t.d(k,{audio_play:()=>LT,audio_record:()=>FT,mic_init:()=>fT,spk_init:()=>NT,video_play:()=>vT,video_record:()=>PT});var x={};t.r(x),t.d(x,{camera_getinfo:()=>QT,camera_init:()=>bT,camera_reset:()=>kT,camera_run:()=>GT,camera_set_colorbar:()=>KT,camera_set_framesize:()=>XT,camera_set_hmirror:()=>BT,camera_set_pixformat:()=>xT,camera_set_vflip:()=>WT,camera_set_windowing:()=>qT,camera_setmun:()=>jT,camera_shutdown:()=>wT,camera_skip_frames:()=>HT,camera_snapshot:()=>UT,mode:()=>yT,size:()=>YT});var X={};t.r(X),t.d(X,{communicate_i2c_available:()=>Ih,communicate_i2c_init:()=>ZT,communicate_i2c_master_read:()=>dh,communicate_i2c_read:()=>th,communicate_i2c_scan:()=>ih,communicate_i2c_write:()=>eh,communicate_i2s_init:()=>$T,communicate_ir_recv:()=>zT,communicate_ow_init:()=>hh,communicate_ow_read:()=>ch,communicate_ow_reset:()=>Mh,communicate_ow_scan:()=>mh,communicate_ow_select:()=>Rh,communicate_ow_write:()=>Oh,communicate_spi_buffer:()=>oh,communicate_spi_init:()=>nh,communicate_spi_read:()=>ph,communicate_spi_read_output:()=>uh,communicate_spi_readinto:()=>ah,communicate_spi_readinto_output:()=>lh,communicate_spi_set:()=>sh,communicate_spi_write:()=>_h,communicate_spi_write_readinto:()=>rh,i2c_available:()=>Yh,i2c_init:()=>Eh,i2c_master_reader2:()=>yh,i2c_read:()=>Ch,i2c_scan:()=>gh,i2c_slave_onreceive:()=>Th,i2c_write:()=>Ah,spi_buffer:()=>Nh,spi_init:()=>Sh,spi_read:()=>fh,spi_read_output:()=>Lh,spi_readinto:()=>Fh,spi_readinto_output:()=>vh,spi_set:()=>Dh,spi_write:()=>Ph,spi_write_readinto:()=>Vh});var G={};t.r(G),t.d(G,{angle:()=>kh,lcd_clear:()=>Bh,lcd_color:()=>xh,lcd_colour:()=>Uh,lcd_display:()=>wh,lcd_draw_string:()=>Qh,lcd_init:()=>Gh,lcd_mirror:()=>Kh,lcd_rotation:()=>Wh,lcd_width:()=>Hh,on_off:()=>Xh,touch_calibrate:()=>qh,touch_info:()=>zh,touch_init:()=>jh,touch_read:()=>Jh});var H={};t.r(H),t.d(H,{factory_block:()=>am,factory_block_notes:()=>dm,factory_block_return:()=>lm,factory_block_return_with_textarea:()=>rm,factory_block_with_textarea:()=>_m,factory_callMethod_noreturn:()=>pm,factory_callMethod_return:()=>um,factory_create_with_container:()=>im,factory_create_with_item:()=>nm,factory_declare:()=>om,factory_from_import:()=>$h,factory_function_noreturn:()=>em,factory_function_return:()=>sm,factory_import:()=>tm});var U={};t.r(U),t.d(U,{asrloca_config:()=>hm,asrloca_del:()=>cm,asrloca_init:()=>Tm,asrloca_recognize:()=>mm});var w={};t.r(w),t.d(w,{image_Histogram:()=>cc,image_Image:()=>Mm,image_Image1:()=>Em,image_RGB:()=>Sm,image_apriltag:()=>Ic,image_barcode:()=>dc,image_binary:()=>pc,image_blob:()=>mc,image_cartoon:()=>$m,image_circle:()=>qm,image_clear:()=>Nm,image_compress:()=>Dm,image_copy:()=>gm,image_dilate:()=>ec,image_draw_arrow:()=>km,image_draw_circle:()=>Xm,image_draw_cross:()=>xm,image_draw_image:()=>Um,image_draw_keypoints:()=>Hm,image_draw_line:()=>bm,image_draw_rectangle:()=>Gm,image_draw_string:()=>Ym,image_draw_string_UTF:()=>ym,image_draw_string_flash:()=>Vm,image_erode:()=>tc,image_find_apriltags:()=>_c,image_find_barcodes:()=>ac,image_find_blobs:()=>Tc,image_find_circles:()=>Wm,image_find_hog:()=>gc,image_find_keypoints:()=>Sc,image_find_line_segments:()=>Bm,image_find_lines:()=>wm,image_find_qrcodes:()=>lc,image_find_rects:()=>Km,image_flood_fill:()=>ic,image_font_free:()=>Pm,image_font_load:()=>vm,image_get_histogram:()=>hc,image_get_pixel:()=>Fm,image_get_regression:()=>Qm,image_getinfo:()=>Cm,image_grayscale_to_rgb:()=>Ac,image_histeq:()=>zm,image_invert:()=>sc,image_kptmatch:()=>Nc,image_lab_to_rgb:()=>Mc,image_lens_corr:()=>oc,image_line:()=>jm,image_linpolar:()=>nc,image_match_descriptor:()=>Dc,image_mean:()=>Zm,image_morph:()=>uc,image_percentile:()=>Oc,image_qrcode:()=>rc,image_rect:()=>Jm,image_rgb_to_grayscale:()=>Cc,image_rgb_to_lab:()=>Ec,image_save:()=>Am,image_set_pixel:()=>Lm,image_threshold:()=>Rc,image_tonew:()=>fm,true_false:()=>Rm});var B={};t.r(B),t.d(B,{inout_digital_init:()=>Fc,inout_digital_read:()=>Pc,inout_digital_write:()=>vc,inout_highlow:()=>Lc,inout_pin_attachInterrupt:()=>Yc,inout_pin_disirq:()=>bc,inout_pwm_init:()=>Vc,inout_pwm_write:()=>yc});var W={};t.r(W),t.d(W,{iot_checkonenet:()=>Jc,iot_create_with_item:()=>Kc,iot_onenet_check:()=>Hc,iot_onenet_connect:()=>Xc,iot_onenet_disconnect:()=>Gc,iot_onenet_publish:()=>wc,iot_onenet_publish_dict:()=>Uc,iot_onenetconnect:()=>jc,iot_onenetdisconnect:()=>qc,iot_publish:()=>zc,iot_publish_container:()=>Bc,iot_publish_item:()=>Wc,iot_wifi_connect:()=>xc,iot_wificonnect:()=>Qc});var K={};t.r(K),t.d(K,{base_map:()=>TO,math_arithmetic:()=>eO,math_bit:()=>nO,math_constant:()=>tO,math_constrain:()=>_O,math_indexer_number:()=>dO,math_map:()=>rO,math_max_min:()=>pO,math_max_min1:()=>uO,math_number:()=>$c,math_number_base_conversion:()=>aO,math_random:()=>lO,math_random_seed:()=>IO,math_selfcalcu:()=>iO,math_to_int:()=>oO,math_trig:()=>sO});var Q={};t.r(Q),t.d(Q,{nes_joystick_init:()=>mO,nes_keyboard_init:()=>cO,nes_run:()=>OO});var j={};t.r(j),t.d(j,{network_connect:()=>CO,network_disable_ap:()=>DO,network_disconnect:()=>gO,network_enable_ap:()=>SO,network_ifconfig:()=>AO,network_init:()=>MO,network_scan:()=>EO,network_socket_close:()=>VO,network_socket_connect:()=>LO,network_socket_getaddrinfo:()=>fO,network_socket_init:()=>NO,network_socket_receive:()=>PO,network_socket_send:()=>vO,network_socket_settimeout:()=>FO});var q={};t.r(q),t.d(q,{pins_analog:()=>kO,pins_analog_pin:()=>xO,pins_axis:()=>ZO,pins_brightness:()=>$O,pins_builtinimg:()=>QO,pins_button:()=>HO,pins_dac:()=>XO,pins_dac_pin:()=>GO,pins_digital:()=>YO,pins_digital_dot:()=>sR,pins_digital_pin:()=>bO,pins_exlcdh:()=>JO,pins_exlcdv:()=>zO,pins_imglist:()=>jO,pins_one_more:()=>nR,pins_playlist:()=>qO,pins_pwm:()=>UO,pins_pwm_pin:()=>wO,pins_radio_datarate:()=>iR,pins_radio_power:()=>eR,pins_serial:()=>KO,pins_tone_notes:()=>tR,pins_touch:()=>WO,pins_touch_pin:()=>BO});var J={};t.r(J),t.d(J,{HCSR04:()=>_R,KEY_SELET:()=>pR,sensor_adxl345_get_acceleration:()=>OR,sensor_bmp:()=>IR,sensor_button_init:()=>uR,sensor_button_read:()=>aR,sensor_dht11:()=>lR,sensor_mpu9250_get_acceleration:()=>rR,sensor_mpu9250_get_gyro:()=>mR,sensor_mpu9250_get_magnetic:()=>hR,sensor_mpu9250_temperature:()=>cR,sensor_sht:()=>TR,sensor_use_i2c_init:()=>dR});var z={};t.r(z),t.d(z,{serial_any:()=>SR,serial_print:()=>MR,serial_print_hex:()=>CR,serial_println:()=>ER,serial_read_from_mixgoce:()=>kR,serial_readline:()=>DR,serial_readstr:()=>gR,serial_readstr_until:()=>NR,serial_receive_data_event:()=>AR,serial_send_to_mixgoce:()=>bR,serial_softserial1:()=>fR,system_input:()=>LR,system_print:()=>FR,system_print_container:()=>yR,system_print_end:()=>PR,system_print_inline:()=>vR,system_print_item:()=>YR,system_print_many:()=>VR});var Z={};t.r(Z),t.d(Z,{Panic_with_status_code:()=>HR,TIM_SELET:()=>XR,Timer_init:()=>JR,base_delay:()=>$R,controls_delay:()=>GR,controls_millis:()=>UR,controls_uname:()=>BR,raw_block:()=>wR,system_gc_collect:()=>QR,system_reset:()=>KR,system_ticks_diff:()=>jR,system_timer:()=>WR,system_timer_init:()=>qR,time_ticks_diff:()=>ZR,timer2:()=>zR});var $={};t.r($),t.d($,{LCD_color_seclet:()=>nM,lists_create_with_text1:()=>eM,tuple_create_with_text3:()=>iM});var tt={};t.r(tt),t.d(tt,{PID_get_pid:()=>hM,PID_init:()=>TM,actuator_PAC9685_Servo:()=>uM,actuator_PAC9685_init:()=>pM,actuator_Servo:()=>oM,actuator_Servo_init:()=>sM,actuator_ms32006_dcmotor:()=>dM,actuator_ms32006_init:()=>rM,actuator_ms32006_stepper:()=>IM,actuator_rgb_display:()=>_M,actuator_rgb_init:()=>aM,actuator_rgb_set:()=>lM});var et={};t.r(et),t.d(et,{KPU_analysis:()=>AM,KPU_forward:()=>CM,KPU_init_yolo2:()=>MM,KPU_load:()=>OM,KPU_load1:()=>RM,KPU_run_yolo2:()=>EM,ai_face_info:()=>PM,ai_face_init:()=>FM,ai_face_train:()=>vM,ailocal_loading:()=>fM,ailocal_predict:()=>LM,ailocal_training:()=>NM,aionenet_API:()=>DM,aionenet_nic_init:()=>gM,aionenet_token:()=>SM,tuple_anchor:()=>mM,tuple_calss:()=>cM});var it={};t.r(it),t.d(it,{audio_play:()=>YM,audio_record:()=>bM,mic_init:()=>yM,spk_init:()=>VM,video_play:()=>kM,video_record:()=>xM});var nt={};t.r(nt),t.d(nt,{camera_getinfo:()=>ZM,camera_init:()=>HM,camera_reset:()=>UM,camera_run:()=>WM,camera_set_colorbar:()=>zM,camera_set_framesize:()=>BM,camera_set_hmirror:()=>qM,camera_set_pixformat:()=>wM,camera_set_vflip:()=>JM,camera_set_windowing:()=>tE,camera_setmun:()=>$M,camera_shutdown:()=>jM,camera_skip_frames:()=>KM,camera_snapshot:()=>QM,mode:()=>XM,size:()=>GM});var st={};t.r(st),t.d(st,{communicate_i2c_available:()=>aE,communicate_i2c_init:()=>iE,communicate_i2c_master_read:()=>uE,communicate_i2c_read:()=>sE,communicate_i2c_scan:()=>pE,communicate_i2c_write:()=>oE,communicate_i2s_init:()=>nE,communicate_ir_recv:()=>eE,communicate_ow_init:()=>RE,communicate_ow_read:()=>CE,communicate_ow_reset:()=>EE,communicate_ow_scan:()=>ME,communicate_ow_select:()=>gE,communicate_ow_write:()=>AE,communicate_spi_buffer:()=>dE,communicate_spi_init:()=>_E,communicate_spi_read:()=>IE,communicate_spi_read_output:()=>TE,communicate_spi_readinto:()=>hE,communicate_spi_readinto_output:()=>mE,communicate_spi_set:()=>rE,communicate_spi_write:()=>cE,communicate_spi_write_readinto:()=>OE,i2c_slave_onreceive:()=>lE});var ot={};t.r(ot),t.d(ot,{angle:()=>SE,lcd_clear:()=>PE,lcd_color:()=>DE,lcd_colour:()=>LE,lcd_display:()=>vE,lcd_draw_string:()=>YE,lcd_init:()=>fE,lcd_mirror:()=>yE,lcd_rotation:()=>VE,lcd_width:()=>FE,on_off:()=>NE,touch_calibrate:()=>kE,touch_info:()=>XE,touch_init:()=>bE,touch_read:()=>xE});var pt={};t.r(pt),t.d(pt,{factory_block:()=>QE,factory_block_notes:()=>zE,factory_block_return:()=>jE,factory_block_return_with_textarea:()=>JE,factory_block_with_textarea:()=>qE,factory_callMethod_noreturn:()=>WE,factory_callMethod_return:()=>KE,factory_declare:()=>BE,factory_from_import:()=>GE,factory_function_noreturn:()=>UE,factory_function_return:()=>wE,factory_import:()=>HE});var ut={};t.r(ut),t.d(ut,{asrloca_config:()=>$E,asrloca_del:()=>eC,asrloca_init:()=>ZE,asrloca_recognize:()=>tC});var at={};t.r(at),t.d(at,{image_Histogram:()=>tA,image_Image:()=>sC,image_Image1:()=>oC,image_RGB:()=>nC,image_apriltag:()=>JC,image_barcode:()=>jC,image_binary:()=>wC,image_blob:()=>$C,image_cartoon:()=>bC,image_circle:()=>PC,image_clear:()=>hC,image_compress:()=>TC,image_copy:()=>IC,image_dilate:()=>xC,image_draw_arrow:()=>MC,image_draw_circle:()=>CC,image_draw_cross:()=>EC,image_draw_image:()=>SC,image_draw_keypoints:()=>gC,image_draw_line:()=>RC,image_draw_rectangle:()=>AC,image_draw_string:()=>dC,image_draw_string_UTF:()=>rC,image_draw_string_flash:()=>_C,image_erode:()=>kC,image_find_apriltags:()=>QC,image_find_barcodes:()=>WC,image_find_blobs:()=>zC,image_find_circles:()=>fC,image_find_hog:()=>uA,image_find_keypoints:()=>aA,image_find_line_segments:()=>NC,image_find_lines:()=>DC,image_find_qrcodes:()=>KC,image_find_rects:()=>LC,image_flood_fill:()=>XC,image_font_free:()=>aC,image_font_load:()=>lC,image_get_histogram:()=>ZC,image_get_pixel:()=>OC,image_get_regression:()=>FC,image_getinfo:()=>pC,image_grayscale_to_rgb:()=>pA,image_histeq:()=>yC,image_invert:()=>HC,image_kptmatch:()=>_A,image_lab_to_rgb:()=>nA,image_lens_corr:()=>UC,image_line:()=>vC,image_linpolar:()=>GC,image_match_descriptor:()=>lA,image_mean:()=>YC,image_morph:()=>BC,image_percentile:()=>eA,image_qrcode:()=>qC,image_rect:()=>VC,image_rgb_to_grayscale:()=>oA,image_rgb_to_lab:()=>sA,image_save:()=>uC,image_set_pixel:()=>cC,image_threshold:()=>iA,image_tonew:()=>mC,true_false:()=>iC});var lt={};t.r(lt),t.d(lt,{PGA_SELET:()=>rA,inout_adc_Vread:()=>MA,inout_adc_init:()=>OA,inout_adc_read:()=>RA,inout_digital_init:()=>IA,inout_digital_read:()=>hA,inout_digital_write:()=>TA,inout_highlow:()=>dA,inout_pin_attachInterrupt:()=>EA,inout_pin_disirq:()=>CA,inout_pwm_init:()=>mA,inout_pwm_write:()=>cA});var _t={};t.r(_t),t.d(_t,{iot_onenet_check:()=>NA,iot_onenet_connect:()=>gA,iot_onenet_disconnect:()=>SA,iot_onenet_publish:()=>fA,iot_onenet_publish_dict:()=>DA,iot_wifi_connect:()=>AA});var rt={};t.r(rt),t.d(rt,{base_map:()=>WA,math_arithmetic:()=>PA,math_bit:()=>vA,math_constant:()=>FA,math_constrain:()=>HA,math_indexer_number:()=>BA,math_map:()=>GA,math_max_min:()=>kA,math_max_min1:()=>xA,math_number:()=>LA,math_number_base_conversion:()=>UA,math_random:()=>XA,math_random_seed:()=>wA,math_selfcalcu:()=>VA,math_single:()=>yA,math_to_int:()=>bA,math_trig:()=>YA});var dt={};t.r(dt),t.d(dt,{nes_joystick_init:()=>KA,nes_keyboard_init:()=>QA,nes_run:()=>jA});var It={};t.r(It),t.d(It,{network_connect:()=>zA,network_disable_ap:()=>eg,network_disconnect:()=>$A,network_enable_ap:()=>tg,network_ifconfig:()=>ZA,network_init:()=>qA,network_scan:()=>JA,network_server:()=>ig,network_socket_close:()=>lg,network_socket_connect:()=>og,network_socket_getaddrinfo:()=>sg,network_socket_init:()=>ng,network_socket_receive:()=>ug,network_socket_send:()=>ag,network_socket_settimeout:()=>pg});var Tt={};t.r(Tt),t.d(Tt,{pins_analog:()=>Tg,pins_analog_pin:()=>Ig,pins_axis:()=>Dg,pins_brightness:()=>Lg,pins_builtinimg:()=>Ag,pins_button:()=>rg,pins_dac:()=>Og,pins_dac_pin:()=>cg,pins_digital:()=>_g,pins_digital_dot:()=>yg,pins_digital_pin:()=>dg,pins_exlcdh:()=>Ng,pins_exlcdv:()=>fg,pins_imglist:()=>gg,pins_interrupt:()=>Eg,pins_one_more:()=>Vg,pins_playlist:()=>Sg,pins_pwm:()=>mg,pins_pwm_pin:()=>hg,pins_radio_datarate:()=>Pg,pins_radio_power:()=>vg,pins_serial:()=>Cg,pins_tone_notes:()=>Fg,pins_touch:()=>Mg,pins_touch_pin:()=>Rg});var ht={};t.r(ht),t.d(ht,{HCSR04:()=>Xg,KEY_SELET:()=>Yg,sensor_adxl345_get_acceleration:()=>wg,sensor_bmp:()=>zg,sensor_button_init:()=>bg,sensor_button_read:()=>kg,sensor_compass_reset:()=>qg,sensor_dht11:()=>xg,sensor_mpu9250_attachGestureInterrupt:()=>Gg,sensor_mpu9250_calibrate_compass:()=>Kg,sensor_mpu9250_field_strength:()=>jg,sensor_mpu9250_gesture:()=>Hg,sensor_mpu9250_get_acceleration:()=>Ug,sensor_mpu9250_get_gyro:()=>Wg,sensor_mpu9250_get_magnetic:()=>Bg,sensor_mpu9250_temperature:()=>Qg,sensor_sht:()=>Zg,sensor_use_i2c_init:()=>Jg});var mt={};t.r(mt),t.d(mt,{UART_SELET:()=>$g,serial_any:()=>nS,serial_print:()=>tS,serial_print_hex:()=>iS,serial_println:()=>eS,serial_read_from_mixgoce:()=>IS,serial_readline:()=>oS,serial_readstr:()=>sS,serial_send_to_mixgoce:()=>dS,serial_softserial1:()=>pS,system_input:()=>uS,system_print:()=>aS,system_print_end:()=>_S,system_print_inline:()=>lS,system_print_many:()=>rS});var ct={};t.r(ct),t.d(ct,{Panic_with_status_code:()=>SS,TIM_SELET:()=>TS,Timer_init:()=>bS,base_delay:()=>XS,controls_delay:()=>PS,controls_end_program:()=>NS,controls_millis:()=>DS,controls_uname:()=>vS,reset:()=>fS,system_device_name:()=>AS,system_device_serial_number:()=>gS,system_event_bus_source:()=>ES,system_event_bus_value:()=>CS,system_gc_collect:()=>FS,system_on_event:()=>OS,system_raise_event:()=>cS,system_reset:()=>LS,system_run_in_background:()=>hS,system_ticks_diff:()=>yS,system_timer:()=>VS,system_timer_init:()=>YS,system_timestamp:()=>RS,system_value:()=>MS,system_wait:()=>mS,time_ticks_diff:()=>xS,timer2:()=>kS});var Ot={};t.r(Ot),t.d(Ot,{LCD_color_seclet:()=>wS,LCD_color_seclet1:()=>US,lists_create_with_text1:()=>GS,tuple_create_with_text3:()=>HS});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 @@ -18,4 +18,4 @@ * 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")}},Ut={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)}},wt={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")}},Bt={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)}}},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.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")}},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.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"]],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=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 re={init:function(){this.setColour(_e),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},de={init:function(){this.setColour(_e);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]}))}},Ie={init:function(){this.setColour(_e);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]}))}},Te={init:function(){this.setColour(_e),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]}))}},he={init:function(){this.setColour(_e),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]}))}},me={init:function(){this.setColour(_e),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ce={init:function(){this.setColour(_e),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(_e),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]}))}},Re={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(_e),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]}))}},Me={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(_e),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]}))}},Ee={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(_e),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]}))}},Ce={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(_e),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]}))}},Ae={init:function(){this.setColour(_e),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)}},ge={init:function(){this.setColour(_e),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)}},Se={init:function(){this.setColour(_e),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)}},De={init:function(){this.setColour(_e),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)}},Ne={init:function(){this.setColour(_e),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(_e),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]}))}},Le={init:function(){var t=[[Rt.Msg.MIXLY_TO_INT,"int"],[Rt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(_e),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]}))}},Fe=ge,ve={init:function(){this.setColour(_e),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)}},Pe=160,Ve={init:function(){this.setColour(Pe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Rt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Rt.Msg.TEXT_TEXT_TOOLTIP)},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,'"')}},ye={init:function(){this.setColour(Pe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Rt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Rt.Msg.TEXT_LINES_TOOLTIP)},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,'"')}};Rt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 Ye={init:function(){this.setColour(Pe),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,'"')}},be={init:function(){this.setColour(Pe),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)}},ke={init:function(){this.setColour(Pe),this.appendValueInput("VAR").setCheck(Number).appendField(Rt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},xe={init:function(){this.setColour(Pe),this.appendValueInput("VAR").setCheck(String).appendField(Rt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Xe={init:function(){this.setColour(Pe),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ge={init:function(){this.setColour(Pe),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},He={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(Pe),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)}},Ue={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Pe),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)}},we={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Pe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Rt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Rt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Be={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(Pe),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"))}},We={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pe),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(Pe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Rt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Qe={init:function(){this.setColour(Pe),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)}},je={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(Pe),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]}))}},qe={init:function(){var t=[[Rt.Msg.TEXT_LJUST,"ljust"],[Rt.Msg.TEXT_CENTER,"center"],[Rt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Pe),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)}},Je={init:function(){this.setColour(Pe),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)}},ze={init:function(){this.setColour(Pe),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)}},Ze={init:function(){this.setColour(Pe),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)}},$e={init:function(){this.setColour(Pe),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)}},ti={init:function(){var t=[[Rt.Msg.TEXT_TRIM_BOTH,"strip"],[Rt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Rt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Pe),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]}))}},ei={init:function(){this.setColour(Pe),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")}},ji={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},qi={init:function(){this.setColour(Ki),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}},Ji={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_KEYS),this.setTooltip(Rt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},zi={init:function(){this.setColour(Ki),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)}},Zi={init:function(){this.setColour(Ki),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)}},$i={init:function(){this.setColour(Ki),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)}},tn={init:function(){this.setColour(Ki),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)}},en={init:function(){this.setColour(Ki),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)}},nn={init:function(){this.setColour(Ki),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)}},sn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_ITEMS),this.setTooltip(Rt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_VALUES),this.setTooltip(Rt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},pn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_LENGTH),this.setTooltip(Rt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},un={init:function(){this.setColour(Ki),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)}},an={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(Ki),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")}},ln={init:function(){this.setColour(Ki),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)}},_n={init:function(){this.setColour(Ki),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(Ki),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")}},dn={init:function(){this.setColour(Ki),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},In={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn={init:function(){this.setColour(Ki),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},hn=210,mn={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)}},On={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]}))}},Rn={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)}},Mn={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)}},En={init:function(){this.setColour(hn),this.setOutput(!0),this.appendDummyInput().appendField(Rt.Msg.LOGIC_NULL),this.setTooltip(Rt.Msg.LOGIC_NULL_TOOLTIP)}},Cn={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)}},An={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)}},gn={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)}},Sn={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)}},Dn={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)}},Nn={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")}},fn={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}))}},Ln={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}))}},Fn={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)}},Pn={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}))}},Vn={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)}},yn={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)}},Yn={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)}},bn={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)}},kn={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 xn={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)}},Xn={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)}},Gn={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)}},Hn={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}))}},Un={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)}},wn={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)}},Wn={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)}},Kn={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]}))}},Qn={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)}},jn={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()}},qn={};qn.NAME_TYPE=Rt.PROCEDURE_CATEGORY_NAME,qn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},Bs={init:function(){this.setColour(xs),this.appendDummyInput().appendField(Rt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ws={init:function(){this.setColour(xs),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)}},Ks={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qs={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},js={init:function(){this.setColour(xs),this.appendDummyInput().appendField(Rt.Msg.HTML_TEXT).appendField(new Rt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs=160,Js={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Rt.FieldTable(""),"TEXT")}},zs={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT")}},Zs={init:function(){this.setColour(qs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},$s={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},to={init:function(){this.setColour(qs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Rt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},eo={init:function(){this.setColour(qs),this.appendValueInput("VALUE").appendField(Rt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},io={init:function(){this.setColour(qs),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 Uu=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]},wu=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]},Wu=function(t,e){return["None",e.ORDER_ATOMIC]},Ku=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]},Qu=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]},ju=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]},qu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ju=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},zu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Zu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},$u=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ta=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ea=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ia=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]},na=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},pa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ua=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},aa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},la=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},_a=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ra=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"},Ia=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},ha=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"},ma=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]},ca=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"},Oa=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"},Ra=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]},$a=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},tl=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},el=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},il=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},nl=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},sl=function(t,e){return'"},ol=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},pl=function(){return this.getFieldValue("TEXT")+"\n"},ul=function(t){return t.getFieldValue("TEXT")+"\n"},al=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},ll=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},_l=function(){return""},rl=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},dl=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+p.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+p.join("\n")},Tl.scrubNakedValue=function(t){return t+"\n"},Tl.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},Tl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Tl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Rt.utils.string.wrap(o,Tl.COMMENT_WRAP-3),n+=Tl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const hl=100,ml={init:function(){this.setColour(hl),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)}},cl={init:function(){this.setColour(hl),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["1","1"],["2","2"]]),"op"),this.setOutput(!0)}},Ol={init:function(){this.setColour(hl),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)}},Rl={init:function(){this.setColour(hl),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)}},Ml={init:function(){this.setColour(hl),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)}},El={init:function(){this.setColour(hl),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)}},Cl={init:function(){this.setColour(hl),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)}},Al={init:function(){this.setColour(hl),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)}},gl={init:function(){this.setColour(hl),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)}},Sl={init:function(){this.setColour(hl),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)}},Dl={init:function(){this.setColour(hl),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)}},Nl={init:function(){this.setColour(hl),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)}},fl={init:function(){this.setColour(hl),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)}},Ll={init:function(){this.setColour(hl),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)}},Fl={init:function(){this.setColour(hl),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)}},vl={init:function(){this.setColour(hl),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)}},Pl={init:function(){this.setColour(hl),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)}},Vl={init:function(){this.setColour(hl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yl={init:function(){this.setColour(hl),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)}},Yl={init:function(){this.setColour(hl),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)}},bl={init:function(){this.setColour(hl),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)}},kl={init:function(){this.setColour(hl),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)}},xl={init:function(){this.setColour(hl),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)}},Xl={init:function(){this.setColour(hl),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)}},Gl={init:function(){this.setColour(hl),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)}},Hl={init:function(){this.setColour(hl),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)}},Ul={init:function(){this.setColour(hl),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)}},wl=Cl,Bl=Al,Wl=gl,Kl="#2FAD7A",Ql={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},jl={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},ql={init:function(){this.jsonInit({inputsInline:!0,colour:Kl,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)}},Jl={init:function(){this.jsonInit({inputsInline:!0,colour:Kl,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)}},zl={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,helpUrl:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_MESSAGE0})}},Zl={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,helpUrl:Rt.Msg.MPYTHON_BLYNK_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_RUN_MESSAGE0})}},$l={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},t_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},e_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},i_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},n_={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Kl,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:Kl,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)}},o_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},p_={init:function(){this.jsonInit({inputsInline:!0,colour:Kl,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)}},u_={init:function(){this.jsonInit({nextStatement:null,previousStatement:null,colour:Kl,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"}]})}},a_=120;({init:function(){this.setColour(a_),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Rt.FieldDropdown(this.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"]];({init:function(){this.setColour(a_);var t=new Rt.FieldDropdown(this.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"]];const l_=180,__={colourOptions:["#f00","#000"],columns:2},r_={init:function(){this.jsonInit({colour:l_,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)}},d_={init:function(){this.setColour(l_),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)}},I_={init:function(){this.setColour(l_),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)}},T_={init:function(){this.setColour(l_),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}))}},h_={init:function(){this.setColour(l_),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}))}},m_={init:function(){this.setColour(l_),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)}},c_={init:function(){this.setColour(l_),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)}},O_={init:function(){this.jsonInit({colour:l_,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"}]})}},R_={init:function(){this.jsonInit({colour:l_,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)}},M_={init:function(){this.jsonInit({colour:l_,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"}]})}},E_={init:function(){this.setColour(l_),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}))}},C_={init:function(){this.jsonInit({colour:l_,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})}},A_={init:function(){this.jsonInit({colour:l_,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)}},g_={init:function(){this.jsonInit({colour:l_,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})}},S_={init:function(){this.jsonInit({colour:l_,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)}},D_={init:function(){var t=[[Rt.Msg.MIXLY_UP,"up"],[Rt.Msg.MIXLY_DOWN,"down"],[Rt.Msg.MIXLY_LEFT,"left"],[Rt.Msg.MIXLY_RIGHT,"right"]];this.setColour(l_),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(t),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.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}[t]+s}))}},N_={init:function(){var t=[[Rt.Msg.MICROBIT_DISPLAY_UNION,"+"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(l_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},f_={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:l_,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}))}},L_={init:function(){this.setColour(l_),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)}},F_={init:function(){this.setColour(l_),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)}},v_={init:function(){this.setColour(l_),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)}},P_={init:function(){this.setColour(l_),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]}))}},V_={init:function(){this.setColour(l_),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()}},y_={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(l_),this.setTooltip(Rt.Msg.MIXLY_DF_LCD+Rt.Msg.OLEDDISPLAY+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING)}},Y_={init:function(){var t=[[Rt.Msg.MIXLY_HEIGHT,"height"],[Rt.Msg.MIXLY_WIDTH,"width"]];this.setColour(l_),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(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},b_={init:function(){var t=[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]];this.setColour(l_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RECT).appendField(new Rt.FieldDropdown(t),"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)}},k_={init:function(){this.setColour(l_),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)}},x_={init:function(){this.setColour(l_),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)}},X_={init:function(){this.setColour(l_),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)}},G_={init:function(){this.setColour(l_),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)}},H_={init:function(){this.setColour(l_),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)}},U_={init:function(){this.setColour(l_),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)}},w_={init:function(){this.setColour(l_),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,__),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},B_={init:function(){this.setColour(l_),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)}},W_={init:function(){this.setColour(l_),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)}},K_={init:function(){this.setColour(l_),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)}},Q_={init:function(){this.setColour(l_),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)}},j_={init:function(){this.setColour(l_),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)}},q_={init:function(){this.setColour(l_),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]}))}},J_={init:function(){this.setColour(l_),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]}))}},z_={init:function(){this.setColour(l_),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)}},Z_={init:function(){this.setColour(l_),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)}},$_={init:function(){this.setColour(l_),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)}},tr={init:function(){this.setColour(l_),this.setOutput(!0,"Tuple"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISPLAY_ANIMATE).appendField(new Rt.FieldDropdown([["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]]),"ANIMATION")}},er={init:function(){var t=[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]];this.setColour(l_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Rt.FieldDropdown(t),"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)}},ir={init:function(){var t=[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]];this.setColour(l_),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(t),"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)}},nr={init:function(){this.setColour("#555555"),this.appendDummyInput("").appendField(Rt.Msg.MIXGO_ONBOARDDISPLAY_HELP),this.setInputsInline(!0),this.setTooltip("")}},sr={init:function(){this.setColour(l_),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)}},or={init:function(){this.setColour(l_),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)}},pr={init:function(){this.setColour(l_),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)}},ur={init:function(){this.setColour(l_),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)}},ar={init:function(){this.setColour(l_),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)}},lr="#526FC3",_r={init:function(){this.setColour(lr),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)}},rr={init:function(){this.setColour(lr),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)}},dr={init:function(){this.setColour(lr),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)}},Ir={init:function(){this.setColour(lr),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)}},Tr={init:function(){this.setColour(lr),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)}},hr={init:function(){this.setColour(lr),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")}},mr={init:function(){this.setColour(lr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},cr={init:function(){this.setColour(lr),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}},Or={init:function(){this.setColour(lr),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}},Rr={init:function(){this.setColour(lr),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)}},Mr={init:function(){this.setColour(lr),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)}},Er={init:function(){this.setColour(lr),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)}},Cr={init:function(){this.setColour(lr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ar={init:function(){this.setColour(lr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gr={init:function(){this.setColour(lr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sr={init:function(){this.setColour(lr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Dr={init:function(){this.setColour(lr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Nr={init:function(){this.setColour(lr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},fr={init:function(){this.setColour(lr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Lr={init:function(){this.setColour(lr),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)}},Fr={init:function(){this.setColour(lr),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)}},vr={init:function(){this.setColour(lr),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)}},Pr={init:function(){this.setColour(lr),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)}},Vr={init:function(){this.VISITOR_ID=Mt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(lr),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")}},yr={init:function(){this.setColour(lr),this.appendDummyInput().appendField("MixIO").appendField(Rt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(lr),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)}},br={init:function(){this.setColour(lr),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)}},kr={init:function(){this.setColour(lr),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)}},xr={init:function(){this.setColour(lr),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)}},Xr=_r,Gr=rr,Hr=dr,Ur=Ir,wr=hr;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;const Br=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"},Wr=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"},Kr=function(t,e){return e.definitions_.import_music="import music","music.stop("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")\n"},Qr=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"},jr=function(t,e){e.definitions_.import_music="import music";return["music.get_tempo()",e.ORDER_ATOMIC]},qr=function(t,e){return e.definitions_.import_music="import music","music.pitch("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+")\n"},Jr=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"},zr=function(t,e){e.definitions_.import_music="import music";return"music.stop()\n"},Zr=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+")\n"},$r=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"},td=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"},ed=function(t,e){return e.definitions_.import_music="import music","music.reset()\n"},id=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"},nd=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},sd=function(t,e){return[this.getFieldValue("flag"),e.ORDER_ATOMIC]},od=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"},pd=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").getonoff()",e.ORDER_ATOMIC]},ud=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"},ad=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"},ld=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".getonoff()",e.ORDER_ATOMIC]},_d=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"},rd=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"},dd=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"},Id=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"},Td=function(t,e){e.definitions_.import_mixgo="import mixgo";return"mixgo.rgb.write()\n"},hd=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"},md=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"},cd=ad,Od=ld,Rd=_d,Md=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""},Ed=function(t,e){return"blynk.virtual_sync("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+")\n"},Cd=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,""},Ad=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,""},gd=function(){return"blynk_timer.run()\n"},Sd=function(){return"blynk.run()\n"},Dd=function(t,e){return"blynk.notify("+e.valueToCode(this,"notification",e.ORDER_ATOMIC)+")\n"},Nd=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`},fd=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]},Ld=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,""},Fd=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"},vd=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,""},Pd=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`},Vd=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`},yd=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 Yd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},bd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},kd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.showstatic("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},xd=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"},Xd=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"},Gd=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]},Hd=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.Image."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Ud=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]},wd=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"},Bd=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_brightness()",e.ORDER_ATOMIC]},Wd=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_screenimage()",e.ORDER_ATOMIC]},Kd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},Qd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.blink_rate("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},jd=function(t,e){e.definitions_.import_matrix="import matrix";return"matrix.clear()\n"},qd=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"},Jd=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"},zd=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"},Zd=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},$d=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]},tI=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"},eI=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},iI=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]},nI=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"},sI=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},oI=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+this.getFieldValue("STAT")+"()\n"},pI=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"},uI=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"},aI=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},lI=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},_I=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},rI=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"},dI=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"},II=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},TI=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"},hI=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"},mI=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"},cI=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"},OI=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".do_disconnect()\n"},RI=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"},MI=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".check_msg()\n"},EI=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;te?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")}},rm={init:function(){this.setColour(am),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("启动识别 返回结果"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("语音识别,获取识别结果")}},dm={init:function(){this.setColour(am),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("注销识别 内存释放"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("语音识别,注销语音识别,释放内存")}},Im="#90A244",Tm={init:function(){this.setColour(Im),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["否","0"],["是","1"]]),"flag"),this.setOutput(!0),this.setTooltip()}},hm={init:function(){this.setColour(Im),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("path").appendField("打开路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("打开一个新的图像对象")}},mm={init:function(){this.setColour(Im),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField("打开空图"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开一个空的图像对象")}},cm={init:function(){this.setColour(Im),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("获取图像的宽度、高度、格式、大小")}},Om={init:function(){this.setColour(Im),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("图像的副本保存到文件系统")}},Rm={init:function(){this.setColour(Im),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("复制一个图像图像的副本")}},Mm={init:function(){this.setColour(Im),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("对图像进行适当压缩")}},Em={init:function(){this.setColour(Im),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("对图像进行适当压缩")}},Cm={init:function(){this.setColour(Im),this.appendDummyInput().appendField("图像清除"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将图像中的所有像素设置为零")}},Am={init:function(){this.setColour(Im),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("将图像转换为灰度图、彩色图、彩虹图像")}},gm={init:function(){this.setColour(Im),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("设置图像某点像素值")}},Sm={init:function(){this.setColour(Im),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("获取图像某点像素值")}},Dm={init:function(){this.setColour(Im),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中加载需要显示文字的字库")}},Nm={init:function(){this.setColour(Im),this.appendDummyInput().appendField("字库释放"),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("释放字库所占的内存")}},fm={init:function(){this.setColour(Im),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("图像上绘制一个文本")}},Lm={init:function(){this.setColour(Im),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("图像上绘制一个中文文本")}},Fm={init:function(){this.setColour(Im),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("图像上绘制一个字符文本")}},vm={init:function(){this.setColour(Im),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)的线")}},Pm={init:function(){this.setColour(Im),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("图像上绘制一个箭头")}},Vm={init:function(){this.setColour(Im),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("图像上绘制一个十字")}},ym={init:function(){this.setColour(Im),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("图像上绘制一个圆形")}},Ym={init:function(){this.setColour(Im),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("图像上绘制一个矩形")}},bm={init:function(){this.setColour(Im),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("绘制一个特征点对象的各个点")}},km={init:function(){this.setColour(Im),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图像")}},xm={init:function(){this.setColour(Im),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对象列表")}},Xm={init:function(){this.setColour(Im),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对象列表")}},Gm={init:function(){this.setColour(Im),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对象列表")}},Hm={init:function(){this.setColour(Im),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对象列表")}},Um={init:function(){this.setColour(Im),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对象列表")}},wm={init:function(){this.setColour(Im),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列表,获取直线信息")}},Bm={init:function(){this.setColour(Im),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列表,获取圆形信息")}},Wm={init:function(){this.setColour(Im),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列表,获取矩形信息")}},Km={init:function(){this.setColour(Im),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("图像上的简单直方图均衡化")}},Qm={init:function(){this.setColour(Im),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("图像上的简单模糊滤波")}},jm={init:function(){this.setColour(Im),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("图像上的简单卡通滤波器")}},qm={init:function(){this.setColour(Im),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("图像腐蚀,从分割区域的边缘删除像素(白色目标区域)")}},Jm={init:function(){this.setColour(Im),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("图像膨胀,将像素添加到分割区域的边缘中(白色目标区域)")}},zm={init:function(){this.setColour(Im),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("像洪水一样填充图像中低矮凹陷的地方(洪水填充)")}},Zm={init:function(){this.setColour(Im),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("图像从笛卡尔坐标到线性极坐标重新投影")}},$m={init:function(){this.setColour(Im),this.appendDummyInput().appendField("图像反转"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("翻转图像中的所有像素值")}},tc={init:function(){this.setColour(Im),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("翻转图像中的所有像素值")}},ec={init:function(){this.setColour(Im),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 中的阈值内,将图像中的所有像素设置为黑色或白色。")}},ic={init:function(){this.setColour(Im),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("通过过滤器内核对图像进行卷积。")}},nc={init:function(){this.setColour(Im),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对象列表")}},sc={init:function(){this.setColour(Im),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对象列表")}},oc={init:function(){this.setColour(Im),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对象列表")}},pc={init:function(){this.setColour(Im),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列表,获取二维码信息")}},uc={init:function(){this.setColour(Im),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列表,获取条形码信息")}},ac={init:function(){this.setColour(Im),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信息")}},lc={init:function(){this.setColour(Im),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对象列表")}},_c={init:function(){this.setColour(Im),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对象列表")}},rc={init:function(){this.setColour(Im),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列表,获取追踪色块信息")}},dc={init:function(){this.setColour(Im),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列表,获取条形码信息")}},Ic={init:function(){this.setColour(Im),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列表,获取识别颜色信息")}},Tc={init:function(){this.setColour(Im),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列表,获取条形码信息")}},hc={init:function(){this.setColour(Im),this.appendDummyInput().appendField("RGB888值"),this.appendValueInput("LIST").appendField("由LAB"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("LAB转RGB888")}},mc={init:function(){this.setColour(Im),this.appendDummyInput().appendField("LAB值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转LAB")}},cc={init:function(){this.setColour(Im),this.appendDummyInput().appendField("灰度值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转灰度图")}},Oc={init:function(){this.setColour(Im),this.appendDummyInput().appendField("RGB888"),this.appendValueInput("g_value").appendField("由灰度值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("灰度图转RGB888")}},Rc={init:function(){this.setColour(Im),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中的像素,仅支持灰度图像")}},Mc={init:function(){this.setColour(Im),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对象列表")}},Ec={init:function(){this.setColour(Im),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对象列表")}},Cc={init:function(){this.setColour(Im),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列表,获取追踪特征信息")}},Ac=20,gc={init:function(){this.setColour(Ac),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)}},Sc={init:function(){this.setColour(Ac),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)}},Dc={init:function(){this.setColour(Ac),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)}},Nc={init:function(){this.setColour(Ac),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)}},fc={init:function(){this.setColour(Ac),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输出设置,需要调用定时器")}},Lc={init:function(){this.setColour(Ac),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%,可以为小数")}},Fc={init:function(){this.setColour(Ac),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)}},vc={init:function(){this.setColour(Ac),this.appendDummyInput().appendField("取消中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("取消中断")}},Pc="#637AAC",Vc={init:function(){this.setColour(Pc),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)}},yc={init:function(){this.setColour(Pc),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)}},Yc={init:function(){this.setColour(Pc),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)}},bc={init:function(){this.setColour(Pc),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)}},kc={init:function(){this.setColour(Pc),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)}},xc={init:function(){this.setColour(Pc),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")}},Xc={init:function(){this.setColour(Pc),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Gc={init:function(){this.setColour(Pc),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}},Hc={init:function(){this.setColour(Pc),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}},Uc=Vc,wc=yc,Bc=Yc,Wc=bc,Kc=xc,Qc=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 jc={init:function(){this.setColour(Qc),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},qc={init:function(){this.setColour(Qc);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]}))}},Jc={init:function(){this.setColour(Qc),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]}))}},zc={init:function(){this.setColour(Qc),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]}))}},Zc={init:function(){this.setColour(Qc),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},$c={init:function(){this.setColour(Qc),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]}))}},tO={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(Qc),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]}))}},eO={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(Qc),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]}))}},iO={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(Qc),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]}))}},nO={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(Qc),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]}))}},sO={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Qc),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]}))}},oO={init:function(){this.setColour(Qc),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)}},pO={init:function(){this.setColour(Qc),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)}},uO={init:function(){this.setColour(Qc),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)}},aO={init:function(){this.setColour(Qc),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)}},lO=pO,_O="#2E9883",rO={init:function(){this.setColour(_O),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手柄控制")}},dO={init:function(){this.setColour(_O),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,使用串口键盘控制")}},IO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("NES 运行游戏"),this.appendValueInput("path").appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("运行NES游戏ROM")}},TO="#5B6DA5",hO={init:function(){this.setColour(TO),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设备,并初始化配置")}},mO={init:function(){this.setColour(TO),this.appendDummyInput().appendField("WiFi扫描"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("扫描附近可用的WiFi信息-返回多信息列表")}},cO={init:function(){this.setColour(TO),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上网")}},OO={init:function(){this.setColour(TO),this.appendDummyInput().appendField("WiFi").appendField(new Rt.FieldDropdown([["连接信息","1"],["连接状态","2"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("查看wifi连接信息或者连接状态")}},RO={init:function(){this.setColour(TO),this.appendDummyInput().appendField("WiFi断开连接"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("断开wifi连接")}},MO={init:function(){this.setColour(TO),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热点并配置")}},EO={init:function(){this.setColour(TO),this.appendDummyInput().appendField("关闭热点"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("关闭热点")}},CO={init:function(){this.setColour(TO),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("套接字 初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("套接字初始化")}},AO={init:function(){this.setColour(TO),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信息")}},gO={init:function(){this.setColour(TO),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地址连接")}},SO={init:function(){this.setColour(TO),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("设置阻塞套接字超时时间")}},DO={init:function(){this.setColour(TO),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendValueInput("content").appendField("发送数据"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接发送数据")}},NO={init:function(){this.setColour(TO),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("接收数据"),this.appendValueInput("size").appendField("字节").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接接收数据,返回接收到的数据对象")}},fO={init:function(){this.setColour(TO),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)}},LO=230,FO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital),"PIN"),this.setOutput(!0)}},vO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},PO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog),"PIN"),this.setOutput(!0)}},VO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},yO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac),"PIN"),this.setOutput(!0)}},YO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},bO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},kO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},xO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},XO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},GO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch),"PIN"),this.setOutput(!0)}},HO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},UO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},wO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},BO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},WO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},KO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},QO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},jO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},qO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},JO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},zO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},ZO={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},$O={init:function(){this.setColour(LO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},tR=40,eR={init:function(){this.setColour(tR),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["A","17"],["B","16"]]),"KEY"),this.setOutput(!0),this.setTooltip()}},iR={init:function(){this.setColour(tR),this.appendDummyInput().appendField("初始化"),this.appendValueInput("key").appendField("按键"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化按键")}},nR={init:function(){this.setColour(tR),this.appendValueInput("key").appendField("按键"),this.appendDummyInput().appendField("被按下?"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip("获取按键值")}},sR={init:function(){this.setColour(tR),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,获取温湿度")}},oR={init:function(){this.setColour(tR),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)}},pR={init:function(){this.setColour(tR),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}))}},uR={init:function(){this.setColour(tR),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]}))}},aR={init:function(){this.setColour(tR),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]}))}},lR={init:function(){this.setColour(tR),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]}))}},_R={init:function(){this.setColour(tR),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}))}},rR={init:function(){this.setColour(tR),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}))}},dR={init:function(){this.setColour(tR),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)}},IR={init:function(){this.setColour(tR),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}))}},TR=65,hR={init:function(){this.setColour(TR),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)}},mR={init:function(){this.setColour(TR),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)}},cR={init:function(){this.setColour(TR),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)}},OR={init:function(){this.setColour(TR),this.appendValueInput("char_marker").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_SERIAL_WHEN_CONTAIN_DATA),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO)}},RR={init:function(){this.setColour(TR),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)}},MR={init:function(){this.setColour(TR),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)}},ER={init:function(){this.setColour(TR),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)}},CR={init:function(){this.setColour(TR),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)}},AR={init:function(){this.setColour(TR),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)}},gR={init:function(){this.setColour(TR),this.appendValueInput("VAR").appendField(Rt.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Rt.Msg.INOUT_input_TOOLTIP)}},SR={init:function(){this.setColour(TR),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.BLOCKPY_PRINT_TOOLTIP)}},DR={init:function(){this.setColour(TR),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)}},NR={init:function(){this.setColour(TR),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)}},fR={init:function(){this.setColour(TR),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"},rS=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},dS=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"},IS=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"},TS=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},hS=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},mS=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},cS=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},OS=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},RS=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},MS=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},ES=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]}},CS=function(){return"while True:\n pass\n"},AS=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},gS=function(t,e){e.definitions_["import machine"]="import machine";return"machine.reset()\n"},SS=function(t,e){return e.definitions_["import gc"]="import gc",this.getFieldValue("gc")+"\n"},DS=function(t,e){return e.definitions_.import_os="import os","os.uname()"},NS=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"}},fS=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"},LS=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]},FS=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"},vS=FS,PS=fS,VS=LS,yS=NS;const YS=function(t,e){return["["+this.getFieldValue("TEXT")+"]",e.ORDER_ATOMIC]},bS=function(t,e){return["("+this.getFieldValue("TEXT")+")",e.ORDER_ATOMIC]},kS=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]},xS=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,Jn),Rt.Python=Tl,Rt.generator=Tl,Mt.Profile.default={},Object.assign(Mt.Profile,wI),Object.assign(Mt.Profile.default,wI.k210),Object.assign(Rt.Blocks,e,i,n,s,o,p,u,a,l,_,r,d,I,F,L,f,N,Y,b,k,x,X,G,H,U,w,B,W,K,Q,j,q,J,z,Z,$),Object.assign(Rt.Python.forBlock,T,h,m,c,O,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,ct,Ot)})(); \ No newline at end of file +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")}},Ut={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)}},wt={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")}},Bt={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)}}},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.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")}},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.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"]],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=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 de={init:function(){this.setColour(re),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},Ie={init:function(){this.setColour(re);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]}))}},Te={init:function(){this.setColour(re);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]}))}},he={init:function(){this.setColour(re),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]}))}},me={init:function(){this.setColour(re),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(re),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Oe={init:function(){this.setColour(re),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]}))}},Re={init:function(){var t=[[Rt.Msg.MATH_BIN,"bin"],[Rt.Msg.MATH_OCT,"oct"],[Rt.Msg.MATH_HEX,"hex"]];this.setColour(re),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]}))}},Me={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(re),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]}))}},Ee={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(re),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]}))}},Ce={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(re),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]}))}},Ae={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(re),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]}))}},ge={init:function(){this.setColour(re),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)}},Se={init:function(){this.setColour(re),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)}},De={init:function(){this.setColour(re),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)}},Ne={init:function(){this.setColour(re),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(re),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)}},Le={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(re),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]}))}},Fe={init:function(){var t=[[Rt.Msg.MIXLY_TO_INT,"int"],[Rt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(re),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]}))}},ve=Se,Pe={init:function(){this.setColour(re),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)}},Ve=160,ye={init:function(){this.setColour(Ve),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Rt.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Rt.Msg.TEXT_TEXT_TOOLTIP)},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,'"')}},Ye={init:function(){this.setColour(Ve),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Rt.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Rt.Msg.TEXT_LINES_TOOLTIP)},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,'"')}};Rt.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 be={init:function(){this.setColour(Ve),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,'"')}},ke={init:function(){this.setColour(Ve),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)}},xe={init:function(){this.setColour(Ve),this.appendValueInput("VAR").setCheck(Number).appendField(Rt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Xe={init:function(){this.setColour(Ve),this.appendValueInput("VAR").setCheck(String).appendField(Rt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ge={init:function(){this.setColour(Ve),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},He={init:function(){this.setColour(Ve),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ue={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(Ve),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)}},we={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ve),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)}},Be={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ve),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Rt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Rt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},We={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(Ve),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"))}},Ke={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ve),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)}},Qe={init:function(){var t=[[Rt.Msg.MIXLY_EQUALS,"==="],[Rt.Msg.MIXLY_STARTSWITH,"startswith"],[Rt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ve),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Rt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},je={init:function(){this.setColour(Ve),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)}},qe={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(Ve),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]}))}},Je={init:function(){var t=[[Rt.Msg.TEXT_LJUST,"ljust"],[Rt.Msg.TEXT_CENTER,"center"],[Rt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ve),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)}},ze={init:function(){this.setColour(Ve),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)}},Ze={init:function(){this.setColour(Ve),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)}},$e={init:function(){this.setColour(Ve),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)}},ti={init:function(){this.setColour(Ve),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)}},ei={init:function(){var t=[[Rt.Msg.TEXT_TRIM_BOTH,"strip"],[Rt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Rt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ve),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]}))}},ii={init:function(){this.setColour(Ve),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")}},zi={init:function(){this.setColour(qi),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Zi={init:function(){this.setColour(qi),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}},$i={init:function(){this.setColour(qi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_KEYS),this.setTooltip(Rt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},tn={init:function(){this.setColour(qi),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)}},en={init:function(){this.setColour(qi),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)}},nn={init:function(){this.setColour(qi),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)}},sn={init:function(){this.setColour(qi),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)}},on={init:function(){this.setColour(qi),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)}},pn={init:function(){this.setColour(qi),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)}},un={init:function(){this.setColour(qi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_ITEMS),this.setTooltip(Rt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},an={init:function(){this.setColour(qi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_VALUES),this.setTooltip(Rt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},ln={init:function(){this.setColour(qi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_LENGTH),this.setTooltip(Rt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},_n={init:function(){this.setColour(qi),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)}},rn={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(qi),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")}},dn={init:function(){this.setColour(qi),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)}},In={init:function(){this.setColour(qi),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)}},Tn={init:function(){this.setColour(qi),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")}},hn={init:function(){this.setColour(qi),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},mn={init:function(){this.setColour(qi),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(qi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},On=210,Rn={init:function(){var t=Rt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(On),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]}},Mn={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(On),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)}},En={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(On),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]}))}},Cn={init:function(){this.setColour(On),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Rt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Rt.Msg.LOGIC_NEGATE_TOOLTIP)}},An={init:function(){var t=[[Rt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Rt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(On),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Rt.FieldDropdown(t),"BOOL"),this.setTooltip(Rt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},gn={init:function(){this.setColour(On),this.setOutput(!0),this.appendDummyInput().appendField(Rt.Msg.LOGIC_NULL),this.setTooltip(Rt.Msg.LOGIC_NULL_TOOLTIP)}},Sn={init:function(){this.setColour(On),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)}},Dn={init:function(){var t=[[Rt.Msg.TEXT_APPEND_TO,"in"],[Rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(On),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)}},Nn={init:function(){var t=[[Rt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(On),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)}},fn={init:function(){this.setColour(On),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Ln={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)}},Fn={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")}},vn={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}))}},Pn={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}))}},Vn={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)}},yn={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)}},Yn={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)}},kn={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)}},xn={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)}},Xn={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)}},Gn={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 Hn={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)}},Un={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)}},wn={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)}},Bn={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}))}},Wn={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)}},Kn={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]}))}},Qn={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)}},jn={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)}},qn={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]}))}},Jn={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)}},zn={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()}},Zn={};Zn.NAME_TYPE=Rt.PROCEDURE_CATEGORY_NAME,Zn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},Qs={init:function(){this.setColour(Hs),this.appendDummyInput().appendField(Rt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},js={init:function(){this.setColour(Hs),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)}},qs={init:function(){this.setColour(Hs),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Hs),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs={init:function(){this.setColour(Hs),this.appendDummyInput().appendField(Rt.Msg.HTML_TEXT).appendField(new Rt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs=160,$s={init:function(){this.setColour(Zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Rt.FieldTable(""),"TEXT")}},to={init:function(){this.setColour(Zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT")}},eo={init:function(){this.setColour(Zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},io={init:function(){this.setColour(Zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},no={init:function(){this.setColour(Zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Rt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},so={init:function(){this.setColour(Zs),this.appendValueInput("VALUE").appendField(Rt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},oo={init:function(){this.setColour(Zs),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 Qu=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]},ju=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},qu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Ju=function(t,e){return["None",e.ORDER_ATOMIC]},zu=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]},Zu=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]},$u=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]},ta=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},ea=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"},na=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},sa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},oa=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},pa=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ua=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]},aa=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]},_a=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ra=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]},Ia=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ta=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ha=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ma=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"},ca=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Oa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ra=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ma=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"},Ea=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]},Ca=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"},Aa=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"),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]},sl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},ol=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},pl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},ul=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},al=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},ll=function(t,e){return'"},_l=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},rl=function(){return this.getFieldValue("TEXT")+"\n"},dl=function(t){return t.getFieldValue("TEXT")+"\n"},Il=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Tl=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},hl=function(){return""},ml=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},cl=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+p.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+p.join("\n")},Rl.scrubNakedValue=function(t){return t+"\n"},Rl.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},Rl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Rl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Rt.utils.string.wrap(o,Rl.COMMENT_WRAP-3),n+=Rl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ml=100,El={init:function(){this.setColour(Ml),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)}},Cl={init:function(){this.setColour(Ml),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["1","1"],["2","2"]]),"op"),this.setOutput(!0)}},Al={init:function(){this.setColour(Ml),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)}},gl={init:function(){this.setColour(Ml),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)}},Sl={init:function(){this.setColour(Ml),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)}},Dl={init:function(){this.setColour(Ml),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)}},Nl={init:function(){this.setColour(Ml),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)}},fl={init:function(){this.setColour(Ml),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)}},Ll={init:function(){this.setColour(Ml),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)}},Fl={init:function(){this.setColour(Ml),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)}},vl={init:function(){this.setColour(Ml),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)}},Pl={init:function(){this.setColour(Ml),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)}},Vl={init:function(){this.setColour(Ml),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)}},yl={init:function(){this.setColour(Ml),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)}},Yl={init:function(){this.setColour(Ml),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)}},bl={init:function(){this.setColour(Ml),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)}},kl={init:function(){this.setColour(Ml),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)}},xl={init:function(){this.setColour(Ml),this.appendDummyInput().appendField(Rt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xl={init:function(){this.setColour(Ml),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)}},Gl={init:function(){this.setColour(Ml),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)}},Hl={init:function(){this.setColour(Ml),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)}},Ul={init:function(){this.setColour(Ml),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)}},wl={init:function(){this.setColour(Ml),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)}},Bl={init:function(){this.setColour(Ml),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)}},Wl={init:function(){this.setColour(Ml),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)}},Kl={init:function(){this.setColour(Ml),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)}},Ql={init:function(){this.setColour(Ml),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)}},jl=Nl,ql=fl,Jl=Ll,zl="#2FAD7A",Zl={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},$l={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},t_={init:function(){this.jsonInit({inputsInline:!0,colour:zl,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)}},e_={init:function(){this.jsonInit({inputsInline:!0,colour:zl,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)}},i_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,helpUrl:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_MESSAGE0})}},n_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,helpUrl:Rt.Msg.MPYTHON_BLYNK_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_RUN_MESSAGE0})}},s_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},o_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},p_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},u_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},a_={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:zl,helpUrl:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_MESSAGE0})}},l_={init:function(){this.jsonInit({message0:Rt.Msg.MPYTHON_BLYNKTIMER_MESSAGE0,colour:zl,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)}},__={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:zl,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"}]})}},r_={init:function(){this.jsonInit({inputsInline:!0,colour:zl,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)}},d_={init:function(){this.jsonInit({nextStatement:null,previousStatement:null,colour:zl,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"}]})}},I_=120;({init:function(){this.setColour(I_),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Rt.FieldDropdown(this.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"]];({init:function(){this.setColour(I_);var t=new Rt.FieldDropdown(this.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"]];const T_=180,h_={colourOptions:["#f00","#000"],columns:2},m_={init:function(){this.jsonInit({colour:T_,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)}},c_={init:function(){this.setColour(T_),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)}},O_={init:function(){this.setColour(T_),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)}},R_={init:function(){this.setColour(T_),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}))}},M_={init:function(){this.setColour(T_),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}))}},E_={init:function(){this.setColour(T_),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)}},C_={init:function(){this.setColour(T_),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)}},A_={init:function(){this.jsonInit({colour:T_,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"}]})}},g_={init:function(){this.jsonInit({colour:T_,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)}},S_={init:function(){this.jsonInit({colour:T_,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"}]})}},D_={init:function(){this.setColour(T_),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}))}},N_={init:function(){this.jsonInit({colour:T_,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})}},f_={init:function(){this.jsonInit({colour:T_,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)}},L_={init:function(){this.jsonInit({colour:T_,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})}},F_={init:function(){this.jsonInit({colour:T_,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)}},v_={init:function(){var t=[[Rt.Msg.MIXLY_UP,"up"],[Rt.Msg.MIXLY_DOWN,"down"],[Rt.Msg.MIXLY_LEFT,"left"],[Rt.Msg.MIXLY_RIGHT,"right"]];this.setColour(T_),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(t),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.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}[t]+s}))}},P_={init:function(){var t=[[Rt.Msg.MICROBIT_DISPLAY_UNION,"+"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(T_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},V_={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:T_,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}))}},y_={init:function(){this.setColour(T_),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)}},Y_={init:function(){this.setColour(T_),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)}},b_={init:function(){this.setColour(T_),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)}},k_={init:function(){this.setColour(T_),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]}))}},x_={init:function(){this.setColour(T_),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()}},X_={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(T_),this.setTooltip(Rt.Msg.MIXLY_DF_LCD+Rt.Msg.OLEDDISPLAY+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING)}},G_={init:function(){var t=[[Rt.Msg.MIXLY_HEIGHT,"height"],[Rt.Msg.MIXLY_WIDTH,"width"]];this.setColour(T_),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(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},H_={init:function(){var t=[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]];this.setColour(T_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RECT).appendField(new Rt.FieldDropdown(t),"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)}},U_={init:function(){this.setColour(T_),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)}},w_={init:function(){this.setColour(T_),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)}},B_={init:function(){this.setColour(T_),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)}},W_={init:function(){this.setColour(T_),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)}},K_={init:function(){this.setColour(T_),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)}},Q_={init:function(){this.setColour(T_),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)}},j_={init:function(){this.setColour(T_),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,h_),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},q_={init:function(){this.setColour(T_),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)}},J_={init:function(){this.setColour(T_),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)}},z_={init:function(){this.setColour(T_),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)}},Z_={init:function(){this.setColour(T_),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)}},$_={init:function(){this.setColour(T_),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)}},tr={init:function(){this.setColour(T_),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]}))}},er={init:function(){this.setColour(T_),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]}))}},ir={init:function(){this.setColour(T_),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)}},nr={init:function(){this.setColour(T_),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)}},sr={init:function(){this.setColour(T_),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)}},or={init:function(){this.setColour(T_),this.setOutput(!0,"Tuple"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISPLAY_ANIMATE).appendField(new Rt.FieldDropdown([["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]]),"ANIMATION")}},pr={init:function(){var t=[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]];this.setColour(T_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Rt.FieldDropdown(t),"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)}},ur={init:function(){var t=[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]];this.setColour(T_),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(t),"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)}},ar={init:function(){this.setColour("#555555"),this.appendDummyInput("").appendField(Rt.Msg.MIXGO_ONBOARDDISPLAY_HELP),this.setInputsInline(!0),this.setTooltip("")}},lr={init:function(){this.setColour(T_),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)}},_r={init:function(){this.setColour(T_),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)}},rr={init:function(){this.setColour(T_),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)}},dr={init:function(){this.setColour(T_),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)}},Ir={init:function(){this.setColour(T_),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)}},Tr="#526FC3",hr={init:function(){this.setColour(Tr),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)}},mr={init:function(){this.setColour(Tr),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)}},cr={init:function(){this.setColour(Tr),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)}},Or={init:function(){this.setColour(Tr),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)}},Rr={init:function(){this.setColour(Tr),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)}},Mr={init:function(){this.setColour(Tr),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")}},Er={init:function(){this.setColour(Tr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Cr={init:function(){this.setColour(Tr),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}},Ar={init:function(){this.setColour(Tr),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}},gr={init:function(){this.setColour(Tr),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)}},Sr={init:function(){this.setColour(Tr),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)}},Dr={init:function(){this.setColour(Tr),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)}},Nr={init:function(){this.setColour(Tr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fr={init:function(){this.setColour(Tr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Lr={init:function(){this.setColour(Tr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fr={init:function(){this.setColour(Tr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},vr={init:function(){this.setColour(Tr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Pr={init:function(){this.setColour(Tr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},Vr={init:function(){this.setColour(Tr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},yr={init:function(){this.setColour(Tr),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)}},Yr={init:function(){this.setColour(Tr),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)}},br={init:function(){this.setColour(Tr),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)}},kr={init:function(){this.setColour(Tr),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)}},xr={init:function(){this.VISITOR_ID=Mt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Tr),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")}},Xr={init:function(){this.setColour(Tr),this.appendDummyInput().appendField("MixIO").appendField(Rt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Gr={init:function(){this.setColour(Tr),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)}},Hr={init:function(){this.setColour(Tr),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)}},Ur={init:function(){this.setColour(Tr),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)}},wr={init:function(){this.setColour(Tr),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)}},Br=hr,Wr=mr,Kr=cr,Qr=Or,jr=Mr;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;const qr=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"},Jr=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"},zr=function(t,e){return e.definitions_.import_music="import music","music.stop("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")\n"},Zr=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"},$r=function(t,e){e.definitions_.import_music="import music";return["music.get_tempo()",e.ORDER_ATOMIC]},td=function(t,e){return e.definitions_.import_music="import music","music.pitch("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+")\n"},ed=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"},id=function(t,e){e.definitions_.import_music="import music";return"music.stop()\n"},nd=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+")\n"},sd=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"},od=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"},pd=function(t,e){return e.definitions_.import_music="import music","music.reset()\n"},ud=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"},ad=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},ld=function(t,e){return[this.getFieldValue("flag"),e.ORDER_ATOMIC]},_d=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"},rd=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").getonoff()",e.ORDER_ATOMIC]},dd=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"},Id=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"},Td=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".getonoff()",e.ORDER_ATOMIC]},hd=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"},md=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"},cd=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"},Od=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"},Rd=function(t,e){e.definitions_.import_mixgo="import mixgo";return"mixgo.rgb.write()\n"},Md=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"},Ed=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"},Cd=Id,Ad=Td,gd=hd,Sd=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""},Dd=function(t,e){return"blynk.virtual_sync("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+")\n"},Nd=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,""},fd=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,""},Ld=function(){return"blynk_timer.run()\n"},Fd=function(){return"blynk.run()\n"},vd=function(t,e){return"blynk.notify("+e.valueToCode(this,"notification",e.ORDER_ATOMIC)+")\n"},Pd=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`},Vd=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]},yd=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,""},Yd=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"},bd=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,""},kd=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`},xd=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`},Xd=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 Gd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},Hd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},Ud=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.showstatic("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},wd=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"},Bd=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"},Wd=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]},Kd=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.Image."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Qd=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]},jd=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"},qd=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_brightness()",e.ORDER_ATOMIC]},Jd=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_screenimage()",e.ORDER_ATOMIC]},zd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},Zd=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.blink_rate("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},$d=function(t,e){e.definitions_.import_matrix="import matrix";return"matrix.clear()\n"},tI=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"},eI=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"},iI=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"},nI=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},sI=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]},oI=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"},pI=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},uI=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]},aI=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"},lI=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},_I=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+this.getFieldValue("STAT")+"()\n"},rI=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"},dI=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"},II=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},TI=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},hI=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},mI=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"},cI=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"},OI=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},RI=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"},MI=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"},EI=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"},CI=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"},AI=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".do_disconnect()\n"},gI=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"},SI=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".check_msg()\n"},DI=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;te?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")}},mm={init:function(){this.setColour(Im),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("启动识别 返回结果"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("语音识别,获取识别结果")}},cm={init:function(){this.setColour(Im),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("注销识别 内存释放"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("语音识别,注销语音识别,释放内存")}},Om="#90A244",Rm={init:function(){this.setColour(Om),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["否","0"],["是","1"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Mm={init:function(){this.setColour(Om),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("path").appendField("打开路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("打开一个新的图像对象")}},Em={init:function(){this.setColour(Om),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField("打开空图"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开一个空的图像对象")}},Cm={init:function(){this.setColour(Om),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("获取图像的宽度、高度、格式、大小")}},Am={init:function(){this.setColour(Om),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("图像的副本保存到文件系统")}},gm={init:function(){this.setColour(Om),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("复制一个图像图像的副本")}},Sm={init:function(){this.setColour(Om),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("对图像进行适当压缩")}},Dm={init:function(){this.setColour(Om),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("对图像进行适当压缩")}},Nm={init:function(){this.setColour(Om),this.appendDummyInput().appendField("图像清除"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将图像中的所有像素设置为零")}},fm={init:function(){this.setColour(Om),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("将图像转换为灰度图、彩色图、彩虹图像")}},Lm={init:function(){this.setColour(Om),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("设置图像某点像素值")}},Fm={init:function(){this.setColour(Om),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("获取图像某点像素值")}},vm={init:function(){this.setColour(Om),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中加载需要显示文字的字库")}},Pm={init:function(){this.setColour(Om),this.appendDummyInput().appendField("字库释放"),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("释放字库所占的内存")}},Vm={init:function(){this.setColour(Om),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("图像上绘制一个文本")}},ym={init:function(){this.setColour(Om),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("图像上绘制一个中文文本")}},Ym={init:function(){this.setColour(Om),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("图像上绘制一个字符文本")}},bm={init:function(){this.setColour(Om),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)的线")}},km={init:function(){this.setColour(Om),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("图像上绘制一个箭头")}},xm={init:function(){this.setColour(Om),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("图像上绘制一个十字")}},Xm={init:function(){this.setColour(Om),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("图像上绘制一个圆形")}},Gm={init:function(){this.setColour(Om),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("图像上绘制一个矩形")}},Hm={init:function(){this.setColour(Om),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("绘制一个特征点对象的各个点")}},Um={init:function(){this.setColour(Om),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图像")}},wm={init:function(){this.setColour(Om),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对象列表")}},Bm={init:function(){this.setColour(Om),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对象列表")}},Wm={init:function(){this.setColour(Om),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对象列表")}},Km={init:function(){this.setColour(Om),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对象列表")}},Qm={init:function(){this.setColour(Om),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对象列表")}},jm={init:function(){this.setColour(Om),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列表,获取直线信息")}},qm={init:function(){this.setColour(Om),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列表,获取圆形信息")}},Jm={init:function(){this.setColour(Om),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列表,获取矩形信息")}},zm={init:function(){this.setColour(Om),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("图像上的简单直方图均衡化")}},Zm={init:function(){this.setColour(Om),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("图像上的简单模糊滤波")}},$m={init:function(){this.setColour(Om),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("图像上的简单卡通滤波器")}},tc={init:function(){this.setColour(Om),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("图像腐蚀,从分割区域的边缘删除像素(白色目标区域)")}},ec={init:function(){this.setColour(Om),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("图像膨胀,将像素添加到分割区域的边缘中(白色目标区域)")}},ic={init:function(){this.setColour(Om),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("像洪水一样填充图像中低矮凹陷的地方(洪水填充)")}},nc={init:function(){this.setColour(Om),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("图像从笛卡尔坐标到线性极坐标重新投影")}},sc={init:function(){this.setColour(Om),this.appendDummyInput().appendField("图像反转"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("翻转图像中的所有像素值")}},oc={init:function(){this.setColour(Om),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("翻转图像中的所有像素值")}},pc={init:function(){this.setColour(Om),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 中的阈值内,将图像中的所有像素设置为黑色或白色。")}},uc={init:function(){this.setColour(Om),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("通过过滤器内核对图像进行卷积。")}},ac={init:function(){this.setColour(Om),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对象列表")}},lc={init:function(){this.setColour(Om),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对象列表")}},_c={init:function(){this.setColour(Om),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对象列表")}},rc={init:function(){this.setColour(Om),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列表,获取二维码信息")}},dc={init:function(){this.setColour(Om),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列表,获取条形码信息")}},Ic={init:function(){this.setColour(Om),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信息")}},Tc={init:function(){this.setColour(Om),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对象列表")}},hc={init:function(){this.setColour(Om),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对象列表")}},mc={init:function(){this.setColour(Om),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(Om),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列表,获取条形码信息")}},Oc={init:function(){this.setColour(Om),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列表,获取识别颜色信息")}},Rc={init:function(){this.setColour(Om),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列表,获取条形码信息")}},Mc={init:function(){this.setColour(Om),this.appendDummyInput().appendField("RGB888值"),this.appendValueInput("LIST").appendField("由LAB"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("LAB转RGB888")}},Ec={init:function(){this.setColour(Om),this.appendDummyInput().appendField("LAB值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转LAB")}},Cc={init:function(){this.setColour(Om),this.appendDummyInput().appendField("灰度值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转灰度图")}},Ac={init:function(){this.setColour(Om),this.appendDummyInput().appendField("RGB888"),this.appendValueInput("g_value").appendField("由灰度值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("灰度图转RGB888")}},gc={init:function(){this.setColour(Om),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中的像素,仅支持灰度图像")}},Sc={init:function(){this.setColour(Om),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对象列表")}},Dc={init:function(){this.setColour(Om),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对象列表")}},Nc={init:function(){this.setColour(Om),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列表,获取追踪特征信息")}},fc=20,Lc={init:function(){this.setColour(fc),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)}},Fc={init:function(){this.setColour(fc),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)}},vc={init:function(){this.setColour(fc),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)}},Pc={init:function(){this.setColour(fc),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)}},Vc={init:function(){this.setColour(fc),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输出设置,需要调用定时器")}},yc={init:function(){this.setColour(fc),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%,可以为小数")}},Yc={init:function(){this.setColour(fc),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)}},bc={init:function(){this.setColour(fc),this.appendDummyInput().appendField("取消中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("取消中断")}},kc="#637AAC",xc={init:function(){this.setColour(kc),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)}},Xc={init:function(){this.setColour(kc),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)}},Gc={init:function(){this.setColour(kc),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)}},Hc={init:function(){this.setColour(kc),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)}},Uc={init:function(){this.setColour(kc),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)}},wc={init:function(){this.setColour(kc),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")}},Bc={init:function(){this.setColour(kc),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Wc={init:function(){this.setColour(kc),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}},Kc={init:function(){this.setColour(kc),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}},Qc=xc,jc=Xc,qc=Gc,Jc=Hc,zc=wc,Zc=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 $c={init:function(){this.setColour(Zc),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},tO={init:function(){this.setColour(Zc);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]}))}},eO={init:function(){this.setColour(Zc),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]}))}},iO={init:function(){this.setColour(Zc),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]}))}},nO={init:function(){this.setColour(Zc),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},sO={init:function(){this.setColour(Zc),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]}))}},oO={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(Zc),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]}))}},pO={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(Zc),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]}))}},uO={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(Zc),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]}))}},aO={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(Zc),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]}))}},lO={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Zc),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]}))}},_O={init:function(){this.setColour(Zc),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)}},rO={init:function(){this.setColour(Zc),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)}},dO={init:function(){this.setColour(Zc),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)}},IO={init:function(){this.setColour(Zc),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)}},TO=rO,hO="#2E9883",mO={init:function(){this.setColour(hO),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手柄控制")}},cO={init:function(){this.setColour(hO),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,使用串口键盘控制")}},OO={init:function(){this.setColour(hO),this.appendDummyInput().appendField("NES 运行游戏"),this.appendValueInput("path").appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("运行NES游戏ROM")}},RO="#5B6DA5",MO={init:function(){this.setColour(RO),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设备,并初始化配置")}},EO={init:function(){this.setColour(RO),this.appendDummyInput().appendField("WiFi扫描"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("扫描附近可用的WiFi信息-返回多信息列表")}},CO={init:function(){this.setColour(RO),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上网")}},AO={init:function(){this.setColour(RO),this.appendDummyInput().appendField("WiFi").appendField(new Rt.FieldDropdown([["连接信息","1"],["连接状态","2"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("查看wifi连接信息或者连接状态")}},gO={init:function(){this.setColour(RO),this.appendDummyInput().appendField("WiFi断开连接"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("断开wifi连接")}},SO={init:function(){this.setColour(RO),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热点并配置")}},DO={init:function(){this.setColour(RO),this.appendDummyInput().appendField("关闭热点"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("关闭热点")}},NO={init:function(){this.setColour(RO),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("套接字 初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("套接字初始化")}},fO={init:function(){this.setColour(RO),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信息")}},LO={init:function(){this.setColour(RO),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地址连接")}},FO={init:function(){this.setColour(RO),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("设置阻塞套接字超时时间")}},vO={init:function(){this.setColour(RO),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendValueInput("content").appendField("发送数据"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接发送数据")}},PO={init:function(){this.setColour(RO),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("接收数据"),this.appendValueInput("size").appendField("字节").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接接收数据,返回接收到的数据对象")}},VO={init:function(){this.setColour(RO),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)}},yO=230,YO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital),"PIN"),this.setOutput(!0)}},bO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},kO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog),"PIN"),this.setOutput(!0)}},xO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},XO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac),"PIN"),this.setOutput(!0)}},GO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},HO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},UO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},wO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},BO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},WO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch),"PIN"),this.setOutput(!0)}},KO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},QO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},jO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},qO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},JO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},zO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},ZO={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},$O={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},tR={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},eR={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},iR={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},nR={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},sR={init:function(){this.setColour(yO),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},oR=40,pR={init:function(){this.setColour(oR),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["A","17"],["B","16"]]),"KEY"),this.setOutput(!0),this.setTooltip()}},uR={init:function(){this.setColour(oR),this.appendDummyInput().appendField("初始化"),this.appendValueInput("key").appendField("按键"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化按键")}},aR={init:function(){this.setColour(oR),this.appendValueInput("key").appendField("按键"),this.appendDummyInput().appendField("被按下?"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip("获取按键值")}},lR={init:function(){this.setColour(oR),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,获取温湿度")}},_R={init:function(){this.setColour(oR),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)}},rR={init:function(){this.setColour(oR),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}))}},dR={init:function(){this.setColour(oR),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]}))}},IR={init:function(){this.setColour(oR),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]}))}},TR={init:function(){this.setColour(oR),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]}))}},hR={init:function(){this.setColour(oR),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}))}},mR={init:function(){this.setColour(oR),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}))}},cR={init:function(){this.setColour(oR),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)}},OR={init:function(){this.setColour(oR),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}))}},RR=65,MR={init:function(){this.setColour(RR),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)}},ER={init:function(){this.setColour(RR),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)}},CR={init:function(){this.setColour(RR),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)}},AR={init:function(){this.setColour(RR),this.appendValueInput("char_marker").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_SERIAL_WHEN_CONTAIN_DATA),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO)}},gR={init:function(){this.setColour(RR),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)}},SR={init:function(){this.setColour(RR),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)}},DR={init:function(){this.setColour(RR),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)}},NR={init:function(){this.setColour(RR),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)}},fR={init:function(){this.setColour(RR),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)}},LR={init:function(){this.setColour(RR),this.appendValueInput("VAR").appendField(Rt.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Rt.Msg.INOUT_input_TOOLTIP)}},FR={init:function(){this.setColour(RR),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.BLOCKPY_PRINT_TOOLTIP)}},vR={init:function(){this.setColour(RR),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)}},PR={init:function(){this.setColour(RR),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)}},VR={init:function(){this.setColour(RR),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"},mS=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},cS=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"},OS=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"},RS=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},MS=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},ES=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},CS=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},AS=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},gS=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},SS=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},DS=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]}},NS=function(){return"while True:\n pass\n"},fS=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},LS=function(t,e){e.definitions_["import machine"]="import machine";return"machine.reset()\n"},FS=function(t,e){return e.definitions_["import gc"]="import gc",this.getFieldValue("gc")+"\n"},vS=function(t,e){return e.definitions_.import_os="import os","os.uname()"},PS=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"}},VS=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"},yS=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]},YS=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"},bS=YS,kS=VS,xS=yS,XS=PS;const GS=function(t,e){return["["+this.getFieldValue("TEXT")+"]",e.ORDER_ATOMIC]},HS=function(t,e){return["("+this.getFieldValue("TEXT")+")",e.ORDER_ATOMIC]},US=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]},wS=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,$n),Rt.Python=Rl,Rt.generator=Rl,Mt.Profile.default={},Object.assign(Mt.Profile,jI),Object.assign(Mt.Profile.default,jI.k210),Object.assign(Rt.Blocks,e,i,n,s,o,p,u,a,l,_,r,d,I,F,L,f,N,Y,b,k,x,X,G,H,U,w,B,W,K,Q,j,q,J,z,Z,$),Object.assign(Rt.Python.forBlock,T,h,m,c,O,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,ct,Ot)})(); \ No newline at end of file diff --git a/boards/default/micropython_nrf51822_microbit/main.bundle.js b/boards/default/micropython_nrf51822_microbit/main.bundle.js index 615a01ea..0bc83f6b 100644 --- a/boards/default/micropython_nrf51822_microbit/main.bundle.js +++ b/boards/default/micropython_nrf51822_microbit/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>it,controls_typeLists:()=>nt,lists_zip:()=>st,lists_zip_container:()=>ot,lists_zip_item:()=>_t,unpack_iterable_object:()=>ut,variables_change:()=>tt,variables_get:()=>Z,variables_global:()=>et,variables_set:()=>$});var i={};t.r(i),t.d(i,{base_setup:()=>pt,controls_delay:()=>lt,controls_end_program:()=>It,controls_except:()=>Lt,controls_finally:()=>St,controls_flow_statements:()=>ct,controls_for:()=>Ot,controls_forEach:()=>ht,controls_for_range:()=>Et,controls_if:()=>Tt,controls_if_else:()=>Ct,controls_if_elseif:()=>gt,controls_if_if:()=>Rt,controls_lambda:()=>Dt,controls_main:()=>rt,controls_pass:()=>ft,controls_range:()=>dt,controls_repeat_ext:()=>Nt,controls_thread:()=>Pt,controls_try:()=>At,controls_try_finally:()=>mt,controls_whileUntil:()=>Mt,do_while:()=>Ft,garbage_collection:()=>vt,get_mem_alloc:()=>Yt,get_mem_free:()=>bt,get_unique_identifier:()=>Vt});var n={};t.r(n),t.d(n,{base_map:()=>ie,math_arithmetic:()=>Gt,math_bit:()=>kt,math_constant:()=>Bt,math_constant_mp:()=>Ut,math_constrain:()=>Qt,math_dec:()=>xt,math_indexer_number:()=>zt,math_map:()=>qt,math_max_min:()=>Kt,math_number:()=>yt,math_number_base_conversion:()=>Jt,math_random:()=>jt,math_random_seed:()=>Zt,math_round:()=>$t,math_selfcalcu:()=>wt,math_to_int:()=>Wt,math_trig:()=>Ht,text_to_number:()=>te,text_to_number_skulpt:()=>ee,turn_to_int:()=>ne});var s={};t.r(s),t.d(s,{ascii_to_char:()=>re,char_to_ascii:()=>pe,number_to_text:()=>le,os_system:()=>Xe,text:()=>oe,text_capital:()=>Ee,text_center:()=>Re,text_char:()=>ue,text_char_at:()=>de,text_char_at2:()=>Te,text_char_at3:()=>ve,text_compareTo:()=>Fe,text_compare_to:()=>Oe,text_create_with_container:()=>De,text_create_with_item:()=>fe,text_encode:()=>be,text_equals_starts_ends:()=>ce,text_eval:()=>Ve,text_find:()=>ge,text_format:()=>Ne,text_format_noreturn:()=>Ye,text_join:()=>ae,text_join_seq:()=>Ce,text_length:()=>Ie,text_random_char:()=>he,text_replace:()=>Ae,text_split:()=>Le,text_strip:()=>Se,text_substring:()=>me,text_substring2:()=>Me,text_substring3:()=>Pe,text_textarea:()=>_e});var o={};t.r(o),t.d(o,{list_many_input:()=>oi,list_tolist:()=>ri,list_tolist2:()=>mi,list_trig:()=>ii,lists_2d_get_col_row_data:()=>we,lists_2d_get_data_with_col_row:()=>Ge,lists_append_extend:()=>Je,lists_change_to:()=>si,lists_change_to_general:()=>ui,lists_clear:()=>Ze,lists_create_with:()=>ke,lists_create_with2:()=>pi,lists_create_with_container:()=>xe,lists_create_with_item:()=>We,lists_create_with_noreturn:()=>_i,lists_create_with_text:()=>He,lists_create_with_text2:()=>li,lists_del_general:()=>ai,lists_find:()=>ei,lists_getIndex3:()=>Ii,lists_getSublist3:()=>Ti,lists_get_index:()=>Be,lists_get_random_item:()=>je,lists_get_random_sublist:()=>Qe,lists_get_sublist:()=>Ue,lists_insert_value:()=>qe,lists_insert_value2:()=>hi,lists_pop:()=>ti,lists_remove_at:()=>$e,lists_remove_at2:()=>Mi,lists_reverse:()=>ze,lists_setIndex3:()=>di,lists_set_index:()=>Ke,lists_sort:()=>ni});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Yi,dicts_add_or_change:()=>Li,dicts_clear:()=>Di,dicts_create_with:()=>Oi,dicts_create_with_container:()=>Ei,dicts_create_with_item:()=>Ri,dicts_create_with_noreturn:()=>Xi,dicts_deldict:()=>vi,dicts_delete:()=>Si,dicts_get:()=>Ci,dicts_get_default:()=>Ai,dicts_items:()=>fi,dicts_keys:()=>gi,dicts_length:()=>Fi,dicts_pop:()=>bi,dicts_setdefault:()=>Vi,dicts_to_json:()=>Bi,dicts_todict:()=>yi,dicts_update:()=>Ni,dicts_values:()=>Pi,json_to_dicts:()=>Ui});var u={};t.r(u),t.d(u,{logic_boolean:()=>Wi,logic_compare:()=>wi,logic_compare_continous:()=>ki,logic_is:()=>Qi,logic_is_in:()=>ji,logic_negate:()=>xi,logic_null:()=>Ki,logic_operation:()=>Hi,logic_tobool:()=>qi,logic_true_or_false:()=>Ji});var a={};t.r(a),t.d(a,{sdcard_mount:()=>En,sdcard_use_spi_init:()=>On,storage_can_write_ornot:()=>_n,storage_change_dir:()=>mn,storage_close_file:()=>an,storage_delete_file:()=>pn,storage_file_seek:()=>Tn,storage_file_tell:()=>In,storage_file_write:()=>en,storage_fileopen:()=>Zi,storage_fileopen_new:()=>$i,storage_fileopen_new_encoding:()=>tn,storage_get_a_line:()=>on,storage_get_contents:()=>sn,storage_get_contents_without_para:()=>nn,storage_get_current_dir:()=>dn,storage_get_file_size:()=>ln,storage_get_filename:()=>un,storage_is_file:()=>cn,storage_list_all_files:()=>rn,storage_make_dir:()=>hn,storage_open_file_with_os:()=>zi,storage_rename:()=>Mn});var r={};t.r(r),t.d(r,{procedures_callnoreturn:()=>Nn,procedures_callreturn:()=>Dn,procedures_defnoreturn:()=>Cn,procedures_defreturn:()=>An,procedures_ifreturn:()=>fn,procedures_mutatorarg:()=>Sn,procedures_mutatorcontainer:()=>Ln,procedures_return:()=>Pn});var p={};t.r(p),t.d(p,{tuple_change_to:()=>kn,tuple_create_with:()=>vn,tuple_create_with_container:()=>Yn,tuple_create_with_item:()=>bn,tuple_create_with_noreturn:()=>Kn,tuple_create_with_text2:()=>Vn,tuple_create_with_text_return:()=>Xn,tuple_del:()=>Un,tuple_find:()=>Hn,tuple_getIndex:()=>yn,tuple_getSublist:()=>Wn,tuple_get_random_item:()=>jn,tuple_get_sublist:()=>Jn,tuple_join:()=>Gn,tuple_length:()=>Bn,tuple_max:()=>wn,tuple_totuple:()=>Qn,tuple_trig:()=>xn});var l={};t.r(l),t.d(l,{set_add_discard:()=>os,set_clear:()=>is,set_create_with:()=>zn,set_create_with_container:()=>Zn,set_create_with_item:()=>$n,set_create_with_text_return:()=>as,set_length:()=>ts,set_operate:()=>ns,set_operate_update:()=>ss,set_pop:()=>es,set_sub:()=>_s,set_toset:()=>rs,set_update:()=>us});var I={};t.r(I),t.d(I,{html_content:()=>ds,html_content_more:()=>hs,html_document:()=>ls,html_form:()=>ms,html_head_body:()=>Ts,html_style:()=>Ms,html_style_color:()=>Os,html_style_content:()=>cs,html_text:()=>Es,html_title:()=>Is});var T={};t.r(T),t.d(T,{attribute_access:()=>bs,function_call:()=>Fs,function_call_container:()=>vs,function_call_item:()=>Ys,raw_block:()=>Cs,raw_empty:()=>Ls,raw_expression:()=>As,raw_table:()=>gs,text_comment:()=>Ss,text_print_multiple:()=>Ds,text_print_multiple_container:()=>fs,text_print_multiple_item:()=>Ps,type_check:()=>Ns});var d={};t.r(d),t.d(d,{controls_type:()=>Us,controls_typeLists:()=>Gs,lists_zip:()=>ws,unpack_iterable_object:()=>ks,variables_change:()=>ys,variables_get:()=>Vs,variables_global:()=>Bs,variables_set:()=>Xs});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>Zs,base_setup:()=>xs,controls_delay:()=>zs,controls_flow_statements:()=>qs,controls_for:()=>Js,controls_forEach:()=>no,controls_for_range:()=>js,controls_if:()=>Ws,controls_interrupts:()=>eo,controls_lambda:()=>oo,controls_main:()=>Hs,controls_millis:()=>$s,controls_nointerrupts:()=>io,controls_pass:()=>uo,controls_range:()=>so,controls_repeat:()=>Mo,controls_repeat_ext:()=>po,controls_thread:()=>ao,controls_try_finally:()=>Ks,controls_whileUntil:()=>Qs,do_while:()=>ro,garbage_collection:()=>lo,get_mem_alloc:()=>Io,get_mem_free:()=>To,get_unique_identifier:()=>ho,reset:()=>to,time_sleep:()=>_o});var M={};t.r(M),t.d(M,{base_map:()=>yo,math_arithmetic:()=>Ro,math_bit:()=>Eo,math_constant:()=>co,math_constant_mp:()=>Oo,math_constrain:()=>Po,math_dec:()=>Lo,math_indexer_number:()=>Yo,math_map:()=>fo,math_max_min:()=>No,math_number:()=>mo,math_number_base_conversion:()=>Fo,math_random:()=>Do,math_random_seed:()=>vo,math_round:()=>bo,math_selfcalcu:()=>go,math_single:()=>Co,math_to_int:()=>So,math_trig:()=>Ao,text_to_number:()=>Vo,text_to_number_skulpt:()=>Xo,turn_to_int:()=>Bo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Ho,char_to_ascii:()=>xo,number_to_text:()=>Wo,os_system:()=>d_,text:()=>Uo,text_capital:()=>t_,text_center:()=>e_,text_char:()=>wo,text_char_at:()=>jo,text_char_at2:()=>Jo,text_char_at3:()=>l_,text_compareTo:()=>p_,text_compare_to:()=>zo,text_encode:()=>I_,text_equals_starts_ends:()=>qo,text_eval:()=>T_,text_find:()=>i_,text_format:()=>u_,text_format_noreturn:()=>a_,text_join:()=>ko,text_join_seq:()=>n_,text_length:()=>Ko,text_random_char:()=>Qo,text_replace:()=>s_,text_split:()=>o_,text_strip:()=>__,text_substring:()=>$o,text_substring2:()=>Zo,text_substring3:()=>r_,text_textarea:()=>Go});var c={};t.r(c),t.d(c,{list_many_input:()=>b_,list_tolist:()=>W_,list_tolist2:()=>K_,list_trig:()=>F_,lists_2d_get_col_row_data:()=>m_,lists_2d_get_data_with_col_row:()=>M_,lists_append_extend:()=>g_,lists_change_to:()=>Y_,lists_change_to_general:()=>X_,lists_clear:()=>N_,lists_create_with:()=>c_,lists_create_with2:()=>B_,lists_create_with_noreturn:()=>V_,lists_create_with_text:()=>O_,lists_create_with_text2:()=>U_,lists_del_general:()=>y_,lists_find:()=>D_,lists_getIndex3:()=>G_,lists_getSublist3:()=>w_,lists_get_index:()=>E_,lists_get_random_item:()=>C_,lists_get_random_sublist:()=>A_,lists_get_sublist:()=>h_,lists_insert_value:()=>L_,lists_insert_value2:()=>H_,lists_pop:()=>P_,lists_remove_at:()=>f_,lists_remove_at2:()=>x_,lists_reverse:()=>S_,lists_setIndex3:()=>k_,lists_set_index:()=>R_,lists_sort:()=>v_});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>ou,dicts_add_or_change:()=>z_,dicts_clear:()=>tu,dicts_create_with:()=>J_,dicts_create_with_noreturn:()=>au,dicts_deldict:()=>su,dicts_delete:()=>Z_,dicts_get:()=>Q_,dicts_get_default:()=>q_,dicts_items:()=>eu,dicts_keys:()=>j_,dicts_length:()=>nu,dicts_pop:()=>_u,dicts_setdefault:()=>uu,dicts_to_json:()=>pu,dicts_todict:()=>ru,dicts_update:()=>$_,dicts_values:()=>iu,json_to_dicts:()=>lu});var E={};t.r(E),t.d(E,{logic_boolean:()=>Mu,logic_compare:()=>Iu,logic_compare_continous:()=>Tu,logic_is:()=>Eu,logic_is_in:()=>Ou,logic_negate:()=>hu,logic_null:()=>mu,logic_operation:()=>du,logic_tobool:()=>Ru,logic_true_or_false:()=>cu});var R={};t.r(R),t.d(R,{sdcard_mount:()=>xu,sdcard_use_spi_init:()=>Hu,storage_can_write_ornot:()=>Pu,storage_change_dir:()=>Bu,storage_close_file:()=>vu,storage_delete_file:()=>bu,storage_file_seek:()=>yu,storage_file_tell:()=>Xu,storage_file_write:()=>Su,storage_fileopen:()=>Cu,storage_fileopen_new:()=>Au,storage_fileopen_new_encoding:()=>Lu,storage_get_a_line:()=>fu,storage_get_contents:()=>Du,storage_get_contents_without_para:()=>Nu,storage_get_current_dir:()=>Uu,storage_get_file_size:()=>Vu,storage_get_filename:()=>Fu,storage_is_file:()=>ku,storage_list_all_files:()=>Yu,storage_make_dir:()=>Gu,storage_open_file_with_os:()=>gu,storage_rename:()=>wu});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>ju,procedures_callreturn:()=>Ju,procedures_defnoreturn:()=>Ku,procedures_defreturn:()=>Wu,procedures_ifreturn:()=>Qu,procedures_return:()=>qu});var C={};t.r(C),t.d(C,{tuple_change_to:()=>oa,tuple_create_with:()=>zu,tuple_create_with_noreturn:()=>ra,tuple_create_with_text2:()=>Zu,tuple_create_with_text_return:()=>$u,tuple_del:()=>ia,tuple_find:()=>_a,tuple_getIndex:()=>ta,tuple_getSublist:()=>aa,tuple_get_random_item:()=>la,tuple_get_sublist:()=>pa,tuple_join:()=>na,tuple_length:()=>ea,tuple_max:()=>sa,tuple_totuple:()=>Ia,tuple_trig:()=>ua});var A={};t.r(A),t.d(A,{set_add_discard:()=>Oa,set_clear:()=>Ma,set_create_with:()=>Ta,set_create_with_text_return:()=>ga,set_length:()=>da,set_operate:()=>ma,set_operate_update:()=>ca,set_pop:()=>ha,set_sub:()=>Ea,set_toset:()=>Ca,set_update:()=>Ra});var L={};t.r(L),t.d(L,{html_content:()=>Na,html_content_more:()=>Da,html_document:()=>Aa,html_form:()=>Pa,html_head_body:()=>Sa,html_style:()=>fa,html_style_content:()=>Fa,html_text:()=>va,html_title:()=>La});var S={};t.r(S),t.d(S,{attribute_access:()=>Ua,function_call:()=>Ba,raw_block:()=>Ya,raw_empty:()=>Va,raw_expression:()=>ba,raw_table:()=>Xa,type_check:()=>ya});var N={};t.r(N),t.d(N,{MP3_CONTROL:()=>Tr,MP3_EQ_MODE:()=>mr,MP3_INIT:()=>lr,MP3_LOOP_MODE:()=>hr,MP3_PLAY_FOLDER:()=>Er,MP3_PLAY_NUM:()=>Or,MP3_VOL:()=>cr,bit_motor_control:()=>_r,display_rgb:()=>ar,display_rgb2:()=>rr,display_rgb_init:()=>ur,display_rgb_show:()=>pr,microbit_music_get_tempo:()=>Za,microbit_music_pitch:()=>Ja,microbit_music_pitch_delay:()=>Ka,microbit_music_play_built_in:()=>xa,microbit_music_play_built_in_easy:()=>Wa,microbit_music_play_list_of_notes:()=>ja,microbit_music_play_list_of_notes_easy:()=>Qa,microbit_music_reset:()=>qa,microbit_music_stop:()=>za,servo_move:()=>or,speech_pronounce_easy:()=>nr,speech_say:()=>tr,speech_say_easy:()=>er,speech_sing_easy:()=>ir,speech_translate:()=>sr,tone_set_tempo:()=>$a});var D={};t.r(D),t.d(D,{i2c_init:()=>Fr,i2c_read:()=>vr,i2c_write:()=>Yr,microbit_radio_config:()=>Lr,microbit_radio_off:()=>Ar,microbit_radio_on:()=>Cr,microbit_radio_receive:()=>fr,microbit_radio_reset:()=>Sr,microbit_radio_send_string:()=>Nr,radio_ons:()=>gr,radio_receive_string:()=>Pr,radio_send_string:()=>Dr,spi_init:()=>br,spi_write:()=>Vr});var f={};t.r(f),t.d(f,{display_fill:()=>rp,display_image_size:()=>ap,group_lcd_init:()=>sp,group_lcd_power:()=>_p,group_lcd_print:()=>np,group_lcd_print2:()=>op,image_arithmetic:()=>ip,image_shift:()=>ep,lp2i_u8g_draw_4strings:()=>up,microbit_display_clear:()=>yr,microbit_display_is_on:()=>qr,microbit_display_off:()=>Qr,microbit_display_on:()=>jr,microbit_display_scroll:()=>Jr,microbit_display_scroll_string_animation:()=>Kr,microbit_display_show_animation:()=>Wr,microbit_display_show_default_image:()=>xr,microbit_display_show_image:()=>Hr,microbit_image_builtins:()=>zr,microbit_image_copy:()=>Zr,microbit_image_create:()=>tp,microbit_image_invert:()=>$r,monitor_bright_point:()=>Ur,monitor_get_pixel:()=>Br,monitor_scroll_string:()=>wr,monitor_scroll_string_with_delay:()=>kr,monitor_show_image_or_string:()=>Gr});var P={};t.r(P),t.d(P,{factory_block:()=>Ep,factory_block_return:()=>Rp,factory_block_return_with_textarea:()=>Cp,factory_block_with_textarea:()=>gp,factory_callMethod_noreturn:()=>cp,factory_callMethod_return:()=>Op,factory_create_with_container:()=>dp,factory_create_with_item:()=>hp,factory_declare:()=>mp,factory_from_import:()=>lp,factory_function_noreturn:()=>Tp,factory_function_return:()=>Mp,factory_import:()=>Ip});var F={};t.r(F),t.d(F,{inout_analog_read:()=>fp,inout_analog_write:()=>Np,inout_analog_write_set:()=>Dp,inout_digital_read:()=>Sp,inout_digital_write:()=>Fp,inout_highlow:()=>Lp,sensor_pin_pressed:()=>Pp});var v={};t.r(v),t.d(v,{pins_analog:()=>bp,pins_axis:()=>wp,pins_brightness:()=>kp,pins_builtinimg:()=>Up,pins_button:()=>Vp,pins_digital:()=>Yp,pins_imglist:()=>Gp,pins_interrupt:()=>yp,pins_pwm:()=>Xp,pins_radio_datarate:()=>Wp,pins_radio_power:()=>xp,pins_serial:()=>Bp,pins_tone_notes:()=>Hp});var Y={};t.r(Y),t.d(Y,{DS1307_init:()=>hl,NTC_TEMP:()=>Ll,RTC_get_time:()=>ml,RTC_set_date:()=>Ol,RTC_set_time:()=>cl,TCS34725_Get_RGB:()=>Al,controls_GestureLists:()=>$p,controls_attachGestureInterrupt:()=>Zp,controls_attachGestureInterrupt2:()=>tl,sensor_button_get_presses:()=>Qp,sensor_button_is_pressed:()=>Jp,sensor_button_was_pressed:()=>jp,sensor_calibrate_compass:()=>_l,sensor_compass_heading:()=>al,sensor_compass_reset:()=>El,sensor_current_gesture:()=>sl,sensor_current_gesture1:()=>qp,sensor_current_gesture2:()=>zp,sensor_distance_hrsc04:()=>Tl,sensor_distance_hrsc04_:()=>dl,sensor_field_strength:()=>pl,sensor_get_acceleration:()=>el,sensor_get_gestures:()=>nl,sensor_hrsc04_init:()=>gl,sensor_is_compass_calibrated:()=>ul,sensor_light:()=>Rl,sensor_light_level:()=>ol,sensor_magnetic:()=>Il,sensor_rotation:()=>ll,sensor_set_acceleration:()=>il,sensor_temperature:()=>rl});var b={};t.r(b),t.d(b,{IO_input:()=>yl,IO_print:()=>Bl,IO_print_inline:()=>Ul,serial_any:()=>vl,serial_begin:()=>Xl,serial_print:()=>Nl,serial_print_hex:()=>fl,serial_println:()=>Dl,serial_readline:()=>Yl,serial_readstr:()=>Fl,serial_readstr_until:()=>bl,serial_receive_data_event:()=>Pl,serial_softserial:()=>Vl});var V={};t.r(V),t.d(V,{Panic_with_status_code:()=>Hl,base_delay:()=>wl,controls_millis:()=>kl,controls_uname:()=>Wl,reset:()=>xl});var X={};t.r(X),t.d(X,{MP3_CONTROL:()=>TI,MP3_EQ_MODE:()=>hI,MP3_INIT:()=>II,MP3_LOOP_MODE:()=>dI,MP3_PLAY_FOLDER:()=>cI,MP3_PLAY_NUM:()=>mI,MP3_VOL:()=>MI,bit_motor_control:()=>uI,display_rgb:()=>rI,display_rgb2:()=>pI,display_rgb_init:()=>aI,display_rgb_show:()=>lI,microbit_music_get_tempo:()=>$l,microbit_music_pitch:()=>Ql,microbit_music_pitch_delay:()=>jl,microbit_music_play_built_in:()=>Kl,microbit_music_play_built_in_easy:()=>Jl,microbit_music_play_list_of_notes:()=>ql,microbit_music_reset:()=>zl,microbit_music_stop:()=>Zl,servo_move:()=>_I,speech_pronounce_easy:()=>oI,speech_say:()=>iI,speech_say_easy:()=>nI,speech_sing_easy:()=>sI,speech_translate:()=>eI,tone_set_tempo:()=>tI});var y={};t.r(y),t.d(y,{i2c_init:()=>NI,i2c_read:()=>DI,i2c_write:()=>fI,microbit_radio_config:()=>gI,microbit_radio_off:()=>RI,microbit_radio_on:()=>EI,microbit_radio_receive:()=>SI,microbit_radio_reset:()=>CI,radio_ons:()=>OI,radio_receive_string:()=>LI,radio_send_string:()=>AI,spi_init:()=>PI,spi_write:()=>FI});var B={};t.r(B),t.d(B,{display_fill:()=>sT,display_image_size:()=>nT,group_lcd_init:()=>$I,group_lcd_power:()=>eT,group_lcd_print:()=>ZI,group_lcd_print2:()=>tT,image_arithmetic:()=>qI,image_shift:()=>QI,lp2i_u8g_draw_4strings:()=>iT,microbit_display_clear:()=>vI,microbit_display_is_on:()=>xI,microbit_display_on:()=>HI,microbit_display_scroll:()=>kI,microbit_display_scroll_string_animation:()=>zI,microbit_display_set_pixel:()=>bI,microbit_display_show_animation:()=>wI,microbit_display_show_default_image:()=>GI,microbit_display_show_image:()=>UI,microbit_image_builtins:()=>WI,microbit_image_copy:()=>KI,microbit_image_create:()=>jI,microbit_image_invert:()=>JI,monitor_bright_point:()=>VI,monitor_get_pixel:()=>YI,monitor_scroll_string:()=>yI,monitor_scroll_string_with_delay:()=>BI,monitor_show_image_or_string:()=>XI});var U={};t.r(U),t.d(U,{factory_block:()=>IT,factory_block_return:()=>TT,factory_block_return_with_textarea:()=>hT,factory_block_with_textarea:()=>dT,factory_callMethod_noreturn:()=>pT,factory_callMethod_return:()=>lT,factory_declare:()=>rT,factory_from_import:()=>oT,factory_function_noreturn:()=>uT,factory_function_return:()=>aT,factory_import:()=>_T});var G={};t.r(G),t.d(G,{inout_analog_read:()=>RT,inout_analog_write:()=>OT,inout_analog_write_set:()=>ET,inout_digital_read:()=>cT,inout_digital_write:()=>mT,inout_highlow:()=>MT,sensor_pin_pressed:()=>gT});var w={};t.r(w),t.d(w,{pins_analog:()=>AT,pins_axis:()=>FT,pins_brightness:()=>vT,pins_builtinimg:()=>fT,pins_button:()=>LT,pins_digital:()=>CT,pins_imglist:()=>PT,pins_interrupt:()=>NT,pins_pwm:()=>ST,pins_radio_datarate:()=>VT,pins_radio_power:()=>bT,pins_serial:()=>DT,pins_tone_notes:()=>YT});var k={};t.r(k),t.d(k,{DS1307_init:()=>sd,NTC_TEMP:()=>Id,RTC_get_time:()=>od,RTC_set_date:()=>ud,RTC_set_time:()=>_d,TCS34725_Get_RGB:()=>ld,controls_GestureLists:()=>UT,controls_attachGestureInterrupt:()=>GT,controls_attachGestureInterrupt2:()=>HT,sensor_button_get_presses:()=>BT,sensor_button_is_pressed:()=>XT,sensor_button_was_pressed:()=>yT,sensor_calibrate_compass:()=>QT,sensor_compass_heading:()=>zT,sensor_compass_reset:()=>ad,sensor_current_gesture:()=>WT,sensor_current_gesture1:()=>wT,sensor_current_gesture2:()=>kT,sensor_distance_hrsc04:()=>id,sensor_distance_hrsc04_:()=>nd,sensor_field_strength:()=>$T,sensor_get_acceleration:()=>KT,sensor_get_gestures:()=>xT,sensor_hrsc04_init:()=>pd,sensor_is_compass_calibrated:()=>qT,sensor_light:()=>rd,sensor_light_level:()=>jT,sensor_magnetic:()=>ed,sensor_rotation:()=>td,sensor_set_acceleration:()=>JT,sensor_temperature:()=>ZT});var H={};t.r(H),t.d(H,{IO_input:()=>Cd,IO_print:()=>Ad,IO_print_inline:()=>Ld,serial_any:()=>md,serial_begin:()=>gd,serial_print:()=>Td,serial_print_hex:()=>hd,serial_println:()=>dd,serial_readline:()=>Od,serial_readstr:()=>cd,serial_readstr_until:()=>Ed,serial_receive_data_event:()=>Md,serial_softserial:()=>Rd});var x={};t.r(x),t.d(x,{Panic_with_status_code:()=>Bd,base_delay:()=>yd,controls_end_program:()=>Gd,controls_millis:()=>Ud,controls_uname:()=>kd,reset:()=>wd,system_device_name:()=>Vd,system_device_serial_number:()=>Xd,system_event_bus_source:()=>Yd,system_event_bus_value:()=>bd,system_on_event:()=>Pd,system_raise_event:()=>fd,system_reset:()=>Nd,system_run_in_background:()=>Sd,system_timestamp:()=>Fd,system_value:()=>vd,system_wait:()=>Dd});const W=Blockly,K=Mixly,J={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}},j=J; +(()=>{"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:()=>it,controls_typeLists:()=>nt,lists_zip:()=>st,lists_zip_container:()=>ot,lists_zip_item:()=>_t,unpack_iterable_object:()=>ut,variables_change:()=>tt,variables_get:()=>Z,variables_global:()=>et,variables_set:()=>$});var i={};t.r(i),t.d(i,{base_setup:()=>pt,controls_delay:()=>lt,controls_end_program:()=>It,controls_except:()=>Lt,controls_finally:()=>St,controls_flow_statements:()=>ct,controls_for:()=>Ot,controls_forEach:()=>ht,controls_for_range:()=>Et,controls_if:()=>Tt,controls_if_else:()=>Ct,controls_if_elseif:()=>gt,controls_if_if:()=>Rt,controls_lambda:()=>Dt,controls_main:()=>rt,controls_pass:()=>ft,controls_range:()=>dt,controls_repeat_ext:()=>Nt,controls_thread:()=>Pt,controls_try:()=>At,controls_try_finally:()=>mt,controls_whileUntil:()=>Mt,datetime_fromtimestamp:()=>Xt,do_while:()=>Ft,garbage_collection:()=>vt,get_mem_alloc:()=>Yt,get_mem_free:()=>bt,get_unique_identifier:()=>Vt});var n={};t.r(n),t.d(n,{base_map:()=>ne,math_arithmetic:()=>wt,math_bit:()=>Ht,math_constant:()=>Bt,math_constant_mp:()=>Gt,math_constrain:()=>qt,math_dec:()=>Wt,math_indexer_number:()=>Zt,math_map:()=>zt,math_max_min:()=>Jt,math_number:()=>Ut,math_number_base_conversion:()=>jt,math_random:()=>Qt,math_random_seed:()=>$t,math_round:()=>te,math_selfcalcu:()=>kt,math_to_int:()=>Kt,math_trig:()=>xt,text_to_number:()=>ee,text_to_number_skulpt:()=>ie,turn_to_int:()=>se});var s={};t.r(s),t.d(s,{ascii_to_char:()=>pe,char_to_ascii:()=>le,number_to_text:()=>Ie,os_system:()=>ye,text:()=>_e,text_capital:()=>Re,text_center:()=>ge,text_char:()=>ae,text_char_at:()=>he,text_char_at2:()=>de,text_char_at3:()=>Ye,text_compareTo:()=>ve,text_compare_to:()=>Ee,text_create_with_container:()=>fe,text_create_with_item:()=>Pe,text_encode:()=>Ve,text_equals_starts_ends:()=>Oe,text_eval:()=>Xe,text_find:()=>Ce,text_format:()=>De,text_format_noreturn:()=>be,text_join:()=>re,text_join_seq:()=>Ae,text_length:()=>Te,text_random_char:()=>Me,text_replace:()=>Le,text_split:()=>Se,text_strip:()=>Ne,text_substring:()=>ce,text_substring2:()=>me,text_substring3:()=>Fe,text_textarea:()=>ue});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Oi,enumerate:()=>Ei,list_many_input:()=>_i,list_tolist:()=>pi,list_tolist2:()=>ci,list_trig:()=>ni,lists_2d_get_col_row_data:()=>ke,lists_2d_get_data_with_col_row:()=>we,lists_append_extend:()=>je,lists_change_to:()=>oi,lists_change_to_general:()=>ai,lists_clear:()=>$e,lists_create_with:()=>He,lists_create_with2:()=>li,lists_create_with_container:()=>We,lists_create_with_item:()=>Ke,lists_create_with_noreturn:()=>ui,lists_create_with_text:()=>xe,lists_create_with_text2:()=>Ii,lists_del_general:()=>ri,lists_find:()=>ii,lists_getIndex3:()=>Ti,lists_getSublist3:()=>di,lists_get_index:()=>Be,lists_get_random_item:()=>Qe,lists_get_random_sublist:()=>qe,lists_get_sublist:()=>Ge,lists_insert_value:()=>ze,lists_insert_value2:()=>Mi,lists_pop:()=>ei,lists_remove_at:()=>ti,lists_remove_at2:()=>mi,lists_reverse:()=>Ze,lists_setIndex3:()=>hi,lists_set_index:()=>Je,lists_sort:()=>si});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Xi,dicts_add_or_change:()=>Di,dicts_clear:()=>Fi,dicts_create_with:()=>gi,dicts_create_with_container:()=>Ci,dicts_create_with_item:()=>Ai,dicts_create_with_noreturn:()=>Bi,dicts_deldict:()=>Vi,dicts_delete:()=>fi,dicts_get:()=>Si,dicts_get_default:()=>Ni,dicts_items:()=>vi,dicts_keys:()=>Li,dicts_length:()=>bi,dicts_pop:()=>yi,dicts_setdefault:()=>Ui,dicts_to_json:()=>wi,dicts_todict:()=>Gi,dicts_update:()=>Pi,dicts_values:()=>Yi,json_to_dicts:()=>ki});var u={};t.r(u),t.d(u,{logic_boolean:()=>ji,logic_compare:()=>xi,logic_compare_continous:()=>Wi,logic_is:()=>Zi,logic_is_in:()=>zi,logic_negate:()=>Ji,logic_null:()=>Qi,logic_operation:()=>Ki,logic_tobool:()=>$i,logic_true_or_false:()=>qi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Cn,sdcard_use_spi_init:()=>gn,storage_can_write_ornot:()=>rn,storage_change_dir:()=>En,storage_close_file:()=>ln,storage_delete_file:()=>Tn,storage_file_seek:()=>Mn,storage_file_tell:()=>hn,storage_file_write:()=>on,storage_fileopen:()=>en,storage_fileopen_new:()=>nn,storage_fileopen_new_encoding:()=>sn,storage_get_a_line:()=>an,storage_get_contents:()=>un,storage_get_contents_without_para:()=>_n,storage_get_current_dir:()=>mn,storage_get_file_size:()=>dn,storage_get_filename:()=>pn,storage_is_file:()=>Rn,storage_list_all_files:()=>In,storage_make_dir:()=>cn,storage_open_file_with_os:()=>tn,storage_rename:()=>On});var r={};t.r(r),t.d(r,{procedures_callnoreturn:()=>Pn,procedures_callreturn:()=>Fn,procedures_defnoreturn:()=>Sn,procedures_defreturn:()=>Nn,procedures_ifreturn:()=>vn,procedures_mutatorarg:()=>fn,procedures_mutatorcontainer:()=>Dn,procedures_return:()=>Yn});var p={};t.r(p),t.d(p,{tuple_change_to:()=>Wn,tuple_create_with:()=>Vn,tuple_create_with_container:()=>Xn,tuple_create_with_item:()=>yn,tuple_create_with_noreturn:()=>Qn,tuple_create_with_text2:()=>Un,tuple_create_with_text_return:()=>Bn,tuple_del:()=>kn,tuple_find:()=>Kn,tuple_getIndex:()=>Gn,tuple_getSublist:()=>jn,tuple_get_random_item:()=>zn,tuple_get_sublist:()=>qn,tuple_join:()=>Hn,tuple_length:()=>wn,tuple_max:()=>xn,tuple_totuple:()=>Zn,tuple_trig:()=>Jn});var l={};t.r(l),t.d(l,{set_add_discard:()=>as,set_clear:()=>os,set_create_with:()=>ts,set_create_with_container:()=>es,set_create_with_item:()=>is,set_create_with_text_return:()=>ls,set_length:()=>ns,set_operate:()=>_s,set_operate_update:()=>us,set_pop:()=>ss,set_sub:()=>rs,set_toset:()=>Is,set_update:()=>ps});var I={};t.r(I),t.d(I,{html_content:()=>ms,html_content_more:()=>cs,html_document:()=>ds,html_form:()=>Es,html_head_body:()=>Ms,html_style:()=>Os,html_style_color:()=>gs,html_style_content:()=>Rs,html_text:()=>Cs,html_title:()=>hs});var T={};t.r(T),t.d(T,{attribute_access:()=>ys,function_call:()=>bs,function_call_container:()=>Vs,function_call_item:()=>Xs,raw_block:()=>Ss,raw_empty:()=>Ds,raw_expression:()=>Ns,raw_table:()=>Ls,text_comment:()=>fs,text_print_multiple:()=>Fs,text_print_multiple_container:()=>vs,text_print_multiple_item:()=>Ys,type_check:()=>Ps});var d={};t.r(d),t.d(d,{controls_type:()=>ks,controls_typeLists:()=>Hs,lists_zip:()=>xs,unpack_iterable_object:()=>Ws,variables_change:()=>Gs,variables_get:()=>Us,variables_global:()=>ws,variables_set:()=>Bs});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>eo,base_setup:()=>Js,controls_delay:()=>to,controls_flow_statements:()=>$s,controls_for:()=>qs,controls_forEach:()=>_o,controls_for_range:()=>zs,controls_if:()=>js,controls_interrupts:()=>so,controls_lambda:()=>ao,controls_main:()=>Ks,controls_millis:()=>io,controls_nointerrupts:()=>oo,controls_pass:()=>po,controls_range:()=>uo,controls_repeat:()=>Oo,controls_repeat_ext:()=>To,controls_thread:()=>lo,controls_try_finally:()=>Qs,controls_whileUntil:()=>Zs,datetime_fromtimestamp:()=>Eo,do_while:()=>Io,garbage_collection:()=>ho,get_mem_alloc:()=>Mo,get_mem_free:()=>mo,get_unique_identifier:()=>co,reset:()=>no,time_sleep:()=>ro});var M={};t.r(M),t.d(M,{base_map:()=>wo,math_arithmetic:()=>Lo,math_bit:()=>Ao,math_constant:()=>go,math_constant_mp:()=>Co,math_constrain:()=>bo,math_dec:()=>fo,math_indexer_number:()=>yo,math_map:()=>Yo,math_max_min:()=>Fo,math_number:()=>Ro,math_number_base_conversion:()=>Vo,math_random:()=>vo,math_random_seed:()=>Xo,math_round:()=>Uo,math_selfcalcu:()=>So,math_single:()=>No,math_to_int:()=>Po,math_trig:()=>Do,text_to_number:()=>Bo,text_to_number_skulpt:()=>Go,turn_to_int:()=>ko});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Jo,char_to_ascii:()=>jo,number_to_text:()=>Qo,os_system:()=>c_,text:()=>Ho,text_capital:()=>s_,text_center:()=>o_,text_char:()=>Wo,text_char_at:()=>Zo,text_char_at2:()=>zo,text_char_at3:()=>h_,text_compareTo:()=>d_,text_compare_to:()=>e_,text_encode:()=>M_,text_equals_starts_ends:()=>t_,text_eval:()=>m_,text_find:()=>__,text_format:()=>l_,text_format_noreturn:()=>I_,text_join:()=>Ko,text_join_seq:()=>u_,text_length:()=>qo,text_random_char:()=>$o,text_replace:()=>a_,text_split:()=>r_,text_strip:()=>p_,text_substring:()=>n_,text_substring2:()=>i_,text_substring3:()=>T_,text_textarea:()=>xo});var c={};t.r(c),t.d(c,{enumerate:()=>z_,list_many_input:()=>U_,list_tolist:()=>Q_,list_tolist2:()=>q_,list_trig:()=>V_,lists_2d_get_col_row_data:()=>R_,lists_2d_get_data_with_col_row:()=>E_,lists_append_extend:()=>S_,lists_change_to:()=>y_,lists_change_to_general:()=>G_,lists_clear:()=>F_,lists_create_with:()=>g_,lists_create_with2:()=>k_,lists_create_with_noreturn:()=>B_,lists_create_with_text:()=>C_,lists_create_with_text2:()=>H_,lists_del_general:()=>w_,lists_find:()=>v_,lists_getIndex3:()=>x_,lists_getSublist3:()=>W_,lists_get_index:()=>A_,lists_get_random_item:()=>N_,lists_get_random_sublist:()=>D_,lists_get_sublist:()=>O_,lists_insert_value:()=>f_,lists_insert_value2:()=>J_,lists_pop:()=>b_,lists_remove_at:()=>Y_,lists_remove_at2:()=>j_,lists_reverse:()=>P_,lists_setIndex3:()=>K_,lists_set_index:()=>L_,lists_sort:()=>X_});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>pu,dicts_add_or_change:()=>iu,dicts_clear:()=>ou,dicts_create_with:()=>Z_,dicts_create_with_noreturn:()=>Tu,dicts_deldict:()=>ru,dicts_delete:()=>nu,dicts_get:()=>tu,dicts_get_default:()=>eu,dicts_items:()=>_u,dicts_keys:()=>$_,dicts_length:()=>au,dicts_pop:()=>lu,dicts_setdefault:()=>Iu,dicts_to_json:()=>hu,dicts_todict:()=>du,dicts_update:()=>su,dicts_values:()=>uu,json_to_dicts:()=>Mu});var E={};t.r(E),t.d(E,{logic_boolean:()=>Ru,logic_compare:()=>mu,logic_compare_continous:()=>cu,logic_is:()=>Lu,logic_is_in:()=>Au,logic_negate:()=>Eu,logic_null:()=>gu,logic_operation:()=>Ou,logic_tobool:()=>Su,logic_true_or_false:()=>Cu});var R={};t.r(R),t.d(R,{sdcard_mount:()=>Qu,sdcard_use_spi_init:()=>ju,storage_can_write_ornot:()=>Vu,storage_change_dir:()=>Hu,storage_close_file:()=>yu,storage_delete_file:()=>Bu,storage_file_seek:()=>ku,storage_file_tell:()=>wu,storage_file_write:()=>Fu,storage_fileopen:()=>Du,storage_fileopen_new:()=>fu,storage_fileopen_new_encoding:()=>Pu,storage_get_a_line:()=>bu,storage_get_contents:()=>Yu,storage_get_contents_without_para:()=>vu,storage_get_current_dir:()=>xu,storage_get_file_size:()=>Gu,storage_get_filename:()=>Xu,storage_is_file:()=>Ju,storage_list_all_files:()=>Uu,storage_make_dir:()=>Wu,storage_open_file_with_os:()=>Nu,storage_rename:()=>Ku});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>$u,procedures_callreturn:()=>Zu,procedures_defnoreturn:()=>zu,procedures_defreturn:()=>qu,procedures_ifreturn:()=>ta,procedures_return:()=>ea});var C={};t.r(C),t.d(C,{tuple_change_to:()=>pa,tuple_create_with:()=>ia,tuple_create_with_noreturn:()=>da,tuple_create_with_text2:()=>na,tuple_create_with_text_return:()=>sa,tuple_del:()=>ua,tuple_find:()=>la,tuple_getIndex:()=>oa,tuple_getSublist:()=>Ta,tuple_get_random_item:()=>Ma,tuple_get_sublist:()=>ha,tuple_join:()=>aa,tuple_length:()=>_a,tuple_max:()=>ra,tuple_totuple:()=>ma,tuple_trig:()=>Ia});var A={};t.r(A),t.d(A,{set_add_discard:()=>Aa,set_clear:()=>Ra,set_create_with:()=>ca,set_create_with_text_return:()=>Na,set_length:()=>Oa,set_operate:()=>ga,set_operate_update:()=>Ca,set_pop:()=>Ea,set_sub:()=>La,set_toset:()=>Da,set_update:()=>Sa});var L={};t.r(L),t.d(L,{html_content:()=>va,html_content_more:()=>Ya,html_document:()=>fa,html_form:()=>Va,html_head_body:()=>Fa,html_style:()=>ba,html_style_content:()=>Xa,html_text:()=>ya,html_title:()=>Pa});var S={};t.r(S),t.d(S,{attribute_access:()=>xa,function_call:()=>Ha,raw_block:()=>Ua,raw_empty:()=>Ga,raw_expression:()=>Ba,raw_table:()=>wa,type_check:()=>ka});var N={};t.r(N),t.d(N,{MP3_CONTROL:()=>cr,MP3_EQ_MODE:()=>gr,MP3_INIT:()=>Mr,MP3_LOOP_MODE:()=>Er,MP3_PLAY_FOLDER:()=>Lr,MP3_PLAY_NUM:()=>Ar,MP3_VOL:()=>Cr,bit_motor_control:()=>lr,display_rgb:()=>Tr,display_rgb2:()=>dr,display_rgb_init:()=>Ir,display_rgb_show:()=>hr,microbit_music_get_tempo:()=>nr,microbit_music_pitch:()=>Za,microbit_music_pitch_delay:()=>za,microbit_music_play_built_in:()=>Qa,microbit_music_play_built_in_easy:()=>qa,microbit_music_play_list_of_notes:()=>$a,microbit_music_play_list_of_notes_easy:()=>tr,microbit_music_reset:()=>er,microbit_music_stop:()=>ir,servo_move:()=>pr,speech_pronounce_easy:()=>ar,speech_say:()=>or,speech_say_easy:()=>_r,speech_sing_easy:()=>ur,speech_translate:()=>rr,tone_set_tempo:()=>sr});var D={};t.r(D),t.d(D,{i2c_init:()=>Xr,i2c_read:()=>yr,i2c_write:()=>Ur,microbit_radio_config:()=>Pr,microbit_radio_off:()=>fr,microbit_radio_on:()=>Dr,microbit_radio_receive:()=>br,microbit_radio_reset:()=>Fr,microbit_radio_send_string:()=>vr,radio_ons:()=>Nr,radio_receive_string:()=>Vr,radio_send_string:()=>Yr,spi_init:()=>Br,spi_write:()=>Gr});var f={};t.r(f),t.d(f,{display_fill:()=>dp,display_image_size:()=>Tp,group_lcd_init:()=>rp,group_lcd_power:()=>lp,group_lcd_print:()=>ap,group_lcd_print2:()=>pp,image_arithmetic:()=>up,image_shift:()=>_p,lp2i_u8g_draw_4strings:()=>Ip,microbit_display_clear:()=>kr,microbit_display_is_on:()=>ep,microbit_display_off:()=>tp,microbit_display_on:()=>$r,microbit_display_scroll:()=>Zr,microbit_display_scroll_string_animation:()=>zr,microbit_display_show_animation:()=>qr,microbit_display_show_default_image:()=>Qr,microbit_display_show_image:()=>jr,microbit_image_builtins:()=>ip,microbit_image_copy:()=>np,microbit_image_create:()=>op,microbit_image_invert:()=>sp,monitor_bright_point:()=>xr,monitor_get_pixel:()=>Hr,monitor_scroll_string:()=>Kr,monitor_scroll_string_with_delay:()=>Jr,monitor_show_image_or_string:()=>Wr});var P={};t.r(P),t.d(P,{factory_block:()=>Lp,factory_block_return:()=>Sp,factory_block_return_with_textarea:()=>Dp,factory_block_with_textarea:()=>Np,factory_callMethod_noreturn:()=>Cp,factory_callMethod_return:()=>Ap,factory_create_with_container:()=>Op,factory_create_with_item:()=>Ep,factory_declare:()=>gp,factory_from_import:()=>Mp,factory_function_noreturn:()=>cp,factory_function_return:()=>Rp,factory_import:()=>mp});var F={};t.r(F),t.d(F,{inout_analog_read:()=>bp,inout_analog_write:()=>vp,inout_analog_write_set:()=>Yp,inout_digital_read:()=>Fp,inout_digital_write:()=>Xp,inout_highlow:()=>Pp,sensor_pin_pressed:()=>Vp});var v={};t.r(v),t.d(v,{pins_analog:()=>Bp,pins_axis:()=>Kp,pins_brightness:()=>Jp,pins_builtinimg:()=>xp,pins_button:()=>Gp,pins_digital:()=>Up,pins_imglist:()=>Wp,pins_interrupt:()=>kp,pins_pwm:()=>wp,pins_radio_datarate:()=>qp,pins_radio_power:()=>Qp,pins_serial:()=>Hp,pins_tone_notes:()=>jp});var Y={};t.r(Y),t.d(Y,{DS1307_init:()=>El,NTC_TEMP:()=>Pl,RTC_get_time:()=>gl,RTC_set_date:()=>Al,RTC_set_time:()=>Cl,TCS34725_Get_RGB:()=>fl,controls_GestureLists:()=>sl,controls_attachGestureInterrupt:()=>nl,controls_attachGestureInterrupt2:()=>ol,sensor_button_get_presses:()=>tl,sensor_button_is_pressed:()=>Zp,sensor_button_was_pressed:()=>$p,sensor_calibrate_compass:()=>ll,sensor_compass_heading:()=>Tl,sensor_compass_reset:()=>Ll,sensor_current_gesture:()=>rl,sensor_current_gesture1:()=>el,sensor_current_gesture2:()=>il,sensor_distance_hrsc04:()=>cl,sensor_distance_hrsc04_:()=>Ol,sensor_field_strength:()=>hl,sensor_get_acceleration:()=>_l,sensor_get_gestures:()=>al,sensor_hrsc04_init:()=>Nl,sensor_is_compass_calibrated:()=>Il,sensor_light:()=>Sl,sensor_light_level:()=>pl,sensor_magnetic:()=>ml,sensor_rotation:()=>Ml,sensor_set_acceleration:()=>ul,sensor_temperature:()=>dl});var b={};t.r(b),t.d(b,{IO_input:()=>kl,IO_print:()=>Hl,IO_print_inline:()=>xl,serial_any:()=>yl,serial_begin:()=>wl,serial_print:()=>vl,serial_print_hex:()=>bl,serial_println:()=>Yl,serial_readline:()=>Ul,serial_readstr:()=>Xl,serial_readstr_until:()=>Bl,serial_receive_data_event:()=>Vl,serial_softserial:()=>Gl});var V={};t.r(V),t.d(V,{Panic_with_status_code:()=>jl,base_delay:()=>Kl,controls_millis:()=>Jl,controls_uname:()=>ql,reset:()=>Ql});var X={};t.r(X),t.d(X,{MP3_CONTROL:()=>cI,MP3_EQ_MODE:()=>EI,MP3_INIT:()=>mI,MP3_LOOP_MODE:()=>OI,MP3_PLAY_FOLDER:()=>CI,MP3_PLAY_NUM:()=>gI,MP3_VOL:()=>RI,bit_motor_control:()=>II,display_rgb:()=>dI,display_rgb2:()=>hI,display_rgb_init:()=>TI,display_rgb_show:()=>MI,microbit_music_get_tempo:()=>sI,microbit_music_pitch:()=>tI,microbit_music_pitch_delay:()=>$l,microbit_music_play_built_in:()=>zl,microbit_music_play_built_in_easy:()=>Zl,microbit_music_play_list_of_notes:()=>eI,microbit_music_reset:()=>iI,microbit_music_stop:()=>nI,servo_move:()=>lI,speech_pronounce_easy:()=>pI,speech_say:()=>uI,speech_say_easy:()=>aI,speech_sing_easy:()=>rI,speech_translate:()=>_I,tone_set_tempo:()=>oI});var y={};t.r(y),t.d(y,{i2c_init:()=>vI,i2c_read:()=>YI,i2c_write:()=>bI,microbit_radio_config:()=>NI,microbit_radio_off:()=>SI,microbit_radio_on:()=>LI,microbit_radio_receive:()=>FI,microbit_radio_reset:()=>DI,radio_ons:()=>AI,radio_receive_string:()=>PI,radio_send_string:()=>fI,spi_init:()=>VI,spi_write:()=>XI});var U={};t.r(U),t.d(U,{display_fill:()=>rT,display_image_size:()=>aT,group_lcd_init:()=>sT,group_lcd_power:()=>_T,group_lcd_print:()=>nT,group_lcd_print2:()=>oT,image_arithmetic:()=>eT,image_shift:()=>tT,lp2i_u8g_draw_4strings:()=>uT,microbit_display_clear:()=>yI,microbit_display_is_on:()=>QI,microbit_display_on:()=>jI,microbit_display_scroll:()=>JI,microbit_display_scroll_string_animation:()=>iT,microbit_display_set_pixel:()=>BI,microbit_display_show_animation:()=>KI,microbit_display_show_default_image:()=>WI,microbit_display_show_image:()=>xI,microbit_image_builtins:()=>qI,microbit_image_copy:()=>zI,microbit_image_create:()=>$I,microbit_image_invert:()=>ZI,monitor_bright_point:()=>GI,monitor_get_pixel:()=>UI,monitor_scroll_string:()=>kI,monitor_scroll_string_with_delay:()=>HI,monitor_show_image_or_string:()=>wI});var B={};t.r(B),t.d(B,{factory_block:()=>mT,factory_block_return:()=>cT,factory_block_return_with_textarea:()=>ET,factory_block_with_textarea:()=>OT,factory_callMethod_noreturn:()=>hT,factory_callMethod_return:()=>MT,factory_declare:()=>dT,factory_from_import:()=>pT,factory_function_noreturn:()=>IT,factory_function_return:()=>TT,factory_import:()=>lT});var G={};t.r(G),t.d(G,{inout_analog_read:()=>ST,inout_analog_write:()=>AT,inout_analog_write_set:()=>LT,inout_digital_read:()=>CT,inout_digital_write:()=>gT,inout_highlow:()=>RT,sensor_pin_pressed:()=>NT});var w={};t.r(w),t.d(w,{pins_analog:()=>fT,pins_axis:()=>XT,pins_brightness:()=>yT,pins_builtinimg:()=>bT,pins_button:()=>PT,pins_digital:()=>DT,pins_imglist:()=>VT,pins_interrupt:()=>vT,pins_pwm:()=>FT,pins_radio_datarate:()=>GT,pins_radio_power:()=>BT,pins_serial:()=>YT,pins_tone_notes:()=>UT});var k={};t.r(k),t.d(k,{DS1307_init:()=>rd,NTC_TEMP:()=>md,RTC_get_time:()=>pd,RTC_set_date:()=>Id,RTC_set_time:()=>ld,TCS34725_Get_RGB:()=>Md,controls_GestureLists:()=>xT,controls_attachGestureInterrupt:()=>WT,controls_attachGestureInterrupt2:()=>jT,sensor_button_get_presses:()=>HT,sensor_button_is_pressed:()=>wT,sensor_button_was_pressed:()=>kT,sensor_calibrate_compass:()=>td,sensor_compass_heading:()=>id,sensor_compass_reset:()=>Td,sensor_current_gesture:()=>qT,sensor_current_gesture1:()=>KT,sensor_current_gesture2:()=>JT,sensor_distance_hrsc04:()=>ud,sensor_distance_hrsc04_:()=>ad,sensor_field_strength:()=>sd,sensor_get_acceleration:()=>zT,sensor_get_gestures:()=>QT,sensor_hrsc04_init:()=>hd,sensor_is_compass_calibrated:()=>ed,sensor_light:()=>dd,sensor_light_level:()=>$T,sensor_magnetic:()=>_d,sensor_rotation:()=>od,sensor_set_acceleration:()=>ZT,sensor_temperature:()=>nd});var H={};t.r(H),t.d(H,{IO_input:()=>Dd,IO_print:()=>fd,IO_print_inline:()=>Pd,serial_any:()=>gd,serial_begin:()=>Nd,serial_print:()=>cd,serial_print_hex:()=>Ed,serial_println:()=>Od,serial_readline:()=>Ad,serial_readstr:()=>Cd,serial_readstr_until:()=>Ld,serial_receive_data_event:()=>Rd,serial_softserial:()=>Sd});var x={};t.r(x),t.d(x,{Panic_with_status_code:()=>Hd,base_delay:()=>kd,controls_end_program:()=>Wd,controls_millis:()=>xd,controls_uname:()=>Jd,reset:()=>Kd,system_device_name:()=>Gd,system_device_serial_number:()=>wd,system_event_bus_source:()=>Ud,system_event_bus_value:()=>Bd,system_on_event:()=>Vd,system_raise_event:()=>bd,system_reset:()=>vd,system_run_in_background:()=>Fd,system_timestamp:()=>Xd,system_value:()=>yd,system_wait:()=>Yd});const W=Blockly,K=Mixly,J={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}},j=J; /** * @license * Visual Blocks Editor @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class Q{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(W.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(W.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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(W.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(W.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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")}},dt={init:function(){this.setColour(at),this.appendValueInput("FROM").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.PYTHON_RANGE).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ht={init:function(){this.setColour(at),this.appendValueInput("LIST").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(W.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return W.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mt={init:function(){this.setColour(at),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(W.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new W.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(W.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:W.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:W.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},mt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(W.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new W.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(W.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(W.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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(W.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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")}},ct={init:function(){this.setColour(at);var t=new W.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:W.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:W.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(W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Ot={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new W.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return W.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Et={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new W.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return W.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Mt.OPERATORS=[[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],ct.OPERATORS=[[W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Rt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(W.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},gt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Ct={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(W.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},At={init:function(){this.setColour(at),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Lt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(W.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},St={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(W.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Nt={init:function(){this.jsonInit({message0:W.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:at,tooltip:W.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:W.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Dt={init:function(){this.setColour(at),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_STAT),this.setOutput(!0)}},ft={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Pt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(W.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Ft={init:function(){this.appendDummyInput().appendField(W.Msg.CONTROLS_REPEAT_TITLE_REPEAT+W.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(W.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new W.FieldDropdown([[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(at),this.setTooltip("do-while loop"),this.setHelpUrl("")}},vt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},bt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Vt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_GET+W.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(W.Msg.PROCEDURES_DEFRETURN_RETURN+W.Msg.MIXLY_GET_UNIQUE_IDEN)}},Xt=230;W.FieldTextInput.math_number_validator=function(t){return String(t)},W.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(Xt),this.appendDummyInput().appendField(new W.FieldTextInput("0",W.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(W.Msg.MATH_NUMBER_TOOLTIP)}},Bt={init:function(){this.setColour(Xt);this.appendDummyInput("").appendField(W.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new W.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ut={init:function(){this.setColour(Xt);this.appendDummyInput("").appendField(W.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new W.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Gt={init:function(){this.setColour(Xt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.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:W.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:W.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:W.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:W.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:W.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},wt={init:function(){this.setColour(Xt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.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:W.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:W.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:W.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:W.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:W.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},kt={init:function(){this.setColour(Xt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new W.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ht={init:function(){this.setColour(Xt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new W.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:W.Msg.MATH_TRIG_TOOLTIP_SIN,COS:W.Msg.MATH_TRIG_TOOLTIP_COS,TAN:W.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:W.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:W.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:W.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:W.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},xt={init:function(){var t=[[W.Msg.MATH_BIN,"bin"],[W.Msg.MATH_OCT,"oct"],[W.Msg.MATH_HEX,"hex"]];this.setColour(Xt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new W.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:W.Msg.MATH_DEC_TOOLTIP_BIN,oct:W.Msg.MATH_DEC_TOOLTIP_OCT,hex:W.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Wt={init:function(){var t=[[W.Msg.LANG_MATH_TO_ROUND,"round"],[W.Msg.LANG_MATH_TO_CEIL,"ceil"],[W.Msg.LANG_MATH_TO_FLOOR,"floor"],[W.Msg.MATH_ABS,"fabs"],[W.Msg.MATH_SQRT,"sqrt"]];this.setColour(Xt),this.appendValueInput("A").setCheck(Number).appendField(new W.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:W.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:W.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:W.Msg.MATH_SINGLE_TOOLTIP_SQ,round:W.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:W.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:W.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Kt={init:function(){var t=[[W.Msg.MIXLY_MAX,"max"],[W.Msg.MIXLY_MIN,"min"]];this.setColour(Xt),this.appendValueInput("A").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(new W.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(W.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:W.Msg.MIXLY_TOOLTIP_MATH_MAX,min:W.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Jt={init:function(){var t=[[W.Msg.MATH_TWO,"two"],[W.Msg.MATH_EIGHT,"eight"],[W.Msg.MATH_TEN,"ten"],[W.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Xt),this.appendDummyInput("").appendField(W.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new W.FieldDropdown(t),"OP").appendField(W.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(W.Msg.MATH_ZHW).appendField(new W.FieldDropdown(t),"OP2").appendField(W.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:W.Msg.MATH_Before_two,eight:W.Msg.MATH_Before_eight,ten:W.Msg.MATH_Before_ten,sixteen:W.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:W.Msg.MATH_Behind_two,eight:W.Msg.MATH_Behind_eight,ten:W.Msg.MATH_Behind_ten,sixteen:W.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},jt={init:function(){var t=[[W.Msg.LANG_MATH_INT,"int"],[W.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Xt),this.setOutput(!0,Number),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_RANDOM).appendField(new W.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:W.Msg.LANG_MATH_INT,float:W.Msg.LANG_MATH_FLOAT_RANDOM};return W.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Qt={init:function(){this.setColour(Xt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(W.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(W.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(W.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(W.Msg.MATH_CONSTRAIN_TOOLTIP)}},qt={init:function(){this.setColour(Xt),this.appendValueInput("NUM",Number).appendField(W.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(W.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(W.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_MATH_MAP)}},zt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(new W.FieldTextInput("0",W.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(W.Msg.MATH_NUMBER_TOOLTIP)}},Zt={init:function(){this.setColour(Xt),this.appendValueInput("NUM").setCheck(Number).appendField(W.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},$t={init:function(){this.setColour(Xt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(W.Msg.MATH_ROUND).appendField(W.Msg.TEXT_KEEP),this.appendDummyInput().appendField(W.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(W.Msg.MATH_ROUND_NEW_TOOLTIP)}},te={init:function(){var t=[[W.Msg.MIXLY_TO_INT,"int"],[W.Msg.MIXLY_TO_FLOAT,"float"],[W.Msg.MIXLY_TO_BITES,"b"],[W.Msg.LANG_MATH_BYTE+W.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Xt),this.appendValueInput("VAR").appendField(new W.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:W.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:W.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:W.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ee={init:function(){var t=[[W.Msg.MIXLY_TO_INT,"int"],[W.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Xt),this.appendValueInput("VAR").appendField(new W.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:W.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:W.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ie=qt,ne={init:function(){this.setColour(Xt),this.appendValueInput("VAR").appendField(W.Msg.LANG_MATH_BYTE+W.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},se=160,oe={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new W.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(W.Msg.TEXT_TEXT_TOOLTIP)},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 W.FieldImage(e,12,12,'"')}},_e={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new W.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(W.Msg.TEXT_LINES_TOOLTIP)},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 W.FieldImage(e,12,12,'"')}};W.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ue={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new W.FieldTextInput("",W.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(W.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new W.FieldImage(e,7,12,'"')}},ae={init:function(){this.setColour(se),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(W.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},re={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(Number).appendField(W.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},pe={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},le={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Ie={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Te={init:function(){this.WHERE_OPTIONS=[[W.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[W.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[W.Msg.TEXT_GET_INDEX_RANDOM+1+W.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(W.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(W.Msg.LISTS_GET_INDEX_GET,"MODE"),W.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(W.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=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+W.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",W.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:W.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:W.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:W.Msg.TEXT_GET_INDEX_RANDOM};return W.Msg.PROCEDURES_DEFRETURN_RETURN+W.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+W.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==W.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),W.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(W.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new W.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"),W.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},de={init:function(){this.setHelpUrl(W.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(W.Msg.LISTS_GET_INDEX_GET+" "+W.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(W.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(W.Msg.PROCEDURES_DEFRETURN_RETURN+W.Msg.MIXLY_MICROBIT_TYPE_STRING+W.Msg.LISTS_GET_INDEX_FROM_START+"n"+W.Msg.TEXT_CHARAT2)}},he={init:function(){this.setHelpUrl(W.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(W.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(W.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Me={init:function(){this.WHERE_OPTIONS_1=[[W.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[W.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[W.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[W.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[W.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[W.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(W.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(W.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(W.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==W.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==W.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),W.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(W.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new W.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"))}},me={init:function(){this.setHelpUrl(W.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(W.Msg.LISTS_GET_INDEX_GET+" "+W.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(W.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(W.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(W.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ce={init:function(){var t=[[W.Msg.MIXLY_EQUALS,"==="],[W.Msg.MIXLY_STARTSWITH,"startswith"],[W.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new W.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Oe={init:function(){this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(W.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_COMPARETO_HELP)}},Ee={init:function(){var t=[[W.Msg.TEXT_UPPER,"upper"],[W.Msg.TEXT_TITLE,"title"],[W.Msg.TEXT_CAPITALIZE,"capitalize"],[W.Msg.TEXT_SWAPCASE,"swapcase"],[W.Msg.TEXT_LOWER,"lower"]];this.setColour(se),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new W.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:W.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:W.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:W.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:W.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:W.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Re={init:function(){var t=[[W.Msg.TEXT_LJUST,"ljust"],[W.Msg.TEXT_CENTER,"center"],[W.Msg.TEXT_RJUST,"rjust"]];this.setColour(se),this.appendValueInput("VAR").appendField(new W.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(W.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(W.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ge={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(W.Msg.MIXLY_MID+W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(W.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ce={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ae={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(W.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(W.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Le={init:function(){this.setColour(se),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(W.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(W.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Se={init:function(){var t=[[W.Msg.TEXT_TRIM_BOTH,"strip"],[W.Msg.TEXT_TRIM_LEFT,"lstrip"],[W.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(se),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(W.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new W.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(W.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:W.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:W.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:W.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Ne={init:function(){this.setColour(se),this.appendDummyInput("").appendField(W.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new W.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new W.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(W.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){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ei={init:function(){this.setColour(ci),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(W.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ri={init:function(){this.setColour(ci),this.appendDummyInput().appendField(W.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},gi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_KEYS),this.setTooltip(W.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Ci={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(W.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(W.Msg.DICTS_GET_TOOLTIP)}},Ai={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(W.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(W.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(W.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Li={init:function(){this.setColour(ci),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(W.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Si={init:function(){this.setColour(ci),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(W.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_DELETE_TOOLTIP)}},Ni={init:function(){this.setColour(ci),this.appendValueInput("DICT2").setCheck("Dict").appendField(W.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(W.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(W.Msg.MIXLY_MID),this.setTooltip(W.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Di={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_CLEAR),this.setTooltip(W.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_ITEMS),this.setTooltip(W.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Pi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_VALUES),this.setTooltip(W.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Fi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.MIXLY_LENGTH),this.setTooltip(W.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},vi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_DELDICT),this.setTooltip(W.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yi={init:function(){this.MODE=[[W.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[W.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(W.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(W.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=W.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=W.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==W.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 W.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")}},bi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(W.Msg.DICTS_ADD_VALUE),this.setTooltip(W.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Vi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(W.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Xi={init:function(){this.setColour(ci),this.appendDummyInput("").appendField(new W.FieldLabel(W.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 W.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(W.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){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},yi={init:function(){this.setColour(ci),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Bi={init:function(){this.setColour(ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.MIXLY_TO_JSON),this.setTooltip(W.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Ui={init:function(){this.setColour(ci),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(W.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(W.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Gi=210,wi={init:function(){var t=W.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Gi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:W.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:W.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:W.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:W.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:W.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:W.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},ki={init:function(){var t=W.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=W.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Gi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new W.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Hi={init:function(){var t=[[W.Msg.LOGIC_OPERATION_AND,"AND"],[W.Msg.LOGIC_OPERATION_OR,"OR"],[W.Msg.LOGIC_OPERATION_NOR,"NOR"],[W.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Gi),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:W.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:W.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:W.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:W.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},xi={init:function(){this.setColour(Gi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(W.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(W.Msg.LOGIC_NEGATE_TOOLTIP)}},Wi={init:function(){var t=[[W.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[W.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Gi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new W.FieldDropdown(t),"BOOL"),this.setTooltip(W.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Ki={init:function(){this.setColour(Gi),this.setOutput(!0),this.appendDummyInput().appendField(W.Msg.LOGIC_NULL),this.setTooltip(W.Msg.LOGIC_NULL_TOOLTIP)}},Ji={init:function(){this.setColour(Gi),this.appendValueInput("A"),this.appendValueInput("B").appendField(W.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(W.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},ji={init:function(){var t=[[W.Msg.TEXT_APPEND_TO,"in"],[W.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Gi),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new W.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(W.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(W.Msg.IN)}},Qi={init:function(){var t=[[W.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[W.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Gi),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},qi={init:function(){this.setColour(Gi),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},zi={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(W.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Zi={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(W.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=W.Msg.MIXLY_USE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=W.Msg.MIXLY_BELONG;return i+{r:W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},$i={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[W.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=W.Msg.MIXLY_USE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=W.Msg.MIXLY_BELONG,_=W.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},tn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(W.Msg.MIXPY_TEXT_ENCODE).appendField(new W.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=W.Msg.MIXLY_USE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=W.Msg.MIXLY_BELONG,_=W.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},en={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+W.Msg.MIXLY_MICROBIT_TYPE_STRING+W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},nn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},sn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:W.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},on={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(W.Msg.MICROBIT_PYTHON_TYPE)}},_n={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.HTML_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},un={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},an={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},rn={init:function(){this.setColour(0),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};W.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const pn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[W.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(W.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},ln={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+W.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},In={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+W.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},dn={init:function(){this.setColour(0),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},hn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(W.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[W.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 W.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+W.Msg.MIXLY_ESP32_SET+{mkdir:W.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(W.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.HTML_FILE,"isfile"],[W.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 W.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+W.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:W.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},On={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(W.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(W.Msg.MIXLY_SETUP+W.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(W.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},En={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(W.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Rn={};Rn.NAME_TYPE=W.PROCEDURE_CATEGORY_NAME,Rn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(W.Msg.MIXLY_AIP_ATTR).setAlign(W.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ms={init:function(){this.setColour(ps),this.appendDummyInput().appendField(W.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ms={init:function(){this.setColour(ps),this.appendDummyInput().appendField(W.Msg.HTML_FORM_CONTENT).appendField(new W.FieldDropdown([[W.Msg.HTML_TEXT,"text"],[W.Msg.HTML_EMAIL,"email"],[W.Msg.HTML_NUMBER,"number"],[W.Msg.HTML_PASSWORD,"password"],[W.Msg.HTML_CHECKBOX,"checkbox"],[W.Msg.HTML_RADIOBUTTON,"radiobutton"],[W.Msg.HTML_BUTTON,"button"],[W.Msg.HTML_COLOUR,"colour"],[W.Msg.HTML_DATE,"date"],[W.Msg.HTML_LOCALTIME,"local time"],[W.Msg.HTML_FILE,"file"],[W.Msg.HTML_HIDDEN,"hidden"],[W.Msg.HTML_IMAGE,"image"],[W.Msg.HTML_MONTH,"month"],[W.Msg.HTML_RANGE,"range"],[W.Msg.HTML_RESET,"reset"],[W.Msg.HTML_SEARCH,"search"],[W.Msg.HTML_SUBMIT,"submit"],[W.Msg.HTML_TELEPHONENUMBER,"telephone number"],[W.Msg.HTML_TIME,"time"],[W.Msg.HTML_URL,"url"],[W.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(W.Msg.HTML_NAME).appendField(new W.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(W.Msg.HTML_VALUE).appendField(new W.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(W.Msg.MIXLY_AIP_ATTR).setAlign(W.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cs={init:function(){this.setColour(ps),this.appendDummyInput().appendField(new W.FieldTextInput("property"),"KEY").appendField(":").appendField(new W.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(ps),this.appendDummyInput().appendField(new W.FieldTextInput("property"),"KEY").appendField(":").appendField(new W.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Es={init:function(){this.setColour(ps),this.appendDummyInput().appendField(W.Msg.HTML_TEXT).appendField(new W.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rs=160,gs={init:function(){this.setColour(Rs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new W.FieldTable(""),"TEXT")}},Cs={init:function(){this.setColour(Rs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new W.FieldMultilineInput(""),"TEXT")}},As={init:function(){this.setColour(Rs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new W.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ls={init:function(){this.setColour(Rs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Ss={init:function(){this.setColour(Rs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new W.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Ns={init:function(){this.setColour(Rs),this.appendValueInput("VALUE").appendField(W.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Ds={init:function(){this.setColour(Rs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new W.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(W.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=W.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+")"},W.isNumber(n)&&W.isNumber(s)&&W.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 du=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]},hu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Mu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},mu=function(t,e){return["None",e.ORDER_ATOMIC]},cu=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]},Ou=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]},Eu=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]},Ru=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},gu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Cu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Au=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Lu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Su=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Nu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Du=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]},fu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Pu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Fu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},vu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Yu=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},bu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Vu=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Xu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},yu=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"},Bu=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Uu=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Gu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},wu=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"},ku=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]},Hu=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"},xu=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"},Wu=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),W.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]},La=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Sa=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},Na=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Da=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},fa=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Pa=function(t,e){return'"},Fa=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},va=function(){return this.getFieldValue("TEXT")+"\n"},Ya=function(t){return t.getFieldValue("TEXT")+"\n"},ba=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Va=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Xa=function(){return""},ya=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Ba=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.join("\n")},Ga.scrubNakedValue=function(t){return t+"\n"},Ga.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},Ga.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Ga.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=W.utils.string.wrap(o,Ga.COMMENT_WRAP-3),n+=Ga.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const wa={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"]]}};wa["BBC micro:bit"]=wa.microbit;const ka=wa,Ha=100,xa={init:function(){this.jsonInit({colour:Ha,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:W.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(W.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},Wa={init:function(){this.jsonInit({colour:Ha,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:W.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"}]})}},Ka={init:function(){this.setColour(Ha),this.appendValueInput("PIN",Number).appendField(W.Msg.MIXLY_TONE).appendField(W.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(W.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(W.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(W.Msg.MIXLY_MILLIS).appendField(W.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new W.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ja={init:function(){this.setColour(Ha),this.appendValueInput("PIN",Number).appendField(W.Msg.MIXLY_TONE).appendField(W.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(W.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ja={init:function(){this.jsonInit({colour:Ha,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:W.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(W.Msg.MIXLY_MICROBIT_Play_notes1)}},Qa={init:function(){this.jsonInit({colour:Ha,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:W.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"}]})}},qa={init:function(){this.jsonInit({colour:Ha,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:W.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Reset_music)}},za={init:function(){this.setColour(Ha),this.appendValueInput("PIN").appendField(W.Msg.MIXLY_NOTONE).appendField(W.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_NOTONE)}},Za={init:function(){this.jsonInit({colour:Ha,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:W.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Get_current_tempo)}},$a={init:function(){this.setColour(Ha),this.appendValueInput("TICKS").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(W.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(W.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},tr={init:function(){this.setColour(Ha),this.appendValueInput("VAR").setCheck(String).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(W.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(W.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(W.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=W.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},er={init:function(){this.setColour(Ha),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ir={init:function(){this.setColour(Ha),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},nr={init:function(){this.setColour(Ha),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},sr={init:function(){this.setColour(Ha),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+W.Msg.MIXLY_MICROBIT_TYPE_STRING+W.Msg.MICROBIT_SPEECH_translation)}},or={init:function(){this.setColour(Ha),this.appendValueInput("PIN",Number).appendField(W.Msg.MIXLY_SERVO).appendField(W.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},_r={init:function(){this.appendValueInput("speed").setCheck(null).appendField(W.Msg.MIXLY_MOTOR).appendField(new W.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(W.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new W.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Ha),this.setTooltip(""),this.setHelpUrl("")}},ur={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(W.Msg.MIXLY_RGB_PIN_COUNT)}},ar={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(W.Msg.MIXLY_RGB_NUM_R_G_B)}},rr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(W.inputs.Align.RIGHT).appendField(new W.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},pr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendDummyInput().appendField(W.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(W.Msg.MIXLY_ESP32_MUSIC_WRI)}},lr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.MIXLY_SETUP+" "+W.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(W.inputs.Align.RIGHT).appendField("TX#"),this.appendValueInput("TX").setAlign(W.inputs.Align.RIGHT).appendField("RX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Ir=[[W.Msg.MIXLY_MP3_PLAY,"play"],[W.Msg.MIXLY_MP3_PAUSE,"pause"],[W.Msg.MIXLY_MP3_NEXT,"next_track"],[W.Msg.MIXLY_MP3_PREV,"prev_track"],[W.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[W.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const Tr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_STAT).appendField(new W.FieldDropdown(Ir),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var dr=[[W.Msg.MIXLY_MP3_LOOP_ALL,"0"],[W.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[W.Msg.MIXLY_MP3_LOOP_ONE,"2"],[W.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const hr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_MP3_LOOP_MODE).appendField(W.Msg.MIXLY_STAT).appendField(new W.FieldDropdown(dr),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Mr=[[W.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[W.Msg.MIXLY_MP3_EQ_POP,"1"],[W.Msg.MIXLY_MP3_EQ_ROCK,"2"],[W.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[W.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[W.Msg.MIXLY_MP3_EQ_BASS,"5"]];const mr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_MP3_EQ_MODE).appendField(W.Msg.MIXLY_STAT).appendField(new W.FieldDropdown(Mr),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},cr={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(W.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Or={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(W.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()}},Er={init:function(){this.setColour(Ha),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(W.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(W.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()}},Rr=140,gr={init:function(){this.setColour(225),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[W.Msg.HTML_RESET,"reset"]]),"type").appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:W.Blockly.Msg.HTML_RESET}[e]+i}))}},Cr={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:W.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Ar={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:W.Msg.MIXLY_MICROBIT_Switch_off_radio})}},Lr={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:W.Msg.MIXLY_MICROBIT_Configure_radio1,message0:W.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"}]})}},Sr={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:W.Msg.MIXLY_MICROBIT_Reset_radio})}},Nr={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:W.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Dr={init:function(){this.setColour(225),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_MSG,"send"],[W.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_Send_message1)}},fr={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:W.Msg.MIXLY_MICROBIT_Receive_message,message0:W.Msg.MIXLY_MICROBIT_Receive_message})}},Pr={init:function(){this.setColour(225),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_MSG,"receive"],[W.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[W.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_Receive_message)}},Fr={init:function(){this.setColour(Rr),this.appendValueInput("RX",Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(W.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(W.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(W.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(Rr),this.appendValueInput("address").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(W.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(W.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new W.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},Yr={init:function(){this.setColour(Rr),this.appendValueInput("address").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(W.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new W.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},br={init:function(){this.jsonInit({colour:Rr,nextStatement:null,previousStatement:null,message0:W.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:K.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:K.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:K.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},Vr={init:function(){this.setColour(Rr),this.appendValueInput("data").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},Xr=180,yr={init:function(){this.jsonInit({colour:Xr,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:W.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Clear_display)}},Br={init:function(){this.setColour(Xr),this.appendValueInput("x").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_GET).appendField(W.Msg.MIXLY_BRIGHTNESS).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_BRIGHTNESS1)}},Ur={init:function(){this.setColour(Xr),this.appendValueInput("x").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(W.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_BRIGHTNESS2)}},Gr={init:function(){this.setColour(Xr),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(W.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},wr={init:function(){this.setColour(Xr),this.appendValueInput("data").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},kr={init:function(){this.setColour(Xr),this.appendValueInput("data").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(W.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(W.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Hr={init:function(){this.setColour(Xr),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(W.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.OLED_BITMAP)}},xr={init:function(){this.jsonInit({colour:Xr,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:W.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"}]})}},Wr={init:function(){this.jsonInit({colour:Xr,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:W.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(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+W.Msg.MIXLY_MICROBIT_Animate_images1)}},Kr={init:function(){this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:Xr,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:W.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(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},Jr={init:function(){this.jsonInit({colour:Xr,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:W.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},jr={init:function(){this.setColour(Xr),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[W.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(W.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=W.Msg.MIXLY_MICROBIT_monitor;return{on:W.Msg.MIXLY_MICROBIT_Turn_on_display,off:W.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},Qr={init:function(){this.jsonInit({colour:Xr,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:W.Msg.MIXLY_MICROBIT_Turn_off_display})}},qr={init:function(){this.jsonInit({colour:Xr,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:W.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Display_is_on1)}},zr={init:function(){this.jsonInit({colour:Xr,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:W.Msg.MIXLY_MICROBIT_Built_in_image1,message0:W.Msg.MIXLY_MICROBIT_Built_in_image})}},Zr={init:function(){this.jsonInit({colour:Xr,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:W.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Copy_image1)}},$r={init:function(){this.jsonInit({colour:Xr,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:W.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Invert_image1)}},tp={init:function(){this.jsonInit({colour:Xr,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:W.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Create_image1)}},ep={init:function(){var t=[[W.Msg.MIXLY_UP,"up"],[W.Msg.MIXLY_DOWN,"down"],[W.Msg.MIXLY_LEFT,"left"],[W.Msg.MIXLY_RIGHT,"right"]];this.setColour(Xr),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(W.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(W.Msg.DISPLAY_IMAGE_LET2).appendField(new W.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(W.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(W.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=W.Msg.DISPLAY_IMAGE_LET,n=W.Msg.DISPLAY_IMAGE_LET2,s=W.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:W.Msg.MIXLY_UP,down:W.Msg.MIXLY_DOWN,left:W.Msg.MIXLY_LEFT,right:W.Msg.MIXLY_RIGHT}[t]+s}))}},ip={init:function(){var t=[[W.Msg.MICROBIT_DISPLAY_UNION,"+"],[W.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(Xr),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(W.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":W.Msg.MIXLY_MICROBIT_image_add,"-":W.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},np={init:function(){this.setColour(Xr),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(W.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(W.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},sp={init:function(){this.setColour(Xr),this.appendValueInput("device").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_SETUP).appendField(W.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(W.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_SETUP+W.Msg.MIXLY_DF_LCD+W.Msg.MIXLY_LCD_ADDRESS)}},op={init:function(){this.setColour(Xr),this.appendValueInput("row",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(W.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(W.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},_p={init:function(){this.setColour(Xr),this.appendDummyInput().appendField(W.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new W.FieldDropdown([[W.Msg.MIXLY_ON,"on()"],[W.Msg.MIXLY_OFF,"off()"],[W.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[W.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[W.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 W.Msg.LISTS_SET_INDEX_SET+W.Msg.MIXLY_DF_LCD+{"on()":W.Msg.MIXLY_ON,"off()":W.Msg.MIXLY_OFF,"clear()":W.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":W.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":W.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},up={init:function(){this.appendDummyInput().appendField(W.Msg.MIXLY_DF_LCD+" OLED "+W.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(W.inputs.Align.RIGHT).appendField("(128*64) "+W.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Xr),this.setTooltip(W.Msg.MIXLY_DF_LCD+W.Msg.OLEDDISPLAY+W.Msg.MIXLY_MICROBIT_TYPE_STRING)}},ap={init:function(){var t=[[W.Msg.MIXLY_HEIGHT,"height"],[W.Msg.MIXLY_WIDTH,"width"]];this.setColour(Xr),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+W.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+W.Msg.MIXLY_MICROBIT_IMAGE+{height:W.Msg.MIXLY_HEIGHT,width:W.Msg.MIXLY_WIDTH}[t]}))}},rp={init:function(){this.setColour(Xr),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[W.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:W.Msg.MIXLY_LCD_STAT_CLEAR,1:W.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return W.Msg.MIXLY_DF_LCD+i[e]}))}},pp="#777777",lp={init:function(){this.setColour(pp),this.appendDummyInput("").appendField("from ").appendField(new W.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new W.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ip={init:function(){this.setColour(pp),this.appendDummyInput("").appendField("import ").appendField(new W.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tp={init:function(){this.setColour(pp),this.appendDummyInput("").appendField(new W.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new W.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]},sd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},od=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]}},_d=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"},ud=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"},ad=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},rd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},pd=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"},ld=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]},Id=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]},Td=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},dd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},hd=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"},Md=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"},md=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},cd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},Od=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},Ed=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},Rd=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"},gd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},Cd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},Ad=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},Ld=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},Sd=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},Nd=function(){return"control.reset()\n"},Dd=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||K.Profile.default.serial)+")\n"},fd=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||K.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||K.Profile.default.serial)+")\n"},Pd=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||K.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||K.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},Fd=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},vd=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},Yd=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},bd=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Vd=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},Xd=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},yd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},Bd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Ud=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},Gd=function(){return"while True:\n pass\n"},wd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},kd=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(W.Variables,j),Object.assign(W.Procedures,gn),W.Python=Ga,W.generator=Ga,K.Profile.default={},Object.assign(K.Profile,ka),Object.assign(K.Profile.default,ka.microbit),Object.assign(W.Blocks,e,i,n,s,o,_,u,a,r,p,l,I,T,N,D,f,P,F,v,Y,b,V),Object.assign(W.Python.forBlock,d,h,M,m,c,O,E,R,g,C,A,L,S,X,y,B,U,G,w,k,H,x)})(); \ No newline at end of file +class Q{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(W.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(W.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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(W.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(W.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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")}},dt={init:function(){this.setColour(at),this.appendValueInput("FROM").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.PYTHON_RANGE).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ht={init:function(){this.setColour(at),this.appendValueInput("LIST").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(W.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return W.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mt={init:function(){this.setColour(at),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(W.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new W.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(W.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:W.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:W.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},mt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(W.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new W.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(W.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(W.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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(W.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(W.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")}},ct={init:function(){this.setColour(at);var t=new W.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:W.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:W.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(W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Ot={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new W.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return W.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Et={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new W.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return W.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Mt.OPERATORS=[[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],ct.OPERATORS=[[W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[W.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Rt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(W.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},gt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Ct={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(W.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},At={init:function(){this.setColour(at),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Lt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(W.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},St={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(W.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Nt={init:function(){this.jsonInit({message0:W.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:at,tooltip:W.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:W.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Dt={init:function(){this.setColour(at),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(W.Msg.MIXLY_STAT),this.setOutput(!0)}},ft={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Pt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(W.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Ft={init:function(){this.appendDummyInput().appendField(W.Msg.CONTROLS_REPEAT_TITLE_REPEAT+W.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(W.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new W.FieldDropdown([[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[W.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(at),this.setTooltip("do-while loop"),this.setHelpUrl("")}},vt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},bt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Vt={init:function(){this.setColour(at),this.appendDummyInput().appendField(W.Msg.MIXLY_GET+W.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(W.Msg.PROCEDURES_DEFRETURN_RETURN+W.Msg.MIXLY_GET_UNIQUE_IDEN)}},Xt={init:function(){this.setColour(at),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(W.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},yt=230;W.FieldTextInput.math_number_validator=function(t){return String(t)},W.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 Ut={init:function(){this.setColour(yt),this.appendDummyInput().appendField(new W.FieldTextInput("0",W.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(W.Msg.MATH_NUMBER_TOOLTIP)}},Bt={init:function(){this.setColour(yt);this.appendDummyInput("").appendField(W.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new W.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Gt={init:function(){this.setColour(yt);this.appendDummyInput("").appendField(W.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new W.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:W.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},wt={init:function(){this.setColour(yt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.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:W.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:W.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:W.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:W.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:W.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},kt={init:function(){this.setColour(yt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.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:W.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:W.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:W.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:W.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:W.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ht={init:function(){this.setColour(yt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new W.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},xt={init:function(){this.setColour(yt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new W.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:W.Msg.MATH_TRIG_TOOLTIP_SIN,COS:W.Msg.MATH_TRIG_TOOLTIP_COS,TAN:W.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:W.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:W.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:W.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:W.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Wt={init:function(){var t=[[W.Msg.MATH_BIN,"bin"],[W.Msg.MATH_OCT,"oct"],[W.Msg.MATH_HEX,"hex"]];this.setColour(yt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new W.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:W.Msg.MATH_DEC_TOOLTIP_BIN,oct:W.Msg.MATH_DEC_TOOLTIP_OCT,hex:W.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Kt={init:function(){var t=[[W.Msg.LANG_MATH_TO_ROUND,"round"],[W.Msg.LANG_MATH_TO_CEIL,"ceil"],[W.Msg.LANG_MATH_TO_FLOOR,"floor"],[W.Msg.MATH_ABS,"fabs"],[W.Msg.MATH_SQRT,"sqrt"]];this.setColour(yt),this.appendValueInput("A").setCheck(Number).appendField(new W.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:W.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:W.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:W.Msg.MATH_SINGLE_TOOLTIP_SQ,round:W.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:W.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:W.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Jt={init:function(){var t=[[W.Msg.MIXLY_MAX,"max"],[W.Msg.MIXLY_MIN,"min"]];this.setColour(yt),this.appendValueInput("A").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(new W.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(W.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:W.Msg.MIXLY_TOOLTIP_MATH_MAX,min:W.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},jt={init:function(){var t=[[W.Msg.MATH_TWO,"two"],[W.Msg.MATH_EIGHT,"eight"],[W.Msg.MATH_TEN,"ten"],[W.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(yt),this.appendDummyInput("").appendField(W.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new W.FieldDropdown(t),"OP").appendField(W.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(W.Msg.MATH_ZHW).appendField(new W.FieldDropdown(t),"OP2").appendField(W.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:W.Msg.MATH_Before_two,eight:W.Msg.MATH_Before_eight,ten:W.Msg.MATH_Before_ten,sixteen:W.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:W.Msg.MATH_Behind_two,eight:W.Msg.MATH_Behind_eight,ten:W.Msg.MATH_Behind_ten,sixteen:W.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Qt={init:function(){var t=[[W.Msg.LANG_MATH_INT,"int"],[W.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(yt),this.setOutput(!0,Number),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_RANDOM).appendField(new W.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(W.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:W.Msg.LANG_MATH_INT,float:W.Msg.LANG_MATH_FLOAT_RANDOM};return W.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},qt={init:function(){this.setColour(yt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(W.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(W.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(W.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(W.Msg.MATH_CONSTRAIN_TOOLTIP)}},zt={init:function(){this.setColour(yt),this.appendValueInput("NUM",Number).appendField(W.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(W.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(W.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Zt={init:function(){this.setColour(yt),this.appendDummyInput().appendField(new W.FieldTextInput("0",W.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(W.Msg.MATH_NUMBER_TOOLTIP)}},$t={init:function(){this.setColour(yt),this.appendValueInput("NUM").setCheck(Number).appendField(W.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},te={init:function(){this.setColour(yt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(W.Msg.MATH_ROUND).appendField(W.Msg.TEXT_KEEP),this.appendDummyInput().appendField(W.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(W.Msg.MATH_ROUND_NEW_TOOLTIP)}},ee={init:function(){var t=[[W.Msg.MIXLY_TO_INT,"int"],[W.Msg.MIXLY_TO_FLOAT,"float"],[W.Msg.MIXLY_TO_BITES,"b"],[W.Msg.LANG_MATH_BYTE+W.Msg.MIXLY_TO_INT,"bti"]];this.setColour(yt),this.appendValueInput("VAR").appendField(new W.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:W.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:W.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:W.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ie={init:function(){var t=[[W.Msg.MIXLY_TO_INT,"int"],[W.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(yt),this.appendValueInput("VAR").appendField(new W.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:W.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:W.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ne=zt,se={init:function(){this.setColour(yt),this.appendValueInput("VAR").appendField(W.Msg.LANG_MATH_BYTE+W.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},oe=160,_e={init:function(){this.setColour(oe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new W.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(W.Msg.TEXT_TEXT_TOOLTIP)},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 W.FieldImage(e,12,12,'"')}},ue={init:function(){this.setColour(oe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new W.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(W.Msg.TEXT_LINES_TOOLTIP)},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 W.FieldImage(e,12,12,'"')}};W.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ae={init:function(){this.setColour(oe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new W.FieldTextInput("",W.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(W.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new W.FieldImage(e,7,12,'"')}},re={init:function(){this.setColour(oe),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(W.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},pe={init:function(){this.setColour(oe),this.appendValueInput("VAR").setCheck(Number).appendField(W.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},le={init:function(){this.setColour(oe),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ie={init:function(){this.setColour(oe),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Te={init:function(){this.setColour(oe),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},de={init:function(){this.WHERE_OPTIONS=[[W.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[W.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[W.Msg.TEXT_GET_INDEX_RANDOM+1+W.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(W.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(oe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(W.Msg.LISTS_GET_INDEX_GET,"MODE"),W.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(W.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=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=W.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+W.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",W.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:W.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:W.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:W.Msg.TEXT_GET_INDEX_RANDOM};return W.Msg.PROCEDURES_DEFRETURN_RETURN+W.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+W.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==W.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),W.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(W.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new W.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"),W.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},he={init:function(){this.setHelpUrl(W.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(oe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(W.Msg.LISTS_GET_INDEX_GET+" "+W.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(W.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(W.Msg.PROCEDURES_DEFRETURN_RETURN+W.Msg.MIXLY_MICROBIT_TYPE_STRING+W.Msg.LISTS_GET_INDEX_FROM_START+"n"+W.Msg.TEXT_CHARAT2)}},Me={init:function(){this.setHelpUrl(W.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(oe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(W.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(W.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},me={init:function(){this.WHERE_OPTIONS_1=[[W.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[W.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[W.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[W.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[W.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[W.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(W.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(oe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(W.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(W.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==W.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==W.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),W.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(W.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new W.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"))}},ce={init:function(){this.setHelpUrl(W.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(oe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(W.Msg.LISTS_GET_INDEX_GET+" "+W.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(W.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(W.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(W.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Oe={init:function(){var t=[[W.Msg.MIXLY_EQUALS,"==="],[W.Msg.MIXLY_STARTSWITH,"startswith"],[W.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(oe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new W.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ee={init:function(){this.setColour(oe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(W.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_COMPARETO_HELP)}},Re={init:function(){var t=[[W.Msg.TEXT_UPPER,"upper"],[W.Msg.TEXT_TITLE,"title"],[W.Msg.TEXT_CAPITALIZE,"capitalize"],[W.Msg.TEXT_SWAPCASE,"swapcase"],[W.Msg.TEXT_LOWER,"lower"]];this.setColour(oe),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new W.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:W.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:W.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:W.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:W.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:W.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ge={init:function(){var t=[[W.Msg.TEXT_LJUST,"ljust"],[W.Msg.TEXT_CENTER,"center"],[W.Msg.TEXT_RJUST,"rjust"]];this.setColour(oe),this.appendValueInput("VAR").appendField(new W.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(W.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(W.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ce={init:function(){this.setColour(oe),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(W.Msg.MIXLY_MID+W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(W.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ae={init:function(){this.setColour(oe),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Le={init:function(){this.setColour(oe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(W.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(W.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Se={init:function(){this.setColour(oe),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(W.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(W.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(W.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Ne={init:function(){var t=[[W.Msg.TEXT_TRIM_BOTH,"strip"],[W.Msg.TEXT_TRIM_LEFT,"lstrip"],[W.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(oe),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(W.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new W.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(W.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:W.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:W.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:W.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},De={init:function(){this.setColour(oe),this.appendDummyInput("").appendField(W.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new W.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new W.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(W.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){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ci={init:function(){this.setColour(Ri),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(W.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ai={init:function(){this.setColour(Ri),this.appendDummyInput().appendField(W.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Li={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_KEYS),this.setTooltip(W.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Si={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(W.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(W.Msg.DICTS_GET_TOOLTIP)}},Ni={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(W.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(W.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(W.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Di={init:function(){this.setColour(Ri),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(W.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},fi={init:function(){this.setColour(Ri),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(W.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_DELETE_TOOLTIP)}},Pi={init:function(){this.setColour(Ri),this.appendValueInput("DICT2").setCheck("Dict").appendField(W.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(W.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(W.Msg.MIXLY_MID),this.setTooltip(W.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_CLEAR),this.setTooltip(W.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_ITEMS),this.setTooltip(W.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Yi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_VALUES),this.setTooltip(W.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},bi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.MIXLY_LENGTH),this.setTooltip(W.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Vi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.DICT_DELDICT),this.setTooltip(W.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xi={init:function(){this.MODE=[[W.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[W.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(W.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(W.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=W.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=W.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==W.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 W.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")}},yi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(W.Msg.DICTS_ADD_VALUE),this.setTooltip(W.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Ui={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(W.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(W.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Bi={init:function(){this.setColour(Ri),this.appendDummyInput("").appendField(new W.FieldLabel(W.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 W.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(W.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){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gi={init:function(){this.setColour(Ri),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},wi={init:function(){this.setColour(Ri),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(W.Msg.MIXLY_TO_JSON),this.setTooltip(W.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ki={init:function(){this.setColour(Ri),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(W.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(W.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Hi=210,xi={init:function(){var t=W.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Hi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:W.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:W.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:W.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:W.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:W.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:W.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Wi={init:function(){var t=W.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=W.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Hi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new W.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ki={init:function(){var t=[[W.Msg.LOGIC_OPERATION_AND,"AND"],[W.Msg.LOGIC_OPERATION_OR,"OR"],[W.Msg.LOGIC_OPERATION_NOR,"NOR"],[W.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Hi),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:W.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:W.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:W.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:W.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Ji={init:function(){this.setColour(Hi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(W.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(W.Msg.LOGIC_NEGATE_TOOLTIP)}},ji={init:function(){var t=[[W.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[W.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Hi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new W.FieldDropdown(t),"BOOL"),this.setTooltip(W.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Qi={init:function(){this.setColour(Hi),this.setOutput(!0),this.appendDummyInput().appendField(W.Msg.LOGIC_NULL),this.setTooltip(W.Msg.LOGIC_NULL_TOOLTIP)}},qi={init:function(){this.setColour(Hi),this.appendValueInput("A"),this.appendValueInput("B").appendField(W.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(W.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},zi={init:function(){var t=[[W.Msg.TEXT_APPEND_TO,"in"],[W.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Hi),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new W.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(W.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(W.Msg.IN)}},Zi={init:function(){var t=[[W.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[W.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Hi),this.appendValueInput("A"),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},$i={init:function(){this.setColour(Hi),this.appendValueInput("VAR").appendField(W.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(W.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},tn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(W.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},en={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(W.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=W.Msg.MIXLY_USE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=W.Msg.MIXLY_BELONG;return i+{r:W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[W.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=W.Msg.MIXLY_USE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=W.Msg.MIXLY_BELONG,_=W.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},sn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(W.Msg.MIXPY_TEXT_ENCODE).appendField(new W.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=W.Msg.MIXLY_USE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=W.Msg.MIXLY_BELONG,_=W.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:W.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:W.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:W.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},on={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+W.Msg.MIXLY_MICROBIT_TYPE_STRING+W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},_n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:W.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:W.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},an={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(W.Msg.MICROBIT_PYTHON_TYPE)}},rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.HTML_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},pn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},ln={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},In={init:function(){this.setColour(0),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};W.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Tn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[W.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(W.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},dn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+W.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+W.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:W.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},mn={init:function(){this.setColour(0),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},cn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(W.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[W.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 W.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+W.Msg.MIXLY_ESP32_SET+{mkdir:W.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(W.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(W.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.HTML_FILE,"isfile"],[W.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 W.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+W.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:W.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},gn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(W.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(W.Msg.MIXLY_SETUP+W.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(W.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(W.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(W.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},An={};An.NAME_TYPE=W.PROCEDURE_CATEGORY_NAME,An.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(W.Msg.MIXLY_AIP_ATTR).setAlign(W.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(Ts),this.appendDummyInput().appendField(W.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Es={init:function(){this.setColour(Ts),this.appendDummyInput().appendField(W.Msg.HTML_FORM_CONTENT).appendField(new W.FieldDropdown([[W.Msg.HTML_TEXT,"text"],[W.Msg.HTML_EMAIL,"email"],[W.Msg.HTML_NUMBER,"number"],[W.Msg.HTML_PASSWORD,"password"],[W.Msg.HTML_CHECKBOX,"checkbox"],[W.Msg.HTML_RADIOBUTTON,"radiobutton"],[W.Msg.HTML_BUTTON,"button"],[W.Msg.HTML_COLOUR,"colour"],[W.Msg.HTML_DATE,"date"],[W.Msg.HTML_LOCALTIME,"local time"],[W.Msg.HTML_FILE,"file"],[W.Msg.HTML_HIDDEN,"hidden"],[W.Msg.HTML_IMAGE,"image"],[W.Msg.HTML_MONTH,"month"],[W.Msg.HTML_RANGE,"range"],[W.Msg.HTML_RESET,"reset"],[W.Msg.HTML_SEARCH,"search"],[W.Msg.HTML_SUBMIT,"submit"],[W.Msg.HTML_TELEPHONENUMBER,"telephone number"],[W.Msg.HTML_TIME,"time"],[W.Msg.HTML_URL,"url"],[W.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(W.Msg.HTML_NAME).appendField(new W.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(W.Msg.HTML_VALUE).appendField(new W.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(W.Msg.MIXLY_AIP_ATTR).setAlign(W.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rs={init:function(){this.setColour(Ts),this.appendDummyInput().appendField(new W.FieldTextInput("property"),"KEY").appendField(":").appendField(new W.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(Ts),this.appendDummyInput().appendField(new W.FieldTextInput("property"),"KEY").appendField(":").appendField(new W.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cs={init:function(){this.setColour(Ts),this.appendDummyInput().appendField(W.Msg.HTML_TEXT).appendField(new W.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},As=160,Ls={init:function(){this.setColour(As),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new W.FieldTable(""),"TEXT")}},Ss={init:function(){this.setColour(As),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new W.FieldMultilineInput(""),"TEXT")}},Ns={init:function(){this.setColour(As),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new W.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ds={init:function(){this.setColour(As),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},fs={init:function(){this.setColour(As),this.appendDummyInput().appendTitle("Comment:").appendTitle(new W.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Ps={init:function(){this.setColour(As),this.appendValueInput("VALUE").appendField(W.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Fs={init:function(){this.setColour(As),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new W.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(W.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=W.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+")"},W.isNumber(n)&&W.isNumber(s)&&W.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 Ou=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]},Eu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Ru=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},gu=function(t,e){return["None",e.ORDER_ATOMIC]},Cu=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]},Au=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]},Lu=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]},Su=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Nu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Du=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},fu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Pu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Fu=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},vu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Yu=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]},bu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Vu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Xu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},yu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Uu=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Bu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Gu=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},wu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ku=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"},Hu=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},xu=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Wu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ku=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"},Ju=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]},ju=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"},Qu=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"},qu=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),W.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]},Pa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Fa=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},va=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Ya=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},ba=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Va=function(t,e){return'"},Xa=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},ya=function(){return this.getFieldValue("TEXT")+"\n"},Ua=function(t){return t.getFieldValue("TEXT")+"\n"},Ba=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Ga=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},wa=function(){return""},ka=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Ha=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.join("\n")},Wa.scrubNakedValue=function(t){return t+"\n"},Wa.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},Wa.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Wa.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=W.utils.string.wrap(o,Wa.COMMENT_WRAP-3),n+=Wa.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ka={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"]]}};Ka["BBC micro:bit"]=Ka.microbit;const Ja=Ka,ja=100,Qa={init:function(){this.jsonInit({colour:ja,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:W.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(W.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},qa={init:function(){this.jsonInit({colour:ja,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:W.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"}]})}},za={init:function(){this.setColour(ja),this.appendValueInput("PIN",Number).appendField(W.Msg.MIXLY_TONE).appendField(W.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(W.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(W.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(W.Msg.MIXLY_MILLIS).appendField(W.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new W.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Za={init:function(){this.setColour(ja),this.appendValueInput("PIN",Number).appendField(W.Msg.MIXLY_TONE).appendField(W.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(W.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},$a={init:function(){this.jsonInit({colour:ja,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:W.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(W.Msg.MIXLY_MICROBIT_Play_notes1)}},tr={init:function(){this.jsonInit({colour:ja,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:W.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"}]})}},er={init:function(){this.jsonInit({colour:ja,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:W.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Reset_music)}},ir={init:function(){this.setColour(ja),this.appendValueInput("PIN").appendField(W.Msg.MIXLY_NOTONE).appendField(W.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_NOTONE)}},nr={init:function(){this.jsonInit({colour:ja,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:W.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Get_current_tempo)}},sr={init:function(){this.setColour(ja),this.appendValueInput("TICKS").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(W.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(W.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},or={init:function(){this.setColour(ja),this.appendValueInput("VAR").setCheck(String).appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(W.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(W.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(W.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=W.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},_r={init:function(){this.setColour(ja),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ur={init:function(){this.setColour(ja),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ar={init:function(){this.setColour(ja),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},rr={init:function(){this.setColour(ja),this.appendValueInput("VAR").setCheck(String).appendField(W.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(W.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+W.Msg.MIXLY_MICROBIT_TYPE_STRING+W.Msg.MICROBIT_SPEECH_translation)}},pr={init:function(){this.setColour(ja),this.appendValueInput("PIN",Number).appendField(W.Msg.MIXLY_SERVO).appendField(W.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},lr={init:function(){this.appendValueInput("speed").setCheck(null).appendField(W.Msg.MIXLY_MOTOR).appendField(new W.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(W.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new W.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ja),this.setTooltip(""),this.setHelpUrl("")}},Ir={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(W.Msg.MIXLY_RGB_PIN_COUNT)}},Tr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(W.Msg.MIXLY_RGB_NUM_R_G_B)}},dr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(W.inputs.Align.RIGHT).appendField(new W.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},hr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.MIXLY_RGB),this.appendDummyInput().appendField(W.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(W.Msg.MIXLY_ESP32_MUSIC_WRI)}},Mr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.MIXLY_SETUP+" "+W.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(W.inputs.Align.RIGHT).appendField("TX#"),this.appendValueInput("TX").setAlign(W.inputs.Align.RIGHT).appendField("RX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var mr=[[W.Msg.MIXLY_MP3_PLAY,"play"],[W.Msg.MIXLY_MP3_PAUSE,"pause"],[W.Msg.MIXLY_MP3_NEXT,"next_track"],[W.Msg.MIXLY_MP3_PREV,"prev_track"],[W.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[W.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const cr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_STAT).appendField(new W.FieldDropdown(mr),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Or=[[W.Msg.MIXLY_MP3_LOOP_ALL,"0"],[W.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[W.Msg.MIXLY_MP3_LOOP_ONE,"2"],[W.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const Er={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_MP3_LOOP_MODE).appendField(W.Msg.MIXLY_STAT).appendField(new W.FieldDropdown(Or),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Rr=[[W.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[W.Msg.MIXLY_MP3_EQ_POP,"1"],[W.Msg.MIXLY_MP3_EQ_ROCK,"2"],[W.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[W.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[W.Msg.MIXLY_MP3_EQ_BASS,"5"]];const gr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_MP3_EQ_MODE).appendField(W.Msg.MIXLY_STAT).appendField(new W.FieldDropdown(Rr),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Cr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(W.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(W.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Ar={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(W.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()}},Lr={init:function(){this.setColour(ja),this.appendDummyInput("").appendField(W.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(W.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(W.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()}},Sr=140,Nr={init:function(){this.setColour(225),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[W.Msg.HTML_RESET,"reset"]]),"type").appendField(W.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=W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:W.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:W.Blockly.Msg.HTML_RESET}[e]+i}))}},Dr={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:W.Msg.MIXLY_MICROBIT_Switch_on_radio})}},fr={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:W.Msg.MIXLY_MICROBIT_Switch_off_radio})}},Pr={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:W.Msg.MIXLY_MICROBIT_Configure_radio1,message0:W.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"}]})}},Fr={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:W.Msg.MIXLY_MICROBIT_Reset_radio})}},vr={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:W.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Yr={init:function(){this.setColour(225),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_MSG,"send"],[W.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_Send_message1)}},br={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:W.Msg.MIXLY_MICROBIT_Receive_message,message0:W.Msg.MIXLY_MICROBIT_Receive_message})}},Vr={init:function(){this.setColour(225),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_MSG,"receive"],[W.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[W.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_Receive_message)}},Xr={init:function(){this.setColour(Sr),this.appendValueInput("RX",Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(W.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(W.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(W.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(Sr),this.appendValueInput("address").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(W.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(W.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new W.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},Ur={init:function(){this.setColour(Sr),this.appendValueInput("address").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(W.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new W.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},Br={init:function(){this.jsonInit({colour:Sr,nextStatement:null,previousStatement:null,message0:W.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:K.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:K.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:K.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},Gr={init:function(){this.setColour(Sr),this.appendValueInput("data").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},wr=180,kr={init:function(){this.jsonInit({colour:wr,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:W.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Clear_display)}},Hr={init:function(){this.setColour(wr),this.appendValueInput("x").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_GET).appendField(W.Msg.MIXLY_BRIGHTNESS).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(W.Msg.MIXLY_BRIGHTNESS1)}},xr={init:function(){this.setColour(wr),this.appendValueInput("x").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(W.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_BRIGHTNESS2)}},Wr={init:function(){this.setColour(wr),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(W.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},Kr={init:function(){this.setColour(wr),this.appendValueInput("data").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jr={init:function(){this.setColour(wr),this.appendValueInput("data").setCheck(String).appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(W.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(W.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jr={init:function(){this.setColour(wr),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(W.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.OLED_BITMAP)}},Qr={init:function(){this.jsonInit({colour:wr,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:W.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"}]})}},qr={init:function(){this.jsonInit({colour:wr,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:W.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(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+W.Msg.MIXLY_MICROBIT_Animate_images1)}},zr={init:function(){this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:wr,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:W.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(W.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},Zr={init:function(){this.jsonInit({colour:wr,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:W.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},$r={init:function(){this.setColour(wr),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[W.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(W.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=W.Msg.MIXLY_MICROBIT_monitor;return{on:W.Msg.MIXLY_MICROBIT_Turn_on_display,off:W.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},tp={init:function(){this.jsonInit({colour:wr,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:W.Msg.MIXLY_MICROBIT_Turn_off_display})}},ep={init:function(){this.jsonInit({colour:wr,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:W.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Display_is_on1)}},ip={init:function(){this.jsonInit({colour:wr,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:W.Msg.MIXLY_MICROBIT_Built_in_image1,message0:W.Msg.MIXLY_MICROBIT_Built_in_image})}},np={init:function(){this.jsonInit({colour:wr,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:W.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Copy_image1)}},sp={init:function(){this.jsonInit({colour:wr,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:W.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Invert_image1)}},op={init:function(){this.jsonInit({colour:wr,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:W.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(W.Msg.MIXLY_MICROBIT_Create_image1)}},_p={init:function(){var t=[[W.Msg.MIXLY_UP,"up"],[W.Msg.MIXLY_DOWN,"down"],[W.Msg.MIXLY_LEFT,"left"],[W.Msg.MIXLY_RIGHT,"right"]];this.setColour(wr),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(W.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(W.Msg.DISPLAY_IMAGE_LET2).appendField(new W.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(W.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(W.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=W.Msg.DISPLAY_IMAGE_LET,n=W.Msg.DISPLAY_IMAGE_LET2,s=W.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:W.Msg.MIXLY_UP,down:W.Msg.MIXLY_DOWN,left:W.Msg.MIXLY_LEFT,right:W.Msg.MIXLY_RIGHT}[t]+s}))}},up={init:function(){var t=[[W.Msg.MICROBIT_DISPLAY_UNION,"+"],[W.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(wr),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(W.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":W.Msg.MIXLY_MICROBIT_image_add,"-":W.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},ap={init:function(){this.setColour(wr),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(W.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(W.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},rp={init:function(){this.setColour(wr),this.appendValueInput("device").setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_SETUP).appendField(W.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(W.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(W.Msg.MIXLY_SETUP+W.Msg.MIXLY_DF_LCD+W.Msg.MIXLY_LCD_ADDRESS)}},pp={init:function(){this.setColour(wr),this.appendValueInput("row",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(W.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(W.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},lp={init:function(){this.setColour(wr),this.appendDummyInput().appendField(W.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new W.FieldDropdown([[W.Msg.MIXLY_ON,"on()"],[W.Msg.MIXLY_OFF,"off()"],[W.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[W.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[W.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 W.Msg.LISTS_SET_INDEX_SET+W.Msg.MIXLY_DF_LCD+{"on()":W.Msg.MIXLY_ON,"off()":W.Msg.MIXLY_OFF,"clear()":W.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":W.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":W.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},Ip={init:function(){this.appendDummyInput().appendField(W.Msg.MIXLY_DF_LCD+" OLED "+W.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(W.inputs.Align.RIGHT).appendField("(128*64) "+W.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(W.inputs.Align.RIGHT).appendField(W.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(wr),this.setTooltip(W.Msg.MIXLY_DF_LCD+W.Msg.OLEDDISPLAY+W.Msg.MIXLY_MICROBIT_TYPE_STRING)}},Tp={init:function(){var t=[[W.Msg.MIXLY_HEIGHT,"height"],[W.Msg.MIXLY_WIDTH,"width"]];this.setColour(wr),this.appendDummyInput().appendField(W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+W.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new W.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return W.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+W.Msg.MIXLY_MICROBIT_IMAGE+{height:W.Msg.MIXLY_HEIGHT,width:W.Msg.MIXLY_WIDTH}[t]}))}},dp={init:function(){this.setColour(wr),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new W.FieldDropdown([[W.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[W.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:W.Msg.MIXLY_LCD_STAT_CLEAR,1:W.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return W.Msg.MIXLY_DF_LCD+i[e]}))}},hp="#777777",Mp={init:function(){this.setColour(hp),this.appendDummyInput("").appendField("from ").appendField(new W.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new W.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mp={init:function(){this.setColour(hp),this.appendDummyInput("").appendField("import ").appendField(new W.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cp={init:function(){this.setColour(hp),this.appendDummyInput("").appendField(new W.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new W.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]},rd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},pd=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]}},ld=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"},Id=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"},Td=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},dd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},hd=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"},Md=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]},md=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]},cd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},Od=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},Ed=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"},Rd=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"},gd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},Cd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},Ad=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},Ld=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},Sd=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"},Nd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},Dd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},fd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},Pd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},Fd=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},vd=function(){return"control.reset()\n"},Yd=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||K.Profile.default.serial)+")\n"},bd=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||K.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||K.Profile.default.serial)+")\n"},Vd=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||K.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||K.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},Xd=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},yd=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},Ud=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Bd=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},Gd=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},wd=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},kd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},Hd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},xd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},Wd=function(){return"while True:\n pass\n"},Kd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},Jd=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(W.Variables,j),Object.assign(W.Procedures,Ln),W.Python=Wa,W.generator=Wa,K.Profile.default={},Object.assign(K.Profile,Ja),Object.assign(K.Profile.default,Ja.microbit),Object.assign(W.Blocks,e,i,n,s,o,_,u,a,r,p,l,I,T,N,D,f,P,F,v,Y,b,V),Object.assign(W.Python.forBlock,d,h,M,m,c,O,E,R,g,C,A,L,S,X,y,U,B,G,w,k,H,x)})(); \ No newline at end of file diff --git a/boards/default/micropython_nrf51822_mithoncc/main.bundle.js b/boards/default/micropython_nrf51822_mithoncc/main.bundle.js index 2e3806a5..8851f89c 100644 --- a/boards/default/micropython_nrf51822_mithoncc/main.bundle.js +++ b/boards/default/micropython_nrf51822_mithoncc/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>st,controls_typeLists:()=>ot,lists_zip:()=>_t,lists_zip_container:()=>ut,lists_zip_item:()=>at,unpack_iterable_object:()=>rt,variables_change:()=>it,variables_get:()=>tt,variables_global:()=>nt,variables_set:()=>et});var i={};t.r(i),t.d(i,{base_setup:()=>It,controls_delay:()=>Tt,controls_end_program:()=>dt,controls_except:()=>ft,controls_finally:()=>Nt,controls_flow_statements:()=>Et,controls_for:()=>Rt,controls_forEach:()=>mt,controls_for_range:()=>gt,controls_if:()=>ht,controls_if_else:()=>Lt,controls_if_elseif:()=>At,controls_if_if:()=>Ct,controls_lambda:()=>Pt,controls_main:()=>lt,controls_pass:()=>Ft,controls_range:()=>Mt,controls_repeat_ext:()=>Dt,controls_thread:()=>vt,controls_try:()=>St,controls_try_finally:()=>Ot,controls_whileUntil:()=>ct,do_while:()=>Yt,garbage_collection:()=>bt,get_mem_alloc:()=>Vt,get_mem_free:()=>Xt,get_unique_identifier:()=>yt});var n={};t.r(n),t.d(n,{base_map:()=>se,math_arithmetic:()=>kt,math_bit:()=>xt,math_constant:()=>Gt,math_constant_mp:()=>wt,math_constrain:()=>zt,math_dec:()=>Kt,math_indexer_number:()=>$t,math_map:()=>Zt,math_max_min:()=>jt,math_number:()=>Ut,math_number_base_conversion:()=>Qt,math_random:()=>qt,math_random_seed:()=>te,math_round:()=>ee,math_selfcalcu:()=>Ht,math_to_int:()=>Jt,math_trig:()=>Wt,text_to_number:()=>ie,text_to_number_skulpt:()=>ne,turn_to_int:()=>oe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>le,char_to_ascii:()=>Ie,number_to_text:()=>Te,os_system:()=>Be,text:()=>ue,text_capital:()=>ge,text_center:()=>Ce,text_char:()=>re,text_char_at:()=>Me,text_char_at2:()=>he,text_char_at3:()=>be,text_compareTo:()=>Ye,text_compare_to:()=>Re,text_create_with_container:()=>Pe,text_create_with_item:()=>Fe,text_encode:()=>Xe,text_equals_starts_ends:()=>Ee,text_eval:()=>ye,text_find:()=>Ae,text_format:()=>De,text_format_noreturn:()=>Ve,text_join:()=>pe,text_join_seq:()=>Le,text_length:()=>de,text_random_char:()=>me,text_replace:()=>Se,text_split:()=>fe,text_strip:()=>Ne,text_substring:()=>Oe,text_substring2:()=>ce,text_substring3:()=>ve,text_textarea:()=>ae});var o={};t.r(o),t.d(o,{list_many_input:()=>ui,list_tolist:()=>li,list_tolist2:()=>Oi,list_trig:()=>si,lists_2d_get_col_row_data:()=>He,lists_2d_get_data_with_col_row:()=>ke,lists_append_extend:()=>Qe,lists_change_to:()=>_i,lists_change_to_general:()=>ri,lists_clear:()=>ti,lists_create_with:()=>xe,lists_create_with2:()=>Ii,lists_create_with_container:()=>Ke,lists_create_with_item:()=>Je,lists_create_with_noreturn:()=>ai,lists_create_with_text:()=>We,lists_create_with_text2:()=>Ti,lists_del_general:()=>pi,lists_find:()=>ni,lists_getIndex3:()=>di,lists_getSublist3:()=>hi,lists_get_index:()=>Ge,lists_get_random_item:()=>qe,lists_get_random_sublist:()=>ze,lists_get_sublist:()=>we,lists_insert_value:()=>Ze,lists_insert_value2:()=>mi,lists_pop:()=>ii,lists_remove_at:()=>ei,lists_remove_at2:()=>ci,lists_reverse:()=>$e,lists_setIndex3:()=>Mi,lists_set_index:()=>je,lists_sort:()=>oi});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Vi,dicts_add_or_change:()=>fi,dicts_clear:()=>Pi,dicts_create_with:()=>Ri,dicts_create_with_container:()=>gi,dicts_create_with_item:()=>Ci,dicts_create_with_noreturn:()=>Bi,dicts_deldict:()=>bi,dicts_delete:()=>Ni,dicts_get:()=>Li,dicts_get_default:()=>Si,dicts_items:()=>Fi,dicts_keys:()=>Ai,dicts_length:()=>Yi,dicts_pop:()=>Xi,dicts_setdefault:()=>yi,dicts_to_json:()=>Gi,dicts_todict:()=>Ui,dicts_update:()=>Di,dicts_values:()=>vi,json_to_dicts:()=>wi});var u={};t.r(u),t.d(u,{logic_boolean:()=>Ji,logic_compare:()=>Hi,logic_compare_continous:()=>xi,logic_is:()=>zi,logic_is_in:()=>qi,logic_negate:()=>Ki,logic_null:()=>ji,logic_operation:()=>Wi,logic_tobool:()=>Zi,logic_true_or_false:()=>Qi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>gn,sdcard_use_spi_init:()=>Rn,storage_can_write_ornot:()=>an,storage_change_dir:()=>On,storage_close_file:()=>pn,storage_delete_file:()=>In,storage_file_seek:()=>hn,storage_file_tell:()=>dn,storage_file_write:()=>sn,storage_fileopen:()=>tn,storage_fileopen_new:()=>en,storage_fileopen_new_encoding:()=>nn,storage_get_a_line:()=>un,storage_get_contents:()=>_n,storage_get_contents_without_para:()=>on,storage_get_current_dir:()=>Mn,storage_get_file_size:()=>Tn,storage_get_filename:()=>rn,storage_is_file:()=>En,storage_list_all_files:()=>ln,storage_make_dir:()=>mn,storage_open_file_with_os:()=>$i,storage_rename:()=>cn});var r={};t.r(r),t.d(r,{procedures_callnoreturn:()=>Dn,procedures_callreturn:()=>Pn,procedures_defnoreturn:()=>Ln,procedures_defreturn:()=>Sn,procedures_ifreturn:()=>Fn,procedures_mutatorarg:()=>Nn,procedures_mutatorcontainer:()=>fn,procedures_return:()=>vn});var p={};t.r(p),t.d(p,{tuple_change_to:()=>xn,tuple_create_with:()=>bn,tuple_create_with_container:()=>Vn,tuple_create_with_item:()=>Xn,tuple_create_with_noreturn:()=>jn,tuple_create_with_text2:()=>yn,tuple_create_with_text_return:()=>Bn,tuple_del:()=>wn,tuple_find:()=>Wn,tuple_getIndex:()=>Un,tuple_getSublist:()=>Jn,tuple_get_random_item:()=>qn,tuple_get_sublist:()=>Qn,tuple_join:()=>kn,tuple_length:()=>Gn,tuple_max:()=>Hn,tuple_totuple:()=>zn,tuple_trig:()=>Kn});var l={};t.r(l),t.d(l,{set_add_discard:()=>us,set_clear:()=>ss,set_create_with:()=>$n,set_create_with_container:()=>ts,set_create_with_item:()=>es,set_create_with_text_return:()=>ps,set_length:()=>is,set_operate:()=>os,set_operate_update:()=>_s,set_pop:()=>ns,set_sub:()=>as,set_toset:()=>ls,set_update:()=>rs});var I={};t.r(I),t.d(I,{html_content:()=>Ms,html_content_more:()=>ms,html_document:()=>Ts,html_form:()=>Os,html_head_body:()=>hs,html_style:()=>cs,html_style_color:()=>Rs,html_style_content:()=>Es,html_text:()=>gs,html_title:()=>ds});var T={};t.r(T),t.d(T,{attribute_access:()=>Xs,function_call:()=>Ys,function_call_container:()=>bs,function_call_item:()=>Vs,raw_block:()=>Ls,raw_empty:()=>fs,raw_expression:()=>Ss,raw_table:()=>As,text_comment:()=>Ns,text_print_multiple:()=>Ps,text_print_multiple_container:()=>Fs,text_print_multiple_item:()=>vs,type_check:()=>Ds});var d={};t.r(d),t.d(d,{controls_type:()=>ws,controls_typeLists:()=>ks,lists_zip:()=>Hs,unpack_iterable_object:()=>xs,variables_change:()=>Us,variables_get:()=>ys,variables_global:()=>Gs,variables_set:()=>Bs});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>to,base_setup:()=>Ks,controls_delay:()=>$s,controls_flow_statements:()=>Zs,controls_for:()=>Qs,controls_forEach:()=>oo,controls_for_range:()=>qs,controls_if:()=>Js,controls_interrupts:()=>no,controls_lambda:()=>uo,controls_main:()=>Ws,controls_millis:()=>eo,controls_nointerrupts:()=>so,controls_pass:()=>ro,controls_range:()=>_o,controls_repeat:()=>co,controls_repeat_ext:()=>Io,controls_thread:()=>po,controls_try_finally:()=>js,controls_whileUntil:()=>zs,do_while:()=>lo,garbage_collection:()=>To,get_mem_alloc:()=>ho,get_mem_free:()=>Mo,get_unique_identifier:()=>mo,reset:()=>io,time_sleep:()=>ao});var M={};t.r(M),t.d(M,{base_map:()=>Uo,math_arithmetic:()=>Co,math_bit:()=>go,math_constant:()=>Eo,math_constant_mp:()=>Ro,math_constrain:()=>vo,math_dec:()=>fo,math_indexer_number:()=>Vo,math_map:()=>Fo,math_max_min:()=>Do,math_number:()=>Oo,math_number_base_conversion:()=>Yo,math_random:()=>Po,math_random_seed:()=>bo,math_round:()=>Xo,math_selfcalcu:()=>Ao,math_single:()=>Lo,math_to_int:()=>No,math_trig:()=>So,text_to_number:()=>yo,text_to_number_skulpt:()=>Bo,turn_to_int:()=>Go});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Wo,char_to_ascii:()=>Ko,number_to_text:()=>Jo,os_system:()=>M_,text:()=>wo,text_capital:()=>i_,text_center:()=>n_,text_char:()=>Ho,text_char_at:()=>qo,text_char_at2:()=>Qo,text_char_at3:()=>T_,text_compareTo:()=>I_,text_compare_to:()=>$o,text_encode:()=>d_,text_equals_starts_ends:()=>Zo,text_eval:()=>h_,text_find:()=>s_,text_format:()=>r_,text_format_noreturn:()=>p_,text_join:()=>xo,text_join_seq:()=>o_,text_length:()=>jo,text_random_char:()=>zo,text_replace:()=>__,text_split:()=>u_,text_strip:()=>a_,text_substring:()=>e_,text_substring2:()=>t_,text_substring3:()=>l_,text_textarea:()=>ko});var c={};t.r(c),t.d(c,{list_many_input:()=>X_,list_tolist:()=>J_,list_tolist2:()=>j_,list_trig:()=>Y_,lists_2d_get_col_row_data:()=>O_,lists_2d_get_data_with_col_row:()=>c_,lists_append_extend:()=>A_,lists_change_to:()=>V_,lists_change_to_general:()=>B_,lists_clear:()=>D_,lists_create_with:()=>E_,lists_create_with2:()=>G_,lists_create_with_noreturn:()=>y_,lists_create_with_text:()=>R_,lists_create_with_text2:()=>w_,lists_del_general:()=>U_,lists_find:()=>P_,lists_getIndex3:()=>k_,lists_getSublist3:()=>H_,lists_get_index:()=>g_,lists_get_random_item:()=>L_,lists_get_random_sublist:()=>S_,lists_get_sublist:()=>m_,lists_insert_value:()=>f_,lists_insert_value2:()=>W_,lists_pop:()=>v_,lists_remove_at:()=>F_,lists_remove_at2:()=>K_,lists_reverse:()=>N_,lists_setIndex3:()=>x_,lists_set_index:()=>C_,lists_sort:()=>b_});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>uu,dicts_add_or_change:()=>$_,dicts_clear:()=>iu,dicts_create_with:()=>Q_,dicts_create_with_noreturn:()=>pu,dicts_deldict:()=>_u,dicts_delete:()=>tu,dicts_get:()=>z_,dicts_get_default:()=>Z_,dicts_items:()=>nu,dicts_keys:()=>q_,dicts_length:()=>ou,dicts_pop:()=>au,dicts_setdefault:()=>ru,dicts_to_json:()=>Iu,dicts_todict:()=>lu,dicts_update:()=>eu,dicts_values:()=>su,json_to_dicts:()=>Tu});var E={};t.r(E),t.d(E,{logic_boolean:()=>cu,logic_compare:()=>du,logic_compare_continous:()=>hu,logic_is:()=>gu,logic_is_in:()=>Ru,logic_negate:()=>mu,logic_null:()=>Ou,logic_operation:()=>Mu,logic_tobool:()=>Cu,logic_true_or_false:()=>Eu});var R={};t.r(R),t.d(R,{sdcard_mount:()=>Ku,sdcard_use_spi_init:()=>Wu,storage_can_write_ornot:()=>vu,storage_change_dir:()=>Gu,storage_close_file:()=>bu,storage_delete_file:()=>Xu,storage_file_seek:()=>Uu,storage_file_tell:()=>Bu,storage_file_write:()=>Nu,storage_fileopen:()=>Lu,storage_fileopen_new:()=>Su,storage_fileopen_new_encoding:()=>fu,storage_get_a_line:()=>Fu,storage_get_contents:()=>Pu,storage_get_contents_without_para:()=>Du,storage_get_current_dir:()=>wu,storage_get_file_size:()=>yu,storage_get_filename:()=>Yu,storage_is_file:()=>xu,storage_list_all_files:()=>Vu,storage_make_dir:()=>ku,storage_open_file_with_os:()=>Au,storage_rename:()=>Hu});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>qu,procedures_callreturn:()=>Qu,procedures_defnoreturn:()=>ju,procedures_defreturn:()=>Ju,procedures_ifreturn:()=>zu,procedures_return:()=>Zu});var C={};t.r(C),t.d(C,{tuple_change_to:()=>ua,tuple_create_with:()=>$u,tuple_create_with_noreturn:()=>la,tuple_create_with_text2:()=>ta,tuple_create_with_text_return:()=>ea,tuple_del:()=>sa,tuple_find:()=>aa,tuple_getIndex:()=>ia,tuple_getSublist:()=>pa,tuple_get_random_item:()=>Ta,tuple_get_sublist:()=>Ia,tuple_join:()=>oa,tuple_length:()=>na,tuple_max:()=>_a,tuple_totuple:()=>da,tuple_trig:()=>ra});var A={};t.r(A),t.d(A,{set_add_discard:()=>Ra,set_clear:()=>ca,set_create_with:()=>ha,set_create_with_text_return:()=>Aa,set_length:()=>Ma,set_operate:()=>Oa,set_operate_update:()=>Ea,set_pop:()=>ma,set_sub:()=>ga,set_toset:()=>La,set_update:()=>Ca});var L={};t.r(L),t.d(L,{html_content:()=>Da,html_content_more:()=>Pa,html_document:()=>Sa,html_form:()=>va,html_head_body:()=>Na,html_style:()=>Fa,html_style_content:()=>Ya,html_text:()=>ba,html_title:()=>fa});var S={};t.r(S),t.d(S,{attribute_access:()=>wa,function_call:()=>Ga,raw_block:()=>Va,raw_empty:()=>ya,raw_expression:()=>Xa,raw_table:()=>Ba,type_check:()=>Ua});var f={};t.r(f),t.d(f,{MP3_CONTROL:()=>hr,MP3_EQ_MODE:()=>Or,MP3_INIT:()=>Tr,MP3_LOOP_MODE:()=>mr,MP3_PLAY_FOLDER:()=>gr,MP3_PLAY_NUM:()=>Rr,MP3_VOL:()=>Er,bit_motor_control:()=>ar,display_rgb:()=>pr,display_rgb2:()=>lr,display_rgb_init:()=>rr,display_rgb_show:()=>Ir,microbit_music_get_tempo:()=>tr,microbit_music_pitch:()=>Qa,microbit_music_pitch_delay:()=>ja,microbit_music_play_built_in:()=>Ka,microbit_music_play_built_in_easy:()=>Ja,microbit_music_play_list_of_notes:()=>qa,microbit_music_play_list_of_notes_easy:()=>za,microbit_music_reset:()=>Za,microbit_music_stop:()=>$a,servo_move:()=>ur,speech_pronounce_easy:()=>or,speech_say:()=>ir,speech_say_easy:()=>nr,speech_sing_easy:()=>sr,speech_translate:()=>_r,tone_set_tempo:()=>er});var N={};t.r(N),t.d(N,{i2c_init:()=>Yr,i2c_read:()=>br,i2c_write:()=>Vr,microbit_radio_config:()=>fr,microbit_radio_off:()=>Sr,microbit_radio_on:()=>Lr,microbit_radio_receive:()=>Fr,microbit_radio_reset:()=>Nr,microbit_radio_send_string:()=>Dr,radio_ons:()=>Ar,radio_receive_string:()=>vr,radio_send_string:()=>Pr,spi_init:()=>Xr,spi_write:()=>yr});var D={};t.r(D),t.d(D,{display_fill:()=>lp,display_image_size:()=>pp,group_lcd_init:()=>_p,group_lcd_power:()=>ap,group_lcd_print:()=>op,group_lcd_print2:()=>up,image_arithmetic:()=>sp,image_shift:()=>np,lp2i_u8g_draw_4strings:()=>rp,microbit_display_clear:()=>Ur,microbit_display_is_on:()=>Zr,microbit_display_off:()=>zr,microbit_display_on:()=>qr,microbit_display_scroll:()=>Qr,microbit_display_scroll_string_animation:()=>jr,microbit_display_show_animation:()=>Jr,microbit_display_show_default_image:()=>Kr,microbit_display_show_image:()=>Wr,microbit_image_builtins:()=>$r,microbit_image_copy:()=>tp,microbit_image_create:()=>ip,microbit_image_invert:()=>ep,monitor_bright_point:()=>wr,monitor_get_pixel:()=>Gr,monitor_scroll_string:()=>Hr,monitor_scroll_string_with_delay:()=>xr,monitor_show_image_or_string:()=>kr});var P={};t.r(P),t.d(P,{factory_block:()=>gp,factory_block_return:()=>Cp,factory_block_return_with_textarea:()=>Lp,factory_block_with_textarea:()=>Ap,factory_callMethod_noreturn:()=>Ep,factory_callMethod_return:()=>Rp,factory_create_with_container:()=>Mp,factory_create_with_item:()=>mp,factory_declare:()=>Op,factory_from_import:()=>Tp,factory_function_noreturn:()=>hp,factory_function_return:()=>cp,factory_import:()=>dp});var F={};t.r(F),t.d(F,{inout_analog_read:()=>Fp,inout_analog_write:()=>Dp,inout_analog_write_set:()=>Pp,inout_digital_read:()=>Np,inout_digital_write:()=>Yp,inout_highlow:()=>fp,sensor_pin_pressed:()=>vp});var v={};t.r(v),t.d(v,{actuator_motor_off:()=>Gp,actuator_motor_on:()=>Up,actuator_rgb:()=>Bp,actuator_rgb_color:()=>Xp,actuator_rgb_off:()=>yp,base_loop:()=>Vp,sensor_pin_near:()=>wp,sensor_while_btn_pressed:()=>kp,sensor_while_is_gesture:()=>Hp,sensor_while_is_near:()=>xp});var Y={};t.r(Y),t.d(Y,{pins_analog:()=>Jp,pins_axis:()=>tl,pins_brightness:()=>el,pins_builtinimg:()=>Zp,pins_button:()=>jp,pins_digital:()=>Kp,pins_imglist:()=>$p,pins_interrupt:()=>qp,pins_pwm:()=>Qp,pins_radio_datarate:()=>sl,pins_radio_power:()=>nl,pins_serial:()=>zp,pins_tone_notes:()=>il});var b={};t.r(b),t.d(b,{DS1307_init:()=>Nl,RTC_get_time:()=>Pl,RTC_set_date:()=>vl,RTC_set_time:()=>Fl,TCS34725_Get_RGB:()=>yl,controls_GestureLists:()=>Il,controls_attachGestureInterrupt:()=>ll,controls_attachGestureInterrupt2:()=>Tl,sensor_button_get_presses:()=>al,sensor_button_is_pressed:()=>_l,sensor_button_was_pressed:()=>ul,sensor_calibrate_compass:()=>Ol,sensor_compass_heading:()=>Rl,sensor_compass_reset:()=>Yl,sensor_current_gesture:()=>ml,sensor_current_gesture1:()=>rl,sensor_current_gesture2:()=>pl,sensor_distance_hrsc04:()=>Sl,sensor_distance_hrsc04_:()=>fl,sensor_field_strength:()=>Cl,sensor_get_acceleration:()=>dl,sensor_get_gestures:()=>Ml,sensor_hrsc04_init:()=>Vl,sensor_is_compass_calibrated:()=>El,sensor_light:()=>bl,sensor_light_level:()=>cl,sensor_magnetic:()=>Ll,sensor_rotation:()=>Al,sensor_set_acceleration:()=>hl,sensor_temperature:()=>gl});var V={};t.r(V),t.d(V,{IO_input:()=>Ql,IO_print:()=>ql,IO_print_inline:()=>zl,serial_any:()=>xl,serial_begin:()=>jl,serial_print:()=>Ul,serial_print_hex:()=>wl,serial_println:()=>Gl,serial_readline:()=>Wl,serial_readstr:()=>Hl,serial_readstr_until:()=>Kl,serial_receive_data_event:()=>kl,serial_softserial:()=>Jl});var X={};t.r(X),t.d(X,{Panic_with_status_code:()=>eI,base_delay:()=>$l,controls_millis:()=>tI,controls_uname:()=>nI,reset:()=>iI});var y={};t.r(y),t.d(y,{MP3_CONTROL:()=>LI,MP3_EQ_MODE:()=>fI,MP3_INIT:()=>AI,MP3_LOOP_MODE:()=>SI,MP3_PLAY_FOLDER:()=>PI,MP3_PLAY_NUM:()=>DI,MP3_VOL:()=>NI,bit_motor_control:()=>OI,display_rgb:()=>RI,display_rgb2:()=>gI,display_rgb_init:()=>EI,display_rgb_show:()=>CI,microbit_music_get_tempo:()=>lI,microbit_music_pitch:()=>uI,microbit_music_pitch_delay:()=>_I,microbit_music_play_built_in:()=>sI,microbit_music_play_built_in_easy:()=>oI,microbit_music_play_list_of_notes:()=>aI,microbit_music_reset:()=>rI,microbit_music_stop:()=>pI,servo_move:()=>cI,speech_pronounce_easy:()=>mI,speech_say:()=>dI,speech_say_easy:()=>hI,speech_sing_easy:()=>MI,speech_translate:()=>TI,tone_set_tempo:()=>II});var B={};t.r(B),t.d(B,{i2c_init:()=>UI,i2c_read:()=>GI,i2c_write:()=>wI,microbit_radio_config:()=>bI,microbit_radio_off:()=>YI,microbit_radio_on:()=>vI,microbit_radio_receive:()=>BI,microbit_radio_reset:()=>VI,radio_ons:()=>FI,radio_receive_string:()=>yI,radio_send_string:()=>XI,spi_init:()=>kI,spi_write:()=>HI});var U={};t.r(U),t.d(U,{display_fill:()=>MT,display_image_size:()=>hT,group_lcd_init:()=>lT,group_lcd_power:()=>TT,group_lcd_print:()=>pT,group_lcd_print2:()=>IT,image_arithmetic:()=>aT,image_shift:()=>uT,lp2i_u8g_draw_4strings:()=>dT,microbit_display_clear:()=>xI,microbit_display_is_on:()=>iT,microbit_display_on:()=>eT,microbit_display_scroll:()=>tT,microbit_display_scroll_string_animation:()=>rT,microbit_display_set_pixel:()=>KI,microbit_display_show_animation:()=>$I,microbit_display_show_default_image:()=>ZI,microbit_display_show_image:()=>zI,microbit_image_builtins:()=>nT,microbit_image_copy:()=>sT,microbit_image_create:()=>_T,microbit_image_invert:()=>oT,monitor_bright_point:()=>JI,monitor_get_pixel:()=>WI,monitor_scroll_string:()=>QI,monitor_scroll_string_with_delay:()=>qI,monitor_show_image_or_string:()=>jI});var G={};t.r(G),t.d(G,{factory_block:()=>AT,factory_block_return:()=>LT,factory_block_return_with_textarea:()=>fT,factory_block_with_textarea:()=>ST,factory_callMethod_noreturn:()=>gT,factory_callMethod_return:()=>CT,factory_declare:()=>RT,factory_from_import:()=>mT,factory_function_noreturn:()=>OT,factory_function_return:()=>ET,factory_import:()=>cT});var w={};t.r(w),t.d(w,{inout_analog_read:()=>YT,inout_analog_write:()=>FT,inout_analog_write_set:()=>vT,inout_digital_read:()=>PT,inout_digital_write:()=>DT,inout_highlow:()=>NT,sensor_pin_pressed:()=>bT});var k={};t.r(k),t.d(k,{actuator_motor_off:()=>wT,actuator_motor_on:()=>GT,actuator_rgb:()=>UT,actuator_rgb_color:()=>yT,actuator_rgb_off:()=>BT,base_loop:()=>XT,controls_repeat_ext:()=>KT,microbit_image_create:()=>VT,sensor_pin_near:()=>kT,sensor_while_btn_pressed:()=>HT,sensor_while_is_gesture:()=>xT,sensor_while_is_near:()=>WT});var H={};t.r(H),t.d(H,{pins_analog:()=>jT,pins_axis:()=>ed,pins_brightness:()=>id,pins_builtinimg:()=>$T,pins_button:()=>QT,pins_digital:()=>JT,pins_imglist:()=>td,pins_interrupt:()=>zT,pins_pwm:()=>qT,pins_radio_datarate:()=>od,pins_radio_power:()=>sd,pins_serial:()=>ZT,pins_tone_notes:()=>nd});var x={};t.r(x),t.d(x,{DS1307_init:()=>Nd,RTC_get_time:()=>Dd,RTC_set_date:()=>Fd,RTC_set_time:()=>Pd,TCS34725_Get_RGB:()=>Vd,controls_GestureLists:()=>rd,controls_attachGestureInterrupt:()=>pd,controls_attachGestureInterrupt2:()=>Td,sensor_button_get_presses:()=>ad,sensor_button_is_pressed:()=>_d,sensor_button_was_pressed:()=>ud,sensor_calibrate_compass:()=>Od,sensor_compass_heading:()=>Rd,sensor_compass_reset:()=>vd,sensor_current_gesture:()=>hd,sensor_current_gesture1:()=>ld,sensor_current_gesture2:()=>Id,sensor_distance_hrsc04:()=>Sd,sensor_distance_hrsc04_:()=>fd,sensor_field_strength:()=>Cd,sensor_get_acceleration:()=>Md,sensor_get_gestures:()=>dd,sensor_hrsc04_init:()=>bd,sensor_is_compass_calibrated:()=>Ed,sensor_light:()=>Yd,sensor_light_level:()=>cd,sensor_magnetic:()=>Ld,sensor_rotation:()=>Ad,sensor_set_acceleration:()=>md,sensor_temperature:()=>gd});var W={};t.r(W),t.d(W,{IO_input:()=>Kd,IO_print:()=>Jd,IO_print_inline:()=>jd,serial_any:()=>Gd,serial_begin:()=>Wd,serial_print:()=>Xd,serial_print_hex:()=>Bd,serial_println:()=>yd,serial_readline:()=>kd,serial_readstr:()=>wd,serial_readstr_until:()=>Hd,serial_receive_data_event:()=>Ud,serial_softserial:()=>xd});var K={};t.r(K),t.d(K,{Panic_with_status_code:()=>uh,base_delay:()=>_h,controls_end_program:()=>rh,controls_millis:()=>ah,controls_uname:()=>lh,reset:()=>ph,system_device_name:()=>sh,system_device_serial_number:()=>oh,system_event_bus_source:()=>ih,system_event_bus_value:()=>nh,system_on_event:()=>$d,system_raise_event:()=>Zd,system_reset:()=>qd,system_run_in_background:()=>Qd,system_timestamp:()=>th,system_value:()=>eh,system_wait:()=>zd});const J=Blockly,j=Mixly,Q={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}},q=Q; +(()=>{"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:()=>st,controls_typeLists:()=>ot,lists_zip:()=>_t,lists_zip_container:()=>ut,lists_zip_item:()=>at,unpack_iterable_object:()=>rt,variables_change:()=>it,variables_get:()=>tt,variables_global:()=>nt,variables_set:()=>et});var i={};t.r(i),t.d(i,{base_setup:()=>It,controls_delay:()=>Tt,controls_end_program:()=>dt,controls_except:()=>ft,controls_finally:()=>Nt,controls_flow_statements:()=>Et,controls_for:()=>Rt,controls_forEach:()=>mt,controls_for_range:()=>gt,controls_if:()=>ht,controls_if_else:()=>Lt,controls_if_elseif:()=>At,controls_if_if:()=>Ct,controls_lambda:()=>Pt,controls_main:()=>lt,controls_pass:()=>Ft,controls_range:()=>Mt,controls_repeat_ext:()=>Dt,controls_thread:()=>vt,controls_try:()=>St,controls_try_finally:()=>Ot,controls_whileUntil:()=>ct,datetime_fromtimestamp:()=>Ut,do_while:()=>Yt,garbage_collection:()=>bt,get_mem_alloc:()=>Vt,get_mem_free:()=>Xt,get_unique_identifier:()=>yt});var n={};t.r(n),t.d(n,{base_map:()=>oe,math_arithmetic:()=>Ht,math_bit:()=>Wt,math_constant:()=>wt,math_constant_mp:()=>kt,math_constrain:()=>Zt,math_dec:()=>Jt,math_indexer_number:()=>te,math_map:()=>$t,math_max_min:()=>Qt,math_number:()=>Gt,math_number_base_conversion:()=>qt,math_random:()=>zt,math_random_seed:()=>ee,math_round:()=>ie,math_selfcalcu:()=>xt,math_to_int:()=>jt,math_trig:()=>Kt,text_to_number:()=>ne,text_to_number_skulpt:()=>se,turn_to_int:()=>_e});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ie,char_to_ascii:()=>Te,number_to_text:()=>de,os_system:()=>Be,text:()=>ae,text_capital:()=>Ce,text_center:()=>Ae,text_char:()=>pe,text_char_at:()=>me,text_char_at2:()=>Me,text_char_at3:()=>Ve,text_compareTo:()=>be,text_compare_to:()=>ge,text_create_with_container:()=>Fe,text_create_with_item:()=>ve,text_encode:()=>ye,text_equals_starts_ends:()=>Re,text_eval:()=>Ue,text_find:()=>Le,text_format:()=>Pe,text_format_noreturn:()=>Xe,text_join:()=>le,text_join_seq:()=>Se,text_length:()=>he,text_random_char:()=>ce,text_replace:()=>fe,text_split:()=>Ne,text_strip:()=>De,text_substring:()=>Ee,text_substring2:()=>Oe,text_substring3:()=>Ye,text_textarea:()=>re});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Ri,enumerate:()=>gi,list_many_input:()=>ai,list_tolist:()=>Ii,list_tolist2:()=>Ei,list_trig:()=>oi,lists_2d_get_col_row_data:()=>xe,lists_2d_get_data_with_col_row:()=>He,lists_append_extend:()=>qe,lists_change_to:()=>ui,lists_change_to_general:()=>pi,lists_clear:()=>ei,lists_create_with:()=>We,lists_create_with2:()=>Ti,lists_create_with_container:()=>Je,lists_create_with_item:()=>je,lists_create_with_noreturn:()=>ri,lists_create_with_text:()=>Ke,lists_create_with_text2:()=>di,lists_del_general:()=>li,lists_find:()=>si,lists_getIndex3:()=>hi,lists_getSublist3:()=>Mi,lists_get_index:()=>we,lists_get_random_item:()=>ze,lists_get_random_sublist:()=>Ze,lists_get_sublist:()=>ke,lists_insert_value:()=>$e,lists_insert_value2:()=>ci,lists_pop:()=>ni,lists_remove_at:()=>ii,lists_remove_at2:()=>Oi,lists_reverse:()=>ti,lists_setIndex3:()=>mi,lists_set_index:()=>Qe,lists_sort:()=>_i});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Ui,dicts_add_or_change:()=>Pi,dicts_clear:()=>Yi,dicts_create_with:()=>Ai,dicts_create_with_container:()=>Li,dicts_create_with_item:()=>Si,dicts_create_with_noreturn:()=>wi,dicts_deldict:()=>yi,dicts_delete:()=>Fi,dicts_get:()=>Ni,dicts_get_default:()=>Di,dicts_items:()=>bi,dicts_keys:()=>fi,dicts_length:()=>Xi,dicts_pop:()=>Bi,dicts_setdefault:()=>Gi,dicts_to_json:()=>Hi,dicts_todict:()=>ki,dicts_update:()=>vi,dicts_values:()=>Vi,json_to_dicts:()=>xi});var u={};t.r(u),t.d(u,{logic_boolean:()=>qi,logic_compare:()=>Ki,logic_compare_continous:()=>Ji,logic_is:()=>tn,logic_is_in:()=>$i,logic_negate:()=>Qi,logic_null:()=>zi,logic_operation:()=>ji,logic_tobool:()=>en,logic_true_or_false:()=>Zi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Ln,sdcard_use_spi_init:()=>An,storage_can_write_ornot:()=>ln,storage_change_dir:()=>gn,storage_close_file:()=>Tn,storage_delete_file:()=>hn,storage_file_seek:()=>cn,storage_file_tell:()=>mn,storage_file_write:()=>un,storage_fileopen:()=>sn,storage_fileopen_new:()=>on,storage_fileopen_new_encoding:()=>_n,storage_get_a_line:()=>pn,storage_get_contents:()=>rn,storage_get_contents_without_para:()=>an,storage_get_current_dir:()=>On,storage_get_file_size:()=>Mn,storage_get_filename:()=>In,storage_is_file:()=>Cn,storage_list_all_files:()=>dn,storage_make_dir:()=>En,storage_open_file_with_os:()=>nn,storage_rename:()=>Rn});var r={};t.r(r),t.d(r,{procedures_callnoreturn:()=>vn,procedures_callreturn:()=>Yn,procedures_defnoreturn:()=>Nn,procedures_defreturn:()=>Dn,procedures_ifreturn:()=>bn,procedures_mutatorarg:()=>Fn,procedures_mutatorcontainer:()=>Pn,procedures_return:()=>Vn});var p={};t.r(p),t.d(p,{tuple_change_to:()=>Jn,tuple_create_with:()=>yn,tuple_create_with_container:()=>Un,tuple_create_with_item:()=>Bn,tuple_create_with_noreturn:()=>zn,tuple_create_with_text2:()=>Gn,tuple_create_with_text_return:()=>wn,tuple_del:()=>xn,tuple_find:()=>jn,tuple_getIndex:()=>kn,tuple_getSublist:()=>qn,tuple_get_random_item:()=>$n,tuple_get_sublist:()=>Zn,tuple_join:()=>Wn,tuple_length:()=>Hn,tuple_max:()=>Kn,tuple_totuple:()=>ts,tuple_trig:()=>Qn});var l={};t.r(l),t.d(l,{set_add_discard:()=>ps,set_clear:()=>us,set_create_with:()=>is,set_create_with_container:()=>ns,set_create_with_item:()=>ss,set_create_with_text_return:()=>Ts,set_length:()=>os,set_operate:()=>as,set_operate_update:()=>rs,set_pop:()=>_s,set_sub:()=>ls,set_toset:()=>ds,set_update:()=>Is});var I={};t.r(I),t.d(I,{html_content:()=>Os,html_content_more:()=>Es,html_document:()=>Ms,html_form:()=>gs,html_head_body:()=>cs,html_style:()=>Rs,html_style_color:()=>As,html_style_content:()=>Cs,html_text:()=>Ls,html_title:()=>ms});var T={};t.r(T),t.d(T,{attribute_access:()=>Bs,function_call:()=>Xs,function_call_container:()=>ys,function_call_item:()=>Us,raw_block:()=>Ns,raw_empty:()=>Ps,raw_expression:()=>Ds,raw_table:()=>fs,text_comment:()=>Fs,text_print_multiple:()=>Ys,text_print_multiple_container:()=>bs,text_print_multiple_item:()=>Vs,type_check:()=>vs});var d={};t.r(d),t.d(d,{controls_type:()=>xs,controls_typeLists:()=>Ws,lists_zip:()=>Ks,unpack_iterable_object:()=>Js,variables_change:()=>ks,variables_get:()=>Gs,variables_global:()=>Hs,variables_set:()=>ws});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>no,base_setup:()=>Qs,controls_delay:()=>io,controls_flow_statements:()=>eo,controls_for:()=>Zs,controls_forEach:()=>ao,controls_for_range:()=>$s,controls_if:()=>qs,controls_interrupts:()=>_o,controls_lambda:()=>po,controls_main:()=>js,controls_millis:()=>so,controls_nointerrupts:()=>uo,controls_pass:()=>Io,controls_range:()=>ro,controls_repeat:()=>Ro,controls_repeat_ext:()=>Mo,controls_thread:()=>To,controls_try_finally:()=>zs,controls_whileUntil:()=>to,datetime_fromtimestamp:()=>go,do_while:()=>ho,garbage_collection:()=>mo,get_mem_alloc:()=>co,get_mem_free:()=>Oo,get_unique_identifier:()=>Eo,reset:()=>oo,time_sleep:()=>lo});var M={};t.r(M),t.d(M,{base_map:()=>Ho,math_arithmetic:()=>fo,math_bit:()=>So,math_constant:()=>Ao,math_constant_mp:()=>Lo,math_constrain:()=>Xo,math_dec:()=>Fo,math_indexer_number:()=>Bo,math_map:()=>Vo,math_max_min:()=>Yo,math_number:()=>Co,math_number_base_conversion:()=>yo,math_random:()=>bo,math_random_seed:()=>Uo,math_round:()=>Go,math_selfcalcu:()=>No,math_single:()=>Do,math_to_int:()=>vo,math_trig:()=>Po,text_to_number:()=>wo,text_to_number_skulpt:()=>ko,turn_to_int:()=>xo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Qo,char_to_ascii:()=>qo,number_to_text:()=>zo,os_system:()=>E_,text:()=>Wo,text_capital:()=>__,text_center:()=>u_,text_char:()=>Jo,text_char_at:()=>t_,text_char_at2:()=>$o,text_char_at3:()=>m_,text_compareTo:()=>M_,text_compare_to:()=>n_,text_encode:()=>c_,text_equals_starts_ends:()=>i_,text_eval:()=>O_,text_find:()=>a_,text_format:()=>T_,text_format_noreturn:()=>d_,text_join:()=>jo,text_join_seq:()=>r_,text_length:()=>Zo,text_random_char:()=>e_,text_replace:()=>p_,text_split:()=>l_,text_strip:()=>I_,text_substring:()=>o_,text_substring2:()=>s_,text_substring3:()=>h_,text_textarea:()=>Ko});var c={};t.r(c),t.d(c,{enumerate:()=>$_,list_many_input:()=>G_,list_tolist:()=>z_,list_tolist2:()=>Z_,list_trig:()=>y_,lists_2d_get_col_row_data:()=>C_,lists_2d_get_data_with_col_row:()=>g_,lists_append_extend:()=>N_,lists_change_to:()=>B_,lists_change_to_general:()=>k_,lists_clear:()=>Y_,lists_create_with:()=>A_,lists_create_with2:()=>x_,lists_create_with_noreturn:()=>w_,lists_create_with_text:()=>L_,lists_create_with_text2:()=>W_,lists_del_general:()=>H_,lists_find:()=>b_,lists_getIndex3:()=>K_,lists_getSublist3:()=>J_,lists_get_index:()=>S_,lists_get_random_item:()=>D_,lists_get_random_sublist:()=>P_,lists_get_sublist:()=>R_,lists_insert_value:()=>F_,lists_insert_value2:()=>Q_,lists_pop:()=>X_,lists_remove_at:()=>V_,lists_remove_at2:()=>q_,lists_reverse:()=>v_,lists_setIndex3:()=>j_,lists_set_index:()=>f_,lists_sort:()=>U_});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Iu,dicts_add_or_change:()=>su,dicts_clear:()=>uu,dicts_create_with:()=>tu,dicts_create_with_noreturn:()=>hu,dicts_deldict:()=>lu,dicts_delete:()=>ou,dicts_get:()=>iu,dicts_get_default:()=>nu,dicts_items:()=>au,dicts_keys:()=>eu,dicts_length:()=>pu,dicts_pop:()=>Tu,dicts_setdefault:()=>du,dicts_to_json:()=>mu,dicts_todict:()=>Mu,dicts_update:()=>_u,dicts_values:()=>ru,json_to_dicts:()=>cu});var E={};t.r(E),t.d(E,{logic_boolean:()=>Cu,logic_compare:()=>Ou,logic_compare_continous:()=>Eu,logic_is:()=>fu,logic_is_in:()=>Su,logic_negate:()=>gu,logic_null:()=>Au,logic_operation:()=>Ru,logic_tobool:()=>Nu,logic_true_or_false:()=>Lu});var R={};t.r(R),t.d(R,{sdcard_mount:()=>zu,sdcard_use_spi_init:()=>qu,storage_can_write_ornot:()=>yu,storage_change_dir:()=>Wu,storage_close_file:()=>Bu,storage_delete_file:()=>wu,storage_file_seek:()=>xu,storage_file_tell:()=>Hu,storage_file_write:()=>Yu,storage_fileopen:()=>Pu,storage_fileopen_new:()=>Fu,storage_fileopen_new_encoding:()=>vu,storage_get_a_line:()=>Xu,storage_get_contents:()=>Vu,storage_get_contents_without_para:()=>bu,storage_get_current_dir:()=>Ku,storage_get_file_size:()=>ku,storage_get_filename:()=>Uu,storage_is_file:()=>Qu,storage_list_all_files:()=>Gu,storage_make_dir:()=>Ju,storage_open_file_with_os:()=>Du,storage_rename:()=>ju});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>ea,procedures_callreturn:()=>ta,procedures_defnoreturn:()=>$u,procedures_defreturn:()=>Zu,procedures_ifreturn:()=>ia,procedures_return:()=>na});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ia,tuple_create_with:()=>sa,tuple_create_with_noreturn:()=>Ma,tuple_create_with_text2:()=>oa,tuple_create_with_text_return:()=>_a,tuple_del:()=>ra,tuple_find:()=>Ta,tuple_getIndex:()=>ua,tuple_getSublist:()=>ha,tuple_get_random_item:()=>ca,tuple_get_sublist:()=>ma,tuple_join:()=>pa,tuple_length:()=>aa,tuple_max:()=>la,tuple_totuple:()=>Oa,tuple_trig:()=>da});var A={};t.r(A),t.d(A,{set_add_discard:()=>Sa,set_clear:()=>Ca,set_create_with:()=>Ea,set_create_with_text_return:()=>Da,set_length:()=>Ra,set_operate:()=>Aa,set_operate_update:()=>La,set_pop:()=>ga,set_sub:()=>fa,set_toset:()=>Pa,set_update:()=>Na});var L={};t.r(L),t.d(L,{html_content:()=>ba,html_content_more:()=>Va,html_document:()=>Fa,html_form:()=>ya,html_head_body:()=>Ya,html_style:()=>Xa,html_style_content:()=>Ua,html_text:()=>Ba,html_title:()=>va});var S={};t.r(S),t.d(S,{attribute_access:()=>Ka,function_call:()=>Wa,raw_block:()=>Ga,raw_empty:()=>ka,raw_expression:()=>wa,raw_table:()=>Ha,type_check:()=>xa});var f={};t.r(f),t.d(f,{MP3_CONTROL:()=>Er,MP3_EQ_MODE:()=>Ar,MP3_INIT:()=>cr,MP3_LOOP_MODE:()=>gr,MP3_PLAY_FOLDER:()=>fr,MP3_PLAY_NUM:()=>Sr,MP3_VOL:()=>Lr,bit_motor_control:()=>Tr,display_rgb:()=>hr,display_rgb2:()=>Mr,display_rgb_init:()=>dr,display_rgb_show:()=>mr,microbit_music_get_tempo:()=>or,microbit_music_pitch:()=>tr,microbit_music_pitch_delay:()=>$a,microbit_music_play_built_in:()=>za,microbit_music_play_built_in_easy:()=>Za,microbit_music_play_list_of_notes:()=>er,microbit_music_play_list_of_notes_easy:()=>ir,microbit_music_reset:()=>nr,microbit_music_stop:()=>sr,servo_move:()=>Ir,speech_pronounce_easy:()=>pr,speech_say:()=>ur,speech_say_easy:()=>ar,speech_sing_easy:()=>rr,speech_translate:()=>lr,tone_set_tempo:()=>_r});var N={};t.r(N),t.d(N,{i2c_init:()=>Ur,i2c_read:()=>Br,i2c_write:()=>Gr,microbit_radio_config:()=>vr,microbit_radio_off:()=>Fr,microbit_radio_on:()=>Pr,microbit_radio_receive:()=>Xr,microbit_radio_reset:()=>Yr,microbit_radio_send_string:()=>br,radio_ons:()=>Dr,radio_receive_string:()=>yr,radio_send_string:()=>Vr,spi_init:()=>wr,spi_write:()=>kr});var D={};t.r(D),t.d(D,{display_fill:()=>Mp,display_image_size:()=>hp,group_lcd_init:()=>lp,group_lcd_power:()=>Tp,group_lcd_print:()=>pp,group_lcd_print2:()=>Ip,image_arithmetic:()=>rp,image_shift:()=>ap,lp2i_u8g_draw_4strings:()=>dp,microbit_display_clear:()=>xr,microbit_display_is_on:()=>np,microbit_display_off:()=>ip,microbit_display_on:()=>ep,microbit_display_scroll:()=>tp,microbit_display_scroll_string_animation:()=>$r,microbit_display_show_animation:()=>Zr,microbit_display_show_default_image:()=>zr,microbit_display_show_image:()=>qr,microbit_image_builtins:()=>sp,microbit_image_copy:()=>op,microbit_image_create:()=>up,microbit_image_invert:()=>_p,monitor_bright_point:()=>Kr,monitor_get_pixel:()=>Wr,monitor_scroll_string:()=>jr,monitor_scroll_string_with_delay:()=>Qr,monitor_show_image_or_string:()=>Jr});var P={};t.r(P),t.d(P,{factory_block:()=>fp,factory_block_return:()=>Np,factory_block_return_with_textarea:()=>Pp,factory_block_with_textarea:()=>Dp,factory_callMethod_noreturn:()=>Lp,factory_callMethod_return:()=>Sp,factory_create_with_container:()=>Rp,factory_create_with_item:()=>gp,factory_declare:()=>Ap,factory_from_import:()=>cp,factory_function_noreturn:()=>Ep,factory_function_return:()=>Cp,factory_import:()=>Op});var F={};t.r(F),t.d(F,{inout_analog_read:()=>Xp,inout_analog_write:()=>bp,inout_analog_write_set:()=>Vp,inout_digital_read:()=>Yp,inout_digital_write:()=>Up,inout_highlow:()=>vp,sensor_pin_pressed:()=>yp});var v={};t.r(v),t.d(v,{actuator_motor_off:()=>Wp,actuator_motor_on:()=>xp,actuator_rgb:()=>Hp,actuator_rgb_color:()=>wp,actuator_rgb_off:()=>kp,base_loop:()=>Gp,sensor_pin_near:()=>Kp,sensor_while_btn_pressed:()=>Jp,sensor_while_is_gesture:()=>jp,sensor_while_is_near:()=>Qp});var Y={};t.r(Y),t.d(Y,{pins_analog:()=>Zp,pins_axis:()=>ol,pins_brightness:()=>_l,pins_builtinimg:()=>nl,pins_button:()=>$p,pins_digital:()=>zp,pins_imglist:()=>sl,pins_interrupt:()=>el,pins_pwm:()=>tl,pins_radio_datarate:()=>rl,pins_radio_power:()=>al,pins_serial:()=>il,pins_tone_notes:()=>ul});var b={};t.r(b),t.d(b,{DS1307_init:()=>Yl,RTC_get_time:()=>Vl,RTC_set_date:()=>yl,RTC_set_time:()=>Xl,TCS34725_Get_RGB:()=>kl,controls_GestureLists:()=>ml,controls_attachGestureInterrupt:()=>Ml,controls_attachGestureInterrupt2:()=>cl,sensor_button_get_presses:()=>Tl,sensor_button_is_pressed:()=>ll,sensor_button_was_pressed:()=>Il,sensor_calibrate_compass:()=>Al,sensor_compass_heading:()=>Sl,sensor_compass_reset:()=>Ul,sensor_current_gesture:()=>gl,sensor_current_gesture1:()=>dl,sensor_current_gesture2:()=>hl,sensor_distance_hrsc04:()=>Fl,sensor_distance_hrsc04_:()=>vl,sensor_field_strength:()=>Nl,sensor_get_acceleration:()=>Ol,sensor_get_gestures:()=>Rl,sensor_hrsc04_init:()=>Gl,sensor_is_compass_calibrated:()=>Ll,sensor_light:()=>Bl,sensor_light_level:()=>Cl,sensor_magnetic:()=>Pl,sensor_rotation:()=>Dl,sensor_set_acceleration:()=>El,sensor_temperature:()=>fl});var V={};t.r(V),t.d(V,{IO_input:()=>tI,IO_print:()=>eI,IO_print_inline:()=>iI,serial_any:()=>Ql,serial_begin:()=>$l,serial_print:()=>xl,serial_print_hex:()=>Kl,serial_println:()=>Wl,serial_readline:()=>ql,serial_readstr:()=>jl,serial_readstr_until:()=>zl,serial_receive_data_event:()=>Jl,serial_softserial:()=>Zl});var X={};t.r(X),t.d(X,{Panic_with_status_code:()=>_I,base_delay:()=>sI,controls_millis:()=>oI,controls_uname:()=>aI,reset:()=>uI});var y={};t.r(y),t.d(y,{MP3_CONTROL:()=>PI,MP3_EQ_MODE:()=>vI,MP3_INIT:()=>DI,MP3_LOOP_MODE:()=>FI,MP3_PLAY_FOLDER:()=>VI,MP3_PLAY_NUM:()=>bI,MP3_VOL:()=>YI,bit_motor_control:()=>AI,display_rgb:()=>SI,display_rgb2:()=>fI,display_rgb_init:()=>LI,display_rgb_show:()=>NI,microbit_music_get_tempo:()=>MI,microbit_music_pitch:()=>II,microbit_music_pitch_delay:()=>lI,microbit_music_play_built_in:()=>rI,microbit_music_play_built_in_easy:()=>pI,microbit_music_play_list_of_notes:()=>TI,microbit_music_reset:()=>dI,microbit_music_stop:()=>hI,servo_move:()=>CI,speech_pronounce_easy:()=>gI,speech_say:()=>OI,speech_say_easy:()=>EI,speech_sing_easy:()=>RI,speech_translate:()=>cI,tone_set_tempo:()=>mI});var U={};t.r(U),t.d(U,{i2c_init:()=>xI,i2c_read:()=>WI,i2c_write:()=>KI,microbit_radio_config:()=>BI,microbit_radio_off:()=>UI,microbit_radio_on:()=>yI,microbit_radio_receive:()=>HI,microbit_radio_reset:()=>GI,radio_ons:()=>XI,radio_receive_string:()=>kI,radio_send_string:()=>wI,spi_init:()=>JI,spi_write:()=>jI});var B={};t.r(B),t.d(B,{display_fill:()=>RT,display_image_size:()=>ET,group_lcd_init:()=>MT,group_lcd_power:()=>cT,group_lcd_print:()=>hT,group_lcd_print2:()=>mT,image_arithmetic:()=>TT,image_shift:()=>IT,lp2i_u8g_draw_4strings:()=>OT,microbit_display_clear:()=>QI,microbit_display_is_on:()=>uT,microbit_display_on:()=>_T,microbit_display_scroll:()=>oT,microbit_display_scroll_string_animation:()=>dT,microbit_display_set_pixel:()=>zI,microbit_display_show_animation:()=>sT,microbit_display_show_default_image:()=>nT,microbit_display_show_image:()=>iT,microbit_image_builtins:()=>aT,microbit_image_copy:()=>rT,microbit_image_create:()=>lT,microbit_image_invert:()=>pT,monitor_bright_point:()=>ZI,monitor_get_pixel:()=>qI,monitor_scroll_string:()=>tT,monitor_scroll_string_with_delay:()=>eT,monitor_show_image_or_string:()=>$I});var G={};t.r(G),t.d(G,{factory_block:()=>DT,factory_block_return:()=>PT,factory_block_return_with_textarea:()=>vT,factory_block_with_textarea:()=>FT,factory_callMethod_noreturn:()=>fT,factory_callMethod_return:()=>NT,factory_declare:()=>ST,factory_from_import:()=>gT,factory_function_noreturn:()=>AT,factory_function_return:()=>LT,factory_import:()=>CT});var w={};t.r(w),t.d(w,{inout_analog_read:()=>UT,inout_analog_write:()=>XT,inout_analog_write_set:()=>yT,inout_digital_read:()=>VT,inout_digital_write:()=>bT,inout_highlow:()=>YT,sensor_pin_pressed:()=>BT});var k={};t.r(k),t.d(k,{actuator_motor_off:()=>KT,actuator_motor_on:()=>WT,actuator_rgb:()=>xT,actuator_rgb_color:()=>kT,actuator_rgb_off:()=>HT,base_loop:()=>wT,controls_repeat_ext:()=>zT,microbit_image_create:()=>GT,sensor_pin_near:()=>JT,sensor_while_btn_pressed:()=>jT,sensor_while_is_gesture:()=>QT,sensor_while_is_near:()=>qT});var H={};t.r(H),t.d(H,{pins_analog:()=>$T,pins_axis:()=>_d,pins_brightness:()=>ud,pins_builtinimg:()=>sd,pins_button:()=>td,pins_digital:()=>ZT,pins_imglist:()=>od,pins_interrupt:()=>id,pins_pwm:()=>ed,pins_radio_datarate:()=>pd,pins_radio_power:()=>rd,pins_serial:()=>nd,pins_tone_notes:()=>ad});var x={};t.r(x),t.d(x,{DS1307_init:()=>Yd,RTC_get_time:()=>bd,RTC_set_date:()=>Xd,RTC_set_time:()=>Vd,TCS34725_Get_RGB:()=>Gd,controls_GestureLists:()=>dd,controls_attachGestureInterrupt:()=>hd,controls_attachGestureInterrupt2:()=>cd,sensor_button_get_presses:()=>Td,sensor_button_is_pressed:()=>ld,sensor_button_was_pressed:()=>Id,sensor_calibrate_compass:()=>Ad,sensor_compass_heading:()=>Sd,sensor_compass_reset:()=>yd,sensor_current_gesture:()=>Ed,sensor_current_gesture1:()=>Md,sensor_current_gesture2:()=>md,sensor_distance_hrsc04:()=>Fd,sensor_distance_hrsc04_:()=>vd,sensor_field_strength:()=>Nd,sensor_get_acceleration:()=>Rd,sensor_get_gestures:()=>Od,sensor_hrsc04_init:()=>Bd,sensor_is_compass_calibrated:()=>Ld,sensor_light:()=>Ud,sensor_light_level:()=>Cd,sensor_magnetic:()=>Pd,sensor_rotation:()=>Dd,sensor_set_acceleration:()=>gd,sensor_temperature:()=>fd});var W={};t.r(W),t.d(W,{IO_input:()=>zd,IO_print:()=>Zd,IO_print_inline:()=>$d,serial_any:()=>Wd,serial_begin:()=>qd,serial_print:()=>wd,serial_print_hex:()=>Hd,serial_println:()=>kd,serial_readline:()=>Jd,serial_readstr:()=>Kd,serial_readstr_until:()=>jd,serial_receive_data_event:()=>xd,serial_softserial:()=>Qd});var K={};t.r(K),t.d(K,{Panic_with_status_code:()=>Ih,base_delay:()=>lh,controls_end_program:()=>dh,controls_millis:()=>Th,controls_uname:()=>Mh,reset:()=>hh,system_device_name:()=>rh,system_device_serial_number:()=>ph,system_event_bus_source:()=>uh,system_event_bus_value:()=>ah,system_on_event:()=>sh,system_raise_event:()=>nh,system_reset:()=>eh,system_run_in_background:()=>th,system_timestamp:()=>oh,system_value:()=>_h,system_wait:()=>ih});const J=Blockly,j=Mixly,Q={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}},q=Q; /** * @license * Visual Blocks Editor @@ -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 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(J.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(J.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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(J.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(J.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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(pt),this.appendValueInput("FROM").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.PYTHON_RANGE).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},mt={init:function(){this.setColour(pt),this.appendValueInput("LIST").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(J.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return J.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ct={init:function(){this.setColour(pt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(J.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new J.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(J.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:J.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:J.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Ot={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(J.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new J.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(J.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(J.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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(J.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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")}},Et={init:function(){this.setColour(pt);var t=new J.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:J.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:J.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(J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Rt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new J.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return J.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},gt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new J.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return J.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};ct.OPERATORS=[[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Et.OPERATORS=[[J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Ct={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(J.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},At={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Lt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(J.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},St={init:function(){this.setColour(pt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ft={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(J.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Nt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(J.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Dt={init:function(){this.jsonInit({message0:J.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:pt,tooltip:J.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:J.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Pt={init:function(){this.setColour(pt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_STAT),this.setOutput(!0)}},Ft={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},vt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(J.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Yt={init:function(){this.appendDummyInput().appendField(J.Msg.CONTROLS_REPEAT_TITLE_REPEAT+J.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(J.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new J.FieldDropdown([[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(pt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},bt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Xt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},yt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_GET+J.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(J.Msg.PROCEDURES_DEFRETURN_RETURN+J.Msg.MIXLY_GET_UNIQUE_IDEN)}},Bt=230;J.FieldTextInput.math_number_validator=function(t){return String(t)},J.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 Ut={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(new J.FieldTextInput("0",J.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(J.Msg.MATH_NUMBER_TOOLTIP)}},Gt={init:function(){this.setColour(Bt);this.appendDummyInput("").appendField(J.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new J.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},wt={init:function(){this.setColour(Bt);this.appendDummyInput("").appendField(J.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new J.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},kt={init:function(){this.setColour(Bt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.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:J.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:J.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:J.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:J.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:J.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ht={init:function(){this.setColour(Bt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.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:J.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:J.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:J.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:J.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:J.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},xt={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new J.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Wt={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new J.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:J.Msg.MATH_TRIG_TOOLTIP_SIN,COS:J.Msg.MATH_TRIG_TOOLTIP_COS,TAN:J.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:J.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:J.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:J.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:J.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Kt={init:function(){var t=[[J.Msg.MATH_BIN,"bin"],[J.Msg.MATH_OCT,"oct"],[J.Msg.MATH_HEX,"hex"]];this.setColour(Bt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new J.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:J.Msg.MATH_DEC_TOOLTIP_BIN,oct:J.Msg.MATH_DEC_TOOLTIP_OCT,hex:J.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Jt={init:function(){var t=[[J.Msg.LANG_MATH_TO_ROUND,"round"],[J.Msg.LANG_MATH_TO_CEIL,"ceil"],[J.Msg.LANG_MATH_TO_FLOOR,"floor"],[J.Msg.MATH_ABS,"fabs"],[J.Msg.MATH_SQRT,"sqrt"]];this.setColour(Bt),this.appendValueInput("A").setCheck(Number).appendField(new J.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:J.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:J.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:J.Msg.MATH_SINGLE_TOOLTIP_SQ,round:J.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:J.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:J.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},jt={init:function(){var t=[[J.Msg.MIXLY_MAX,"max"],[J.Msg.MIXLY_MIN,"min"]];this.setColour(Bt),this.appendValueInput("A").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(new J.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(J.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:J.Msg.MIXLY_TOOLTIP_MATH_MAX,min:J.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Qt={init:function(){var t=[[J.Msg.MATH_TWO,"two"],[J.Msg.MATH_EIGHT,"eight"],[J.Msg.MATH_TEN,"ten"],[J.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Bt),this.appendDummyInput("").appendField(J.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new J.FieldDropdown(t),"OP").appendField(J.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(J.Msg.MATH_ZHW).appendField(new J.FieldDropdown(t),"OP2").appendField(J.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:J.Msg.MATH_Before_two,eight:J.Msg.MATH_Before_eight,ten:J.Msg.MATH_Before_ten,sixteen:J.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:J.Msg.MATH_Behind_two,eight:J.Msg.MATH_Behind_eight,ten:J.Msg.MATH_Behind_ten,sixteen:J.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},qt={init:function(){var t=[[J.Msg.LANG_MATH_INT,"int"],[J.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Bt),this.setOutput(!0,Number),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_RANDOM).appendField(new J.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:J.Msg.LANG_MATH_INT,float:J.Msg.LANG_MATH_FLOAT_RANDOM};return J.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},zt={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(J.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(J.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(J.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(J.Msg.MATH_CONSTRAIN_TOOLTIP)}},Zt={init:function(){this.setColour(Bt),this.appendValueInput("NUM",Number).appendField(J.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(J.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(J.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_MATH_MAP)}},$t={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(new J.FieldTextInput("0",J.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(J.Msg.MATH_NUMBER_TOOLTIP)}},te={init:function(){this.setColour(Bt),this.appendValueInput("NUM").setCheck(Number).appendField(J.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ee={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(J.Msg.MATH_ROUND).appendField(J.Msg.TEXT_KEEP),this.appendDummyInput().appendField(J.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(J.Msg.MATH_ROUND_NEW_TOOLTIP)}},ie={init:function(){var t=[[J.Msg.MIXLY_TO_INT,"int"],[J.Msg.MIXLY_TO_FLOAT,"float"],[J.Msg.MIXLY_TO_BITES,"b"],[J.Msg.LANG_MATH_BYTE+J.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Bt),this.appendValueInput("VAR").appendField(new J.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:J.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:J.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:J.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ne={init:function(){var t=[[J.Msg.MIXLY_TO_INT,"int"],[J.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Bt),this.appendValueInput("VAR").appendField(new J.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:J.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:J.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},se=Zt,oe={init:function(){this.setColour(Bt),this.appendValueInput("VAR").appendField(J.Msg.LANG_MATH_BYTE+J.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},_e=160,ue={init:function(){this.setColour(_e),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new J.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(J.Msg.TEXT_TEXT_TOOLTIP)},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 J.FieldImage(e,12,12,'"')}},ae={init:function(){this.setColour(_e),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new J.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(J.Msg.TEXT_LINES_TOOLTIP)},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 J.FieldImage(e,12,12,'"')}};J.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 re={init:function(){this.setColour(_e),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new J.FieldTextInput("",J.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(J.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new J.FieldImage(e,7,12,'"')}},pe={init:function(){this.setColour(_e),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(J.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},le={init:function(){this.setColour(_e),this.appendValueInput("VAR").setCheck(Number).appendField(J.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ie={init:function(){this.setColour(_e),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Te={init:function(){this.setColour(_e),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},de={init:function(){this.setColour(_e),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},he={init:function(){this.WHERE_OPTIONS=[[J.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[J.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[J.Msg.TEXT_GET_INDEX_RANDOM+1+J.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(J.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(_e),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(J.Msg.LISTS_GET_INDEX_GET,"MODE"),J.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(J.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=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+J.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",J.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:J.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:J.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:J.Msg.TEXT_GET_INDEX_RANDOM};return J.Msg.PROCEDURES_DEFRETURN_RETURN+J.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+J.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==J.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),J.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(J.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new J.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"),J.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Me={init:function(){this.setHelpUrl(J.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(_e),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(J.Msg.LISTS_GET_INDEX_GET+" "+J.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(J.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(J.Msg.PROCEDURES_DEFRETURN_RETURN+J.Msg.MIXLY_MICROBIT_TYPE_STRING+J.Msg.LISTS_GET_INDEX_FROM_START+"n"+J.Msg.TEXT_CHARAT2)}},me={init:function(){this.setHelpUrl(J.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(_e),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(J.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(J.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ce={init:function(){this.WHERE_OPTIONS_1=[[J.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[J.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[J.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[J.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[J.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[J.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(J.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(_e),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(J.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(J.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==J.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==J.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),J.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(J.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new J.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(J.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(_e),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(J.Msg.LISTS_GET_INDEX_GET+" "+J.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(J.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(J.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(J.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Ee={init:function(){var t=[[J.Msg.MIXLY_EQUALS,"==="],[J.Msg.MIXLY_STARTSWITH,"startswith"],[J.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(_e),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new J.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Re={init:function(){this.setColour(_e),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(J.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_COMPARETO_HELP)}},ge={init:function(){var t=[[J.Msg.TEXT_UPPER,"upper"],[J.Msg.TEXT_TITLE,"title"],[J.Msg.TEXT_CAPITALIZE,"capitalize"],[J.Msg.TEXT_SWAPCASE,"swapcase"],[J.Msg.TEXT_LOWER,"lower"]];this.setColour(_e),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new J.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:J.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:J.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:J.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:J.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:J.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ce={init:function(){var t=[[J.Msg.TEXT_LJUST,"ljust"],[J.Msg.TEXT_CENTER,"center"],[J.Msg.TEXT_RJUST,"rjust"]];this.setColour(_e),this.appendValueInput("VAR").appendField(new J.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(J.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(J.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ae={init:function(){this.setColour(_e),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(J.Msg.MIXLY_MID+J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(J.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Le={init:function(){this.setColour(_e),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Se={init:function(){this.setColour(_e),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(J.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(J.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},fe={init:function(){this.setColour(_e),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(J.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(J.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Ne={init:function(){var t=[[J.Msg.TEXT_TRIM_BOTH,"strip"],[J.Msg.TEXT_TRIM_LEFT,"lstrip"],[J.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(_e),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(J.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new J.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(J.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:J.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:J.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:J.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},De={init:function(){this.setColour(_e),this.appendDummyInput("").appendField(J.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new J.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new J.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(J.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){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},gi={init:function(){this.setColour(Ei),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(J.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ci={init:function(){this.setColour(Ei),this.appendDummyInput().appendField(J.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Ai={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_KEYS),this.setTooltip(J.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Li={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(J.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(J.Msg.DICTS_GET_TOOLTIP)}},Si={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(J.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(J.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(J.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},fi={init:function(){this.setColour(Ei),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(J.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ni={init:function(){this.setColour(Ei),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(J.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_DELETE_TOOLTIP)}},Di={init:function(){this.setColour(Ei),this.appendValueInput("DICT2").setCheck("Dict").appendField(J.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(J.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(J.Msg.MIXLY_MID),this.setTooltip(J.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_CLEAR),this.setTooltip(J.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_ITEMS),this.setTooltip(J.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},vi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_VALUES),this.setTooltip(J.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Yi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.MIXLY_LENGTH),this.setTooltip(J.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},bi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_DELDICT),this.setTooltip(J.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vi={init:function(){this.MODE=[[J.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[J.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(J.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(J.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=J.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=J.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==J.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 J.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")}},Xi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(J.Msg.DICTS_ADD_VALUE),this.setTooltip(J.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},yi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(J.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Bi={init:function(){this.setColour(Ei),this.appendDummyInput("").appendField(new J.FieldLabel(J.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 J.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(J.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){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ui={init:function(){this.setColour(Ei),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Gi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.MIXLY_TO_JSON),this.setTooltip(J.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},wi={init:function(){this.setColour(Ei),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(J.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(J.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},ki=210,Hi={init:function(){var t=J.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(ki),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:J.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:J.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:J.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:J.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:J.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:J.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},xi={init:function(){var t=J.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=J.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(ki),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new J.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Wi={init:function(){var t=[[J.Msg.LOGIC_OPERATION_AND,"AND"],[J.Msg.LOGIC_OPERATION_OR,"OR"],[J.Msg.LOGIC_OPERATION_NOR,"NOR"],[J.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(ki),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new J.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:J.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:J.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:J.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:J.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Ki={init:function(){this.setColour(ki),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(J.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(J.Msg.LOGIC_NEGATE_TOOLTIP)}},Ji={init:function(){var t=[[J.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[J.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(ki),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new J.FieldDropdown(t),"BOOL"),this.setTooltip(J.Msg.LOGIC_BOOLEAN_TOOLTIP)}},ji={init:function(){this.setColour(ki),this.setOutput(!0),this.appendDummyInput().appendField(J.Msg.LOGIC_NULL),this.setTooltip(J.Msg.LOGIC_NULL_TOOLTIP)}},Qi={init:function(){this.setColour(ki),this.appendValueInput("A"),this.appendValueInput("B").appendField(J.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(J.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},qi={init:function(){var t=[[J.Msg.TEXT_APPEND_TO,"in"],[J.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(ki),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new J.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(J.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(J.Msg.IN)}},zi={init:function(){var t=[[J.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[J.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(ki),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Zi={init:function(){this.setColour(ki),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},$i={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(J.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(J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(J.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=J.Msg.MIXLY_USE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=J.Msg.MIXLY_BELONG;return i+{r:J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},en={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[J.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=J.Msg.MIXLY_USE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=J.Msg.MIXLY_BELONG,_=J.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},nn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(J.Msg.MIXPY_TEXT_ENCODE).appendField(new J.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=J.Msg.MIXLY_USE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=J.Msg.MIXLY_BELONG,_=J.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},sn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+J.Msg.MIXLY_MICROBIT_TYPE_STRING+J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},on={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},_n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:J.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},un={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(J.Msg.MICROBIT_PYTHON_TYPE)}},an={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.HTML_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},pn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},ln={init:function(){this.setColour(0),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};J.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const In={init:function(){this.setColour(0),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[J.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(J.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+J.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},dn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+J.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Mn={init:function(){this.setColour(0),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},mn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(J.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[J.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 J.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+J.Msg.MIXLY_ESP32_SET+{mkdir:J.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(J.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.HTML_FILE,"isfile"],[J.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 J.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+J.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:J.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Rn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(J.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(J.Msg.MIXLY_SETUP+J.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(J.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},gn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(J.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Cn={};Cn.NAME_TYPE=J.PROCEDURE_CATEGORY_NAME,Cn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(J.Msg.MIXLY_AIP_ATTR).setAlign(J.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(J.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Os={init:function(){this.setColour(Is),this.appendDummyInput().appendField(J.Msg.HTML_FORM_CONTENT).appendField(new J.FieldDropdown([[J.Msg.HTML_TEXT,"text"],[J.Msg.HTML_EMAIL,"email"],[J.Msg.HTML_NUMBER,"number"],[J.Msg.HTML_PASSWORD,"password"],[J.Msg.HTML_CHECKBOX,"checkbox"],[J.Msg.HTML_RADIOBUTTON,"radiobutton"],[J.Msg.HTML_BUTTON,"button"],[J.Msg.HTML_COLOUR,"colour"],[J.Msg.HTML_DATE,"date"],[J.Msg.HTML_LOCALTIME,"local time"],[J.Msg.HTML_FILE,"file"],[J.Msg.HTML_HIDDEN,"hidden"],[J.Msg.HTML_IMAGE,"image"],[J.Msg.HTML_MONTH,"month"],[J.Msg.HTML_RANGE,"range"],[J.Msg.HTML_RESET,"reset"],[J.Msg.HTML_SEARCH,"search"],[J.Msg.HTML_SUBMIT,"submit"],[J.Msg.HTML_TELEPHONENUMBER,"telephone number"],[J.Msg.HTML_TIME,"time"],[J.Msg.HTML_URL,"url"],[J.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(J.Msg.HTML_NAME).appendField(new J.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(J.Msg.HTML_VALUE).appendField(new J.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(J.Msg.MIXLY_AIP_ATTR).setAlign(J.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Es={init:function(){this.setColour(Is),this.appendDummyInput().appendField(new J.FieldTextInput("property"),"KEY").appendField(":").appendField(new J.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(new J.FieldTextInput("property"),"KEY").appendField(":").appendField(new J.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(J.Msg.HTML_TEXT).appendField(new J.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cs=160,As={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new J.FieldTable(""),"TEXT")}},Ls={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new J.FieldMultilineInput(""),"TEXT")}},Ss={init:function(){this.setColour(Cs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new J.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},fs={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Ns={init:function(){this.setColour(Cs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new J.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Ds={init:function(){this.setColour(Cs),this.appendValueInput("VALUE").appendField(J.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Ps={init:function(){this.setColour(Cs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new J.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(J.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=J.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+")"},J.isNumber(n)&&J.isNumber(s)&&J.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 Mu=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]},mu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},cu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Ou=function(t,e){return["None",e.ORDER_ATOMIC]},Eu=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]},Ru=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]},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]},Cu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Au=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Lu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Su=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},fu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Nu=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Du=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Pu=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]},Fu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},vu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Yu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},bu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Vu=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Xu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},yu=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Bu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Uu=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"},Gu=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},wu=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ku=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Hu=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"},xu=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]},Wu=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"},Ku=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"},Ju=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),J.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]},fa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Na=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},Da=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Pa=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Fa=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},va=function(t,e){return'"},Ya=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},ba=function(){return this.getFieldValue("TEXT")+"\n"},Va=function(t){return t.getFieldValue("TEXT")+"\n"},Xa=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},ya=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Ba=function(){return""},Ua=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Ga=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.join("\n")},ka.scrubNakedValue=function(t){return t+"\n"},ka.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},ka.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},ka.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=J.utils.string.wrap(o,ka.COMMENT_WRAP-3),n+=ka.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ha={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"]]}};Ha["Mithon CC"]=Ha.microbit;const xa=Ha,Wa=100,Ka={init:function(){this.jsonInit({colour:Wa,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:J.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(J.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},Ja={init:function(){this.jsonInit({colour:Wa,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:J.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"}]})}},ja={init:function(){this.setColour(Wa),this.appendValueInput("PIN",Number).appendField(J.Msg.MIXLY_TONE).appendField(J.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(J.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(J.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(J.Msg.MIXLY_MILLIS).appendField(J.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new J.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Qa={init:function(){this.setColour(Wa),this.appendValueInput("PIN",Number).appendField(J.Msg.MIXLY_TONE).appendField(J.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(J.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},qa={init:function(){this.jsonInit({colour:Wa,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:J.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(J.Msg.MIXLY_MICROBIT_Play_notes1)}},za={init:function(){this.jsonInit({colour:Wa,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:J.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"}]})}},Za={init:function(){this.jsonInit({colour:Wa,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:J.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Reset_music)}},$a={init:function(){this.setColour(Wa),this.appendValueInput("PIN").appendField(J.Msg.MIXLY_NOTONE).appendField(J.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_NOTONE)}},tr={init:function(){this.jsonInit({colour:Wa,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:J.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Get_current_tempo)}},er={init:function(){this.setColour(Wa),this.appendValueInput("TICKS").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(J.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(J.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},ir={init:function(){this.setColour(Wa),this.appendValueInput("VAR").setCheck(String).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(J.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(J.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(J.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=J.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},nr={init:function(){this.setColour(Wa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},sr={init:function(){this.setColour(Wa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},or={init:function(){this.setColour(Wa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_r={init:function(){this.setColour(Wa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+J.Msg.MIXLY_MICROBIT_TYPE_STRING+J.Msg.MICROBIT_SPEECH_translation)}},ur={init:function(){this.setColour(Wa),this.appendValueInput("PIN",Number).appendField(J.Msg.MIXLY_SERVO).appendField(J.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},ar={init:function(){this.appendValueInput("speed").setCheck(null).appendField(J.Msg.MIXLY_MOTOR).appendField(new J.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(J.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new J.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Wa),this.setTooltip(""),this.setHelpUrl("")}},rr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(J.Msg.MIXLY_RGB_PIN_COUNT)}},pr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(J.Msg.MIXLY_RGB_NUM_R_G_B)}},lr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(J.inputs.Align.RIGHT).appendField(new J.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ir={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendDummyInput().appendField(J.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(J.Msg.MIXLY_ESP32_MUSIC_WRI)}},Tr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.MIXLY_SETUP+" "+J.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(J.inputs.Align.RIGHT).appendField("RX#"),this.appendValueInput("TX").setAlign(J.inputs.Align.RIGHT).appendField("TX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var dr=[[J.Msg.MIXLY_MP3_PLAY,"play"],[J.Msg.MIXLY_MP3_PAUSE,"pause"],[J.Msg.MIXLY_MP3_NEXT,"next_track"],[J.Msg.MIXLY_MP3_PREV,"prev_track"],[J.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[J.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const hr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_STAT).appendField(new J.FieldDropdown(dr),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Mr=[[J.Msg.MIXLY_MP3_LOOP_ALL,"0"],[J.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[J.Msg.MIXLY_MP3_LOOP_ONE,"2"],[J.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const mr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_MP3_LOOP_MODE).appendField(J.Msg.MIXLY_STAT).appendField(new J.FieldDropdown(Mr),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var cr=[[J.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[J.Msg.MIXLY_MP3_EQ_POP,"1"],[J.Msg.MIXLY_MP3_EQ_ROCK,"2"],[J.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[J.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[J.Msg.MIXLY_MP3_EQ_BASS,"5"]];const Or={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_MP3_EQ_MODE).appendField(J.Msg.MIXLY_STAT).appendField(new J.FieldDropdown(cr),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Er={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(J.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Rr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(J.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()}},gr={init:function(){this.setColour(Wa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(J.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(J.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()}},Cr=140,Ar={init:function(){this.setColour(225),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[J.Msg.HTML_RESET,"reset"]]),"type").appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:J.Blockly.Msg.HTML_RESET}[e]+i}))}},Lr={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:J.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Sr={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:J.Msg.MIXLY_MICROBIT_Switch_off_radio})}},fr={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:J.Msg.MIXLY_MICROBIT_Configure_radio1,message0:J.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"}]})}},Nr={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:J.Msg.MIXLY_MICROBIT_Reset_radio})}},Dr={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:J.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Pr={init:function(){this.setColour(225),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_MSG,"send"],[J.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_Send_message1)}},Fr={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:J.Msg.MIXLY_MICROBIT_Receive_message,message0:J.Msg.MIXLY_MICROBIT_Receive_message})}},vr={init:function(){this.setColour(225),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_MSG,"receive"],[J.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[J.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_Receive_message)}},Yr={init:function(){this.setColour(Cr),this.appendValueInput("RX",Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(J.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(J.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(J.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(Cr),this.appendValueInput("address").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(J.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(J.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new J.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},Vr={init:function(){this.setColour(Cr),this.appendValueInput("address").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(J.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new J.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},Xr={init:function(){this.jsonInit({colour:Cr,nextStatement:null,previousStatement:null,message0:J.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:j.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:j.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:j.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},yr={init:function(){this.setColour(Cr),this.appendValueInput("data").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},Br=180,Ur={init:function(){this.jsonInit({colour:Br,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:J.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Clear_display)}},Gr={init:function(){this.setColour(Br),this.appendValueInput("x").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_GET).appendField(J.Msg.MIXLY_BRIGHTNESS).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_BRIGHTNESS1)}},wr={init:function(){this.setColour(Br),this.appendValueInput("x").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(J.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_BRIGHTNESS2)}},kr={init:function(){this.setColour(Br),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(J.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},Hr={init:function(){this.setColour(Br),this.appendValueInput("data").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(Br),this.appendValueInput("data").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(J.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(J.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wr={init:function(){this.setColour(Br),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(J.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.OLED_BITMAP)}},Kr={init:function(){this.jsonInit({colour:Br,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:J.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"}]})}},Jr={init:function(){this.jsonInit({colour:Br,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:J.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(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+J.Msg.MIXLY_MICROBIT_Animate_images1)}},jr={init:function(){this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:Br,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:J.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(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},Qr={init:function(){this.jsonInit({colour:Br,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:J.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},qr={init:function(){this.setColour(Br),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[J.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(J.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=J.Msg.MIXLY_MICROBIT_monitor;return{on:J.Msg.MIXLY_MICROBIT_Turn_on_display,off:J.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},zr={init:function(){this.jsonInit({colour:Br,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:J.Msg.MIXLY_MICROBIT_Turn_off_display})}},Zr={init:function(){this.jsonInit({colour:Br,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:J.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Display_is_on1)}},$r={init:function(){this.jsonInit({colour:Br,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:J.Msg.MIXLY_MICROBIT_Built_in_image1,message0:J.Msg.MIXLY_MICROBIT_Built_in_image})}},tp={init:function(){this.jsonInit({colour:Br,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:J.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Copy_image1)}},ep={init:function(){this.jsonInit({colour:Br,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:J.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Invert_image1)}},ip={init:function(){this.jsonInit({colour:Br,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:J.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Create_image1)}},np={init:function(){var t=[[J.Msg.MIXLY_UP,"up"],[J.Msg.MIXLY_DOWN,"down"],[J.Msg.MIXLY_LEFT,"left"],[J.Msg.MIXLY_RIGHT,"right"]];this.setColour(Br),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(J.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(J.Msg.DISPLAY_IMAGE_LET2).appendField(new J.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(J.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(J.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=J.Msg.DISPLAY_IMAGE_LET,n=J.Msg.DISPLAY_IMAGE_LET2,s=J.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:J.Msg.MIXLY_UP,down:J.Msg.MIXLY_DOWN,left:J.Msg.MIXLY_LEFT,right:J.Msg.MIXLY_RIGHT}[t]+s}))}},sp={init:function(){var t=[[J.Msg.MICROBIT_DISPLAY_UNION,"+"],[J.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(Br),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(J.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":J.Msg.MIXLY_MICROBIT_image_add,"-":J.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},op={init:function(){this.setColour(Br),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(J.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(J.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},_p={init:function(){this.setColour(Br),this.appendValueInput("device").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_SETUP).appendField(J.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(J.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_SETUP+J.Msg.MIXLY_DF_LCD+J.Msg.MIXLY_LCD_ADDRESS)}},up={init:function(){this.setColour(Br),this.appendValueInput("row",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(J.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(J.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},ap={init:function(){this.setColour(Br),this.appendDummyInput().appendField(J.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new J.FieldDropdown([[J.Msg.MIXLY_ON,"on()"],[J.Msg.MIXLY_OFF,"off()"],[J.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[J.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[J.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 J.Msg.LISTS_SET_INDEX_SET+J.Msg.MIXLY_DF_LCD+{"on()":J.Msg.MIXLY_ON,"off()":J.Msg.MIXLY_OFF,"clear()":J.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":J.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":J.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},rp={init:function(){this.appendDummyInput().appendField(J.Msg.MIXLY_DF_LCD+" OLED "+J.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(J.inputs.Align.RIGHT).appendField("(128*64) "+J.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Br),this.setTooltip(J.Msg.MIXLY_DF_LCD+J.Msg.OLEDDISPLAY+J.Msg.MIXLY_MICROBIT_TYPE_STRING)}},pp={init:function(){var t=[[J.Msg.MIXLY_HEIGHT,"height"],[J.Msg.MIXLY_WIDTH,"width"]];this.setColour(Br),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+J.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new J.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+J.Msg.MIXLY_MICROBIT_IMAGE+{height:J.Msg.MIXLY_HEIGHT,width:J.Msg.MIXLY_WIDTH}[t]}))}},lp={init:function(){this.setColour(Br),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[J.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:J.Msg.MIXLY_LCD_STAT_CLEAR,1:J.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return J.Msg.MIXLY_DF_LCD+i[e]}))}},Ip="#777777",Tp={init:function(){this.setColour(Ip),this.appendDummyInput("").appendField("from ").appendField(new J.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new J.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dp={init:function(){this.setColour(Ip),this.appendDummyInput("").appendField("import ").appendField(new J.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hp={init:function(){this.setColour(Ip),this.appendDummyInput("").appendField(new J.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new J.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},BT=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},UT=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"},GT=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},wT=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},kT=function(t,e){return["pin"+this.getFieldValue("NUMBER")+".read_analog()",e.ORDER_ATOMIC]},HT=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},xT=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},WT=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},KT=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)},JT=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},jT=JT,QT=JT,qT=JT,zT=JT,ZT=JT,$T=JT,td=JT,ed=JT,id=JT,nd=JT,sd=JT,od=JT,_d=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".is_pressed()",e.ORDER_ATOMIC]},ud=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".was_pressed()",e.ORDER_ATOMIC]},ad=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".get_presses()",e.ORDER_ATOMIC]},rd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['"'+this.getFieldValue("gesture")+'"',e.ORDER_ATOMIC]},pd=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)},ld=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.is_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},Id=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.was_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},Td=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)},dd=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]},hd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.current_gesture()",e.ORDER_ATOMIC]},Md=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.get_"+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},md=function(){return"input.setAccelerometerRange("+this.getFieldValue("key")+")\n"},cd=function(t,e){return["input.lightLevel()",e.ORDER_ATOMIC]},Od=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.calibrate()\n"},Ed=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.is_calibrated()",e.ORDER_ATOMIC]},Rd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.heading()",e.ORDER_ATOMIC]},gd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["temperature()",e.ORDER_ATOMIC]},Cd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass."+this.getFieldValue("compass")+"()",e.ORDER_ATOMIC]},Ad=function(t,e){return["input.rotation("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},Ld=function(t,e){return["input.magneticForce("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},Sd=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]},fd=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]},Nd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},Dd=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]}},Pd=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"},Fd=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"},vd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},Yd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},bd=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"},Vd=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]},Xd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},yd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},Bd=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"},Ud=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"},Gd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},wd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},kd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},Hd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},xd=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"},Wd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},Kd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},Jd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},jd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},Qd=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},qd=function(){return"control.reset()\n"},zd=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||j.Profile.default.serial)+")\n"},Zd=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||j.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||j.Profile.default.serial)+")\n"},$d=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||j.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||j.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},th=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},eh=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},ih=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},nh=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},sh=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},oh=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},_h=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},uh=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},ah=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},rh=function(){return"while True:\n pass\n"},ph=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},lh=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(J.Variables,q),Object.assign(J.Procedures,An),J.Python=ka,J.generator=ka,j.Profile.default={},Object.assign(j.Profile,xa),Object.assign(j.Profile.default,xa.microbit),Object.assign(J.Blocks,e,i,n,s,o,_,u,a,r,p,l,I,T,f,N,D,D,P,F,v,Y,b,V,X),Object.assign(J.Python.forBlock,d,h,M,m,c,O,E,R,g,C,A,L,S,y,B,U,U,G,w,k,H,x,W,K)})(); \ No newline at end of file +class z{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(J.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(J.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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(J.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(J.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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(pt),this.appendValueInput("FROM").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.PYTHON_RANGE).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},mt={init:function(){this.setColour(pt),this.appendValueInput("LIST").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(J.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return J.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ct={init:function(){this.setColour(pt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(J.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new J.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(J.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:J.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:J.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Ot={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(J.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new J.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(J.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(J.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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(J.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(J.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")}},Et={init:function(){this.setColour(pt);var t=new J.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:J.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:J.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(J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Rt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new J.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return J.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},gt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new J.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return J.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};ct.OPERATORS=[[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Et.OPERATORS=[[J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[J.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Ct={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(J.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},At={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Lt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(J.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},St={init:function(){this.setColour(pt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ft={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(J.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Nt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(J.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Dt={init:function(){this.jsonInit({message0:J.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:pt,tooltip:J.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:J.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Pt={init:function(){this.setColour(pt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(J.Msg.MIXLY_STAT),this.setOutput(!0)}},Ft={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},vt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(J.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Yt={init:function(){this.appendDummyInput().appendField(J.Msg.CONTROLS_REPEAT_TITLE_REPEAT+J.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(J.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new J.FieldDropdown([[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[J.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(pt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},bt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Xt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},yt={init:function(){this.setColour(pt),this.appendDummyInput().appendField(J.Msg.MIXLY_GET+J.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(J.Msg.PROCEDURES_DEFRETURN_RETURN+J.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ut={init:function(){this.setColour(pt),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(J.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Bt=230;J.FieldTextInput.math_number_validator=function(t){return String(t)},J.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 Gt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(new J.FieldTextInput("0",J.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(J.Msg.MATH_NUMBER_TOOLTIP)}},wt={init:function(){this.setColour(Bt);this.appendDummyInput("").appendField(J.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new J.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},kt={init:function(){this.setColour(Bt);this.appendDummyInput("").appendField(J.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new J.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:J.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Ht={init:function(){this.setColour(Bt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.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:J.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:J.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:J.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:J.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:J.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},xt={init:function(){this.setColour(Bt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.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:J.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:J.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:J.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:J.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:J.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:J.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Wt={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new J.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Kt={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new J.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:J.Msg.MATH_TRIG_TOOLTIP_SIN,COS:J.Msg.MATH_TRIG_TOOLTIP_COS,TAN:J.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:J.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:J.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:J.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:J.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Jt={init:function(){var t=[[J.Msg.MATH_BIN,"bin"],[J.Msg.MATH_OCT,"oct"],[J.Msg.MATH_HEX,"hex"]];this.setColour(Bt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new J.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:J.Msg.MATH_DEC_TOOLTIP_BIN,oct:J.Msg.MATH_DEC_TOOLTIP_OCT,hex:J.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},jt={init:function(){var t=[[J.Msg.LANG_MATH_TO_ROUND,"round"],[J.Msg.LANG_MATH_TO_CEIL,"ceil"],[J.Msg.LANG_MATH_TO_FLOOR,"floor"],[J.Msg.MATH_ABS,"fabs"],[J.Msg.MATH_SQRT,"sqrt"]];this.setColour(Bt),this.appendValueInput("A").setCheck(Number).appendField(new J.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:J.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:J.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:J.Msg.MATH_SINGLE_TOOLTIP_SQ,round:J.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:J.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:J.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Qt={init:function(){var t=[[J.Msg.MIXLY_MAX,"max"],[J.Msg.MIXLY_MIN,"min"]];this.setColour(Bt),this.appendValueInput("A").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(new J.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(J.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:J.Msg.MIXLY_TOOLTIP_MATH_MAX,min:J.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},qt={init:function(){var t=[[J.Msg.MATH_TWO,"two"],[J.Msg.MATH_EIGHT,"eight"],[J.Msg.MATH_TEN,"ten"],[J.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Bt),this.appendDummyInput("").appendField(J.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new J.FieldDropdown(t),"OP").appendField(J.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(J.Msg.MATH_ZHW).appendField(new J.FieldDropdown(t),"OP2").appendField(J.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:J.Msg.MATH_Before_two,eight:J.Msg.MATH_Before_eight,ten:J.Msg.MATH_Before_ten,sixteen:J.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:J.Msg.MATH_Behind_two,eight:J.Msg.MATH_Behind_eight,ten:J.Msg.MATH_Behind_ten,sixteen:J.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},zt={init:function(){var t=[[J.Msg.LANG_MATH_INT,"int"],[J.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Bt),this.setOutput(!0,Number),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_RANDOM).appendField(new J.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(J.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:J.Msg.LANG_MATH_INT,float:J.Msg.LANG_MATH_FLOAT_RANDOM};return J.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Zt={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(J.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(J.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(J.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(J.Msg.MATH_CONSTRAIN_TOOLTIP)}},$t={init:function(){this.setColour(Bt),this.appendValueInput("NUM",Number).appendField(J.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(J.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(J.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_MATH_MAP)}},te={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(new J.FieldTextInput("0",J.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(J.Msg.MATH_NUMBER_TOOLTIP)}},ee={init:function(){this.setColour(Bt),this.appendValueInput("NUM").setCheck(Number).appendField(J.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ie={init:function(){this.setColour(Bt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(J.Msg.MATH_ROUND).appendField(J.Msg.TEXT_KEEP),this.appendDummyInput().appendField(J.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(J.Msg.MATH_ROUND_NEW_TOOLTIP)}},ne={init:function(){var t=[[J.Msg.MIXLY_TO_INT,"int"],[J.Msg.MIXLY_TO_FLOAT,"float"],[J.Msg.MIXLY_TO_BITES,"b"],[J.Msg.LANG_MATH_BYTE+J.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Bt),this.appendValueInput("VAR").appendField(new J.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:J.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:J.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:J.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},se={init:function(){var t=[[J.Msg.MIXLY_TO_INT,"int"],[J.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Bt),this.appendValueInput("VAR").appendField(new J.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:J.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:J.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},oe=$t,_e={init:function(){this.setColour(Bt),this.appendValueInput("VAR").appendField(J.Msg.LANG_MATH_BYTE+J.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ue=160,ae={init:function(){this.setColour(ue),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new J.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(J.Msg.TEXT_TEXT_TOOLTIP)},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 J.FieldImage(e,12,12,'"')}},re={init:function(){this.setColour(ue),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new J.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(J.Msg.TEXT_LINES_TOOLTIP)},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 J.FieldImage(e,12,12,'"')}};J.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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(ue),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new J.FieldTextInput("",J.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(J.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new J.FieldImage(e,7,12,'"')}},le={init:function(){this.setColour(ue),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(J.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ie={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(Number).appendField(J.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Te={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},de={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},he={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Me={init:function(){this.WHERE_OPTIONS=[[J.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[J.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[J.Msg.TEXT_GET_INDEX_RANDOM+1+J.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(J.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(J.Msg.LISTS_GET_INDEX_GET,"MODE"),J.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(J.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=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=J.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+J.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",J.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:J.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:J.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:J.Msg.TEXT_GET_INDEX_RANDOM};return J.Msg.PROCEDURES_DEFRETURN_RETURN+J.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+J.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==J.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),J.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(J.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new J.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"),J.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},me={init:function(){this.setHelpUrl(J.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(J.Msg.LISTS_GET_INDEX_GET+" "+J.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(J.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(J.Msg.PROCEDURES_DEFRETURN_RETURN+J.Msg.MIXLY_MICROBIT_TYPE_STRING+J.Msg.LISTS_GET_INDEX_FROM_START+"n"+J.Msg.TEXT_CHARAT2)}},ce={init:function(){this.setHelpUrl(J.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(J.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(J.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Oe={init:function(){this.WHERE_OPTIONS_1=[[J.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[J.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[J.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[J.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[J.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[J.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(J.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(J.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(J.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==J.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==J.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),J.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(J.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new J.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"))}},Ee={init:function(){this.setHelpUrl(J.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(J.Msg.LISTS_GET_INDEX_GET+" "+J.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(J.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(J.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(J.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Re={init:function(){var t=[[J.Msg.MIXLY_EQUALS,"==="],[J.Msg.MIXLY_STARTSWITH,"startswith"],[J.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ue),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new J.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ge={init:function(){this.setColour(ue),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(J.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_COMPARETO_HELP)}},Ce={init:function(){var t=[[J.Msg.TEXT_UPPER,"upper"],[J.Msg.TEXT_TITLE,"title"],[J.Msg.TEXT_CAPITALIZE,"capitalize"],[J.Msg.TEXT_SWAPCASE,"swapcase"],[J.Msg.TEXT_LOWER,"lower"]];this.setColour(ue),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new J.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:J.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:J.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:J.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:J.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:J.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ae={init:function(){var t=[[J.Msg.TEXT_LJUST,"ljust"],[J.Msg.TEXT_CENTER,"center"],[J.Msg.TEXT_RJUST,"rjust"]];this.setColour(ue),this.appendValueInput("VAR").appendField(new J.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(J.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(J.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Le={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(J.Msg.MIXLY_MID+J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(J.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Se={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},fe={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(J.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(J.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Ne={init:function(){this.setColour(ue),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(J.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(J.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(J.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},De={init:function(){var t=[[J.Msg.TEXT_TRIM_BOTH,"strip"],[J.Msg.TEXT_TRIM_LEFT,"lstrip"],[J.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ue),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(J.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new J.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(J.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:J.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:J.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:J.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Pe={init:function(){this.setColour(ue),this.appendDummyInput("").appendField(J.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new J.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new J.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(J.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){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Li={init:function(){this.setColour(Ci),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(J.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Si={init:function(){this.setColour(Ci),this.appendDummyInput().appendField(J.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},fi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_KEYS),this.setTooltip(J.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Ni={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(J.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(J.Msg.DICTS_GET_TOOLTIP)}},Di={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(J.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(J.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(J.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Pi={init:function(){this.setColour(Ci),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(J.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Fi={init:function(){this.setColour(Ci),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(J.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_DELETE_TOOLTIP)}},vi={init:function(){this.setColour(Ci),this.appendValueInput("DICT2").setCheck("Dict").appendField(J.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(J.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(J.Msg.MIXLY_MID),this.setTooltip(J.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_CLEAR),this.setTooltip(J.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_ITEMS),this.setTooltip(J.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Vi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_VALUES),this.setTooltip(J.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Xi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.MIXLY_LENGTH),this.setTooltip(J.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},yi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.DICT_DELDICT),this.setTooltip(J.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ui={init:function(){this.MODE=[[J.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[J.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(J.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(J.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=J.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=J.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==J.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 J.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")}},Bi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(J.Msg.DICTS_ADD_VALUE),this.setTooltip(J.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Gi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(J.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(J.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.DICTS_SETDEFAULT_TOOLTIP)}},wi={init:function(){this.setColour(Ci),this.appendDummyInput("").appendField(new J.FieldLabel(J.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 J.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(J.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){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ki={init:function(){this.setColour(Ci),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Hi={init:function(){this.setColour(Ci),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(J.Msg.MIXLY_TO_JSON),this.setTooltip(J.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},xi={init:function(){this.setColour(Ci),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(J.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(J.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Wi=210,Ki={init:function(){var t=J.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 J.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:J.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:J.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:J.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:J.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:J.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:J.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Ji={init:function(){var t=J.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=J.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new J.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},ji={init:function(){var t=[[J.Msg.LOGIC_OPERATION_AND,"AND"],[J.Msg.LOGIC_OPERATION_OR,"OR"],[J.Msg.LOGIC_OPERATION_NOR,"NOR"],[J.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 J.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:J.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:J.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:J.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:J.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Qi={init:function(){this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(J.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(J.Msg.LOGIC_NEGATE_TOOLTIP)}},qi={init:function(){var t=[[J.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[J.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new J.FieldDropdown(t),"BOOL"),this.setTooltip(J.Msg.LOGIC_BOOLEAN_TOOLTIP)}},zi={init:function(){this.setColour(Wi),this.setOutput(!0),this.appendDummyInput().appendField(J.Msg.LOGIC_NULL),this.setTooltip(J.Msg.LOGIC_NULL_TOOLTIP)}},Zi={init:function(){this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").appendField(J.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(J.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},$i={init:function(){var t=[[J.Msg.TEXT_APPEND_TO,"in"],[J.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new J.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(J.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(J.Msg.IN)}},tn={init:function(){var t=[[J.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[J.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},en={init:function(){this.setColour(Wi),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(J.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},nn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(J.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(J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(J.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=J.Msg.MIXLY_USE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=J.Msg.MIXLY_BELONG;return i+{r:J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){J.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},on={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[J.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=J.Msg.MIXLY_USE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=J.Msg.MIXLY_BELONG,_=J.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},_n={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(J.Msg.MIXPY_TEXT_ENCODE).appendField(new J.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=J.Msg.MIXLY_USE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=J.Msg.MIXLY_BELONG,_=J.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:J.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:J.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:J.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},un={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+J.Msg.MIXLY_MICROBIT_TYPE_STRING+J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},an={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},rn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:J.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:J.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},pn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(J.Msg.MICROBIT_PYTHON_TYPE)}},ln={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.HTML_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},In={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},dn={init:function(){this.setColour(0),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};J.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const hn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[J.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(J.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+J.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+J.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:J.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},On={init:function(){this.setColour(0),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},En={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(J.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[J.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 J.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+J.Msg.MIXLY_ESP32_SET+{mkdir:J.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(J.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(J.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Cn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.HTML_FILE,"isfile"],[J.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 J.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+J.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:J.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},An={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(J.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(J.Msg.MIXLY_SETUP+J.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(J.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ln={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(J.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(J.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Sn={};Sn.NAME_TYPE=J.PROCEDURE_CATEGORY_NAME,Sn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),this.appendValueInput("style").appendField(J.Msg.MIXLY_AIP_ATTR).setAlign(J.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rs={init:function(){this.setColour(hs),this.appendDummyInput().appendField(J.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},gs={init:function(){this.setColour(hs),this.appendDummyInput().appendField(J.Msg.HTML_FORM_CONTENT).appendField(new J.FieldDropdown([[J.Msg.HTML_TEXT,"text"],[J.Msg.HTML_EMAIL,"email"],[J.Msg.HTML_NUMBER,"number"],[J.Msg.HTML_PASSWORD,"password"],[J.Msg.HTML_CHECKBOX,"checkbox"],[J.Msg.HTML_RADIOBUTTON,"radiobutton"],[J.Msg.HTML_BUTTON,"button"],[J.Msg.HTML_COLOUR,"colour"],[J.Msg.HTML_DATE,"date"],[J.Msg.HTML_LOCALTIME,"local time"],[J.Msg.HTML_FILE,"file"],[J.Msg.HTML_HIDDEN,"hidden"],[J.Msg.HTML_IMAGE,"image"],[J.Msg.HTML_MONTH,"month"],[J.Msg.HTML_RANGE,"range"],[J.Msg.HTML_RESET,"reset"],[J.Msg.HTML_SEARCH,"search"],[J.Msg.HTML_SUBMIT,"submit"],[J.Msg.HTML_TELEPHONENUMBER,"telephone number"],[J.Msg.HTML_TIME,"time"],[J.Msg.HTML_URL,"url"],[J.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(J.Msg.HTML_NAME).appendField(new J.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(J.Msg.HTML_VALUE).appendField(new J.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(J.Msg.MIXLY_AIP_ATTR).setAlign(J.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cs={init:function(){this.setColour(hs),this.appendDummyInput().appendField(new J.FieldTextInput("property"),"KEY").appendField(":").appendField(new J.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},As={init:function(){this.setColour(hs),this.appendDummyInput().appendField(new J.FieldTextInput("property"),"KEY").appendField(":").appendField(new J.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ls={init:function(){this.setColour(hs),this.appendDummyInput().appendField(J.Msg.HTML_TEXT).appendField(new J.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ss=160,fs={init:function(){this.setColour(Ss),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new J.FieldTable(""),"TEXT")}},Ns={init:function(){this.setColour(Ss),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new J.FieldMultilineInput(""),"TEXT")}},Ds={init:function(){this.setColour(Ss),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new J.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Ss),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Fs={init:function(){this.setColour(Ss),this.appendDummyInput().appendTitle("Comment:").appendTitle(new J.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},vs={init:function(){this.setColour(Ss),this.appendValueInput("VALUE").appendField(J.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Ys={init:function(){this.setColour(Ss),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new J.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(J.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=J.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+")"},J.isNumber(n)&&J.isNumber(s)&&J.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 Ru=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]},gu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Cu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Au=function(t,e){return["None",e.ORDER_ATOMIC]},Lu=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]},Su=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]},fu=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]},Nu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Du=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Pu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Fu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},vu=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Yu=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},bu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Vu=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]},Xu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},yu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Uu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Bu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Gu=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},wu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ku=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Hu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},xu=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"},Wu=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ku=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ju=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},ju=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"},Qu=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]},qu=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"},zu=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"},Zu=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),J.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]},va=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ya=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},ba=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Va=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Xa=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},ya=function(t,e){return'"},Ua=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Ba=function(){return this.getFieldValue("TEXT")+"\n"},Ga=function(t){return t.getFieldValue("TEXT")+"\n"},wa=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},ka=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Ha=function(){return""},xa=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Wa=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.join("\n")},Ja.scrubNakedValue=function(t){return t+"\n"},Ja.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},Ja.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Ja.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=J.utils.string.wrap(o,Ja.COMMENT_WRAP-3),n+=Ja.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const ja={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"]]}};ja["Mithon CC"]=ja.microbit;const Qa=ja,qa=100,za={init:function(){this.jsonInit({colour:qa,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:J.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(J.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},Za={init:function(){this.jsonInit({colour:qa,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:J.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"}]})}},$a={init:function(){this.setColour(qa),this.appendValueInput("PIN",Number).appendField(J.Msg.MIXLY_TONE).appendField(J.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(J.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(J.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(J.Msg.MIXLY_MILLIS).appendField(J.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new J.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},tr={init:function(){this.setColour(qa),this.appendValueInput("PIN",Number).appendField(J.Msg.MIXLY_TONE).appendField(J.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(J.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},er={init:function(){this.jsonInit({colour:qa,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:J.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(J.Msg.MIXLY_MICROBIT_Play_notes1)}},ir={init:function(){this.jsonInit({colour:qa,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:J.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"}]})}},nr={init:function(){this.jsonInit({colour:qa,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:J.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Reset_music)}},sr={init:function(){this.setColour(qa),this.appendValueInput("PIN").appendField(J.Msg.MIXLY_NOTONE).appendField(J.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_NOTONE)}},or={init:function(){this.jsonInit({colour:qa,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:J.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Get_current_tempo)}},_r={init:function(){this.setColour(qa),this.appendValueInput("TICKS").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(J.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(J.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},ur={init:function(){this.setColour(qa),this.appendValueInput("VAR").setCheck(String).appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(J.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(J.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(J.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=J.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},ar={init:function(){this.setColour(qa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},rr={init:function(){this.setColour(qa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},pr={init:function(){this.setColour(qa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},lr={init:function(){this.setColour(qa),this.appendValueInput("VAR").setCheck(String).appendField(J.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(J.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+J.Msg.MIXLY_MICROBIT_TYPE_STRING+J.Msg.MICROBIT_SPEECH_translation)}},Ir={init:function(){this.setColour(qa),this.appendValueInput("PIN",Number).appendField(J.Msg.MIXLY_SERVO).appendField(J.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},Tr={init:function(){this.appendValueInput("speed").setCheck(null).appendField(J.Msg.MIXLY_MOTOR).appendField(new J.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(J.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new J.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(qa),this.setTooltip(""),this.setHelpUrl("")}},dr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(J.Msg.MIXLY_RGB_PIN_COUNT)}},hr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(J.Msg.MIXLY_RGB_NUM_R_G_B)}},Mr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(J.inputs.Align.RIGHT).appendField(new J.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},mr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.MIXLY_RGB),this.appendDummyInput().appendField(J.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(J.Msg.MIXLY_ESP32_MUSIC_WRI)}},cr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.MIXLY_SETUP+" "+J.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(J.inputs.Align.RIGHT).appendField("RX#"),this.appendValueInput("TX").setAlign(J.inputs.Align.RIGHT).appendField("TX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Or=[[J.Msg.MIXLY_MP3_PLAY,"play"],[J.Msg.MIXLY_MP3_PAUSE,"pause"],[J.Msg.MIXLY_MP3_NEXT,"next_track"],[J.Msg.MIXLY_MP3_PREV,"prev_track"],[J.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[J.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const Er={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_STAT).appendField(new J.FieldDropdown(Or),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Rr=[[J.Msg.MIXLY_MP3_LOOP_ALL,"0"],[J.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[J.Msg.MIXLY_MP3_LOOP_ONE,"2"],[J.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const gr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_MP3_LOOP_MODE).appendField(J.Msg.MIXLY_STAT).appendField(new J.FieldDropdown(Rr),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Cr=[[J.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[J.Msg.MIXLY_MP3_EQ_POP,"1"],[J.Msg.MIXLY_MP3_EQ_ROCK,"2"],[J.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[J.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[J.Msg.MIXLY_MP3_EQ_BASS,"5"]];const Ar={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_MP3_EQ_MODE).appendField(J.Msg.MIXLY_STAT).appendField(new J.FieldDropdown(Cr),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Lr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(J.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(J.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Sr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(J.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()}},fr={init:function(){this.setColour(qa),this.appendDummyInput("").appendField(J.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(J.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(J.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()}},Nr=140,Dr={init:function(){this.setColour(225),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[J.Msg.HTML_RESET,"reset"]]),"type").appendField(J.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=J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:J.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:J.Blockly.Msg.HTML_RESET}[e]+i}))}},Pr={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:J.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Fr={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:J.Msg.MIXLY_MICROBIT_Switch_off_radio})}},vr={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:J.Msg.MIXLY_MICROBIT_Configure_radio1,message0:J.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"}]})}},Yr={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:J.Msg.MIXLY_MICROBIT_Reset_radio})}},br={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:J.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Vr={init:function(){this.setColour(225),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_MSG,"send"],[J.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_Send_message1)}},Xr={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:J.Msg.MIXLY_MICROBIT_Receive_message,message0:J.Msg.MIXLY_MICROBIT_Receive_message})}},yr={init:function(){this.setColour(225),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_MSG,"receive"],[J.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[J.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_Receive_message)}},Ur={init:function(){this.setColour(Nr),this.appendValueInput("RX",Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(J.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(J.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(J.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Br={init:function(){this.setColour(Nr),this.appendValueInput("address").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(J.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(J.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new J.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},Gr={init:function(){this.setColour(Nr),this.appendValueInput("address").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(J.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new J.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},wr={init:function(){this.jsonInit({colour:Nr,nextStatement:null,previousStatement:null,message0:J.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:j.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:j.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:j.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},kr={init:function(){this.setColour(Nr),this.appendValueInput("data").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},Hr=180,xr={init:function(){this.jsonInit({colour:Hr,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:J.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Clear_display)}},Wr={init:function(){this.setColour(Hr),this.appendValueInput("x").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_GET).appendField(J.Msg.MIXLY_BRIGHTNESS).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(J.Msg.MIXLY_BRIGHTNESS1)}},Kr={init:function(){this.setColour(Hr),this.appendValueInput("x").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(J.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_BRIGHTNESS2)}},Jr={init:function(){this.setColour(Hr),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(J.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},jr={init:function(){this.setColour(Hr),this.appendValueInput("data").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qr={init:function(){this.setColour(Hr),this.appendValueInput("data").setCheck(String).appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(J.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(J.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qr={init:function(){this.setColour(Hr),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(J.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.OLED_BITMAP)}},zr={init:function(){this.jsonInit({colour:Hr,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:J.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"}]})}},Zr={init:function(){this.jsonInit({colour:Hr,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:J.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(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+J.Msg.MIXLY_MICROBIT_Animate_images1)}},$r={init:function(){this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:Hr,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:J.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(J.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},tp={init:function(){this.jsonInit({colour:Hr,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:J.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},ep={init:function(){this.setColour(Hr),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[J.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(J.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=J.Msg.MIXLY_MICROBIT_monitor;return{on:J.Msg.MIXLY_MICROBIT_Turn_on_display,off:J.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},ip={init:function(){this.jsonInit({colour:Hr,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:J.Msg.MIXLY_MICROBIT_Turn_off_display})}},np={init:function(){this.jsonInit({colour:Hr,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:J.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Display_is_on1)}},sp={init:function(){this.jsonInit({colour:Hr,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:J.Msg.MIXLY_MICROBIT_Built_in_image1,message0:J.Msg.MIXLY_MICROBIT_Built_in_image})}},op={init:function(){this.jsonInit({colour:Hr,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:J.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Copy_image1)}},_p={init:function(){this.jsonInit({colour:Hr,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:J.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Invert_image1)}},up={init:function(){this.jsonInit({colour:Hr,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:J.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(J.Msg.MIXLY_MICROBIT_Create_image1)}},ap={init:function(){var t=[[J.Msg.MIXLY_UP,"up"],[J.Msg.MIXLY_DOWN,"down"],[J.Msg.MIXLY_LEFT,"left"],[J.Msg.MIXLY_RIGHT,"right"]];this.setColour(Hr),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(J.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(J.Msg.DISPLAY_IMAGE_LET2).appendField(new J.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(J.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(J.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=J.Msg.DISPLAY_IMAGE_LET,n=J.Msg.DISPLAY_IMAGE_LET2,s=J.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:J.Msg.MIXLY_UP,down:J.Msg.MIXLY_DOWN,left:J.Msg.MIXLY_LEFT,right:J.Msg.MIXLY_RIGHT}[t]+s}))}},rp={init:function(){var t=[[J.Msg.MICROBIT_DISPLAY_UNION,"+"],[J.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(Hr),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(J.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new J.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":J.Msg.MIXLY_MICROBIT_image_add,"-":J.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},pp={init:function(){this.setColour(Hr),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(J.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(J.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},lp={init:function(){this.setColour(Hr),this.appendValueInput("device").setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_SETUP).appendField(J.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(J.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(J.Msg.MIXLY_SETUP+J.Msg.MIXLY_DF_LCD+J.Msg.MIXLY_LCD_ADDRESS)}},Ip={init:function(){this.setColour(Hr),this.appendValueInput("row",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(J.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(J.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},Tp={init:function(){this.setColour(Hr),this.appendDummyInput().appendField(J.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new J.FieldDropdown([[J.Msg.MIXLY_ON,"on()"],[J.Msg.MIXLY_OFF,"off()"],[J.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[J.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[J.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 J.Msg.LISTS_SET_INDEX_SET+J.Msg.MIXLY_DF_LCD+{"on()":J.Msg.MIXLY_ON,"off()":J.Msg.MIXLY_OFF,"clear()":J.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":J.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":J.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},dp={init:function(){this.appendDummyInput().appendField(J.Msg.MIXLY_DF_LCD+" OLED "+J.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(J.inputs.Align.RIGHT).appendField("(128*64) "+J.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(J.inputs.Align.RIGHT).appendField(J.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Hr),this.setTooltip(J.Msg.MIXLY_DF_LCD+J.Msg.OLEDDISPLAY+J.Msg.MIXLY_MICROBIT_TYPE_STRING)}},hp={init:function(){var t=[[J.Msg.MIXLY_HEIGHT,"height"],[J.Msg.MIXLY_WIDTH,"width"]];this.setColour(Hr),this.appendDummyInput().appendField(J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+J.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new J.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return J.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+J.Msg.MIXLY_MICROBIT_IMAGE+{height:J.Msg.MIXLY_HEIGHT,width:J.Msg.MIXLY_WIDTH}[t]}))}},Mp={init:function(){this.setColour(Hr),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new J.FieldDropdown([[J.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[J.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:J.Msg.MIXLY_LCD_STAT_CLEAR,1:J.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return J.Msg.MIXLY_DF_LCD+i[e]}))}},mp="#777777",cp={init:function(){this.setColour(mp),this.appendDummyInput("").appendField("from ").appendField(new J.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new J.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Op={init:function(){this.setColour(mp),this.appendDummyInput("").appendField("import ").appendField(new J.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ep={init:function(){this.setColour(mp),this.appendDummyInput("").appendField(new J.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new J.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},HT=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},xT=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"},WT=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},KT=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},JT=function(t,e){return["pin"+this.getFieldValue("NUMBER")+".read_analog()",e.ORDER_ATOMIC]},jT=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},QT=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},qT=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},zT=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)},ZT=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},$T=ZT,td=ZT,ed=ZT,id=ZT,nd=ZT,sd=ZT,od=ZT,_d=ZT,ud=ZT,ad=ZT,rd=ZT,pd=ZT,ld=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".is_pressed()",e.ORDER_ATOMIC]},Id=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".was_pressed()",e.ORDER_ATOMIC]},Td=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".get_presses()",e.ORDER_ATOMIC]},dd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['"'+this.getFieldValue("gesture")+'"',e.ORDER_ATOMIC]},hd=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)},Md=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.is_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},md=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.was_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},cd=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)},Od=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]},Ed=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.current_gesture()",e.ORDER_ATOMIC]},Rd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.get_"+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},gd=function(){return"input.setAccelerometerRange("+this.getFieldValue("key")+")\n"},Cd=function(t,e){return["input.lightLevel()",e.ORDER_ATOMIC]},Ad=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.calibrate()\n"},Ld=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.is_calibrated()",e.ORDER_ATOMIC]},Sd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.heading()",e.ORDER_ATOMIC]},fd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["temperature()",e.ORDER_ATOMIC]},Nd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass."+this.getFieldValue("compass")+"()",e.ORDER_ATOMIC]},Dd=function(t,e){return["input.rotation("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},Pd=function(t,e){return["input.magneticForce("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},Fd=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]},vd=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]},Yd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},bd=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]}},Vd=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"},Xd=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"},yd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},Ud=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},Bd=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"},Gd=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]},wd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},kd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},Hd=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"},xd=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"},Wd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},Kd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},Jd=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},jd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},Qd=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"},qd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},zd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},Zd=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},$d=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},th=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},eh=function(){return"control.reset()\n"},ih=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||j.Profile.default.serial)+")\n"},nh=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||j.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||j.Profile.default.serial)+")\n"},sh=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||j.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||j.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},oh=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},_h=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},uh=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ah=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},rh=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},ph=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},lh=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},Ih=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},Th=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},dh=function(){return"while True:\n pass\n"},hh=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},Mh=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(J.Variables,q),Object.assign(J.Procedures,fn),J.Python=Ja,J.generator=Ja,j.Profile.default={},Object.assign(j.Profile,Qa),Object.assign(j.Profile.default,Qa.microbit),Object.assign(J.Blocks,e,i,n,s,o,_,u,a,r,p,l,I,T,f,N,D,D,P,F,v,Y,b,V,X),Object.assign(J.Python.forBlock,d,h,M,m,c,O,E,R,g,C,A,L,S,y,U,B,B,G,w,k,H,x,W,K)})(); \ No newline at end of file diff --git a/boards/default/micropython_robot/main.bundle.js b/boards/default/micropython_robot/main.bundle.js index 8eb8883e..0c393c18 100644 --- a/boards/default/micropython_robot/main.bundle.js +++ b/boards/default/micropython_robot/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>Mt,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:()=>bt,controls_for:()=>yt,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:()=>xt,controls_whileUntil:()=>Xt,do_while:()=>qt,garbage_collection:()=>zt,get_mem_alloc:()=>jt,get_mem_free:()=>Zt,get_unique_identifier:()=>$t});var n={};t.r(n),t.d(n,{base_map:()=>Re,math_arithmetic:()=>se,math_bit:()=>_e,math_constant:()=>ie,math_constant_mp:()=>ne,math_constrain:()=>Ie,math_dec:()=>ae,math_indexer_number:()=>he,math_map:()=>Te,math_max_min:()=>re,math_number:()=>ee,math_number_base_conversion:()=>le,math_random:()=>de,math_random_seed:()=>Me,math_round:()=>me,math_selfcalcu:()=>oe,math_to_int:()=>ue,math_trig:()=>pe,text_to_number:()=>Ee,text_to_number_skulpt:()=>Oe,turn_to_int:()=>ce});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ne,char_to_ascii:()=>De,number_to_text:()=>fe,os_system:()=>ti,text:()=>Ce,text_capital:()=>Ve,text_center:()=>Be,text_char:()=>Ae,text_char_at:()=>ve,text_char_at2:()=>Pe,text_char_at3:()=>ze,text_compareTo:()=>qe,text_compare_to:()=>ye,text_create_with_container:()=>Ke,text_create_with_item:()=>Je,text_encode:()=>Ze,text_equals_starts_ends:()=>be,text_eval:()=>$e,text_find:()=>Ge,text_format:()=>We,text_format_noreturn:()=>je,text_join:()=>Le,text_join_seq:()=>Ue,text_length:()=>Fe,text_random_char:()=>Ye,text_replace:()=>we,text_split:()=>ke,text_strip:()=>He,text_substring:()=>xe,text_substring2:()=>Xe,text_substring3:()=>Qe,text_textarea:()=>Se});var o={};t.r(o),t.d(o,{list_many_input:()=>Ci,list_tolist:()=>Ni,list_tolist2:()=>xi,list_trig:()=>Ri,lists_2d_get_col_row_data:()=>oi,lists_2d_get_data_with_col_row:()=>si,lists_append_extend:()=>li,lists_change_to:()=>gi,lists_change_to_general:()=>Ai,lists_clear:()=>Mi,lists_create_with:()=>_i,lists_create_with2:()=>Di,lists_create_with_container:()=>ai,lists_create_with_item:()=>ui,lists_create_with_noreturn:()=>Si,lists_create_with_text:()=>pi,lists_create_with_text2:()=>fi,lists_del_general:()=>Li,lists_find:()=>Oi,lists_getIndex3:()=>Fi,lists_getSublist3:()=>Pi,lists_get_index:()=>ii,lists_get_random_item:()=>di,lists_get_random_sublist:()=>Ii,lists_get_sublist:()=>ni,lists_insert_value:()=>Ti,lists_insert_value2:()=>Yi,lists_pop:()=>Ei,lists_remove_at:()=>mi,lists_remove_at2:()=>Xi,lists_reverse:()=>hi,lists_setIndex3:()=>vi,lists_set_index:()=>ri,lists_sort:()=>ci});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>ji,dicts_add_or_change:()=>ki,dicts_clear:()=>Ki,dicts_create_with:()=>yi,dicts_create_with_container:()=>Vi,dicts_create_with_item:()=>Bi,dicts_create_with_noreturn:()=>tn,dicts_deldict:()=>zi,dicts_delete:()=>Hi,dicts_get:()=>Ui,dicts_get_default:()=>wi,dicts_items:()=>Ji,dicts_keys:()=>Gi,dicts_length:()=>qi,dicts_pop:()=>Zi,dicts_setdefault:()=>$i,dicts_to_json:()=>nn,dicts_todict:()=>en,dicts_update:()=>Wi,dicts_values:()=>Qi,json_to_dicts:()=>sn});var p={};t.r(p),t.d(p,{logic_boolean:()=>rn,logic_compare:()=>_n,logic_compare_continous:()=>pn,logic_is:()=>Tn,logic_is_in:()=>In,logic_negate:()=>un,logic_null:()=>ln,logic_operation:()=>an,logic_tobool:()=>hn,logic_true_or_false:()=>dn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Vn,sdcard_use_spi_init:()=>yn,storage_can_write_ornot:()=>Sn,storage_change_dir:()=>xn,storage_close_file:()=>Ln,storage_delete_file:()=>Dn,storage_file_seek:()=>Pn,storage_file_tell:()=>Fn,storage_file_write:()=>Rn,storage_fileopen:()=>mn,storage_fileopen_new:()=>En,storage_fileopen_new_encoding:()=>On,storage_get_a_line:()=>Cn,storage_get_contents:()=>gn,storage_get_contents_without_para:()=>cn,storage_get_current_dir:()=>vn,storage_get_file_size:()=>fn,storage_get_filename:()=>An,storage_is_file:()=>bn,storage_list_all_files:()=>Nn,storage_make_dir:()=>Yn,storage_open_file_with_os:()=>Mn,storage_rename:()=>Xn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Wn,procedures_callreturn:()=>Kn,procedures_defnoreturn:()=>Un,procedures_defreturn:()=>wn,procedures_ifreturn:()=>Jn,procedures_mutatorarg:()=>Hn,procedures_mutatorcontainer:()=>kn,procedures_return:()=>Qn});var r={};t.r(r),t.d(r,{tuple_change_to:()=>_s,tuple_create_with:()=>zn,tuple_create_with_container:()=>jn,tuple_create_with_item:()=>Zn,tuple_create_with_noreturn:()=>rs,tuple_create_with_text2:()=>$n,tuple_create_with_text_return:()=>ts,tuple_del:()=>ns,tuple_find:()=>ps,tuple_getIndex:()=>es,tuple_getSublist:()=>us,tuple_get_random_item:()=>ds,tuple_get_sublist:()=>ls,tuple_join:()=>ss,tuple_length:()=>is,tuple_max:()=>os,tuple_totuple:()=>Is,tuple_trig:()=>as});var l={};t.r(l),t.d(l,{set_add_discard:()=>Cs,set_clear:()=>Rs,set_create_with:()=>hs,set_create_with_container:()=>Ms,set_create_with_item:()=>ms,set_create_with_text_return:()=>Ls,set_length:()=>Es,set_operate:()=>cs,set_operate_update:()=>gs,set_pop:()=>Os,set_sub:()=>Ss,set_toset:()=>Ns,set_update:()=>As});var d={};t.r(d),t.d(d,{html_content:()=>vs,html_content_more:()=>Ys,html_document:()=>fs,html_form:()=>xs,html_head_body:()=>Ps,html_style:()=>Xs,html_style_color:()=>ys,html_style_content:()=>bs,html_text:()=>Vs,html_title:()=>Fs});var I={};t.r(I),t.d(I,{attribute_access:()=>Zs,function_call:()=>qs,function_call_container:()=>zs,function_call_item:()=>js,raw_block:()=>Us,raw_empty:()=>ks,raw_expression:()=>ws,raw_table:()=>Gs,text_comment:()=>Hs,text_print_multiple:()=>Ks,text_print_multiple_container:()=>Js,text_print_multiple_item:()=>Qs,type_check:()=>Ws});var T={};t.r(T),t.d(T,{controls_type:()=>no,controls_typeLists:()=>so,lists_zip:()=>oo,unpack_iterable_object:()=>_o,variables_change:()=>eo,variables_get:()=>$s,variables_global:()=>io,variables_set:()=>to});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>mo,base_setup:()=>ao,controls_delay:()=>Mo,controls_flow_statements:()=>ho,controls_for:()=>lo,controls_forEach:()=>go,controls_for_range:()=>Io,controls_if:()=>uo,controls_interrupts:()=>Ro,controls_lambda:()=>So,controls_main:()=>po,controls_millis:()=>Eo,controls_nointerrupts:()=>co,controls_pass:()=>Lo,controls_range:()=>Co,controls_repeat:()=>Xo,controls_repeat_ext:()=>fo,controls_thread:()=>No,controls_try_finally:()=>ro,controls_whileUntil:()=>To,do_while:()=>Do,garbage_collection:()=>Fo,get_mem_alloc:()=>Po,get_mem_free:()=>vo,get_unique_identifier:()=>Yo,reset:()=>Oo,time_sleep:()=>Ao});var M={};t.r(M),t.d(M,{base_map:()=>e_,math_arithmetic:()=>Bo,math_bit:()=>Vo,math_constant:()=>bo,math_constant_mp:()=>yo,math_constrain:()=>Qo,math_dec:()=>ko,math_indexer_number:()=>jo,math_map:()=>Jo,math_max_min:()=>Wo,math_number:()=>xo,math_number_base_conversion:()=>qo,math_random:()=>Ko,math_random_seed:()=>zo,math_round:()=>Zo,math_selfcalcu:()=>Go,math_single:()=>Uo,math_to_int:()=>Ho,math_trig:()=>wo,text_to_number:()=>$o,text_to_number_skulpt:()=>t_,turn_to_int:()=>i_});var m={};t.r(m),t.d(m,{ascii_to_char:()=>p_,char_to_ascii:()=>a_,number_to_text:()=>u_,os_system:()=>v_,text:()=>n_,text_capital:()=>E_,text_center:()=>O_,text_char:()=>o_,text_char_at:()=>d_,text_char_at2:()=>l_,text_char_at3:()=>f_,text_compareTo:()=>D_,text_compare_to:()=>h_,text_encode:()=>F_,text_equals_starts_ends:()=>T_,text_eval:()=>P_,text_find:()=>R_,text_format:()=>A_,text_format_noreturn:()=>L_,text_join:()=>__,text_join_seq:()=>c_,text_length:()=>r_,text_random_char:()=>I_,text_replace:()=>g_,text_split:()=>C_,text_strip:()=>S_,text_substring:()=>m_,text_substring2:()=>M_,text_substring3:()=>N_,text_textarea:()=>s_});var E={};t.r(E),t.d(E,{list_many_input:()=>Z_,list_tolist:()=>up,list_tolist2:()=>rp,list_trig:()=>q_,lists_2d_get_col_row_data:()=>x_,lists_2d_get_data_with_col_row:()=>X_,lists_append_extend:()=>G_,lists_change_to:()=>j_,lists_change_to_general:()=>tp,lists_clear:()=>W_,lists_create_with:()=>b_,lists_create_with2:()=>ip,lists_create_with_noreturn:()=>$_,lists_create_with_text:()=>y_,lists_create_with_text2:()=>np,lists_del_general:()=>ep,lists_find:()=>K_,lists_getIndex3:()=>sp,lists_getSublist3:()=>op,lists_get_index:()=>V_,lists_get_random_item:()=>U_,lists_get_random_sublist:()=>w_,lists_get_sublist:()=>Y_,lists_insert_value:()=>k_,lists_insert_value2:()=>pp,lists_pop:()=>Q_,lists_remove_at:()=>J_,lists_remove_at2:()=>ap,lists_reverse:()=>H_,lists_setIndex3:()=>_p,lists_set_index:()=>B_,lists_sort:()=>z_});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Cp,dicts_add_or_change:()=>hp,dicts_clear:()=>Ep,dicts_create_with:()=>lp,dicts_create_with_noreturn:()=>Lp,dicts_deldict:()=>gp,dicts_delete:()=>Mp,dicts_get:()=>Ip,dicts_get_default:()=>Tp,dicts_items:()=>Op,dicts_keys:()=>dp,dicts_length:()=>cp,dicts_pop:()=>Sp,dicts_setdefault:()=>Ap,dicts_to_json:()=>Dp,dicts_todict:()=>Np,dicts_update:()=>mp,dicts_values:()=>Rp,json_to_dicts:()=>fp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Xp,logic_compare:()=>Fp,logic_compare_continous:()=>Pp,logic_is:()=>Vp,logic_is_in:()=>yp,logic_negate:()=>Yp,logic_null:()=>xp,logic_operation:()=>vp,logic_tobool:()=>Bp,logic_true_or_false:()=>bp});var c={};t.r(c),t.d(c,{sdcard_mount:()=>aa,sdcard_use_spi_init:()=>pa,storage_can_write_ornot:()=>Qp,storage_change_dir:()=>ia,storage_close_file:()=>zp,storage_delete_file:()=>Zp,storage_file_seek:()=>ea,storage_file_tell:()=>ta,storage_file_write:()=>Hp,storage_fileopen:()=>Up,storage_fileopen_new:()=>wp,storage_fileopen_new_encoding:()=>kp,storage_get_a_line:()=>Jp,storage_get_contents:()=>Kp,storage_get_contents_without_para:()=>Wp,storage_get_current_dir:()=>na,storage_get_file_size:()=>$p,storage_get_filename:()=>qp,storage_is_file:()=>_a,storage_list_all_files:()=>jp,storage_make_dir:()=>sa,storage_open_file_with_os:()=>Gp,storage_rename:()=>oa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>da,procedures_callreturn:()=>la,procedures_defnoreturn:()=>ra,procedures_defreturn:()=>ua,procedures_ifreturn:()=>Ia,procedures_return:()=>Ta});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ca,tuple_create_with:()=>ha,tuple_create_with_noreturn:()=>Na,tuple_create_with_text2:()=>Ma,tuple_create_with_text_return:()=>ma,tuple_del:()=>Ra,tuple_find:()=>Sa,tuple_getIndex:()=>Ea,tuple_getSublist:()=>La,tuple_get_random_item:()=>fa,tuple_get_sublist:()=>Da,tuple_join:()=>ca,tuple_length:()=>Oa,tuple_max:()=>ga,tuple_totuple:()=>Fa,tuple_trig:()=>Aa});var S={};t.r(S),t.d(S,{set_add_discard:()=>ya,set_clear:()=>Xa,set_create_with:()=>Pa,set_create_with_text_return:()=>Ga,set_length:()=>va,set_operate:()=>xa,set_operate_update:()=>ba,set_pop:()=>Ya,set_sub:()=>Va,set_toset:()=>Ua,set_update:()=>Ba});var A={};t.r(A),t.d(A,{html_content:()=>Wa,html_content_more:()=>Ka,html_document:()=>wa,html_form:()=>Qa,html_head_body:()=>Ha,html_style:()=>Ja,html_style_content:()=>qa,html_text:()=>za,html_title:()=>ka});var L={};t.r(L),t.d(L,{attribute_access:()=>nu,function_call:()=>iu,raw_block:()=>ja,raw_empty:()=>$a,raw_expression:()=>Za,raw_table:()=>tu,type_check:()=>eu});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>hu,actuator_extern_get_led_state:()=>Mu,actuator_extern_led_bright:()=>Tu,actuator_extern_led_brightness:()=>mu,actuator_ms32006_dcmotor:()=>Lu,actuator_ms32006_init:()=>Au,actuator_ms32006_stepper:()=>Nu,actuator_neopixel_init:()=>Du,actuator_neopixel_rgb:()=>fu,actuator_neopixel_rgb_all:()=>Fu,actuator_neopixel_write:()=>Pu,actuator_use_uart_init:()=>vu,esp32_music_get_tempo_extern:()=>lu,esp32_music_pitch:()=>pu,esp32_music_pitch_init:()=>_u,esp32_music_pitch_with_time:()=>au,esp32_music_play_list:()=>uu,esp32_music_reset_extern:()=>du,esp32_music_set_tempo_extern:()=>ru,esp32_music_stop:()=>Iu,mixbot_actuator_extern_get_addr:()=>zu,mixbot_actuator_extern_set_addr:()=>ju,mixbot_addr_extern:()=>yu,robot_led_extern:()=>Uu,robot_led_extern_get_value:()=>wu,robot_motor_extern:()=>Vu,robot_motor_extern_get_speed:()=>Bu,robot_servo_extern_absolute_run:()=>Ku,robot_servo_extern_get_status:()=>ku,robot_servo_extern_relative_continue:()=>qu,robot_servo_extern_relative_origin:()=>Ju,robot_servo_extern_relative_run:()=>Qu,robot_servo_extern_stop:()=>Wu,robot_servo_extern_stop_mode:()=>Hu,robot_traffic_light_extern:()=>Gu,servo_get_angle:()=>Cu,servo_get_speed:()=>Su,servo_init:()=>Eu,servo_move:()=>Ou,servo_set_angle:()=>cu,servo_set_speed:()=>gu,servo_speed_360:()=>Ru,syn6288_builtin_voice:()=>xu,syn6288_get_voice:()=>Xu,syn6288_set_voice:()=>Yu,syn6288_tts_play:()=>bu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>fr,actuator_dc_motor_stop:()=>Fr,actuator_get_led_bright:()=>ir,actuator_get_led_state:()=>nr,actuator_led_bright:()=>er,actuator_led_brightness:()=>sr,actuator_mixbot_buzzer_on_off:()=>xr,actuator_mixgo_nova_mic_get:()=>Gr,actuator_mixgo_nova_mic_set:()=>Br,actuator_mixgo_nova_onboard_music_pitch:()=>Kr,actuator_mixgo_nova_onboard_music_stop:()=>Jr,actuator_mixgo_nova_play_audio:()=>Hr,actuator_mixgo_nova_play_online_audio:()=>Wr,actuator_mixgo_nova_record_audio:()=>kr,actuator_mixgo_nova_voice_get:()=>wr,actuator_mixgo_nova_voice_set:()=>Ur,actuator_mixgo_zero_led_color:()=>or,actuator_onboard_neopixel_rgb:()=>lr,actuator_onboard_neopixel_rgb_all:()=>dr,actuator_onboard_neopixel_rgb_show_all_chase:()=>Tr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Ir,actuator_onboard_neopixel_write:()=>hr,actuator_rm_onboard_neopixel_rgb:()=>Mr,actuator_rm_onboard_neopixel_rgb_all:()=>mr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Er,actuator_stepper_keep:()=>Nr,actuator_stepper_stop:()=>Dr,analog_ble_keyboard_init:()=>_l,analog_ble_keyboard_input:()=>ul,analog_ble_keyboard_send_battery:()=>ll,analog_ble_keyboard_str:()=>rl,analog_ble_mouse_init:()=>dl,analog_ble_mouse_input:()=>hl,analog_ble_mouse_send_battery:()=>Ml,analog_keyboard_input:()=>jr,analog_keyboard_str:()=>ol,analog_mouse_input:()=>nl,bitbot_motor:()=>Vr,bitbot_move:()=>br,bitbot_stop:()=>yr,ble_keyboard_connect:()=>al,ble_keyboard_get_mac:()=>pl,ble_mouse_connect:()=>Tl,ble_mouse_get_mac:()=>Il,cc_number:()=>rr,esp32_music_get_tempo:()=>Rr,esp32_music_reset:()=>cr,esp32_music_set_tempo:()=>Or,esp32_onboard_music_pitch:()=>gr,esp32_onboard_music_pitch_with_time:()=>Cr,esp32_onboard_music_play_list:()=>Ar,esp32_onboard_music_stop:()=>Sr,general_key:()=>$r,general_key_tuple:()=>tl,generalkey_container:()=>el,generalkey_create_with_item:()=>il,get_power_output:()=>qr,ledswitch:()=>tr,mixbot_motor:()=>Xr,mixbot_motor_status:()=>Pr,mixbot_move:()=>vr,mixbot_stop:()=>Yr,mouse_key:()=>sl,number:()=>$u,rm_actuator_get_led_bright:()=>pr,rm_actuator_get_led_state:()=>ar,rm_actuator_led_bright:()=>_r,rm_actuator_led_brightness:()=>ur,rm_motor:()=>Lr,set_all_power_output:()=>zr,set_power_output:()=>Qr,special_key:()=>Zr});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>zl,ai_sensor_ailocal_class:()=>Bl,ai_sensor_ailocal_class_result:()=>Gl,ai_sensor_ailocal_train:()=>Vl,ai_sensor_asr_recognize:()=>Wl,ai_sensor_audio_play:()=>wl,ai_sensor_audio_record:()=>Ul,ai_sensor_barcode:()=>Sl,ai_sensor_circle:()=>Fl,ai_sensor_classifier_faces:()=>ql,ai_sensor_color:()=>Xl,ai_sensor_color_chases:()=>yl,ai_sensor_color_chases_result:()=>bl,ai_sensor_config:()=>gl,ai_sensor_face:()=>Ql,ai_sensor_find_20objects:()=>jl,ai_sensor_find_barcodes:()=>Al,ai_sensor_find_circles:()=>Pl,ai_sensor_find_colors:()=>xl,ai_sensor_find_licenseplates:()=>Jl,ai_sensor_find_lines:()=>fl,ai_sensor_find_qrcodes:()=>cl,ai_sensor_find_rects:()=>Yl,ai_sensor_find_tags:()=>Nl,ai_sensor_licenseplate:()=>Kl,ai_sensor_line:()=>Dl,ai_sensor_qrcode:()=>Ol,ai_sensor_qrcode_lite:()=>Rl,ai_sensor_rect:()=>vl,ai_sensor_rgb:()=>Cl,ai_sensor_tag:()=>Ll,ai_sensor_use_uart_init:()=>El,ai_sensor_yolo_recognize:()=>kl,ai_sensor_yolo_recognize_result:()=>Hl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>td,MICROPYTHON_AI_Speech_unit:()=>$l,MICROPYTHON_AI_client:()=>Zl});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>hd,mpython_blynk_app_notify:()=>ad,mpython_blynk_email:()=>ld,mpython_blynk_get_timers:()=>dd,mpython_blynk_on_connected:()=>od,mpython_blynk_on_disconnected:()=>sd,mpython_blynk_run:()=>pd,mpython_blynk_sensor_data_to_app:()=>Td,mpython_blynk_set_property:()=>rd,mpython_blynk_setup:()=>Md,mpython_blynk_stop_timers:()=>ud,mpython_blynk_sync_virtual:()=>nd,mpython_blynk_terminal_widget_vpin:()=>id,mpython_blynktimer:()=>Id,mpython_blynktimer_run:()=>_d});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>Zd,communicate_bluetooth_connect:()=>iI,communicate_bluetooth_disconnect:()=>nI,communicate_bluetooth_handle:()=>aI,communicate_bluetooth_is_connected:()=>oI,communicate_bluetooth_mac:()=>eI,communicate_bluetooth_peripheral_init:()=>$d,communicate_bluetooth_recv:()=>_I,communicate_bluetooth_recv_only:()=>pI,communicate_bluetooth_scan:()=>tI,communicate_bluetooth_send:()=>sI,communicate_espnow_init:()=>uI,communicate_espnow_init_new:()=>rI,communicate_i2c_available:()=>Xd,communicate_i2c_init:()=>Rd,communicate_i2c_master_read:()=>Yd,communicate_i2c_onboard:()=>Ed,communicate_i2c_read:()=>cd,communicate_i2c_scan:()=>Cd,communicate_i2c_write:()=>gd,communicate_ir_recv_init:()=>wd,communicate_ir_send_init:()=>Jd,communicate_ow_init:()=>bd,communicate_ow_read:()=>Vd,communicate_ow_reset:()=>Ud,communicate_ow_scan:()=>yd,communicate_ow_select:()=>Gd,communicate_ow_write:()=>Bd,communicate_spi_buffer:()=>Ld,communicate_spi_init:()=>Sd,communicate_spi_onboard:()=>Od,communicate_spi_read:()=>Nd,communicate_spi_read_output:()=>Dd,communicate_spi_readinto:()=>fd,communicate_spi_readinto_output:()=>Fd,communicate_spi_set:()=>Ad,communicate_spi_write:()=>Pd,communicate_spi_write_readinto:()=>vd,espnow_radio_channel:()=>MI,espnow_radio_channel_new:()=>EI,espnow_radio_on_off:()=>OI,espnow_radio_rec:()=>cI,espnow_radio_recv:()=>CI,espnow_radio_recv_certain_msg:()=>SI,espnow_radio_recv_certain_msg_new:()=>LI,espnow_radio_recv_msg:()=>gI,espnow_radio_recv_new:()=>AI,espnow_radio_send:()=>RI,espnow_radio_txpower:()=>mI,i2c_available:()=>QI,i2c_init:()=>XI,i2c_master_reader2:()=>JI,i2c_read:()=>xI,i2c_scan:()=>yI,i2c_slave_onreceive:()=>xd,i2c_write:()=>bI,internal_variable:()=>kd,ir_recv_timeout:()=>Kd,ir_transmit_busy:()=>jd,ir_transmit_conventional_data:()=>Qd,ir_transmit_raw_code:()=>zd,ir_transmit_study_code:()=>qd,ir_whether_recv:()=>Wd,lora_init:()=>NI,lora_packet:()=>DI,lora_recv:()=>FI,lora_send:()=>fI,network_espnow_info:()=>dI,network_espnow_mac:()=>lI,network_espnow_recv:()=>II,network_espnow_recv_handle:()=>hI,network_espnow_send:()=>TI,recv_fun:()=>Hd,spi_buffer:()=>GI,spi_init:()=>VI,spi_read:()=>UI,spi_read_output:()=>wI,spi_readinto:()=>kI,spi_readinto_output:()=>HI,spi_set:()=>BI,spi_write:()=>WI,spi_write_readinto:()=>KI,urequests_attribute:()=>vI,urequests_get:()=>PI,urequests_method:()=>YI});var Y={};t.r(Y),t.d(Y,{display_animate:()=>ST,display_blink_rate:()=>RT,display_circle:()=>AT,display_color_seclet:()=>yT,display_draw_4strings:()=>TT,display_fill:()=>CT,display_get_screen_image:()=>OT,display_help:()=>NT,display_image_size:()=>hT,display_lcd_use_i2c_init:()=>kT,display_line:()=>mT,display_line_arbitrarily:()=>ET,display_matrix_extern_bright_point:()=>_T,display_matrix_extern_bright_screen:()=>aT,display_matrix_extern_clear:()=>uT,display_matrix_extern_get_pixel:()=>oT,display_matrix_extern_get_screen_pixel:()=>pT,display_matrix_extern_image_builtins:()=>rT,display_matrix_extern_scroll_string:()=>tT,display_matrix_extern_scroll_string_delay:()=>eT,display_matrix_extern_shift:()=>sT,display_matrix_extern_show_frame_string:()=>iT,display_matrix_extern_show_frame_string_delay:()=>nT,display_matrix_extern_show_image:()=>ZI,display_matrix_extern_show_image_or_string_delay:()=>$I,display_matrix_use_i2c_init:()=>jI,display_oled_drawPixel:()=>fT,display_oled_showBitmap:()=>DT,display_oled_use_i2c_init:()=>QT,display_onoff:()=>gT,display_rect:()=>MT,display_rgb_color:()=>cT,display_tm1650_power:()=>PT,display_tm1650_set_brightness:()=>XT,display_tm1650_show_dot:()=>YT,display_tm1650_show_num:()=>vT,display_tm_use_i2c_init:()=>FT,display_triangle:()=>LT,display_use_i2c_init:()=>IT,extern_oled_bright_point:()=>oh,extern_oled_clear:()=>_h,extern_oled_get_pixel:()=>sh,extern_oled_hvline:()=>ah,extern_oled_line:()=>uh,extern_oled_scroll_string:()=>$T,extern_oled_scroll_string_delay:()=>th,extern_oled_shape_rect:()=>ph,extern_oled_shift:()=>nh,extern_oled_show_frame_string:()=>eh,extern_oled_show_frame_string_delay:()=>ih,extern_oled_show_image:()=>qT,extern_oled_show_image_or_string_delay:()=>ZT,extern_oled_show_image_xy:()=>zT,extern_oled_show_string:()=>jT,lcd_backlight:()=>KT,lcd_clear:()=>JT,lcd_print_string:()=>WT,lcd_show_image_or_string_delay:()=>HT,matrix_extern_image_arithmetic:()=>lT,matrix_extern_image_invert:()=>dT,tft_fill:()=>UT,tft_line_arbitrarily:()=>wT,tft_scroll_string_delay:()=>BT,tft_show_frame_string_delay:()=>GT,tft_show_image_or_string_delay:()=>VT,tft_show_image_xy:()=>bT,tft_use_spi_init:()=>xT});var X={};t.r(X),t.d(X,{bitbot_display_image_create:()=>Qh,display_bright_point:()=>Sh,display_bright_screen:()=>Lh,display_clear:()=>Nh,display_get_pixel:()=>Ch,display_get_screen_pixel:()=>Ah,display_image_builtins:()=>Eh,display_image_builtins_all:()=>Oh,display_image_create:()=>mh,display_scroll_string:()=>Ih,display_scroll_string_delay:()=>Th,display_shift:()=>gh,display_show_frame_string:()=>hh,display_show_frame_string_delay:()=>Mh,display_show_image:()=>lh,display_show_image_or_string_delay:()=>dh,draw_pointer:()=>EM,image_arithmetic:()=>Rh,image_invert:()=>ch,mixbot_display_bright_screen:()=>Kh,mixbot_display_get_ambientbright:()=>Wh,mixbot_display_get_screen_pixel:()=>Hh,mixbot_display_image_create:()=>kh,mixbot_display_rotate:()=>Jh,mixgo_display_image_create_new:()=>Fh,mixgome_display_font:()=>Ph,mixgome_display_image_create:()=>Dh,mixgomini_display_image_create:()=>fh,mpython_display_hvline:()=>Gh,mpython_display_line:()=>Uh,mpython_display_shape_rect:()=>Bh,mpython_pbm_image:()=>wh,onboard_oled_bright_point:()=>Vh,onboard_oled_scroll_string_delay:()=>bh,onboard_oled_show_frame_string_delay:()=>yh,onboard_oled_show_image:()=>vh,onboard_oled_show_image_or_string_delay:()=>xh,onboard_oled_show_image_xy:()=>Yh,onboard_oled_show_string:()=>Xh,onboard_tft_bright_point:()=>pM,onboard_tft_bright_screen:()=>rM,onboard_tft_clear:()=>aM,onboard_tft_clock_clear:()=>MM,onboard_tft_clock_draw:()=>hM,onboard_tft_clock_get_rtctime:()=>IM,onboard_tft_clock_init:()=>dM,onboard_tft_clock_set_time:()=>TM,onboard_tft_display_hvline:()=>nM,onboard_tft_display_line:()=>sM,onboard_tft_display_shape_circle:()=>mM,onboard_tft_display_shape_rect:()=>iM,onboard_tft_fill:()=>lM,onboard_tft_get_pixel:()=>_M,onboard_tft_get_screen_pixel:()=>uM,onboard_tft_scroll_string:()=>Zh,onboard_tft_scroll_string_delay:()=>$h,onboard_tft_shift:()=>oM,onboard_tft_show_frame_string:()=>tM,onboard_tft_show_frame_string_delay:()=>eM,onboard_tft_show_image:()=>qh,onboard_tft_show_image_or_string_delay:()=>jh,onboard_tft_show_image_xy:()=>zh});var x={};t.r(x),t.d(x,{factory_block:()=>fM,factory_block_return:()=>FM,factory_block_return_with_textarea:()=>vM,factory_block_with_textarea:()=>PM,factory_callMethod_noreturn:()=>NM,factory_callMethod_return:()=>DM,factory_create_with_container:()=>CM,factory_create_with_item:()=>SM,factory_declare:()=>LM,factory_from_import:()=>RM,factory_function_noreturn:()=>gM,factory_function_return:()=>AM,factory_import:()=>cM,folding_block:()=>YM});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>em,inout_analog_atten:()=>kM,inout_analog_read:()=>wM,inout_analog_read_init:()=>qM,inout_analog_write:()=>BM,inout_analog_write_init:()=>QM,inout_analog_write_set:()=>GM,inout_analog_write_set_freq:()=>ZM,inout_digital_init:()=>KM,inout_digital_read:()=>yM,inout_digital_write:()=>bM,inout_highlow:()=>xM,inout_pinMode:()=>jM,inout_pin_attachInterrupt:()=>WM,inout_pin_pressed:()=>HM,inout_pin_pressed_init:()=>zM,inout_pwm_analog_write:()=>VM,inout_pwm_analog_write_init:()=>JM,inout_pwm_analog_write_set_freq:()=>UM,pin_pressed:()=>tm,pin_pressed_init:()=>$M});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Am,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Sm,IOT_EMQX_PING:()=>gm,IOT_FORMATTING:()=>Rm,IOT_FORMAT_STRING:()=>cm,IOT_MIXIO_NTP:()=>Cm,IOT_MIXIO_PUBLISH:()=>Im,IOT_MIXIO_SUBSCRIBE:()=>Tm,iot_checkonenet:()=>xm,iot_client_onboard:()=>Nm,iot_create_with_item:()=>lm,iot_http_client:()=>Dm,iot_http_data:()=>fm,iot_mixio_check:()=>mm,iot_mixio_connect:()=>dm,iot_mixio_connect_only:()=>Mm,iot_mixio_disconnect:()=>hm,iot_mixio_format_msg:()=>Om,iot_mixio_format_topic:()=>Em,iot_mixly_key:()=>Lm,iot_mqtt_client:()=>Fm,iot_mqtt_data:()=>Pm,iot_onenet_check:()=>_m,iot_onenet_connect:()=>sm,iot_onenet_disconnect:()=>om,iot_onenet_publish:()=>am,iot_onenet_publish_dict:()=>pm,iot_onenetconnect:()=>Ym,iot_onenetdisconnect:()=>Xm,iot_publish:()=>bm,iot_publish_container:()=>um,iot_publish_item:()=>rm,iot_wifi_connect:()=>nm,iot_wificonnect:()=>vm});var V={};t.r(V),t.d(V,{network_ap_connect:()=>Jm,network_connect:()=>wm,network_get_connect:()=>Hm,network_get_wifi:()=>Km,network_init:()=>Vm,network_is_active:()=>Gm,network_open:()=>Bm,network_scan:()=>Um,network_server:()=>Qm,network_socket_accept:()=>$m,network_socket_bind:()=>zm,network_socket_close:()=>sE,network_socket_connect:()=>jm,network_socket_init:()=>qm,network_socket_listen:()=>Zm,network_socket_receive:()=>tE,network_socket_receive_from:()=>iE,network_socket_send:()=>eE,network_socket_send_to:()=>nE,network_stop:()=>Wm,network_wifi_connect:()=>km,ntptime_address:()=>uE,ntptime_time:()=>aE,requests_attribute:()=>_E,requests_attribute2:()=>IE,requests_get:()=>oE,requests_get2:()=>lE,requests_method:()=>pE,requests_post:()=>dE});var B={};t.r(B),t.d(B,{HCSR04:()=>TO,PS2_Button:()=>EO,PS2_Buttons:()=>RO,PS2_Buttons_new:()=>SO,PS2_State:()=>OO,PS2_init:()=>hO,PS2_init_new:()=>gO,PS2_stk:()=>cO,PS2_stk_new:()=>AO,PS2_vibration:()=>mO,PS2_vibration_new:()=>CO,esp32_s2_weather_init:()=>rO,esp32_s2_weather_rain:()=>dO,esp32_s2_weather_wd:()=>lO,esp32_s2_weather_ws:()=>IO,extern_rfid_read:()=>zE,extern_rfid_readcontent:()=>ZE,extern_rfid_readid:()=>jE,extern_rfid_status:()=>eO,extern_rfid_write:()=>$E,extern_rfid_write_return:()=>tO,gnss_get_data:()=>fO,gnss_have_data:()=>DO,mixbot_sensor_extern_get_addr:()=>bO,mixbot_sensor_extern_set_addr:()=>yO,pm25_get_data:()=>NO,robot_button_extern_get_value:()=>FO,robot_color_extern_get_value:()=>xO,robot_infrared_extern_get_value:()=>vO,robot_infrared_extern_grey_get_value:()=>YO,robot_potentiometer_extern_get_value:()=>XO,robot_sonar_extern_get_value:()=>VO,robot_sonar_extern_led:()=>BO,robot_touch_extern_get_value:()=>PO,sensor_APDS9960_extern:()=>vE,sensor_DS18X20:()=>DE,sensor_LTR308_extern:()=>YE,sensor_LTR390UV_extern:()=>xE,sensor_MAX30102_extern:()=>PE,sensor_QMC5883L_extern:()=>GE,sensor_VL530LX_extern:()=>bE,sensor_adxl345_get_acceleration:()=>RE,sensor_aht11_extern:()=>VE,sensor_bmp:()=>LE,sensor_compass_reset:()=>QE,sensor_dht11:()=>gE,sensor_hp203_extern:()=>BE,sensor_light_level:()=>cE,sensor_lm35:()=>fE,sensor_ltr381_extern:()=>XE,sensor_mixgo_extern_button_attachInterrupt:()=>EE,sensor_mixgo_extern_button_get_presses:()=>mE,sensor_mixgo_extern_button_is_pressed:()=>hE,sensor_mixgo_extern_button_was_pressed:()=>ME,sensor_mixgo_extern_light:()=>CE,sensor_mixgo_extern_pin_near:()=>AE,sensor_mixgo_extern_sound:()=>SE,sensor_mixgoce_hot_wheel_degrees:()=>uO,sensor_mixgoce_hot_wheel_is_touched:()=>aO,sensor_mpu9250_attachGestureInterrupt:()=>OE,sensor_mpu9250_calibrate_compass:()=>WE,sensor_mpu9250_field_strength:()=>JE,sensor_mpu9250_gesture:()=>UE,sensor_mpu9250_get_acceleration:()=>wE,sensor_mpu9250_get_gyro:()=>HE,sensor_mpu9250_get_magnetic:()=>kE,sensor_mpu9250_temperature:()=>KE,sensor_sht:()=>NE,sensor_shtc3_extern:()=>yE,sensor_use_i2c_init:()=>FE,sensor_use_spi_init:()=>qE,sensor_use_uart_init:()=>LO,sensor_weather_solo_init:()=>GO,sensor_weather_solo_rain:()=>kO,sensor_weather_solo_wd:()=>UO,sensor_weather_solo_ws:()=>wO,weather_data:()=>iO,weather_have_data:()=>nO,weather_set_label:()=>oO,weather_set_label_container:()=>_O,weather_set_label_item:()=>pO,weather_uart_mixio:()=>sO});var G={};t.r(G),t.d(G,{HCSR04:()=>_R,RTC_set_date:()=>oR,RTC_set_time:()=>sR,bitbot_als_num:()=>dc,dht11:()=>Oc,number1:()=>aR,number2:()=>uR,number3:()=>rR,number4:()=>lR,number5:()=>dR,number6:()=>IR,number7:()=>TR,onboard_RTC_get_time:()=>cR,onboard_RTC_get_time_str:()=>NR,onboard_RTC_get_timestamp:()=>gR,onboard_RTC_set_datetime:()=>AR,onboard_RTC_settime_string:()=>SR,onboard_RTC_timestamp_totuple:()=>CR,rfid_readcontent:()=>XR,rfid_readid:()=>YR,rfid_write:()=>xR,rfid_write_return:()=>bR,sensor_LTR308:()=>DR,sensor_aht11:()=>FR,sensor_bitbot_ALS:()=>lc,sensor_button_get_presses:()=>hc,sensor_button_is_pressed:()=>Ic,sensor_button_was_pressed:()=>Tc,sensor_distance_hrsc04:()=>nR,sensor_eulerangles:()=>VR,sensor_field_strength:()=>Rc,sensor_get_acceleration:()=>yR,sensor_get_temperature:()=>PR,sensor_hp203:()=>vR,sensor_light:()=>Ec,sensor_mixbot_get_gyro:()=>rc,sensor_mixbot_patrol_calibrate:()=>pc,sensor_mixbot_patrol_value:()=>ac,sensor_mixbot_temperature:()=>uc,sensor_mixgo_LTR308:()=>RR,sensor_mixgo_button_attachInterrupt:()=>QO,sensor_mixgo_button_get_presses:()=>JO,sensor_mixgo_button_is_pressed:()=>WO,sensor_mixgo_button_was_pressed:()=>KO,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>qR,sensor_mixgo_cc_mmc5603_get_angle:()=>QR,sensor_mixgo_cc_mmc5603_get_magnetic:()=>JR,sensor_mixgo_light:()=>pR,sensor_mixgo_nova_LTR308:()=>OR,sensor_mixgo_nova_pin_near:()=>ER,sensor_mixgo_pin_near:()=>mR,sensor_mixgo_pin_near_double:()=>MR,sensor_mixgo_pin_near_single:()=>hR,sensor_mixgo_pin_pressed:()=>$O,sensor_mixgo_touch_slide:()=>iR,sensor_mixgocar42_button_attachInterrupt:()=>ZO,sensor_mixgocar42_button_get_presses:()=>jO,sensor_mixgocar42_button_is_pressed:()=>qO,sensor_mixgocar42_button_was_pressed:()=>zO,sensor_mixgocar_battery_left:()=>_c,sensor_mixgocar_pin_near:()=>sc,sensor_mixgocar_pin_near_line:()=>nc,sensor_mixgocar_pin_near_state_change:()=>oc,sensor_mixgoce_pin_pressed:()=>tR,sensor_mixgoce_temperature:()=>jR,sensor_mixgome_temperature:()=>zR,sensor_mpython_pin_pressed:()=>eR,sensor_mpython_qmi8658_get_gyro:()=>ZR,sensor_mpython_qmi8658_temperature:()=>$R,sensor_onboard_compass_reset:()=>KR,sensor_onboard_mpu9250_calibrate_compass:()=>kR,sensor_onboard_mpu9250_field_strength:()=>WR,sensor_onboard_mpu9250_gesture:()=>BR,sensor_onboard_mpu9250_get_acceleration:()=>GR,sensor_onboard_mpu9250_get_gyro:()=>wR,sensor_onboard_mpu9250_get_magnetic:()=>UR,sensor_onboard_mpu9250_temperature:()=>HR,sensor_pin_near:()=>mc,sensor_pin_pressed:()=>Mc,sensor_rm_acc:()=>ic,sensor_rm_battery_left:()=>ec,sensor_rm_pin_near_double:()=>tc,sensor_rtc_init:()=>LR,sensor_sound:()=>fR,sensor_temperature:()=>cc});var U={};t.r(U),t.d(U,{serial_any:()=>fc,serial_begin:()=>Xc,serial_print:()=>Sc,serial_print_byte:()=>Cc,serial_print_hex:()=>Lc,serial_println:()=>Ac,serial_read_from_ai:()=>kc,serial_readline:()=>Fc,serial_readstr:()=>Dc,serial_readstr_until:()=>Pc,serial_receive_data_event:()=>Nc,serial_send_to_ai:()=>wc,serial_softserial:()=>Yc,serial_softserial_new:()=>vc,system_input:()=>xc,system_print:()=>bc,system_print_container:()=>Gc,system_print_end:()=>Vc,system_print_inline:()=>yc,system_print_item:()=>Uc,system_print_many:()=>Bc});var w={};t.r(w),t.d(w,{Panic_with_status_code:()=>Jc,Timer_init:()=>_g,base_delay:()=>ug,controls_delay:()=>Kc,controls_delay_new:()=>Wc,controls_millis:()=>qc,controls_uname:()=>jc,raw_block:()=>zc,reset:()=>Qc,system_bitbot_shutdown:()=>og,system_machine_reset:()=>sg,system_ticks_diff:()=>tg,system_timer:()=>$c,system_timer_init:()=>eg,system_wdt_feed:()=>ng,system_wdt_init:()=>ig,time_ticks_diff:()=>ag,timer:()=>Zc,timer2:()=>pg});var k={};t.r(k),t.d(k,{Air_daily_content:()=>Cg,Air_now_content:()=>Mg,Geo_moon_content:()=>Ag,Geo_sun_content:()=>Sg,Life_suggestion_content:()=>Eg,Location_search_content:()=>Rg,Tide_daily_content:()=>Og,WEATHER_DAILY:()=>dg,WEATHER_HOUR:()=>Ig,WEATHER_NOW:()=>lg,Weather_alarm_content:()=>mg,Weather_daily:()=>cg,Weather_daily_content:()=>gg,Weather_now:()=>Tg,Weather_now_content:()=>hg});var H={};t.r(H),t.d(H,{actuator_extern_get_led_bright:()=>Wg,actuator_extern_get_led_state:()=>Kg,actuator_extern_led_bright:()=>Hg,actuator_extern_led_brightness:()=>Jg,actuator_ms32006_dcmotor:()=>Yg,actuator_ms32006_init:()=>vg,actuator_ms32006_stepper:()=>Xg,actuator_neopixel_init:()=>Qg,actuator_neopixel_rgb:()=>jg,actuator_neopixel_rgb_all:()=>qg,actuator_neopixel_write:()=>zg,actuator_use_uart_init:()=>Zg,esp32_music_get_tempo_extern:()=>Gg,esp32_music_pitch:()=>bg,esp32_music_pitch_init:()=>xg,esp32_music_pitch_with_time:()=>yg,esp32_music_play_list:()=>Ug,esp32_music_reset_extern:()=>wg,esp32_music_set_tempo_extern:()=>Bg,esp32_music_stop:()=>Vg,mixbot_actuator_extern_get_addr:()=>MC,mixbot_actuator_extern_set_addr:()=>mC,mixbot_addr_extern:()=>nC,robot_led_extern:()=>pC,robot_led_extern_get_value:()=>aC,robot_motor_extern:()=>sC,robot_motor_extern_get_speed:()=>oC,robot_servo_extern_absolute_run:()=>dC,robot_servo_extern_get_status:()=>uC,robot_servo_extern_relative_continue:()=>hC,robot_servo_extern_relative_origin:()=>IC,robot_servo_extern_relative_run:()=>TC,robot_servo_extern_stop:()=>lC,robot_servo_extern_stop_mode:()=>rC,robot_traffic_light_extern:()=>_C,servo_get_angle:()=>Fg,servo_get_speed:()=>Pg,servo_init:()=>Lg,servo_move:()=>kg,servo_set_angle:()=>Dg,servo_set_speed:()=>fg,servo_speed_360:()=>Ng,syn6288_builtin_voice:()=>eC,syn6288_get_voice:()=>tC,syn6288_set_voice:()=>$g,syn6288_tts_play:()=>iC});var W={};t.r(W),t.d(W,{actuator_dc_motor:()=>WC,actuator_dc_motor_stop:()=>KC,actuator_get_led_bright:()=>DC,actuator_get_led_state:()=>fC,actuator_led_bright:()=>NC,actuator_led_brightness:()=>FC,actuator_mixbot_buzzer_on_off:()=>jC,actuator_mixgo_nova_mic_get:()=>iS,actuator_mixgo_nova_mic_set:()=>eS,actuator_mixgo_nova_onboard_music_pitch:()=>aS,actuator_mixgo_nova_onboard_music_stop:()=>uS,actuator_mixgo_nova_play_audio:()=>_S,actuator_mixgo_nova_play_online_audio:()=>pS,actuator_mixgo_nova_record_audio:()=>oS,actuator_mixgo_nova_voice_get:()=>sS,actuator_mixgo_nova_voice_set:()=>nS,actuator_mixgo_zero_led_color:()=>PC,actuator_onboard_neopixel_rgb:()=>VC,actuator_onboard_neopixel_rgb_all:()=>BC,actuator_onboard_neopixel_rgb_show_all_chase:()=>GC,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>UC,actuator_onboard_neopixel_write:()=>yC,actuator_stepper_keep:()=>kC,actuator_stepper_stop:()=>HC,analog_ble_keyboard_init:()=>RS,analog_ble_keyboard_input:()=>CS,analog_ble_keyboard_send_battery:()=>AS,analog_ble_keyboard_str:()=>SS,analog_ble_mouse_init:()=>LS,analog_ble_mouse_input:()=>fS,analog_ble_mouse_send_battery:()=>FS,analog_keyboard_input:()=>IS,analog_keyboard_str:()=>ES,analog_mouse_input:()=>MS,bitbot_motor:()=>tS,bitbot_move:()=>ZC,bitbot_stop:()=>$C,ble_keyboard_connect:()=>gS,ble_keyboard_get_mac:()=>cS,ble_mouse_connect:()=>DS,ble_mouse_get_mac:()=>NS,cc_number:()=>vC,esp32_music_get_tempo:()=>OC,esp32_music_reset:()=>SC,esp32_music_set_tempo:()=>EC,esp32_onboard_music_pitch:()=>RC,esp32_onboard_music_pitch_with_time:()=>cC,esp32_onboard_music_play_list:()=>CC,esp32_onboard_music_stop:()=>gC,general_key:()=>hS,general_key_tuple:()=>OS,get_power_output:()=>lS,ledswitch:()=>LC,mixbot_motor:()=>zC,mixbot_motor_status:()=>JC,mixbot_move:()=>QC,mixbot_stop:()=>qC,mouse_key:()=>mS,number:()=>AC,rm_actuator_get_led_bright:()=>XC,rm_actuator_get_led_state:()=>xC,rm_actuator_led_bright:()=>YC,rm_actuator_led_brightness:()=>bC,rm_motor:()=>wC,set_all_power_output:()=>dS,set_power_output:()=>rS,special_key:()=>TS});var K={};t.r(K),t.d(K,{ai_sensor_20object:()=>uA,ai_sensor_ailocal_class:()=>ZS,ai_sensor_ailocal_class_result:()=>$S,ai_sensor_ailocal_train:()=>jS,ai_sensor_asr_recognize:()=>sA,ai_sensor_audio_play:()=>eA,ai_sensor_audio_record:()=>tA,ai_sensor_barcode:()=>yS,ai_sensor_circle:()=>kS,ai_sensor_classifier_faces:()=>aA,ai_sensor_color:()=>JS,ai_sensor_color_chases:()=>zS,ai_sensor_color_chases_result:()=>qS,ai_sensor_config:()=>YS,ai_sensor_face:()=>pA,ai_sensor_find_20objects:()=>rA,ai_sensor_find_barcodes:()=>VS,ai_sensor_find_circles:()=>HS,ai_sensor_find_colors:()=>QS,ai_sensor_find_licenseplates:()=>_A,ai_sensor_find_lines:()=>wS,ai_sensor_find_qrcodes:()=>bS,ai_sensor_find_rects:()=>KS,ai_sensor_find_tags:()=>GS,ai_sensor_licenseplate:()=>oA,ai_sensor_line:()=>US,ai_sensor_qrcode:()=>xS,ai_sensor_qrcode_lite:()=>vS,ai_sensor_rect:()=>WS,ai_sensor_rgb:()=>XS,ai_sensor_tag:()=>BS,ai_sensor_use_uart_init:()=>PS,ai_sensor_yolo_recognize:()=>iA,ai_sensor_yolo_recognize_result:()=>nA});var J={};t.r(J),t.d(J,{MICROPYTHON_AI_Speech_asr:()=>IA,MICROPYTHON_AI_Speech_unit:()=>dA,MICROPYTHON_AI_client:()=>lA});var Q={};t.r(Q),t.d(Q,{mpython_blynk_app_data:()=>AA,mpython_blynk_app_notify:()=>RA,mpython_blynk_email:()=>LA,mpython_blynk_get_timers:()=>gA,mpython_blynk_on_connected:()=>mA,mpython_blynk_on_disconnected:()=>MA,mpython_blynk_run:()=>OA,mpython_blynk_sensor_data_to_app:()=>SA,mpython_blynk_set_property:()=>NA,mpython_blynk_setup:()=>DA,mpython_blynk_stop_timers:()=>cA,mpython_blynk_sync_virtual:()=>hA,mpython_blynk_terminal_widget_vpin:()=>TA,mpython_blynktimer:()=>CA,mpython_blynktimer_run:()=>EA});var q={};t.r(q),t.d(q,{communicate_bluetooth_central_init:()=>uL,communicate_bluetooth_connect:()=>dL,communicate_bluetooth_disconnect:()=>IL,communicate_bluetooth_handle:()=>OL,communicate_bluetooth_is_connected:()=>hL,communicate_bluetooth_mac:()=>TL,communicate_bluetooth_peripheral_init:()=>rL,communicate_bluetooth_recv:()=>EL,communicate_bluetooth_recv_only:()=>mL,communicate_bluetooth_scan:()=>lL,communicate_bluetooth_send:()=>ML,communicate_espnow_init:()=>RL,communicate_espnow_init_new:()=>cL,communicate_i2c_available:()=>bA,communicate_i2c_init:()=>PA,communicate_i2c_master_read:()=>xA,communicate_i2c_onboard:()=>fA,communicate_i2c_read:()=>vA,communicate_i2c_scan:()=>XA,communicate_i2c_write:()=>YA,communicate_ir_recv_init:()=>$A,communicate_ir_send_init:()=>sL,communicate_ow_init:()=>JA,communicate_ow_read:()=>zA,communicate_ow_reset:()=>qA,communicate_ow_scan:()=>QA,communicate_ow_select:()=>ZA,communicate_ow_write:()=>jA,communicate_spi_buffer:()=>GA,communicate_spi_init:()=>VA,communicate_spi_onboard:()=>FA,communicate_spi_read:()=>UA,communicate_spi_read_output:()=>wA,communicate_spi_readinto:()=>kA,communicate_spi_readinto_output:()=>HA,communicate_spi_set:()=>BA,communicate_spi_write:()=>WA,communicate_spi_write_readinto:()=>KA,espnow_radio_channel:()=>NL,espnow_radio_channel_new:()=>fL,espnow_radio_on_off:()=>FL,espnow_radio_rec:()=>vL,espnow_radio_recv:()=>XL,espnow_radio_recv_certain_msg:()=>xL,espnow_radio_recv_certain_msg_new:()=>yL,espnow_radio_recv_msg:()=>YL,espnow_radio_recv_new:()=>bL,espnow_radio_send:()=>PL,espnow_radio_txpower:()=>DL,i2c_slave_onreceive:()=>yA,internal_variable:()=>tL,ir_recv_timeout:()=>nL,ir_transmit_busy:()=>aL,ir_transmit_conventional_data:()=>oL,ir_transmit_raw_code:()=>pL,ir_transmit_study_code:()=>_L,ir_whether_recv:()=>iL,lora_init:()=>VL,lora_packet:()=>BL,lora_recv:()=>UL,lora_send:()=>GL,network_espnow_info:()=>CL,network_espnow_mac:()=>gL,network_espnow_recv:()=>SL,network_espnow_recv_handle:()=>LL,network_espnow_send:()=>AL,recv_fun:()=>eL,urequests_attribute:()=>kL,urequests_get:()=>wL,urequests_method:()=>HL});var z={};t.r(z),t.d(z,{display_animate:()=>hN,display_circle:()=>MN,display_color_seclet:()=>NN,display_draw_4strings:()=>aN,display_fill:()=>TN,display_lcd_use_i2c_init:()=>YN,display_line:()=>lN,display_line_arbitrarily:()=>uN,display_matrix_extern_bright_point:()=>eN,display_matrix_extern_bright_screen:()=>nN,display_matrix_extern_clear:()=>ZL,display_matrix_extern_get_pixel:()=>tN,display_matrix_extern_get_screen_pixel:()=>iN,display_matrix_extern_image_builtins:()=>sN,display_matrix_extern_scroll_string:()=>zL,display_matrix_extern_scroll_string_delay:()=>jL,display_matrix_extern_shift:()=>$L,display_matrix_extern_show_frame_string:()=>QL,display_matrix_extern_show_frame_string_delay:()=>qL,display_matrix_extern_show_image:()=>KL,display_matrix_extern_show_image_or_string_delay:()=>JL,display_matrix_use_i2c_init:()=>WL,display_oled_drawPixel:()=>ON,display_oled_showBitmap:()=>EN,display_oled_use_i2c_init:()=>VN,display_onoff:()=>dN,display_rect:()=>rN,display_tm1650_power:()=>cN,display_tm1650_set_brightness:()=>SN,display_tm1650_show_dot:()=>CN,display_tm1650_show_num:()=>gN,display_tm_use_i2c_init:()=>RN,display_triangle:()=>mN,display_use_i2c_init:()=>pN,extern_oled_bright_point:()=>zN,extern_oled_clear:()=>JN,extern_oled_get_pixel:()=>qN,extern_oled_hvline:()=>ZN,extern_oled_line:()=>$N,extern_oled_scroll_string:()=>WN,extern_oled_scroll_string_delay:()=>KN,extern_oled_shape_rect:()=>jN,extern_oled_shift:()=>QN,extern_oled_show_frame_string:()=>kN,extern_oled_show_frame_string_delay:()=>HN,extern_oled_show_image:()=>BN,extern_oled_show_image_or_string_delay:()=>wN,extern_oled_show_image_xy:()=>GN,extern_oled_show_string:()=>UN,image_shift:()=>IN,lcd_backlight:()=>bN,lcd_clear:()=>yN,lcd_print_string:()=>xN,lcd_show_image_or_string_delay:()=>XN,matrix_extern_image_arithmetic:()=>oN,matrix_extern_image_invert:()=>_N,tft_fill:()=>PN,tft_line_arbitrarily:()=>vN,tft_scroll_string_delay:()=>FN,tft_show_frame_string_delay:()=>fN,tft_show_image_or_string_delay:()=>DN,tft_show_image_xy:()=>LN,tft_use_spi_init:()=>AN});var j={};t.r(j),t.d(j,{bitbot_display_image_create:()=>yD,display_bright_point:()=>TD,display_bright_screen:()=>MD,display_clear:()=>uD,display_get_pixel:()=>ID,display_get_screen_pixel:()=>hD,display_image_builtins:()=>_D,display_image_builtins_all:()=>pD,display_image_create:()=>aD,display_scroll_string:()=>sD,display_scroll_string_delay:()=>oD,display_shift:()=>dD,display_show_frame_string:()=>iD,display_show_frame_string_delay:()=>nD,display_show_image:()=>tD,display_show_image_or_string_delay:()=>eD,draw_pointer:()=>af,image_arithmetic:()=>rD,image_invert:()=>lD,mixbot_display_bright_screen:()=>xD,mixbot_display_get_ambientbright:()=>XD,mixbot_display_get_screen_pixel:()=>YD,mixbot_display_image_create:()=>vD,mixbot_display_rotate:()=>bD,mixgo_display_image_create_new:()=>RD,mixgome_display_font:()=>OD,mixgome_display_image_create:()=>mD,mixgomini_display_image_create:()=>ED,mpython_display_hvline:()=>FD,mpython_display_line:()=>PD,mpython_display_shape_rect:()=>fD,mpython_pbm_image:()=>cD,onboard_oled_bright_point:()=>DD,onboard_oled_scroll_string_delay:()=>ND,onboard_oled_show_frame_string_delay:()=>LD,onboard_oled_show_image:()=>gD,onboard_oled_show_image_or_string_delay:()=>AD,onboard_oled_show_image_xy:()=>CD,onboard_oled_show_string:()=>SD,onboard_tft_bright_point:()=>jD,onboard_tft_bright_screen:()=>$D,onboard_tft_clear:()=>QD,onboard_tft_clock_clear:()=>_f,onboard_tft_clock_draw:()=>of,onboard_tft_clock_get_rtctime:()=>nf,onboard_tft_clock_init:()=>ef,onboard_tft_clock_set_time:()=>sf,onboard_tft_display_hvline:()=>KD,onboard_tft_display_line:()=>JD,onboard_tft_display_shape_circle:()=>pf,onboard_tft_display_shape_rect:()=>WD,onboard_tft_fill:()=>tf,onboard_tft_get_pixel:()=>zD,onboard_tft_get_screen_pixel:()=>ZD,onboard_tft_scroll_string:()=>kD,onboard_tft_scroll_string_delay:()=>HD,onboard_tft_shift:()=>qD,onboard_tft_show_frame_string:()=>UD,onboard_tft_show_frame_string_delay:()=>wD,onboard_tft_show_image:()=>VD,onboard_tft_show_image_or_string_delay:()=>GD,onboard_tft_show_image_xy:()=>BD});var Z={};t.r(Z),t.d(Z,{factory_block:()=>Mf,factory_block_return:()=>mf,factory_block_return_with_textarea:()=>Of,factory_block_with_textarea:()=>Ef,factory_callMethod_noreturn:()=>Tf,factory_callMethod_return:()=>hf,factory_declare:()=>If,factory_from_import:()=>uf,factory_function_noreturn:()=>lf,factory_function_return:()=>df,factory_import:()=>rf,folding_block:()=>Rf});var $={};t.r($),t.d($,{inout_analog_atten:()=>xf,inout_analog_read:()=>Df,inout_analog_read_init:()=>Xf,inout_analog_write:()=>Af,inout_analog_write_init:()=>Yf,inout_analog_write_set:()=>Lf,inout_digital_init:()=>Pf,inout_digital_read:()=>Cf,inout_digital_write:()=>gf,inout_highlow:()=>cf,inout_pin_attachInterrupt:()=>Ff,inout_pin_pressed:()=>ff,inout_pin_pressed_init:()=>bf,inout_pwm_analog_write:()=>Sf,inout_pwm_analog_write_init:()=>vf,inout_pwm_analog_write_set_freq:()=>Nf});var tt={};t.r(tt),t.d(tt,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>eF,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>$f,IOT_EMQX_PING:()=>iF,IOT_FORMATTING:()=>jf,IOT_FORMAT_STRING:()=>Zf,IOT_MIXIO_NTP:()=>nF,IOT_MIXIO_PUBLISH:()=>Hf,IOT_MIXIO_SUBSCRIBE:()=>Wf,iot_client_onboard:()=>sF,iot_http_client:()=>oF,iot_http_data:()=>_F,iot_mixio_check:()=>Qf,iot_mixio_connect:()=>kf,iot_mixio_connect_only:()=>Jf,iot_mixio_disconnect:()=>Kf,iot_mixio_format_msg:()=>zf,iot_mixio_format_topic:()=>qf,iot_mixly_key:()=>tF,iot_mqtt_client:()=>pF,iot_mqtt_data:()=>aF,iot_onenet_check:()=>Uf,iot_onenet_connect:()=>Vf,iot_onenet_disconnect:()=>Bf,iot_onenet_publish:()=>wf,iot_onenet_publish_dict:()=>Gf,iot_wifi_connect:()=>yf});var et={};t.r(et),t.d(et,{network_ap_connect:()=>mF,network_connect:()=>rF,network_get_connect:()=>dF,network_get_wifi:()=>MF,network_init:()=>uF,network_is_active:()=>hF,network_open:()=>TF,network_scan:()=>EF,network_server:()=>OF,network_socket_accept:()=>SF,network_socket_bind:()=>cF,network_socket_close:()=>fF,network_socket_connect:()=>gF,network_socket_init:()=>RF,network_socket_listen:()=>CF,network_socket_receive:()=>AF,network_socket_receive_from:()=>NF,network_socket_send:()=>LF,network_socket_send_to:()=>DF,network_stop:()=>IF,network_wifi_connect:()=>lF,ntptime_address:()=>XF,ntptime_time:()=>YF,requests_attribute:()=>PF,requests_attribute2:()=>bF,requests_get:()=>FF,requests_get2:()=>xF,requests_method:()=>vF,requests_post:()=>yF});var it={};t.r(it),t.d(it,{HCSR04:()=>LP,PS2_Button:()=>fP,PS2_Buttons:()=>FP,PS2_Buttons_new:()=>VP,PS2_State:()=>PP,PS2_init:()=>NP,PS2_init_new:()=>bP,PS2_stk:()=>vP,PS2_stk_new:()=>BP,PS2_vibration:()=>DP,PS2_vibration_new:()=>yP,RTC_get_time:()=>XP,RTC_set_date:()=>WF,RTC_set_datetime:()=>YP,RTC_set_time:()=>HF,esp32_s2_weather_init:()=>gP,esp32_s2_weather_rain:()=>SP,esp32_s2_weather_wd:()=>CP,esp32_s2_weather_ws:()=>AP,extern_rfid_read:()=>rP,extern_rfid_readcontent:()=>dP,extern_rfid_readid:()=>lP,extern_rfid_status:()=>hP,extern_rfid_write:()=>IP,extern_rfid_write_return:()=>TP,gnss_get_data:()=>wP,gnss_have_data:()=>kP,mixbot_sensor_extern_get_addr:()=>ZP,mixbot_sensor_extern_set_addr:()=>$P,pm25_get_data:()=>UP,robot_button_extern_get_value:()=>HP,robot_color_extern_get_value:()=>qP,robot_infrared_extern_get_value:()=>KP,robot_infrared_extern_grey_get_value:()=>JP,robot_potentiometer_extern_get_value:()=>QP,robot_sonar_extern_get_value:()=>zP,robot_sonar_extern_led:()=>jP,robot_touch_extern_get_value:()=>WP,sensor_APDS9960_extern:()=>tP,sensor_DS18X20:()=>sv,sensor_LTR308_extern:()=>eP,sensor_LTR390UV_extern:()=>sP,sensor_MAX30102_extern:()=>$F,sensor_QMC5883L_extern:()=>oP,sensor_VL530LX_extern:()=>aP,sensor_aht11_extern:()=>pP,sensor_bmp:()=>zF,sensor_dht11:()=>xP,sensor_distance_hrsc04:()=>kF,sensor_hp203_extern:()=>iP,sensor_ltr381_extern:()=>nP,sensor_mixgo_extern_button_attachInterrupt:()=>UF,sensor_mixgo_extern_button_get_presses:()=>GF,sensor_mixgo_extern_button_is_pressed:()=>VF,sensor_mixgo_extern_button_was_pressed:()=>BF,sensor_mixgo_extern_light:()=>KF,sensor_mixgo_extern_pin_near:()=>QF,sensor_mixgo_extern_sound:()=>JF,sensor_mixgoce_hot_wheel_degrees:()=>cP,sensor_mixgoce_hot_wheel_is_touched:()=>RP,sensor_mpu9250_attachGestureInterrupt:()=>wF,sensor_rtc_init:()=>qF,sensor_sht:()=>jF,sensor_shtc3_extern:()=>_P,sensor_use_i2c_init:()=>ZF,sensor_use_spi_init:()=>uP,sensor_use_uart_init:()=>GP,sensor_weather_solo_init:()=>tv,sensor_weather_solo_rain:()=>nv,sensor_weather_solo_wd:()=>ev,sensor_weather_solo_ws:()=>iv,weather_data:()=>MP,weather_have_data:()=>mP,weather_set_label:()=>OP,weather_uart_mixio:()=>EP});var nt={};t.r(nt),t.d(nt,{HCSR04:()=>Iv,bitbot_als_num:()=>vY,dht11:()=>GY,number1:()=>Tv,number2:()=>hv,number3:()=>Mv,number4:()=>mv,number5:()=>Ev,number6:()=>Ov,number7:()=>Rv,onboard_RTC_get_time:()=>uY,onboard_RTC_get_time_str:()=>dY,onboard_RTC_get_timestamp:()=>rY,onboard_RTC_set_datetime:()=>pY,onboard_RTC_settime_string:()=>aY,onboard_RTC_timestamp_totuple:()=>lY,rfid_readcontent:()=>xv,rfid_readid:()=>Xv,rfid_write:()=>bv,rfid_write_return:()=>yv,sensor_LTR308:()=>fv,sensor_adxl345_get_acceleration:()=>Kv,sensor_aht11:()=>vv,sensor_bitbot_ALS:()=>PY,sensor_button_get_presses:()=>xY,sensor_button_is_pressed:()=>YY,sensor_button_was_pressed:()=>XY,sensor_compass_reset:()=>Zv,sensor_ds18x20:()=>Nv,sensor_eulerangles:()=>Bv,sensor_get_acceleration:()=>Vv,sensor_get_temperature:()=>Yv,sensor_hp203:()=>Pv,sensor_light:()=>BY,sensor_lm35:()=>Dv,sensor_mixbot_get_gyro:()=>FY,sensor_mixbot_patrol_calibrate:()=>NY,sensor_mixbot_patrol_value:()=>DY,sensor_mixbot_temperature:()=>fY,sensor_mixgo_LTR308:()=>Av,sensor_mixgo_button_attachInterrupt:()=>av,sensor_mixgo_button_get_presses:()=>pv,sensor_mixgo_button_is_pressed:()=>ov,sensor_mixgo_button_was_pressed:()=>_v,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>hY,sensor_mixgo_cc_mmc5603_get_angle:()=>TY,sensor_mixgo_cc_mmc5603_get_magnetic:()=>IY,sensor_mixgo_light:()=>VY,sensor_mixgo_nova_LTR308:()=>Lv,sensor_mixgo_nova_pin_near:()=>Sv,sensor_mixgo_pin_near:()=>Cv,sensor_mixgo_pin_near_double:()=>gv,sensor_mixgo_pin_near_single:()=>cv,sensor_mixgo_pin_pressed:()=>Hv,sensor_mixgo_touch_slide:()=>kv,sensor_mixgocar42_button_attachInterrupt:()=>dv,sensor_mixgocar42_button_get_presses:()=>lv,sensor_mixgocar42_button_is_pressed:()=>uv,sensor_mixgocar42_button_was_pressed:()=>rv,sensor_mixgocar_battery_left:()=>LY,sensor_mixgocar_pin_near:()=>SY,sensor_mixgocar_pin_near_line:()=>CY,sensor_mixgocar_pin_near_state_change:()=>AY,sensor_mixgoce_pin_pressed:()=>wv,sensor_mixgoce_temperature:()=>mY,sensor_mixgome_temperature:()=>MY,sensor_mpu9250_calibrate_compass:()=>qv,sensor_mpu9250_field_strength:()=>jv,sensor_mpu9250_gesture:()=>Gv,sensor_mpu9250_get_acceleration:()=>Uv,sensor_mpu9250_get_gyro:()=>Qv,sensor_mpu9250_get_magnetic:()=>Jv,sensor_mpu9250_temperature:()=>zv,sensor_mpython_pin_pressed:()=>Wv,sensor_mpython_qmi8658_get_gyro:()=>EY,sensor_mpython_qmi8658_temperature:()=>OY,sensor_onboard_compass_reset:()=>_Y,sensor_onboard_mpu9250_calibrate_compass:()=>nY,sensor_onboard_mpu9250_field_strength:()=>oY,sensor_onboard_mpu9250_gesture:()=>$v,sensor_onboard_mpu9250_get_acceleration:()=>tY,sensor_onboard_mpu9250_get_gyro:()=>iY,sensor_onboard_mpu9250_get_magnetic:()=>eY,sensor_onboard_mpu9250_temperature:()=>sY,sensor_pin_near:()=>yY,sensor_pin_pressed:()=>bY,sensor_rm_acc:()=>gY,sensor_rm_battery_left:()=>cY,sensor_rm_pin_near_double:()=>RY,sensor_sound:()=>Fv});var st={};t.r(st),t.d(st,{serial_any:()=>WY,serial_print:()=>UY,serial_print_byte:()=>wY,serial_print_hex:()=>HY,serial_println:()=>kY,serial_read_from_ai:()=>iX,serial_readline:()=>JY,serial_readstr:()=>KY,serial_send_to_ai:()=>eX,serial_softserial:()=>QY,serial_softserial_new:()=>qY,system_input:()=>zY,system_print:()=>jY,system_print_end:()=>$Y,system_print_inline:()=>ZY,system_print_many:()=>tX});var ot={};t.r(ot),t.d(ot,{Panic_with_status_code:()=>TX,Timer_init:()=>fX,base_delay:()=>vX,controls_delay:()=>OX,controls_delay_new:()=>RX,controls_end_program:()=>MX,controls_millis:()=>hX,controls_uname:()=>EX,reset:()=>mX,system_bitbot_shutdown:()=>DX,system_device_name:()=>dX,system_device_serial_number:()=>IX,system_event_bus_source:()=>rX,system_event_bus_value:()=>lX,system_machine_reset:()=>NX,system_on_event:()=>pX,system_raise_event:()=>_X,system_reset:()=>sX,system_run_in_background:()=>nX,system_ticks_diff:()=>CX,system_timer:()=>gX,system_timer_init:()=>SX,system_timestamp:()=>aX,system_value:()=>uX,system_wait:()=>oX,system_wdt_feed:()=>LX,system_wdt_init:()=>AX,time_ticks_diff:()=>PX,timer:()=>cX,timer2:()=>FX});var _t={};t.r(_t),t.d(_t,{Air_daily_content:()=>WX,Air_now_content:()=>VX,Geo_moon_content:()=>JX,Geo_sun_content:()=>KX,Life_suggestion_content:()=>GX,Location_search_content:()=>wX,Tide_daily_content:()=>UX,WEATHER_DAILY:()=>XX,WEATHER_HOUR:()=>xX,WEATHER_NOW:()=>YX,Weather_alarm_content:()=>BX,Weather_daily:()=>kX,Weather_daily_content:()=>HX,Weather_now:()=>bX,Weather_now_content:()=>yX});var pt={};t.r(pt),t.d(pt,{analog_input:()=>ox,analog_output:()=>px,espnow_channel:()=>ix,haskylens_model:()=>nx,i2c_A_pin:()=>ax,i2c_B_pin:()=>ux,pins_analog:()=>Tx,pins_analog_pin:()=>hx,pins_axis:()=>Px,pins_brightness:()=>vx,pins_builtinimg:()=>Sx,pins_builtinimg_extern:()=>Ax,pins_button:()=>Ex,pins_dac:()=>Mx,pins_dac_pin:()=>mx,pins_digital:()=>jX,pins_digital_dot:()=>Gx,pins_digital_pin:()=>ZX,pins_exlcdh:()=>fx,pins_exlcdv:()=>Fx,pins_imglist:()=>Lx,pins_input_pin:()=>$X,pins_mpython_touch:()=>ex,pins_one_more:()=>Bx,pins_output_pin:()=>tx,pins_playlist:()=>Nx,pins_playlist_extern:()=>Dx,pins_pwm:()=>Ox,pins_pwm_pin:()=>Rx,pins_radio_datarate:()=>Vx,pins_radio_power:()=>yx,pins_serial:()=>Cx,pins_tone_notes:()=>bx,pins_touch:()=>gx,pins_touch_pin:()=>cx,pins_tts_bgmusic:()=>xx,pins_tts_builtin_music:()=>Xx,pins_tts_voice:()=>Yx,pwm_input:()=>sx,pwm_output:()=>_x,spi_A_pin:()=>rx,spi_B_pin:()=>lx,spi_C_pin:()=>dx,spi_D_pin:()=>Ix});var at={};t.r(at),t.d(at,{espnow_channel:()=>zx,haskylens_model:()=>jx,pins_analog:()=>Jx,pins_analog_pin:()=>Kx,pins_axis:()=>rb,pins_brightness:()=>Ib,pins_builtinimg:()=>ob,pins_builtinimg_extern:()=>_b,pins_button:()=>wx,pins_dac:()=>tb,pins_dac_pin:()=>$x,pins_digital:()=>Ux,pins_digital_dot:()=>cb,pins_digital_pin:()=>kx,pins_exlcdh:()=>lb,pins_exlcdv:()=>db,pins_imglist:()=>pb,pins_input_pin:()=>Hx,pins_interrupt:()=>nb,pins_mpython_touch:()=>Zx,pins_one_more:()=>Rb,pins_output_pin:()=>Wx,pins_playlist:()=>ab,pins_playlist_extern:()=>ub,pins_pwm:()=>qx,pins_pwm_pin:()=>Qx,pins_radio_datarate:()=>Ob,pins_radio_power:()=>Eb,pins_serial:()=>sb,pins_tone_notes:()=>mb,pins_touch:()=>ib,pins_touch_pin:()=>eb,pins_tts_bgmusic:()=>Mb,pins_tts_builtin_music:()=>hb,pins_tts_voice:()=>Tb});const ut=Blockly,rt=Mixly,lt={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}},dt=lt; +(()=>{"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:()=>Mt,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:()=>bt,controls_for:()=>yt,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:()=>xt,controls_whileUntil:()=>Xt,datetime_fromtimestamp:()=>te,do_while:()=>qt,garbage_collection:()=>zt,get_mem_alloc:()=>jt,get_mem_free:()=>Zt,get_unique_identifier:()=>$t});var n={};t.r(n),t.d(n,{base_map:()=>ce,math_arithmetic:()=>oe,math_bit:()=>pe,math_constant:()=>ne,math_constant_mp:()=>se,math_constrain:()=>Te,math_dec:()=>ue,math_indexer_number:()=>Me,math_map:()=>he,math_max_min:()=>le,math_number:()=>ie,math_number_base_conversion:()=>de,math_random:()=>Ie,math_random_seed:()=>me,math_round:()=>Ee,math_selfcalcu:()=>_e,math_to_int:()=>re,math_trig:()=>ae,text_to_number:()=>Oe,text_to_number_skulpt:()=>Re,turn_to_int:()=>ge});var s={};t.r(s),t.d(s,{ascii_to_char:()=>De,char_to_ascii:()=>fe,number_to_text:()=>Fe,os_system:()=>ei,text:()=>Se,text_capital:()=>Be,text_center:()=>Ge,text_char:()=>Le,text_char_at:()=>Ye,text_char_at2:()=>ve,text_char_at3:()=>je,text_compareTo:()=>ze,text_compare_to:()=>Ve,text_create_with_container:()=>Je,text_create_with_item:()=>Qe,text_encode:()=>$e,text_equals_starts_ends:()=>ye,text_eval:()=>ti,text_find:()=>Ue,text_format:()=>Ke,text_format_noreturn:()=>Ze,text_join:()=>Ne,text_join_seq:()=>we,text_length:()=>Pe,text_random_char:()=>Xe,text_replace:()=>ke,text_split:()=>He,text_strip:()=>We,text_substring:()=>be,text_substring2:()=>xe,text_substring3:()=>qe,text_textarea:()=>Ae});var o={};t.r(o),t.d(o,{ENUMERATE:()=>yi,enumerate:()=>Vi,list_many_input:()=>Si,list_tolist:()=>Di,list_tolist2:()=>bi,list_trig:()=>ci,lists_2d_get_col_row_data:()=>_i,lists_2d_get_data_with_col_row:()=>oi,lists_append_extend:()=>di,lists_change_to:()=>Ci,lists_change_to_general:()=>Li,lists_clear:()=>mi,lists_create_with:()=>pi,lists_create_with2:()=>fi,lists_create_with_container:()=>ui,lists_create_with_item:()=>ri,lists_create_with_noreturn:()=>Ai,lists_create_with_text:()=>ai,lists_create_with_text2:()=>Fi,lists_del_general:()=>Ni,lists_find:()=>Ri,lists_getIndex3:()=>Pi,lists_getSublist3:()=>vi,lists_get_index:()=>ni,lists_get_random_item:()=>Ii,lists_get_random_sublist:()=>Ti,lists_get_sublist:()=>si,lists_insert_value:()=>hi,lists_insert_value2:()=>Xi,lists_pop:()=>Oi,lists_remove_at:()=>Ei,lists_remove_at2:()=>xi,lists_reverse:()=>Mi,lists_setIndex3:()=>Yi,lists_set_index:()=>li,lists_sort:()=>gi});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>tn,dicts_add_or_change:()=>Ki,dicts_clear:()=>qi,dicts_create_with:()=>Gi,dicts_create_with_container:()=>Ui,dicts_create_with_item:()=>wi,dicts_create_with_noreturn:()=>sn,dicts_deldict:()=>$i,dicts_delete:()=>Ji,dicts_get:()=>Hi,dicts_get_default:()=>Wi,dicts_items:()=>zi,dicts_keys:()=>ki,dicts_length:()=>Zi,dicts_pop:()=>en,dicts_setdefault:()=>nn,dicts_to_json:()=>_n,dicts_todict:()=>on,dicts_update:()=>Qi,dicts_values:()=>ji,json_to_dicts:()=>pn});var p={};t.r(p),t.d(p,{logic_boolean:()=>In,logic_compare:()=>un,logic_compare_continous:()=>rn,logic_is:()=>mn,logic_is_in:()=>Mn,logic_negate:()=>dn,logic_null:()=>Tn,logic_operation:()=>ln,logic_tobool:()=>En,logic_true_or_false:()=>hn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Un,sdcard_use_spi_init:()=>Gn,storage_can_write_ornot:()=>Nn,storage_change_dir:()=>Vn,storage_close_file:()=>fn,storage_delete_file:()=>Pn,storage_file_seek:()=>Xn,storage_file_tell:()=>Yn,storage_file_write:()=>Cn,storage_fileopen:()=>Rn,storage_fileopen_new:()=>cn,storage_fileopen_new_encoding:()=>gn,storage_get_a_line:()=>Ln,storage_get_contents:()=>An,storage_get_contents_without_para:()=>Sn,storage_get_current_dir:()=>xn,storage_get_file_size:()=>vn,storage_get_filename:()=>Dn,storage_is_file:()=>Bn,storage_list_all_files:()=>Fn,storage_make_dir:()=>bn,storage_open_file_with_os:()=>On,storage_rename:()=>yn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Qn,procedures_callreturn:()=>qn,procedures_defnoreturn:()=>Hn,procedures_defreturn:()=>Wn,procedures_ifreturn:()=>zn,procedures_mutatorarg:()=>Jn,procedures_mutatorcontainer:()=>Kn,procedures_return:()=>jn});var r={};t.r(r),t.d(r,{tuple_change_to:()=>us,tuple_create_with:()=>$n,tuple_create_with_container:()=>ts,tuple_create_with_item:()=>es,tuple_create_with_noreturn:()=>Is,tuple_create_with_text2:()=>is,tuple_create_with_text_return:()=>ns,tuple_del:()=>_s,tuple_find:()=>rs,tuple_getIndex:()=>ss,tuple_getSublist:()=>ds,tuple_get_random_item:()=>hs,tuple_get_sublist:()=>Ts,tuple_join:()=>ps,tuple_length:()=>os,tuple_max:()=>as,tuple_totuple:()=>Ms,tuple_trig:()=>ls});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ls,set_clear:()=>Cs,set_create_with:()=>Es,set_create_with_container:()=>Os,set_create_with_item:()=>Rs,set_create_with_text_return:()=>fs,set_length:()=>cs,set_operate:()=>Ss,set_operate_update:()=>As,set_pop:()=>gs,set_sub:()=>Ns,set_toset:()=>Fs,set_update:()=>Ds});var d={};t.r(d),t.d(d,{html_content:()=>xs,html_content_more:()=>bs,html_document:()=>vs,html_form:()=>Vs,html_head_body:()=>Xs,html_style:()=>ys,html_style_color:()=>Gs,html_style_content:()=>Bs,html_text:()=>Us,html_title:()=>Ys});var I={};t.r(I),t.d(I,{attribute_access:()=>eo,function_call:()=>Zs,function_call_container:()=>$s,function_call_item:()=>to,raw_block:()=>Hs,raw_empty:()=>Ks,raw_expression:()=>Ws,raw_table:()=>ks,text_comment:()=>Js,text_print_multiple:()=>qs,text_print_multiple_container:()=>zs,text_print_multiple_item:()=>js,type_check:()=>Qs});var T={};t.r(T),t.d(T,{controls_type:()=>_o,controls_typeLists:()=>po,lists_zip:()=>ao,unpack_iterable_object:()=>uo,variables_change:()=>so,variables_get:()=>io,variables_global:()=>oo,variables_set:()=>no});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>Ro,base_setup:()=>lo,controls_delay:()=>Oo,controls_flow_statements:()=>Eo,controls_for:()=>ho,controls_forEach:()=>Ao,controls_for_range:()=>Mo,controls_if:()=>Io,controls_interrupts:()=>Co,controls_lambda:()=>No,controls_main:()=>ro,controls_millis:()=>co,controls_nointerrupts:()=>So,controls_pass:()=>fo,controls_range:()=>Lo,controls_repeat:()=>yo,controls_repeat_ext:()=>vo,controls_thread:()=>Fo,controls_try_finally:()=>To,controls_whileUntil:()=>mo,datetime_fromtimestamp:()=>Vo,do_while:()=>Po,garbage_collection:()=>Yo,get_mem_alloc:()=>Xo,get_mem_free:()=>xo,get_unique_identifier:()=>bo,reset:()=>go,time_sleep:()=>Do});var M={};t.r(M),t.d(M,{base_map:()=>o_,math_arithmetic:()=>ko,math_bit:()=>wo,math_constant:()=>Go,math_constant_mp:()=>Uo,math_constrain:()=>Zo,math_dec:()=>Jo,math_indexer_number:()=>e_,math_map:()=>jo,math_max_min:()=>qo,math_number:()=>Bo,math_number_base_conversion:()=>$o,math_random:()=>zo,math_random_seed:()=>t_,math_round:()=>i_,math_selfcalcu:()=>Ho,math_single:()=>Wo,math_to_int:()=>Qo,math_trig:()=>Ko,text_to_number:()=>n_,text_to_number_skulpt:()=>s_,turn_to_int:()=>__});var m={};t.r(m),t.d(m,{ascii_to_char:()=>l_,char_to_ascii:()=>d_,number_to_text:()=>I_,os_system:()=>b_,text:()=>p_,text_capital:()=>g_,text_center:()=>C_,text_char:()=>u_,text_char_at:()=>M_,text_char_at2:()=>h_,text_char_at3:()=>Y_,text_compareTo:()=>v_,text_compare_to:()=>O_,text_encode:()=>X_,text_equals_starts_ends:()=>E_,text_eval:()=>x_,text_find:()=>S_,text_format:()=>f_,text_format_noreturn:()=>F_,text_join:()=>r_,text_join_seq:()=>A_,text_length:()=>T_,text_random_char:()=>m_,text_replace:()=>L_,text_split:()=>N_,text_strip:()=>D_,text_substring:()=>c_,text_substring2:()=>R_,text_substring3:()=>P_,text_textarea:()=>a_});var E={};t.r(E),t.d(E,{enumerate:()=>hp,list_many_input:()=>ip,list_tolist:()=>Ip,list_tolist2:()=>Tp,list_trig:()=>$_,lists_2d_get_col_row_data:()=>B_,lists_2d_get_data_with_col_row:()=>V_,lists_append_extend:()=>H_,lists_change_to:()=>ep,lists_change_to_general:()=>sp,lists_clear:()=>q_,lists_create_with:()=>G_,lists_create_with2:()=>_p,lists_create_with_noreturn:()=>np,lists_create_with_text:()=>U_,lists_create_with_text2:()=>pp,lists_del_general:()=>op,lists_find:()=>z_,lists_getIndex3:()=>ap,lists_getSublist3:()=>up,lists_get_index:()=>w_,lists_get_random_item:()=>W_,lists_get_random_sublist:()=>K_,lists_get_sublist:()=>y_,lists_insert_value:()=>J_,lists_insert_value2:()=>lp,lists_pop:()=>Z_,lists_remove_at:()=>j_,lists_remove_at2:()=>dp,lists_reverse:()=>Q_,lists_setIndex3:()=>rp,lists_set_index:()=>k_,lists_sort:()=>tp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Dp,dicts_add_or_change:()=>Rp,dicts_clear:()=>Cp,dicts_create_with:()=>Mp,dicts_create_with_noreturn:()=>Pp,dicts_deldict:()=>Np,dicts_delete:()=>cp,dicts_get:()=>Ep,dicts_get_default:()=>Op,dicts_items:()=>Sp,dicts_keys:()=>mp,dicts_length:()=>Lp,dicts_pop:()=>fp,dicts_setdefault:()=>Fp,dicts_to_json:()=>Yp,dicts_todict:()=>vp,dicts_update:()=>gp,dicts_values:()=>Ap,json_to_dicts:()=>Xp});var R={};t.r(R),t.d(R,{logic_boolean:()=>Bp,logic_compare:()=>xp,logic_compare_continous:()=>bp,logic_is:()=>kp,logic_is_in:()=>wp,logic_negate:()=>Vp,logic_null:()=>Gp,logic_operation:()=>yp,logic_tobool:()=>Hp,logic_true_or_false:()=>Up});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ia,sdcard_use_spi_init:()=>da,storage_can_write_ornot:()=>$p,storage_change_dir:()=>pa,storage_close_file:()=>ea,storage_delete_file:()=>na,storage_file_seek:()=>_a,storage_file_tell:()=>oa,storage_file_write:()=>qp,storage_fileopen:()=>Kp,storage_fileopen_new:()=>Jp,storage_fileopen_new_encoding:()=>Qp,storage_get_a_line:()=>Zp,storage_get_contents:()=>jp,storage_get_contents_without_para:()=>zp,storage_get_current_dir:()=>aa,storage_get_file_size:()=>sa,storage_get_filename:()=>ta,storage_is_file:()=>la,storage_list_all_files:()=>ia,storage_make_dir:()=>ua,storage_open_file_with_os:()=>Wp,storage_rename:()=>ra});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>ma,procedures_callreturn:()=>Ma,procedures_defnoreturn:()=>ha,procedures_defreturn:()=>Ta,procedures_ifreturn:()=>Ea,procedures_return:()=>Oa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Da,tuple_create_with:()=>Ra,tuple_create_with_noreturn:()=>va,tuple_create_with_text2:()=>ca,tuple_create_with_text_return:()=>ga,tuple_del:()=>Aa,tuple_find:()=>fa,tuple_getIndex:()=>Ca,tuple_getSublist:()=>Pa,tuple_get_random_item:()=>Xa,tuple_get_sublist:()=>Ya,tuple_join:()=>La,tuple_length:()=>Sa,tuple_max:()=>Na,tuple_totuple:()=>xa,tuple_trig:()=>Fa});var S={};t.r(S),t.d(S,{set_add_discard:()=>wa,set_clear:()=>Ba,set_create_with:()=>ba,set_create_with_text_return:()=>Wa,set_length:()=>ya,set_operate:()=>Ga,set_operate_update:()=>Ua,set_pop:()=>Va,set_sub:()=>ka,set_toset:()=>Ka,set_update:()=>Ha});var A={};t.r(A),t.d(A,{html_content:()=>za,html_content_more:()=>ja,html_document:()=>Ja,html_form:()=>$a,html_head_body:()=>qa,html_style:()=>Za,html_style_content:()=>tu,html_text:()=>eu,html_title:()=>Qa});var L={};t.r(L),t.d(L,{attribute_access:()=>au,function_call:()=>pu,raw_block:()=>iu,raw_empty:()=>su,raw_expression:()=>nu,raw_table:()=>ou,type_check:()=>_u});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Ru,actuator_extern_get_led_state:()=>cu,actuator_extern_led_bright:()=>Ou,actuator_extern_led_brightness:()=>gu,actuator_ms32006_dcmotor:()=>Pu,actuator_ms32006_init:()=>Fu,actuator_ms32006_stepper:()=>vu,actuator_neopixel_init:()=>Yu,actuator_neopixel_rgb:()=>Xu,actuator_neopixel_rgb_all:()=>xu,actuator_neopixel_write:()=>bu,actuator_use_uart_init:()=>yu,esp32_music_get_tempo_extern:()=>Mu,esp32_music_pitch:()=>du,esp32_music_pitch_init:()=>lu,esp32_music_pitch_with_time:()=>Iu,esp32_music_play_list:()=>Tu,esp32_music_reset_extern:()=>mu,esp32_music_set_tempo_extern:()=>hu,esp32_music_stop:()=>Eu,mixbot_actuator_extern_get_addr:()=>er,mixbot_actuator_extern_set_addr:()=>ir,mixbot_addr_extern:()=>wu,robot_led_extern:()=>Ku,robot_led_extern_get_value:()=>Ju,robot_motor_extern:()=>ku,robot_motor_extern_get_speed:()=>Hu,robot_servo_extern_absolute_run:()=>ju,robot_servo_extern_get_status:()=>Qu,robot_servo_extern_relative_continue:()=>tr,robot_servo_extern_relative_origin:()=>Zu,robot_servo_extern_relative_run:()=>$u,robot_servo_extern_stop:()=>zu,robot_servo_extern_stop_mode:()=>qu,robot_traffic_light_extern:()=>Wu,servo_get_angle:()=>Du,servo_get_speed:()=>fu,servo_init:()=>Cu,servo_move:()=>Su,servo_set_angle:()=>Lu,servo_set_speed:()=>Nu,servo_speed_360:()=>Au,syn6288_builtin_voice:()=>Gu,syn6288_get_voice:()=>Bu,syn6288_set_voice:()=>Vu,syn6288_tts_play:()=>Uu});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Xr,actuator_dc_motor_stop:()=>xr,actuator_get_led_bright:()=>pr,actuator_get_led_state:()=>ar,actuator_led_bright:()=>_r,actuator_led_brightness:()=>ur,actuator_mixbot_buzzer_on_off:()=>Gr,actuator_mixgo_nova_mic_get:()=>Wr,actuator_mixgo_nova_mic_set:()=>Hr,actuator_mixgo_nova_onboard_music_pitch:()=>jr,actuator_mixgo_nova_onboard_music_stop:()=>Zr,actuator_mixgo_nova_play_audio:()=>qr,actuator_mixgo_nova_play_online_audio:()=>zr,actuator_mixgo_nova_record_audio:()=>Qr,actuator_mixgo_nova_voice_get:()=>Jr,actuator_mixgo_nova_voice_set:()=>Kr,actuator_mixgo_zero_led_color:()=>rr,actuator_onboard_neopixel_rgb:()=>Mr,actuator_onboard_neopixel_rgb_all:()=>mr,actuator_onboard_neopixel_rgb_show_all_chase:()=>Or,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>Er,actuator_onboard_neopixel_write:()=>Rr,actuator_rm_onboard_neopixel_rgb:()=>cr,actuator_rm_onboard_neopixel_rgb_all:()=>gr,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Cr,actuator_stepper_keep:()=>vr,actuator_stepper_stop:()=>Yr,analog_ble_keyboard_init:()=>ll,analog_ble_keyboard_input:()=>Tl,analog_ble_keyboard_send_battery:()=>Ml,analog_ble_keyboard_str:()=>hl,analog_ble_mouse_init:()=>ml,analog_ble_mouse_input:()=>Rl,analog_ble_mouse_send_battery:()=>cl,analog_keyboard_input:()=>il,analog_keyboard_str:()=>rl,analog_mouse_input:()=>al,bitbot_motor:()=>kr,bitbot_move:()=>Ur,bitbot_stop:()=>wr,ble_keyboard_connect:()=>Il,ble_keyboard_get_mac:()=>dl,ble_mouse_connect:()=>Ol,ble_mouse_get_mac:()=>El,cc_number:()=>hr,esp32_music_get_tempo:()=>Ar,esp32_music_reset:()=>Lr,esp32_music_set_tempo:()=>Sr,esp32_onboard_music_pitch:()=>Nr,esp32_onboard_music_pitch_with_time:()=>Dr,esp32_onboard_music_play_list:()=>Fr,esp32_onboard_music_stop:()=>fr,general_key:()=>sl,general_key_tuple:()=>ol,generalkey_container:()=>_l,generalkey_create_with_item:()=>pl,get_power_output:()=>tl,ledswitch:()=>or,mixbot_motor:()=>Br,mixbot_motor_status:()=>br,mixbot_move:()=>yr,mixbot_stop:()=>Vr,mouse_key:()=>ul,number:()=>sr,rm_actuator_get_led_bright:()=>dr,rm_actuator_get_led_state:()=>Ir,rm_actuator_led_bright:()=>lr,rm_actuator_led_brightness:()=>Tr,rm_motor:()=>Pr,set_all_power_output:()=>el,set_power_output:()=>$r,special_key:()=>nl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>ed,ai_sensor_ailocal_class:()=>Hl,ai_sensor_ailocal_class_result:()=>Wl,ai_sensor_ailocal_train:()=>kl,ai_sensor_asr_recognize:()=>zl,ai_sensor_audio_play:()=>Jl,ai_sensor_audio_record:()=>Kl,ai_sensor_barcode:()=>fl,ai_sensor_circle:()=>xl,ai_sensor_classifier_faces:()=>td,ai_sensor_color:()=>Bl,ai_sensor_color_chases:()=>wl,ai_sensor_color_chases_result:()=>Ul,ai_sensor_config:()=>Nl,ai_sensor_face:()=>$l,ai_sensor_find_20objects:()=>id,ai_sensor_find_barcodes:()=>Fl,ai_sensor_find_circles:()=>bl,ai_sensor_find_colors:()=>Gl,ai_sensor_find_licenseplates:()=>Zl,ai_sensor_find_lines:()=>Xl,ai_sensor_find_qrcodes:()=>Ll,ai_sensor_find_rects:()=>Vl,ai_sensor_find_tags:()=>vl,ai_sensor_licenseplate:()=>jl,ai_sensor_line:()=>Yl,ai_sensor_qrcode:()=>Sl,ai_sensor_qrcode_lite:()=>Al,ai_sensor_rect:()=>yl,ai_sensor_rgb:()=>Dl,ai_sensor_tag:()=>Pl,ai_sensor_use_uart_init:()=>Cl,ai_sensor_yolo_recognize:()=>Ql,ai_sensor_yolo_recognize_result:()=>ql});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>od,MICROPYTHON_AI_Speech_unit:()=>sd,MICROPYTHON_AI_client:()=>nd});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>Rd,mpython_blynk_app_notify:()=>Id,mpython_blynk_email:()=>Md,mpython_blynk_get_timers:()=>md,mpython_blynk_on_connected:()=>rd,mpython_blynk_on_disconnected:()=>ud,mpython_blynk_run:()=>dd,mpython_blynk_sensor_data_to_app:()=>Od,mpython_blynk_set_property:()=>hd,mpython_blynk_setup:()=>cd,mpython_blynk_stop_timers:()=>Td,mpython_blynk_sync_virtual:()=>ad,mpython_blynk_terminal_widget_vpin:()=>pd,mpython_blynktimer:()=>Ed,mpython_blynktimer_run:()=>ld});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>nI,communicate_bluetooth_connect:()=>pI,communicate_bluetooth_disconnect:()=>aI,communicate_bluetooth_handle:()=>II,communicate_bluetooth_is_connected:()=>rI,communicate_bluetooth_mac:()=>_I,communicate_bluetooth_peripheral_init:()=>sI,communicate_bluetooth_recv:()=>lI,communicate_bluetooth_recv_only:()=>dI,communicate_bluetooth_scan:()=>oI,communicate_bluetooth_send:()=>uI,communicate_espnow_init:()=>TI,communicate_espnow_init_new:()=>hI,communicate_i2c_available:()=>Bd,communicate_i2c_init:()=>Ad,communicate_i2c_master_read:()=>Vd,communicate_i2c_onboard:()=>Cd,communicate_i2c_read:()=>Ld,communicate_i2c_scan:()=>Dd,communicate_i2c_write:()=>Nd,communicate_ir_recv_init:()=>Jd,communicate_ir_send_init:()=>Zd,communicate_ow_init:()=>Ud,communicate_ow_read:()=>kd,communicate_ow_reset:()=>Kd,communicate_ow_scan:()=>wd,communicate_ow_select:()=>Wd,communicate_ow_write:()=>Hd,communicate_spi_buffer:()=>Pd,communicate_spi_init:()=>fd,communicate_spi_onboard:()=>Sd,communicate_spi_read:()=>vd,communicate_spi_read_output:()=>Yd,communicate_spi_readinto:()=>Xd,communicate_spi_readinto_output:()=>xd,communicate_spi_set:()=>Fd,communicate_spi_write:()=>bd,communicate_spi_write_readinto:()=>yd,espnow_radio_channel:()=>cI,espnow_radio_channel_new:()=>CI,espnow_radio_on_off:()=>SI,espnow_radio_rec:()=>LI,espnow_radio_recv:()=>DI,espnow_radio_recv_certain_msg:()=>fI,espnow_radio_recv_certain_msg_new:()=>PI,espnow_radio_recv_msg:()=>NI,espnow_radio_recv_new:()=>FI,espnow_radio_send:()=>AI,espnow_radio_txpower:()=>gI,i2c_available:()=>$I,i2c_init:()=>BI,i2c_master_reader2:()=>ZI,i2c_read:()=>GI,i2c_scan:()=>wI,i2c_slave_onreceive:()=>Gd,i2c_write:()=>UI,internal_variable:()=>Qd,ir_recv_timeout:()=>jd,ir_transmit_busy:()=>iI,ir_transmit_conventional_data:()=>$d,ir_transmit_raw_code:()=>eI,ir_transmit_study_code:()=>tI,ir_whether_recv:()=>zd,lora_init:()=>vI,lora_packet:()=>YI,lora_recv:()=>xI,lora_send:()=>XI,network_espnow_info:()=>mI,network_espnow_mac:()=>MI,network_espnow_recv:()=>EI,network_espnow_recv_handle:()=>RI,network_espnow_send:()=>OI,recv_fun:()=>qd,spi_buffer:()=>WI,spi_init:()=>kI,spi_read:()=>KI,spi_read_output:()=>JI,spi_readinto:()=>QI,spi_readinto_output:()=>qI,spi_set:()=>HI,spi_write:()=>zI,spi_write_readinto:()=>jI,urequests_attribute:()=>yI,urequests_get:()=>bI,urequests_method:()=>VI});var Y={};t.r(Y),t.d(Y,{display_animate:()=>fT,display_blink_rate:()=>AT,display_circle:()=>FT,display_color_seclet:()=>wT,display_draw_4strings:()=>OT,display_fill:()=>DT,display_get_screen_image:()=>ST,display_help:()=>vT,display_image_size:()=>RT,display_lcd_use_i2c_init:()=>QT,display_line:()=>gT,display_line_arbitrarily:()=>CT,display_matrix_extern_bright_point:()=>lT,display_matrix_extern_bright_screen:()=>IT,display_matrix_extern_clear:()=>TT,display_matrix_extern_get_pixel:()=>rT,display_matrix_extern_get_screen_pixel:()=>dT,display_matrix_extern_image_builtins:()=>hT,display_matrix_extern_scroll_string:()=>oT,display_matrix_extern_scroll_string_delay:()=>_T,display_matrix_extern_shift:()=>uT,display_matrix_extern_show_frame_string:()=>pT,display_matrix_extern_show_frame_string_delay:()=>aT,display_matrix_extern_show_image:()=>nT,display_matrix_extern_show_image_or_string_delay:()=>sT,display_matrix_use_i2c_init:()=>iT,display_oled_drawPixel:()=>XT,display_oled_showBitmap:()=>YT,display_oled_use_i2c_init:()=>$T,display_onoff:()=>NT,display_rect:()=>cT,display_rgb_color:()=>LT,display_tm1650_power:()=>bT,display_tm1650_set_brightness:()=>BT,display_tm1650_show_dot:()=>VT,display_tm1650_show_num:()=>yT,display_tm_use_i2c_init:()=>xT,display_triangle:()=>PT,display_use_i2c_init:()=>ET,extern_oled_bright_point:()=>rh,extern_oled_clear:()=>lh,extern_oled_get_pixel:()=>uh,extern_oled_hvline:()=>Ih,extern_oled_line:()=>Th,extern_oled_scroll_string:()=>sh,extern_oled_scroll_string_delay:()=>oh,extern_oled_shape_rect:()=>dh,extern_oled_shift:()=>ah,extern_oled_show_frame_string:()=>_h,extern_oled_show_frame_string_delay:()=>ph,extern_oled_show_image:()=>th,extern_oled_show_image_or_string_delay:()=>nh,extern_oled_show_image_xy:()=>eh,extern_oled_show_string:()=>ih,lcd_backlight:()=>jT,lcd_clear:()=>ZT,lcd_print_string:()=>zT,lcd_show_image_or_string_delay:()=>qT,matrix_extern_image_arithmetic:()=>MT,matrix_extern_image_invert:()=>mT,tft_fill:()=>KT,tft_line_arbitrarily:()=>JT,tft_scroll_string_delay:()=>HT,tft_show_frame_string_delay:()=>WT,tft_show_image_or_string_delay:()=>kT,tft_show_image_xy:()=>UT,tft_use_spi_init:()=>GT});var X={};t.r(X),t.d(X,{bitbot_display_image_create:()=>$h,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:()=>gh,display_scroll_string:()=>Eh,display_scroll_string_delay:()=>Oh,display_shift:()=>Nh,display_show_frame_string:()=>Rh,display_show_frame_string_delay:()=>ch,display_show_image:()=>Mh,display_show_image_or_string_delay:()=>mh,draw_pointer:()=>CM,image_arithmetic:()=>Ah,image_invert:()=>Lh,mixbot_display_bright_screen:()=>jh,mixbot_display_get_ambientbright:()=>zh,mixbot_display_get_screen_pixel:()=>qh,mixbot_display_image_create:()=>Qh,mixbot_display_rotate:()=>Zh,mixgo_display_image_create_new:()=>xh,mixgome_display_font:()=>bh,mixgome_display_image_create:()=>Yh,mixgomini_display_image_create:()=>Xh,mpython_display_hvline:()=>Wh,mpython_display_line:()=>Kh,mpython_display_shape_rect:()=>Hh,mpython_pbm_image:()=>Jh,onboard_oled_bright_point:()=>kh,onboard_oled_scroll_string_delay:()=>Uh,onboard_oled_show_frame_string_delay:()=>wh,onboard_oled_show_image:()=>yh,onboard_oled_show_image_or_string_delay:()=>Gh,onboard_oled_show_image_xy:()=>Vh,onboard_oled_show_string:()=>Bh,onboard_tft_bright_point:()=>dM,onboard_tft_bright_screen:()=>hM,onboard_tft_clear:()=>IM,onboard_tft_clock_clear:()=>cM,onboard_tft_clock_draw:()=>RM,onboard_tft_clock_get_rtctime:()=>EM,onboard_tft_clock_init:()=>mM,onboard_tft_clock_set_time:()=>OM,onboard_tft_display_hvline:()=>aM,onboard_tft_display_line:()=>uM,onboard_tft_display_shape_circle:()=>gM,onboard_tft_display_shape_rect:()=>pM,onboard_tft_fill:()=>MM,onboard_tft_get_pixel:()=>lM,onboard_tft_get_screen_pixel:()=>TM,onboard_tft_scroll_string:()=>nM,onboard_tft_scroll_string_delay:()=>sM,onboard_tft_shift:()=>rM,onboard_tft_show_frame_string:()=>oM,onboard_tft_show_frame_string_delay:()=>_M,onboard_tft_show_image:()=>tM,onboard_tft_show_image_or_string_delay:()=>iM,onboard_tft_show_image_xy:()=>eM});var x={};t.r(x),t.d(x,{factory_block:()=>XM,factory_block_return:()=>xM,factory_block_return_with_textarea:()=>yM,factory_block_with_textarea:()=>bM,factory_callMethod_noreturn:()=>vM,factory_callMethod_return:()=>YM,factory_create_with_container:()=>DM,factory_create_with_item:()=>fM,factory_declare:()=>PM,factory_from_import:()=>AM,factory_function_noreturn:()=>NM,factory_function_return:()=>FM,factory_import:()=>LM,folding_block:()=>VM});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>_m,inout_analog_atten:()=>QM,inout_analog_read:()=>JM,inout_analog_read_init:()=>tm,inout_analog_write:()=>HM,inout_analog_write_init:()=>$M,inout_analog_write_set:()=>WM,inout_analog_write_set_freq:()=>nm,inout_digital_init:()=>jM,inout_digital_read:()=>wM,inout_digital_write:()=>UM,inout_highlow:()=>GM,inout_pinMode:()=>im,inout_pin_attachInterrupt:()=>zM,inout_pin_pressed:()=>qM,inout_pin_pressed_init:()=>em,inout_pwm_analog_write:()=>kM,inout_pwm_analog_write_init:()=>ZM,inout_pwm_analog_write_set_freq:()=>KM,pin_pressed:()=>om,pin_pressed_init:()=>sm});var y={};t.r(y),t.d(y,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Fm,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>fm,IOT_EMQX_PING:()=>Nm,IOT_FORMATTING:()=>Am,IOT_FORMAT_STRING:()=>Lm,IOT_MIXIO_NTP:()=>Dm,IOT_MIXIO_PUBLISH:()=>Em,IOT_MIXIO_SUBSCRIBE:()=>Om,iot_checkonenet:()=>Gm,iot_client_onboard:()=>vm,iot_create_with_item:()=>Mm,iot_http_client:()=>Ym,iot_http_data:()=>Xm,iot_mixio_check:()=>gm,iot_mixio_connect:()=>mm,iot_mixio_connect_only:()=>cm,iot_mixio_disconnect:()=>Rm,iot_mixio_format_msg:()=>Sm,iot_mixio_format_topic:()=>Cm,iot_mixly_key:()=>Pm,iot_mqtt_client:()=>xm,iot_mqtt_data:()=>bm,iot_onenet_check:()=>lm,iot_onenet_connect:()=>um,iot_onenet_disconnect:()=>rm,iot_onenet_publish:()=>Im,iot_onenet_publish_dict:()=>dm,iot_onenetconnect:()=>Vm,iot_onenetdisconnect:()=>Bm,iot_publish:()=>Um,iot_publish_container:()=>Tm,iot_publish_item:()=>hm,iot_wifi_connect:()=>am,iot_wificonnect:()=>ym});var V={};t.r(V),t.d(V,{network_ap_connect:()=>Zm,network_connect:()=>Jm,network_get_connect:()=>qm,network_get_wifi:()=>jm,network_init:()=>km,network_is_active:()=>Wm,network_open:()=>Hm,network_scan:()=>Km,network_server:()=>$m,network_socket_accept:()=>sE,network_socket_bind:()=>eE,network_socket_close:()=>uE,network_socket_connect:()=>iE,network_socket_init:()=>tE,network_socket_listen:()=>nE,network_socket_receive:()=>oE,network_socket_receive_from:()=>pE,network_socket_send:()=>_E,network_socket_send_to:()=>aE,network_stop:()=>zm,network_wifi_connect:()=>Qm,ntptime_address:()=>TE,ntptime_time:()=>IE,requests_attribute:()=>lE,requests_attribute2:()=>EE,requests_get:()=>rE,requests_get2:()=>ME,requests_method:()=>dE,requests_post:()=>mE});var B={};t.r(B),t.d(B,{HCSR04:()=>OO,PS2_Button:()=>CO,PS2_Buttons:()=>AO,PS2_Buttons_new:()=>fO,PS2_State:()=>SO,PS2_init:()=>RO,PS2_init_new:()=>NO,PS2_stk:()=>LO,PS2_stk_new:()=>FO,PS2_vibration:()=>gO,PS2_vibration_new:()=>DO,esp32_s2_weather_init:()=>hO,esp32_s2_weather_rain:()=>mO,esp32_s2_weather_wd:()=>MO,esp32_s2_weather_ws:()=>EO,extern_rfid_read:()=>eO,extern_rfid_readcontent:()=>nO,extern_rfid_readid:()=>iO,extern_rfid_status:()=>_O,extern_rfid_write:()=>sO,extern_rfid_write_return:()=>oO,gnss_get_data:()=>XO,gnss_have_data:()=>YO,mixbot_sensor_extern_get_addr:()=>UO,mixbot_sensor_extern_set_addr:()=>wO,pm25_get_data:()=>vO,robot_button_extern_get_value:()=>xO,robot_color_extern_get_value:()=>GO,robot_infrared_extern_get_value:()=>yO,robot_infrared_extern_grey_get_value:()=>VO,robot_potentiometer_extern_get_value:()=>BO,robot_sonar_extern_get_value:()=>kO,robot_sonar_extern_led:()=>HO,robot_touch_extern_get_value:()=>bO,sensor_APDS9960_extern:()=>yE,sensor_DS18X20:()=>YE,sensor_LTR308_extern:()=>VE,sensor_LTR390UV_extern:()=>GE,sensor_MAX30102_extern:()=>bE,sensor_QMC5883L_extern:()=>WE,sensor_VL530LX_extern:()=>UE,sensor_adxl345_get_acceleration:()=>AE,sensor_aht11_extern:()=>kE,sensor_bmp:()=>PE,sensor_compass_reset:()=>$E,sensor_dht11:()=>NE,sensor_hp203_extern:()=>HE,sensor_light_level:()=>LE,sensor_lm35:()=>XE,sensor_ltr381_extern:()=>BE,sensor_mixgo_extern_button_attachInterrupt:()=>CE,sensor_mixgo_extern_button_get_presses:()=>gE,sensor_mixgo_extern_button_is_pressed:()=>RE,sensor_mixgo_extern_button_was_pressed:()=>cE,sensor_mixgo_extern_light:()=>DE,sensor_mixgo_extern_pin_near:()=>FE,sensor_mixgo_extern_sound:()=>fE,sensor_mixgoce_hot_wheel_degrees:()=>TO,sensor_mixgoce_hot_wheel_is_touched:()=>IO,sensor_mpu9250_attachGestureInterrupt:()=>SE,sensor_mpu9250_calibrate_compass:()=>zE,sensor_mpu9250_field_strength:()=>ZE,sensor_mpu9250_gesture:()=>KE,sensor_mpu9250_get_acceleration:()=>JE,sensor_mpu9250_get_gyro:()=>qE,sensor_mpu9250_get_magnetic:()=>QE,sensor_mpu9250_temperature:()=>jE,sensor_sht:()=>vE,sensor_shtc3_extern:()=>wE,sensor_use_i2c_init:()=>xE,sensor_use_spi_init:()=>tO,sensor_use_uart_init:()=>PO,sensor_weather_solo_init:()=>WO,sensor_weather_solo_rain:()=>QO,sensor_weather_solo_wd:()=>KO,sensor_weather_solo_ws:()=>JO,weather_data:()=>pO,weather_have_data:()=>aO,weather_set_label:()=>rO,weather_set_label_container:()=>lO,weather_set_label_item:()=>dO,weather_uart_mixio:()=>uO});var G={};t.r(G),t.d(G,{HCSR04:()=>lR,RTC_set_date:()=>rR,RTC_set_time:()=>uR,bitbot_als_num:()=>mc,dht11:()=>Sc,number1:()=>IR,number2:()=>TR,number3:()=>hR,number4:()=>MR,number5:()=>mR,number6:()=>ER,number7:()=>OR,onboard_RTC_get_time:()=>LR,onboard_RTC_get_time_str:()=>vR,onboard_RTC_get_timestamp:()=>NR,onboard_RTC_set_datetime:()=>FR,onboard_RTC_settime_string:()=>fR,onboard_RTC_timestamp_totuple:()=>DR,rfid_readcontent:()=>BR,rfid_readid:()=>VR,rfid_write:()=>GR,rfid_write_return:()=>UR,sensor_LTR308:()=>YR,sensor_aht11:()=>xR,sensor_bitbot_ALS:()=>Mc,sensor_button_get_presses:()=>Rc,sensor_button_is_pressed:()=>Ec,sensor_button_was_pressed:()=>Oc,sensor_distance_hrsc04:()=>aR,sensor_eulerangles:()=>kR,sensor_field_strength:()=>Ac,sensor_get_acceleration:()=>wR,sensor_get_temperature:()=>bR,sensor_hp203:()=>yR,sensor_light:()=>Cc,sensor_mixbot_get_gyro:()=>hc,sensor_mixbot_patrol_calibrate:()=>dc,sensor_mixbot_patrol_value:()=>Ic,sensor_mixbot_temperature:()=>Tc,sensor_mixgo_LTR308:()=>AR,sensor_mixgo_button_attachInterrupt:()=>$O,sensor_mixgo_button_get_presses:()=>ZO,sensor_mixgo_button_is_pressed:()=>zO,sensor_mixgo_button_was_pressed:()=>jO,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>tc,sensor_mixgo_cc_mmc5603_get_angle:()=>$R,sensor_mixgo_cc_mmc5603_get_magnetic:()=>ZR,sensor_mixgo_light:()=>dR,sensor_mixgo_nova_LTR308:()=>SR,sensor_mixgo_nova_pin_near:()=>CR,sensor_mixgo_pin_near:()=>gR,sensor_mixgo_pin_near_double:()=>cR,sensor_mixgo_pin_near_single:()=>RR,sensor_mixgo_pin_pressed:()=>sR,sensor_mixgo_touch_slide:()=>pR,sensor_mixgocar42_button_attachInterrupt:()=>nR,sensor_mixgocar42_button_get_presses:()=>iR,sensor_mixgocar42_button_is_pressed:()=>tR,sensor_mixgocar42_button_was_pressed:()=>eR,sensor_mixgocar_battery_left:()=>lc,sensor_mixgocar_pin_near:()=>uc,sensor_mixgocar_pin_near_line:()=>ac,sensor_mixgocar_pin_near_state_change:()=>rc,sensor_mixgoce_pin_pressed:()=>oR,sensor_mixgoce_temperature:()=>ic,sensor_mixgome_temperature:()=>ec,sensor_mpython_pin_pressed:()=>_R,sensor_mpython_qmi8658_get_gyro:()=>nc,sensor_mpython_qmi8658_temperature:()=>sc,sensor_onboard_compass_reset:()=>jR,sensor_onboard_mpu9250_calibrate_compass:()=>QR,sensor_onboard_mpu9250_field_strength:()=>zR,sensor_onboard_mpu9250_gesture:()=>HR,sensor_onboard_mpu9250_get_acceleration:()=>WR,sensor_onboard_mpu9250_get_gyro:()=>JR,sensor_onboard_mpu9250_get_magnetic:()=>KR,sensor_onboard_mpu9250_temperature:()=>qR,sensor_pin_near:()=>gc,sensor_pin_pressed:()=>cc,sensor_rm_acc:()=>pc,sensor_rm_battery_left:()=>_c,sensor_rm_pin_near_double:()=>oc,sensor_rtc_init:()=>PR,sensor_sound:()=>XR,sensor_temperature:()=>Lc});var U={};t.r(U),t.d(U,{serial_any:()=>Xc,serial_begin:()=>Bc,serial_print:()=>fc,serial_print_byte:()=>Dc,serial_print_hex:()=>Pc,serial_println:()=>Fc,serial_read_from_ai:()=>Qc,serial_readline:()=>xc,serial_readstr:()=>Yc,serial_readstr_until:()=>bc,serial_receive_data_event:()=>vc,serial_send_to_ai:()=>Jc,serial_softserial:()=>Vc,serial_softserial_new:()=>yc,system_input:()=>Gc,system_print:()=>Uc,system_print_container:()=>Wc,system_print_end:()=>kc,system_print_inline:()=>wc,system_print_item:()=>Kc,system_print_many:()=>Hc});var w={};t.r(w),t.d(w,{Panic_with_status_code:()=>Zc,Timer_init:()=>lg,base_delay:()=>Tg,controls_delay:()=>jc,controls_delay_new:()=>zc,controls_millis:()=>tg,controls_uname:()=>ig,raw_block:()=>eg,reset:()=>$c,system_bitbot_shutdown:()=>rg,system_machine_reset:()=>ug,system_ticks_diff:()=>og,system_timer:()=>sg,system_timer_init:()=>_g,system_wdt_feed:()=>ag,system_wdt_init:()=>pg,time_ticks_diff:()=>Ig,timer:()=>ng,timer2:()=>dg});var k={};t.r(k),t.d(k,{Air_daily_content:()=>Dg,Air_now_content:()=>cg,Geo_moon_content:()=>Fg,Geo_sun_content:()=>fg,Life_suggestion_content:()=>Cg,Location_search_content:()=>Ag,Tide_daily_content:()=>Sg,WEATHER_DAILY:()=>mg,WEATHER_HOUR:()=>Eg,WEATHER_NOW:()=>Mg,Weather_alarm_content:()=>gg,Weather_daily:()=>Lg,Weather_daily_content:()=>Ng,Weather_now:()=>Og,Weather_now_content:()=>Rg});var H={};t.r(H),t.d(H,{actuator_extern_get_led_bright:()=>zg,actuator_extern_get_led_state:()=>jg,actuator_extern_led_bright:()=>qg,actuator_extern_led_brightness:()=>Zg,actuator_ms32006_dcmotor:()=>Vg,actuator_ms32006_init:()=>yg,actuator_ms32006_stepper:()=>Bg,actuator_neopixel_init:()=>$g,actuator_neopixel_rgb:()=>iC,actuator_neopixel_rgb_all:()=>tC,actuator_neopixel_write:()=>eC,actuator_use_uart_init:()=>nC,esp32_music_get_tempo_extern:()=>Wg,esp32_music_pitch:()=>Ug,esp32_music_pitch_init:()=>Gg,esp32_music_pitch_with_time:()=>wg,esp32_music_play_list:()=>Kg,esp32_music_reset_extern:()=>Jg,esp32_music_set_tempo_extern:()=>Hg,esp32_music_stop:()=>kg,mixbot_actuator_extern_get_addr:()=>cC,mixbot_actuator_extern_set_addr:()=>gC,mixbot_addr_extern:()=>aC,robot_led_extern:()=>dC,robot_led_extern_get_value:()=>IC,robot_motor_extern:()=>uC,robot_motor_extern_get_speed:()=>rC,robot_servo_extern_absolute_run:()=>mC,robot_servo_extern_get_status:()=>TC,robot_servo_extern_relative_continue:()=>RC,robot_servo_extern_relative_origin:()=>EC,robot_servo_extern_relative_run:()=>OC,robot_servo_extern_stop:()=>MC,robot_servo_extern_stop_mode:()=>hC,robot_traffic_light_extern:()=>lC,servo_get_angle:()=>xg,servo_get_speed:()=>bg,servo_init:()=>Pg,servo_move:()=>Qg,servo_set_angle:()=>Yg,servo_set_speed:()=>Xg,servo_speed_360:()=>vg,syn6288_builtin_voice:()=>_C,syn6288_get_voice:()=>oC,syn6288_set_voice:()=>sC,syn6288_tts_play:()=>pC});var W={};t.r(W),t.d(W,{actuator_dc_motor:()=>zC,actuator_dc_motor_stop:()=>jC,actuator_get_led_bright:()=>YC,actuator_get_led_state:()=>XC,actuator_led_bright:()=>vC,actuator_led_brightness:()=>xC,actuator_mixbot_buzzer_on_off:()=>iS,actuator_mixgo_nova_mic_get:()=>pS,actuator_mixgo_nova_mic_set:()=>_S,actuator_mixgo_nova_onboard_music_pitch:()=>IS,actuator_mixgo_nova_onboard_music_stop:()=>TS,actuator_mixgo_nova_play_audio:()=>lS,actuator_mixgo_nova_play_online_audio:()=>dS,actuator_mixgo_nova_record_audio:()=>rS,actuator_mixgo_nova_voice_get:()=>uS,actuator_mixgo_nova_voice_set:()=>aS,actuator_mixgo_zero_led_color:()=>bC,actuator_onboard_neopixel_rgb:()=>kC,actuator_onboard_neopixel_rgb_all:()=>HC,actuator_onboard_neopixel_rgb_show_all_chase:()=>WC,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>KC,actuator_onboard_neopixel_write:()=>wC,actuator_stepper_keep:()=>QC,actuator_stepper_stop:()=>qC,analog_ble_keyboard_init:()=>AS,analog_ble_keyboard_input:()=>DS,analog_ble_keyboard_send_battery:()=>FS,analog_ble_keyboard_str:()=>fS,analog_ble_mouse_init:()=>PS,analog_ble_mouse_input:()=>XS,analog_ble_mouse_send_battery:()=>xS,analog_keyboard_input:()=>ES,analog_keyboard_str:()=>CS,analog_mouse_input:()=>cS,bitbot_motor:()=>oS,bitbot_move:()=>nS,bitbot_stop:()=>sS,ble_keyboard_connect:()=>NS,ble_keyboard_get_mac:()=>LS,ble_mouse_connect:()=>YS,ble_mouse_get_mac:()=>vS,cc_number:()=>yC,esp32_music_get_tempo:()=>SC,esp32_music_reset:()=>fC,esp32_music_set_tempo:()=>CC,esp32_onboard_music_pitch:()=>AC,esp32_onboard_music_pitch_with_time:()=>LC,esp32_onboard_music_play_list:()=>DC,esp32_onboard_music_stop:()=>NC,general_key:()=>RS,general_key_tuple:()=>SS,get_power_output:()=>MS,ledswitch:()=>PC,mixbot_motor:()=>eS,mixbot_motor_status:()=>ZC,mixbot_move:()=>$C,mixbot_stop:()=>tS,mouse_key:()=>gS,number:()=>FC,rm_actuator_get_led_bright:()=>BC,rm_actuator_get_led_state:()=>GC,rm_actuator_led_bright:()=>VC,rm_actuator_led_brightness:()=>UC,rm_motor:()=>JC,set_all_power_output:()=>mS,set_power_output:()=>hS,special_key:()=>OS});var K={};t.r(K),t.d(K,{ai_sensor_20object:()=>TA,ai_sensor_ailocal_class:()=>nA,ai_sensor_ailocal_class_result:()=>sA,ai_sensor_ailocal_train:()=>iA,ai_sensor_asr_recognize:()=>uA,ai_sensor_audio_play:()=>_A,ai_sensor_audio_record:()=>oA,ai_sensor_barcode:()=>wS,ai_sensor_circle:()=>QS,ai_sensor_classifier_faces:()=>IA,ai_sensor_color:()=>ZS,ai_sensor_color_chases:()=>eA,ai_sensor_color_chases_result:()=>tA,ai_sensor_config:()=>VS,ai_sensor_face:()=>dA,ai_sensor_find_20objects:()=>hA,ai_sensor_find_barcodes:()=>kS,ai_sensor_find_circles:()=>qS,ai_sensor_find_colors:()=>$S,ai_sensor_find_licenseplates:()=>lA,ai_sensor_find_lines:()=>JS,ai_sensor_find_qrcodes:()=>US,ai_sensor_find_rects:()=>jS,ai_sensor_find_tags:()=>WS,ai_sensor_licenseplate:()=>rA,ai_sensor_line:()=>KS,ai_sensor_qrcode:()=>GS,ai_sensor_qrcode_lite:()=>yS,ai_sensor_rect:()=>zS,ai_sensor_rgb:()=>BS,ai_sensor_tag:()=>HS,ai_sensor_use_uart_init:()=>bS,ai_sensor_yolo_recognize:()=>pA,ai_sensor_yolo_recognize_result:()=>aA});var J={};t.r(J),t.d(J,{MICROPYTHON_AI_Speech_asr:()=>EA,MICROPYTHON_AI_Speech_unit:()=>mA,MICROPYTHON_AI_client:()=>MA});var Q={};t.r(Q),t.d(Q,{mpython_blynk_app_data:()=>FA,mpython_blynk_app_notify:()=>AA,mpython_blynk_email:()=>PA,mpython_blynk_get_timers:()=>NA,mpython_blynk_on_connected:()=>gA,mpython_blynk_on_disconnected:()=>cA,mpython_blynk_run:()=>SA,mpython_blynk_sensor_data_to_app:()=>fA,mpython_blynk_set_property:()=>vA,mpython_blynk_setup:()=>YA,mpython_blynk_stop_timers:()=>LA,mpython_blynk_sync_virtual:()=>RA,mpython_blynk_terminal_widget_vpin:()=>OA,mpython_blynktimer:()=>DA,mpython_blynktimer_run:()=>CA});var q={};t.r(q),t.d(q,{communicate_bluetooth_central_init:()=>TL,communicate_bluetooth_connect:()=>mL,communicate_bluetooth_disconnect:()=>EL,communicate_bluetooth_handle:()=>SL,communicate_bluetooth_is_connected:()=>RL,communicate_bluetooth_mac:()=>OL,communicate_bluetooth_peripheral_init:()=>hL,communicate_bluetooth_recv:()=>CL,communicate_bluetooth_recv_only:()=>gL,communicate_bluetooth_scan:()=>ML,communicate_bluetooth_send:()=>cL,communicate_espnow_init:()=>AL,communicate_espnow_init_new:()=>LL,communicate_i2c_available:()=>UA,communicate_i2c_init:()=>bA,communicate_i2c_master_read:()=>GA,communicate_i2c_onboard:()=>XA,communicate_i2c_read:()=>yA,communicate_i2c_scan:()=>BA,communicate_i2c_write:()=>VA,communicate_ir_recv_init:()=>sL,communicate_ir_send_init:()=>uL,communicate_ow_init:()=>ZA,communicate_ow_read:()=>eL,communicate_ow_reset:()=>tL,communicate_ow_scan:()=>$A,communicate_ow_select:()=>nL,communicate_ow_write:()=>iL,communicate_spi_buffer:()=>WA,communicate_spi_init:()=>kA,communicate_spi_onboard:()=>xA,communicate_spi_read:()=>KA,communicate_spi_read_output:()=>JA,communicate_spi_readinto:()=>QA,communicate_spi_readinto_output:()=>qA,communicate_spi_set:()=>HA,communicate_spi_write:()=>zA,communicate_spi_write_readinto:()=>jA,espnow_radio_channel:()=>vL,espnow_radio_channel_new:()=>XL,espnow_radio_on_off:()=>xL,espnow_radio_rec:()=>yL,espnow_radio_recv:()=>BL,espnow_radio_recv_certain_msg:()=>GL,espnow_radio_recv_certain_msg_new:()=>wL,espnow_radio_recv_msg:()=>VL,espnow_radio_recv_new:()=>UL,espnow_radio_send:()=>bL,espnow_radio_txpower:()=>YL,i2c_slave_onreceive:()=>wA,internal_variable:()=>oL,ir_recv_timeout:()=>aL,ir_transmit_busy:()=>IL,ir_transmit_conventional_data:()=>rL,ir_transmit_raw_code:()=>dL,ir_transmit_study_code:()=>lL,ir_whether_recv:()=>pL,lora_init:()=>kL,lora_packet:()=>HL,lora_recv:()=>KL,lora_send:()=>WL,network_espnow_info:()=>DL,network_espnow_mac:()=>NL,network_espnow_recv:()=>fL,network_espnow_recv_handle:()=>PL,network_espnow_send:()=>FL,recv_fun:()=>_L,urequests_attribute:()=>QL,urequests_get:()=>JL,urequests_method:()=>qL});var z={};t.r(z),t.d(z,{display_animate:()=>RN,display_circle:()=>cN,display_color_seclet:()=>vN,display_draw_4strings:()=>IN,display_fill:()=>ON,display_lcd_use_i2c_init:()=>VN,display_line:()=>MN,display_line_arbitrarily:()=>TN,display_matrix_extern_bright_point:()=>_N,display_matrix_extern_bright_screen:()=>aN,display_matrix_extern_clear:()=>nN,display_matrix_extern_get_pixel:()=>oN,display_matrix_extern_get_screen_pixel:()=>pN,display_matrix_extern_image_builtins:()=>uN,display_matrix_extern_scroll_string:()=>eN,display_matrix_extern_scroll_string_delay:()=>iN,display_matrix_extern_shift:()=>sN,display_matrix_extern_show_frame_string:()=>$L,display_matrix_extern_show_frame_string_delay:()=>tN,display_matrix_extern_show_image:()=>jL,display_matrix_extern_show_image_or_string_delay:()=>ZL,display_matrix_use_i2c_init:()=>zL,display_oled_drawPixel:()=>SN,display_oled_showBitmap:()=>CN,display_oled_use_i2c_init:()=>kN,display_onoff:()=>mN,display_rect:()=>hN,display_tm1650_power:()=>LN,display_tm1650_set_brightness:()=>fN,display_tm1650_show_dot:()=>DN,display_tm1650_show_num:()=>NN,display_tm_use_i2c_init:()=>AN,display_triangle:()=>gN,display_use_i2c_init:()=>dN,extern_oled_bright_point:()=>eD,extern_oled_clear:()=>ZN,extern_oled_get_pixel:()=>tD,extern_oled_hvline:()=>nD,extern_oled_line:()=>sD,extern_oled_scroll_string:()=>zN,extern_oled_scroll_string_delay:()=>jN,extern_oled_shape_rect:()=>iD,extern_oled_shift:()=>$N,extern_oled_show_frame_string:()=>QN,extern_oled_show_frame_string_delay:()=>qN,extern_oled_show_image:()=>HN,extern_oled_show_image_or_string_delay:()=>JN,extern_oled_show_image_xy:()=>WN,extern_oled_show_string:()=>KN,image_shift:()=>EN,lcd_backlight:()=>UN,lcd_clear:()=>wN,lcd_print_string:()=>GN,lcd_show_image_or_string_delay:()=>BN,matrix_extern_image_arithmetic:()=>rN,matrix_extern_image_invert:()=>lN,tft_fill:()=>bN,tft_line_arbitrarily:()=>yN,tft_scroll_string_delay:()=>xN,tft_show_frame_string_delay:()=>XN,tft_show_image_or_string_delay:()=>YN,tft_show_image_xy:()=>PN,tft_use_spi_init:()=>FN});var j={};t.r(j),t.d(j,{bitbot_display_image_create:()=>wD,display_bright_point:()=>OD,display_bright_screen:()=>cD,display_clear:()=>TD,display_get_pixel:()=>ED,display_get_screen_pixel:()=>RD,display_image_builtins:()=>lD,display_image_builtins_all:()=>dD,display_image_create:()=>ID,display_scroll_string:()=>uD,display_scroll_string_delay:()=>rD,display_shift:()=>mD,display_show_frame_string:()=>pD,display_show_frame_string_delay:()=>aD,display_show_image:()=>oD,display_show_image_or_string_delay:()=>_D,draw_pointer:()=>If,image_arithmetic:()=>hD,image_invert:()=>MD,mixbot_display_bright_screen:()=>GD,mixbot_display_get_ambientbright:()=>BD,mixbot_display_get_screen_pixel:()=>VD,mixbot_display_image_create:()=>yD,mixbot_display_rotate:()=>UD,mixgo_display_image_create_new:()=>AD,mixgome_display_font:()=>SD,mixgome_display_image_create:()=>gD,mixgomini_display_image_create:()=>CD,mpython_display_hvline:()=>xD,mpython_display_line:()=>bD,mpython_display_shape_rect:()=>XD,mpython_pbm_image:()=>LD,onboard_oled_bright_point:()=>YD,onboard_oled_scroll_string_delay:()=>vD,onboard_oled_show_frame_string_delay:()=>PD,onboard_oled_show_image:()=>ND,onboard_oled_show_image_or_string_delay:()=>FD,onboard_oled_show_image_xy:()=>DD,onboard_oled_show_string:()=>fD,onboard_tft_bright_point:()=>nf,onboard_tft_bright_screen:()=>of,onboard_tft_clear:()=>$D,onboard_tft_clock_clear:()=>lf,onboard_tft_clock_draw:()=>rf,onboard_tft_clock_get_rtctime:()=>af,onboard_tft_clock_init:()=>pf,onboard_tft_clock_set_time:()=>uf,onboard_tft_display_hvline:()=>jD,onboard_tft_display_line:()=>ZD,onboard_tft_display_shape_circle:()=>df,onboard_tft_display_shape_rect:()=>zD,onboard_tft_fill:()=>_f,onboard_tft_get_pixel:()=>ef,onboard_tft_get_screen_pixel:()=>sf,onboard_tft_scroll_string:()=>QD,onboard_tft_scroll_string_delay:()=>qD,onboard_tft_shift:()=>tf,onboard_tft_show_frame_string:()=>KD,onboard_tft_show_frame_string_delay:()=>JD,onboard_tft_show_image:()=>kD,onboard_tft_show_image_or_string_delay:()=>WD,onboard_tft_show_image_xy:()=>HD});var Z={};t.r(Z),t.d(Z,{factory_block:()=>cf,factory_block_return:()=>gf,factory_block_return_with_textarea:()=>Sf,factory_block_with_textarea:()=>Cf,factory_callMethod_noreturn:()=>Of,factory_callMethod_return:()=>Rf,factory_declare:()=>Ef,factory_from_import:()=>Tf,factory_function_noreturn:()=>Mf,factory_function_return:()=>mf,factory_import:()=>hf,folding_block:()=>Af});var $={};t.r($),t.d($,{inout_analog_atten:()=>Gf,inout_analog_read:()=>Yf,inout_analog_read_init:()=>Bf,inout_analog_write:()=>Ff,inout_analog_write_init:()=>Vf,inout_analog_write_set:()=>Pf,inout_digital_init:()=>bf,inout_digital_read:()=>Df,inout_digital_write:()=>Nf,inout_highlow:()=>Lf,inout_pin_attachInterrupt:()=>xf,inout_pin_pressed:()=>Xf,inout_pin_pressed_init:()=>Uf,inout_pwm_analog_write:()=>ff,inout_pwm_analog_write_init:()=>yf,inout_pwm_analog_write_set_freq:()=>vf});var tt={};t.r(tt),t.d(tt,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>_F,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>sF,IOT_EMQX_PING:()=>pF,IOT_FORMATTING:()=>iF,IOT_FORMAT_STRING:()=>nF,IOT_MIXIO_NTP:()=>aF,IOT_MIXIO_PUBLISH:()=>qf,IOT_MIXIO_SUBSCRIBE:()=>zf,iot_client_onboard:()=>uF,iot_http_client:()=>rF,iot_http_data:()=>lF,iot_mixio_check:()=>$f,iot_mixio_connect:()=>Qf,iot_mixio_connect_only:()=>Zf,iot_mixio_disconnect:()=>jf,iot_mixio_format_msg:()=>eF,iot_mixio_format_topic:()=>tF,iot_mixly_key:()=>oF,iot_mqtt_client:()=>dF,iot_mqtt_data:()=>IF,iot_onenet_check:()=>Kf,iot_onenet_connect:()=>kf,iot_onenet_disconnect:()=>Hf,iot_onenet_publish:()=>Jf,iot_onenet_publish_dict:()=>Wf,iot_wifi_connect:()=>wf});var et={};t.r(et),t.d(et,{network_ap_connect:()=>gF,network_connect:()=>hF,network_get_connect:()=>mF,network_get_wifi:()=>cF,network_init:()=>TF,network_is_active:()=>RF,network_open:()=>OF,network_scan:()=>CF,network_server:()=>SF,network_socket_accept:()=>fF,network_socket_bind:()=>LF,network_socket_close:()=>XF,network_socket_connect:()=>NF,network_socket_init:()=>AF,network_socket_listen:()=>DF,network_socket_receive:()=>FF,network_socket_receive_from:()=>vF,network_socket_send:()=>PF,network_socket_send_to:()=>YF,network_stop:()=>EF,network_wifi_connect:()=>MF,ntptime_address:()=>BF,ntptime_time:()=>VF,requests_attribute:()=>bF,requests_attribute2:()=>UF,requests_get:()=>xF,requests_get2:()=>GF,requests_method:()=>yF,requests_post:()=>wF});var it={};t.r(it),t.d(it,{HCSR04:()=>PP,PS2_Button:()=>XP,PS2_Buttons:()=>xP,PS2_Buttons_new:()=>kP,PS2_State:()=>bP,PS2_init:()=>vP,PS2_init_new:()=>UP,PS2_stk:()=>yP,PS2_stk_new:()=>HP,PS2_vibration:()=>YP,PS2_vibration_new:()=>wP,RTC_get_time:()=>BP,RTC_set_date:()=>zF,RTC_set_datetime:()=>VP,RTC_set_time:()=>qF,esp32_s2_weather_init:()=>NP,esp32_s2_weather_rain:()=>fP,esp32_s2_weather_wd:()=>DP,esp32_s2_weather_ws:()=>FP,extern_rfid_read:()=>hP,extern_rfid_readcontent:()=>mP,extern_rfid_readid:()=>MP,extern_rfid_status:()=>RP,extern_rfid_write:()=>EP,extern_rfid_write_return:()=>OP,gnss_get_data:()=>JP,gnss_have_data:()=>QP,mixbot_sensor_extern_get_addr:()=>nv,mixbot_sensor_extern_set_addr:()=>sv,pm25_get_data:()=>KP,robot_button_extern_get_value:()=>qP,robot_color_extern_get_value:()=>tv,robot_infrared_extern_get_value:()=>jP,robot_infrared_extern_grey_get_value:()=>ZP,robot_potentiometer_extern_get_value:()=>$P,robot_sonar_extern_get_value:()=>ev,robot_sonar_extern_led:()=>iv,robot_touch_extern_get_value:()=>zP,sensor_APDS9960_extern:()=>oP,sensor_DS18X20:()=>uv,sensor_LTR308_extern:()=>_P,sensor_LTR390UV_extern:()=>uP,sensor_MAX30102_extern:()=>sP,sensor_QMC5883L_extern:()=>rP,sensor_VL530LX_extern:()=>IP,sensor_aht11_extern:()=>dP,sensor_bmp:()=>eP,sensor_dht11:()=>GP,sensor_distance_hrsc04:()=>QF,sensor_hp203_extern:()=>pP,sensor_ltr381_extern:()=>aP,sensor_mixgo_extern_button_attachInterrupt:()=>KF,sensor_mixgo_extern_button_get_presses:()=>WF,sensor_mixgo_extern_button_is_pressed:()=>kF,sensor_mixgo_extern_button_was_pressed:()=>HF,sensor_mixgo_extern_light:()=>jF,sensor_mixgo_extern_pin_near:()=>$F,sensor_mixgo_extern_sound:()=>ZF,sensor_mixgoce_hot_wheel_degrees:()=>LP,sensor_mixgoce_hot_wheel_is_touched:()=>AP,sensor_mpu9250_attachGestureInterrupt:()=>JF,sensor_rtc_init:()=>tP,sensor_sht:()=>iP,sensor_shtc3_extern:()=>lP,sensor_use_i2c_init:()=>nP,sensor_use_spi_init:()=>TP,sensor_use_uart_init:()=>WP,sensor_weather_solo_init:()=>ov,sensor_weather_solo_rain:()=>av,sensor_weather_solo_wd:()=>_v,sensor_weather_solo_ws:()=>pv,weather_data:()=>cP,weather_have_data:()=>gP,weather_set_label:()=>SP,weather_uart_mixio:()=>CP});var nt={};t.r(nt),t.d(nt,{HCSR04:()=>Ev,bitbot_als_num:()=>yY,dht11:()=>WY,number1:()=>Ov,number2:()=>Rv,number3:()=>cv,number4:()=>gv,number5:()=>Cv,number6:()=>Sv,number7:()=>Av,onboard_RTC_get_time:()=>TY,onboard_RTC_get_time_str:()=>mY,onboard_RTC_get_timestamp:()=>hY,onboard_RTC_set_datetime:()=>dY,onboard_RTC_settime_string:()=>IY,onboard_RTC_timestamp_totuple:()=>MY,rfid_readcontent:()=>Gv,rfid_readid:()=>Bv,rfid_write:()=>Uv,rfid_write_return:()=>wv,sensor_LTR308:()=>Xv,sensor_adxl345_get_acceleration:()=>jv,sensor_aht11:()=>yv,sensor_bitbot_ALS:()=>bY,sensor_button_get_presses:()=>GY,sensor_button_is_pressed:()=>VY,sensor_button_was_pressed:()=>BY,sensor_compass_reset:()=>nY,sensor_ds18x20:()=>vv,sensor_eulerangles:()=>Hv,sensor_get_acceleration:()=>kv,sensor_get_temperature:()=>Vv,sensor_hp203:()=>bv,sensor_light:()=>HY,sensor_lm35:()=>Yv,sensor_mixbot_get_gyro:()=>xY,sensor_mixbot_patrol_calibrate:()=>vY,sensor_mixbot_patrol_value:()=>YY,sensor_mixbot_temperature:()=>XY,sensor_mixgo_LTR308:()=>Fv,sensor_mixgo_button_attachInterrupt:()=>Iv,sensor_mixgo_button_get_presses:()=>dv,sensor_mixgo_button_is_pressed:()=>rv,sensor_mixgo_button_was_pressed:()=>lv,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>RY,sensor_mixgo_cc_mmc5603_get_angle:()=>OY,sensor_mixgo_cc_mmc5603_get_magnetic:()=>EY,sensor_mixgo_light:()=>kY,sensor_mixgo_nova_LTR308:()=>Pv,sensor_mixgo_nova_pin_near:()=>fv,sensor_mixgo_pin_near:()=>Dv,sensor_mixgo_pin_near_double:()=>Nv,sensor_mixgo_pin_near_single:()=>Lv,sensor_mixgo_pin_pressed:()=>qv,sensor_mixgo_touch_slide:()=>Qv,sensor_mixgocar42_button_attachInterrupt:()=>mv,sensor_mixgocar42_button_get_presses:()=>Mv,sensor_mixgocar42_button_is_pressed:()=>Tv,sensor_mixgocar42_button_was_pressed:()=>hv,sensor_mixgocar_battery_left:()=>PY,sensor_mixgocar_pin_near:()=>fY,sensor_mixgocar_pin_near_line:()=>DY,sensor_mixgocar_pin_near_state_change:()=>FY,sensor_mixgoce_pin_pressed:()=>Jv,sensor_mixgoce_temperature:()=>gY,sensor_mixgome_temperature:()=>cY,sensor_mpu9250_calibrate_compass:()=>tY,sensor_mpu9250_field_strength:()=>iY,sensor_mpu9250_gesture:()=>Wv,sensor_mpu9250_get_acceleration:()=>Kv,sensor_mpu9250_get_gyro:()=>$v,sensor_mpu9250_get_magnetic:()=>Zv,sensor_mpu9250_temperature:()=>eY,sensor_mpython_pin_pressed:()=>zv,sensor_mpython_qmi8658_get_gyro:()=>CY,sensor_mpython_qmi8658_temperature:()=>SY,sensor_onboard_compass_reset:()=>lY,sensor_onboard_mpu9250_calibrate_compass:()=>aY,sensor_onboard_mpu9250_field_strength:()=>rY,sensor_onboard_mpu9250_gesture:()=>sY,sensor_onboard_mpu9250_get_acceleration:()=>oY,sensor_onboard_mpu9250_get_gyro:()=>pY,sensor_onboard_mpu9250_get_magnetic:()=>_Y,sensor_onboard_mpu9250_temperature:()=>uY,sensor_pin_near:()=>wY,sensor_pin_pressed:()=>UY,sensor_rm_acc:()=>NY,sensor_rm_battery_left:()=>LY,sensor_rm_pin_near_double:()=>AY,sensor_sound:()=>xv});var st={};t.r(st),t.d(st,{serial_any:()=>zY,serial_print:()=>KY,serial_print_byte:()=>JY,serial_print_hex:()=>qY,serial_println:()=>QY,serial_read_from_ai:()=>pX,serial_readline:()=>ZY,serial_readstr:()=>jY,serial_send_to_ai:()=>_X,serial_softserial:()=>$Y,serial_softserial_new:()=>tX,system_input:()=>eX,system_print:()=>iX,system_print_end:()=>sX,system_print_inline:()=>nX,system_print_many:()=>oX});var ot={};t.r(ot),t.d(ot,{Panic_with_status_code:()=>OX,Timer_init:()=>XX,base_delay:()=>yX,controls_delay:()=>SX,controls_delay_new:()=>AX,controls_end_program:()=>cX,controls_millis:()=>RX,controls_uname:()=>CX,reset:()=>gX,system_bitbot_shutdown:()=>YX,system_device_name:()=>mX,system_device_serial_number:()=>EX,system_event_bus_source:()=>hX,system_event_bus_value:()=>MX,system_machine_reset:()=>vX,system_on_event:()=>dX,system_raise_event:()=>lX,system_reset:()=>uX,system_run_in_background:()=>aX,system_ticks_diff:()=>DX,system_timer:()=>NX,system_timer_init:()=>fX,system_timestamp:()=>IX,system_value:()=>TX,system_wait:()=>rX,system_wdt_feed:()=>PX,system_wdt_init:()=>FX,time_ticks_diff:()=>bX,timer:()=>LX,timer2:()=>xX});var _t={};t.r(_t),t.d(_t,{Air_daily_content:()=>zX,Air_now_content:()=>kX,Geo_moon_content:()=>ZX,Geo_sun_content:()=>jX,Life_suggestion_content:()=>WX,Location_search_content:()=>JX,Tide_daily_content:()=>KX,WEATHER_DAILY:()=>BX,WEATHER_HOUR:()=>GX,WEATHER_NOW:()=>VX,Weather_alarm_content:()=>HX,Weather_daily:()=>QX,Weather_daily_content:()=>qX,Weather_now:()=>UX,Weather_now_content:()=>wX});var pt={};t.r(pt),t.d(pt,{analog_input:()=>rx,analog_output:()=>dx,espnow_channel:()=>px,haskylens_model:()=>ax,i2c_A_pin:()=>Ix,i2c_B_pin:()=>Tx,pins_analog:()=>Ox,pins_analog_pin:()=>Rx,pins_axis:()=>bx,pins_brightness:()=>yx,pins_builtinimg:()=>fx,pins_builtinimg_extern:()=>Fx,pins_button:()=>Cx,pins_dac:()=>cx,pins_dac_pin:()=>gx,pins_digital:()=>ix,pins_digital_dot:()=>Wx,pins_digital_pin:()=>nx,pins_exlcdh:()=>Xx,pins_exlcdv:()=>xx,pins_imglist:()=>Px,pins_input_pin:()=>sx,pins_mpython_touch:()=>_x,pins_one_more:()=>Hx,pins_output_pin:()=>ox,pins_playlist:()=>vx,pins_playlist_extern:()=>Yx,pins_pwm:()=>Sx,pins_pwm_pin:()=>Ax,pins_radio_datarate:()=>kx,pins_radio_power:()=>wx,pins_serial:()=>Dx,pins_tone_notes:()=>Ux,pins_touch:()=>Nx,pins_touch_pin:()=>Lx,pins_tts_bgmusic:()=>Gx,pins_tts_builtin_music:()=>Bx,pins_tts_voice:()=>Vx,pwm_input:()=>ux,pwm_output:()=>lx,spi_A_pin:()=>hx,spi_B_pin:()=>Mx,spi_C_pin:()=>mx,spi_D_pin:()=>Ex});var at={};t.r(at),t.d(at,{espnow_channel:()=>eb,haskylens_model:()=>ib,pins_analog:()=>Zx,pins_analog_pin:()=>jx,pins_axis:()=>hb,pins_brightness:()=>Eb,pins_builtinimg:()=>rb,pins_builtinimg_extern:()=>lb,pins_button:()=>Jx,pins_dac:()=>ob,pins_dac_pin:()=>sb,pins_digital:()=>Kx,pins_digital_dot:()=>Lb,pins_digital_pin:()=>Qx,pins_exlcdh:()=>Mb,pins_exlcdv:()=>mb,pins_imglist:()=>db,pins_input_pin:()=>qx,pins_interrupt:()=>ab,pins_mpython_touch:()=>nb,pins_one_more:()=>Ab,pins_output_pin:()=>zx,pins_playlist:()=>Ib,pins_playlist_extern:()=>Tb,pins_pwm:()=>tb,pins_pwm_pin:()=>$x,pins_radio_datarate:()=>Sb,pins_radio_power:()=>Cb,pins_serial:()=>ub,pins_tone_notes:()=>gb,pins_touch:()=>pb,pins_touch_pin:()=>_b,pins_tts_bgmusic:()=>cb,pins_tts_builtin_music:()=>Rb,pins_tts_voice:()=>Ob});const ut=Blockly,rt=Mixly,lt={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}},dt=lt; /** * @license * Visual Blocks Editor @@ -18,4 +18,4 @@ * 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]}))}},xt={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")}},bt={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)}}},yt={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"]],bt.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)}},Zt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},$t={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=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 ee={init:function(){this.setColour(te),this.appendDummyInput().appendField(new ut.FieldTextInput("0",ut.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MATH_NUMBER_TOOLTIP)}},ie={init:function(){this.setColour(te);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]}))}},ne={init:function(){this.setColour(te);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]}))}},se={init:function(){this.setColour(te),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]}))}},oe={init:function(){this.setColour(te),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]}))}},_e={init:function(){this.setColour(te),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new ut.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},pe={init:function(){this.setColour(te),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]}))}},ae={init:function(){var t=[[ut.Msg.MATH_BIN,"bin"],[ut.Msg.MATH_OCT,"oct"],[ut.Msg.MATH_HEX,"hex"]];this.setColour(te),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]}))}},ue={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(te),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]}))}},re={init:function(){var t=[[ut.Msg.MIXLY_MAX,"max"],[ut.Msg.MIXLY_MIN,"min"]];this.setColour(te),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]}))}},le={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(te),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]}))}},de={init:function(){var t=[[ut.Msg.LANG_MATH_INT,"int"],[ut.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(te),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]}))}},Ie={init:function(){this.setColour(te),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)}},Te={init:function(){this.setColour(te),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)}},he={init:function(){this.setColour(te),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)}},Me={init:function(){this.setColour(te),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)}},me={init:function(){this.setColour(te),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)}},Ee={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(te),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]}))}},Oe={init:function(){var t=[[ut.Msg.MIXLY_TO_INT,"int"],[ut.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(te),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]}))}},Re=Te,ce={init:function(){this.setColour(te),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)}},ge=160,Ce={init:function(){this.setColour(ge),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ut.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(ut.Msg.TEXT_TEXT_TOOLTIP)},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 ut.FieldImage(e,12,12,'"')}},Se={init:function(){this.setColour(ge),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ut.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(ut.Msg.TEXT_LINES_TOOLTIP)},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 ut.FieldImage(e,12,12,'"')}};ut.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 Ae={init:function(){this.setColour(ge),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,'"')}},Le={init:function(){this.setColour(ge),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)}},Ne={init:function(){this.setColour(ge),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},De={init:function(){this.setColour(ge),this.appendValueInput("VAR").setCheck(String).appendField(ut.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},fe={init:function(){this.setColour(ge),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Fe={init:function(){this.setColour(ge),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Pe={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(ge),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)}},ve={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ge),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)}},Ye={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ge),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(ut.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(ut.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Xe={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(ge),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"))}},xe={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ge),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)}},be={init:function(){var t=[[ut.Msg.MIXLY_EQUALS,"==="],[ut.Msg.MIXLY_STARTSWITH,"startswith"],[ut.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ge),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new ut.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ye={init:function(){this.setColour(ge),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)}},Ve={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(ge),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]}))}},Be={init:function(){var t=[[ut.Msg.TEXT_LJUST,"ljust"],[ut.Msg.TEXT_CENTER,"center"],[ut.Msg.TEXT_RJUST,"rjust"]];this.setColour(ge),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)}},Ge={init:function(){this.setColour(ge),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)}},Ue={init:function(){this.setColour(ge),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)}},we={init:function(){this.setColour(ge),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)}},ke={init:function(){this.setColour(ge),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)}},He={init:function(){var t=[[ut.Msg.TEXT_TRIM_BOTH,"strip"],[ut.Msg.TEXT_TRIM_LEFT,"lstrip"],[ut.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ge),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]}))}},We={init:function(){this.setColour(ge),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")}},Vi={init:function(){this.setColour(bi),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Bi={init:function(){this.setColour(bi),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}},Gi={init:function(){this.setColour(bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_KEYS),this.setTooltip(ut.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Ui={init:function(){this.setColour(bi),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)}},wi={init:function(){this.setColour(bi),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)}},ki={init:function(){this.setColour(bi),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)}},Hi={init:function(){this.setColour(bi),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)}},Wi={init:function(){this.setColour(bi),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)}},Ki={init:function(){this.setColour(bi),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)}},Ji={init:function(){this.setColour(bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_ITEMS),this.setTooltip(ut.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Qi={init:function(){this.setColour(bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_VALUES),this.setTooltip(ut.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},qi={init:function(){this.setColour(bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_LENGTH),this.setTooltip(ut.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},zi={init:function(){this.setColour(bi),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)}},ji={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(bi),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")}},Zi={init:function(){this.setColour(bi),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)}},$i={init:function(){this.setColour(bi),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)}},tn={init:function(){this.setColour(bi),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")}},en={init:function(){this.setColour(bi),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},nn={init:function(){this.setColour(bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TO_JSON),this.setTooltip(ut.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},sn={init:function(){this.setColour(bi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(ut.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},on=210,_n={init:function(){var t=ut.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(on),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]}},pn={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(on),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)}},an={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(on),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]}))}},un={init:function(){this.setColour(on),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(on),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new ut.FieldDropdown(t),"BOOL"),this.setTooltip(ut.Msg.LOGIC_BOOLEAN_TOOLTIP)}},ln={init:function(){this.setColour(on),this.setOutput(!0),this.appendDummyInput().appendField(ut.Msg.LOGIC_NULL),this.setTooltip(ut.Msg.LOGIC_NULL_TOOLTIP)}},dn={init:function(){this.setColour(on),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)}},In={init:function(){var t=[[ut.Msg.TEXT_APPEND_TO,"in"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(on),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)}},Tn={init:function(){var t=[[ut.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(on),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)}},hn={init:function(){this.setColour(on),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Mn={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)}},mn={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")}},En={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+_}))}},On={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+_}))}},Rn={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)}},cn={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)}},gn={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}))}},Cn={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)}},Sn={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)}},An={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)}},Ln={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)}},Nn={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 Dn={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)}},fn={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)}},Fn={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)}},Pn={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}))}},vn={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)}},Yn={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]}))}},Xn={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)}},xn={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)}},bn={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]}))}},yn={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)}},Vn={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()}},Bn={};Bn.NAME_TYPE=ut.PROCEDURE_CATEGORY_NAME,Bn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},Xs={init:function(){this.setColour(Ds),this.appendDummyInput().appendField(ut.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},xs={init:function(){this.setColour(Ds),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)}},bs={init:function(){this.setColour(Ds),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ys={init:function(){this.setColour(Ds),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vs={init:function(){this.setColour(Ds),this.appendDummyInput().appendField(ut.Msg.HTML_TEXT).appendField(new ut.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bs=160,Gs={init:function(){this.setColour(Bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new ut.FieldTable(""),"TEXT")}},Us={init:function(){this.setColour(Bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT")}},ws={init:function(){this.setColour(Bs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},ks={init:function(){this.setColour(Bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Hs={init:function(){this.setColour(Bs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new ut.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Ws={init:function(){this.setColour(Bs),this.appendValueInput("VALUE").appendField(ut.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 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 vp=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]},Yp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Xp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},xp=function(t,e){return["None",e.ORDER_ATOMIC]},bp=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]},yp=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]},Vp=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]},Bp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Gp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Up=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},wp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},kp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Hp=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Wp=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Kp=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]},Jp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Qp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},qp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},zp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},jp=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Zp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},$p=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ta=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ea=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"},ia=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},na=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"},oa=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"},_a=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]},pa=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"},aa=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"},ua=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]},ka=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ha=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},Wa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Ka=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Ja=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Qa=function(t,e){return'"},qa=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},za=function(){return this.getFieldValue("TEXT")+"\n"},ja=function(t){return t.getFieldValue("TEXT")+"\n"},Za=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},$a=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},tu=function(){return""},eu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},iu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.join("\n")},su.scrubNakedValue=function(t){return t+"\n"},su.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},su.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},su.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=ut.utils.string.wrap(o,su.COMMENT_WRAP-3),n+=su.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const ou="#74A55B",_u={init:function(){this.setColour(ou),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)}},pu={init:function(){this.setColour(ou),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)}},au={init:function(){this.setColour(ou),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)}},uu={init:function(){this.setColour(ou),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)}},ru={init:function(){this.setColour(ou),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)}},lu={init:function(){this.setColour(ou),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)}},du={init:function(){this.setColour(ou),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)}},Iu={init:function(){this.setColour(ou),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tu={init:function(){this.setColour(ou),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)}},hu={init:function(){this.setColour(ou),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)}},Mu={init:function(){this.setColour(ou),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)}},mu={init:function(){this.setColour(ou),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)}},Eu={init:function(){this.setColour(ou),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)}},Ou={init:function(){this.setColour(ou),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)}},Ru={init:function(){this.setColour(ou),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)}},cu={init:function(){this.setColour(ou),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)}},gu={init:function(){this.setColour(ou),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)}},Cu={init:function(){this.setColour(ou),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)}},Su={init:function(){this.setColour(ou),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)}},Au={init:function(){this.setColour(ou),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通信")}},Lu={init:function(){this.setColour(ou),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)")}},Nu={init:function(){this.setColour(ou),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)")}},Du={init:function(){this.setColour(ou),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)}},fu={init:function(){this.setColour(ou),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)}},Fu={init:function(){this.setColour(ou),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)}},Pu={init:function(){this.setColour(ou),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)}},vu={init:function(){this.setColour(ou),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+"SYN6288"+ut.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Yu={init:function(){this.setColour(ou),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)}},Xu={init:function(){this.setColour(ou),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)}},xu={init:function(){this.setColour(ou),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)}},bu={init:function(){this.setColour(ou),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)}},yu={init:function(){this.setColour(ou),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Vu={init:function(){this.setColour(ou),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)}},Bu={init:function(){this.setColour(ou),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)}},Gu={init:function(){this.setColour(ou),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)}},Uu={init:function(){this.setColour(ou),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)}},wu={init:function(){this.setColour(ou),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)}},ku={init:function(){this.setColour(ou),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)}},Hu={init:function(){this.setColour(ou),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)}},Wu={init:function(){this.setColour(ou),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)}},Ku={init:function(){this.setColour(ou),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)}},Ju={init:function(){this.setColour(ou),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)}},Qu={init:function(){this.setColour(ou),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)}},qu={init:function(){this.setColour(ou),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)}},zu={init:function(){this.setColour(ou),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)}},ju={init:function(){this.setColour(ou),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)}},Zu="#6C9858",$u={init:function(){this.setColour(Zu),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},tr={init:function(){this.setColour(Zu),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)}},er={init:function(){this.setColour(Zu),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)}},ir={init:function(){this.setColour(Zu),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)}},nr={init:function(){this.setColour(Zu),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)}},sr={init:function(){this.setColour(Zu),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%)")}},or={init:function(){this.setColour(Zu),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()}},_r={init:function(){this.setColour(Zu),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)}},pr={init:function(){this.setColour(Zu),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)}},ar={init:function(){this.setColour(Zu),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)}},ur={init:function(){this.setColour(Zu),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)")}},rr={init:function(){this.setColour(Zu),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},lr={init:function(){this.setColour(Zu),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)}}},dr={init:function(){this.setColour(Zu),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)}},Ir={init:function(){this.setColour(Zu),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("")}},Tr={init:function(){this.setColour(Zu),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("")}},hr={init:function(){this.setColour(Zu),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)}},Mr={init:function(){this.setColour(Zu),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)}}},mr={init:function(){this.setColour(Zu),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)}},Er={init:function(){this.setColour(Zu),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("")}},Or={init:function(){this.setColour(Zu),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)}},Rr={init:function(){this.setColour(Zu),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)}},cr={init:function(){this.setColour(Zu),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)}},gr={init:function(){this.setColour(Zu),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)}},Cr={init:function(){this.setColour(Zu),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)}},Sr={init:function(){this.setColour(Zu),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ar={init:function(){this.setColour(Zu),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)}},Lr={init:function(){this.setColour(Zu),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)}},Nr={init:function(){this.setColour(Zu),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)}},Dr={init:function(){this.setColour(Zu),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("")}},fr={init:function(){this.setColour(Zu),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)}},Fr={init:function(){this.setColour(Zu),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)}},Pr={init:function(){this.setColour(Zu),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},vr={init:function(){this.setColour(Zu),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)}},Yr={init:function(){this.setColour(Zu),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)}},Xr={init:function(){this.setColour(Zu),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)}},xr={init:function(){this.setColour(Zu),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)}},br={init:function(){this.setColour(Zu),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)}},yr={init:function(){this.setColour(Zu),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)}},Vr={init:function(){this.setColour(Zu),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)}},Br={init:function(){this.setColour(Zu),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)}},Gr={init:function(){this.setColour(Zu),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Ur={init:function(){this.setColour(Zu),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)}},wr={init:function(){this.setColour(Zu),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)}},kr={init:function(){this.setColour(Zu),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)}},Hr={init:function(){this.setColour(Zu),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)}},Wr={init:function(){this.setColour(Zu),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Kr={init:function(){this.setColour(Zu),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)}},Jr={init:function(){this.setColour(Zu),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qr={init:function(){this.setColour(Zu),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"]]),"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()}},qr={init:function(){this.setColour(Zu),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)}},zr={init:function(){this.setColour(Zu),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)}},jr={init:function(){this.setColour(Zu),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)}},Zr={init:function(){this.setColour(Zu),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_KEY1,"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)}},$r={init:function(){this.setColour(Zu),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)}},tl={init:function(){this.setColour(Zu),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;ne?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")}},um={init:function(){this.setColour(im),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},rm={init:function(){this.setColour(im),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}},lm={init:function(){this.setColour(im),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}},dm={init:function(){this.setColour(im),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)}},Im={init:function(){this.setColour(im),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)}},Tm={init:function(){this.setColour(im),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)}},hm={init:function(){this.setColour(im),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mm={init:function(){this.setColour(im),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mm={init:function(){this.setColour(im),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Em={init:function(){this.setColour(im),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Om={init:function(){this.setColour(im),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Rm={init:function(){this.setColour(im),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},cm={init:function(){this.setColour(im),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},gm={init:function(){this.setColour(im),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)}},Cm={init:function(){this.setColour(im),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)}},Sm={init:function(){this.setColour(im),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)}},Am={init:function(){this.setColour(im),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)}},Lm={init:function(){this.VISITOR_ID=rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(im),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")}},Nm={init:function(){this.setColour(im),this.appendDummyInput().appendField("MixIO").appendField(ut.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Dm={init:function(){this.setColour(im),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)}},fm={init:function(){this.setColour(im),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)}},Fm={init:function(){this.setColour(im),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)}},Pm={init:function(){this.setColour(im),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)}},vm=nm,Ym=sm,Xm=om,xm=_m,bm=am,ym=225,Vm={init:function(){this.setColour(ym),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)}},Bm={init:function(){this.setColour(ym),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}))}},Gm={init:function(){this.setColour(ym),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)}},Um={init:function(){this.setColour(ym),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}))}},wm={init:function(){this.setColour(ym),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)}},km={init:function(){this.setColour(ym),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)}},Hm={init:function(){this.setColour(ym),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]}))}},Wm={init:function(){this.setColour(ym),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)}},Km={init:function(){this.setColour(ym),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)}},Jm={init:function(){this.setColour(ym),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)}},Qm={init:function(){this.setColour(ym),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)}},qm={init:function(){this.setColour(ym),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]}))}},zm={init:function(){this.setColour(ym),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)}},jm={init:function(){this.setColour(ym),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)}},Zm={init:function(){this.setColour(ym),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)}},$m={init:function(){this.setColour(ym),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)}},tE={init:function(){this.setColour(ym),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)}},eE={init:function(){this.setColour(ym),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)}},iE={init:function(){this.setColour(ym),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)}},nE={init:function(){this.setColour(ym),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)}},sE={init:function(){this.setColour(ym),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)}},oE={init:function(){this.setColour(ym),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")}},_E={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(ym),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:ut.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:ut.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:ut.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},pE={init:function(){this.appendValueInput("VAR").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(ym),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},aE={init:function(){this.setColour(ym),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)}},uE={init:function(){this.setColour(ym),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)}},rE="#3288dd",lE={init:function(){this.setColour(rE),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("")}},dE={init:function(){this.setColour(rE),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("")}},IE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(rE),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},TE="#A58C5B",hE={init:function(){this.setColour(TE),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)}},ME={init:function(){this.setColour(TE),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)}},mE={init:function(){this.setColour(TE),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)}},EE={init:function(){this.setColour(TE),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)}},OE={init:function(){this.setColour(TE),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}))}},RE={init:function(){this.setColour(TE),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}))}},cE={init:function(){this.setColour(TE),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)}},gE={init:function(){var t=[[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(TE),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},CE={init:function(){this.setColour(TE),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)}},SE={init:function(){this.setColour(TE),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)}},AE={init:function(){this.setColour(TE),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}))}},LE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("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]}))}},NE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("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]}))}},DE={init:function(){this.setColour(TE),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)}},fE={init:function(){this.setColour(TE),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)}},FE={init:function(){this.setColour(TE),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},PE={init:function(){this.setColour(TE),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)}},vE={init:function(){this.setColour(TE),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)}},YE={init:function(){this.setColour(TE),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},XE={init:function(){this.setColour(TE),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)}},xE={init:function(){this.setColour(TE),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)}},bE={init:function(){this.setColour(TE),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)}},yE={init:function(){this.setColour(TE),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]}))}},VE={init:function(){this.setColour(TE),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]}))}},BE={init:function(){this.setColour(TE),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)}},GE={init:function(){this.setColour(TE),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)}},UE={init:function(){this.setColour(TE),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}))}},wE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("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}))}},kE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("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}))}},HE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("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}))}},WE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("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)}},KE={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_GETTEMPERATUE)}},JE={init:function(){this.setColour(TE),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]}))}},QE={init:function(){this.setColour(TE),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)}},qE={init:function(){this.setColour(TE),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")}},zE={init:function(){this.setColour(TE),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)}},jE={init:function(){this.setColour(TE),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)}},ZE={init:function(){this.setColour(TE),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)}},$E={init:function(){this.setColour(TE),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)}},tO={init:function(){this.setColour(TE),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)}},eO={init:function(){this.setColour(TE),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)}},iO={init:function(){this.setColour(TE),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)")}},nO={init:function(){this.setColour(TE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},sO={init:function(){this.setColour(TE),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)}},oO={init:function(){this.setColour(TE),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_zero"].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},KL=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},JL=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"},QL=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},qL=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"},zL=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},jL=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"},ZL=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},$L=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},tN=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]},eN=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"},iN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},nN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},sN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},oN=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]},_N=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pN=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"},aN=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"},uN=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"},rN=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"}},lN=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"},dN=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},IN=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]},TN=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"},hN=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},MN=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"}},mN=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"}},EN=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"},ON=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"},RN=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},cN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},gN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},CN=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"},SN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},AN=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_zero"].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"},LN=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},NN=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]},DN=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 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 = "+o+",size = "+_+",space = "+p+",center = "+u+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},fN=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},FN=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},PN=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},vN=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},YN=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"},XN=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"},xN=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"},bN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},yN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},VN=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=rt.Boards.getSelectedBoardKey().split(":")[2],_="";return _=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_zero"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+_+")\n"},BN=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"},GN=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"},UN=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"},wN=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"},kN=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"},HN=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"},WN=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"},KN=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"},JN=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"},QN=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"},qN=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]},zN=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"},jN=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"},ZN=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"},$N=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"},tD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},eD=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+o+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+o+")\n")},iD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},nD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},sD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},oD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},_D=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]},pD=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]},aD=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},GD=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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+o+",size = "+_+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+o+",size = "+_+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},UD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},wD=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},kD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},HD=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},WD=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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},KD=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");if("0x"==_.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},JD=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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+o+", "+_+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},QD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},qD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},zD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},jD=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);if("0x"==o.slice(0,2))var _="onboard_tft.pixel(int("+n+"), int("+s+"), "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return _},ZD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},$D=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},tf=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},ef=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},nf=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"},sf=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"},of=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"},_f=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},pf=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");if("0x"==_.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", "+_+","+p+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},af=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},uf=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},rf=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},lf=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},sX=function(){return"control.reset()\n"},oX=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||rt.Profile.default.serial)+")\n"},_X=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"},pX=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"},aX=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},uX=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},rX=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},lX=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},dX=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},IX=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},TX=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},hX=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]}},MX=function(){return"while True:\n pass\n"},mX=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},EX=function(t,e){return e.definitions_.import_os="import os","os.uname()"},OX=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"}},RX=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"}},cX=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"},gX=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"},CX=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]},SX=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},AX=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},LX=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},NX=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},DX=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},fX=SX,FX=gX,PX=CX,vX=OX,YX=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]},XX=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]},xX=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]},bX=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"},yX=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]},VX=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]},BX=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]},GX=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]},UX=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]},wX=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]},kX=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"},HX=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]},WX=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]},KX=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]},JX=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]},QX={};QX["飞乙"]={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"])},QX["超霸大师"]={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"])},QX["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"]]},QX["机器人大师"]={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 qX=QX,zX=230,jX={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},ZX={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},$X={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},tx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},ex={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},ix={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},nx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},sx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},ox={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},_x={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},px={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},ax={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},ux={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},rx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},lx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},dx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Ix={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},Tx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},hx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},Mx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},mx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Ex={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Ox={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},Rx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},cx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},gx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},Cx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},Sx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Ax={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Lx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},Nx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},Dx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},fx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},Fx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},Px={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},vx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Yx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},Xx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},xx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},bx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},yx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},Vx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Bx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},Gx={init:function(){this.setColour(zX),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},Ux=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},wx=Ux,kx=Ux,Hx=Ux,Wx=Ux,Kx=Ux,Jx=Ux,Qx=Ux,qx=Ux,zx=Ux,jx=Ux,Zx=Ux,$x=Ux,tb=Ux,eb=Ux,ib=Ux,nb=Ux,sb=Ux,ob=Ux,_b=Ux,pb=Ux,ab=Ux,ub=Ux,rb=Ux,lb=Ux,db=Ux,Ib=Ux,Tb=Ux,hb=Ux,Mb=Ux,mb=Ux,Eb=Ux,Ob=Ux,Rb=Ux,cb=Ux;Object.assign(ut.Variables,dt),Object.assign(ut.Procedures,Gn),ut.Python=su,ut.generator=su,rt.Profile.default={},Object.assign(rt.Profile,qX),Object.assign(rt.Profile.default,qX["ESP32 Generic"]),Object.assign(ut.Blocks,e,i,n,s,o,_,p,a,u,r,l,d,I,b,w,U,v,y,k,f,G,B,V,F,D,N,X,Y,x,P,pt),Object.assign(ut.Python.forBlock,T,h,M,m,E,O,R,c,g,C,S,A,L,$,ot,st,q,tt,_t,K,nt,it,et,J,W,H,j,z,Z,Q,at)})(); \ No newline at end of file +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]}))}},xt={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")}},bt={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)}}},yt={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"]],bt.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)}},Zt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},$t={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=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 ie={init:function(){this.setColour(ee),this.appendDummyInput().appendField(new ut.FieldTextInput("0",ut.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MATH_NUMBER_TOOLTIP)}},ne={init:function(){this.setColour(ee);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]}))}},se={init:function(){this.setColour(ee);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]}))}},oe={init:function(){this.setColour(ee),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]}))}},_e={init:function(){this.setColour(ee),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]}))}},pe={init:function(){this.setColour(ee),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new ut.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ae={init:function(){this.setColour(ee),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]}))}},ue={init:function(){var t=[[ut.Msg.MATH_BIN,"bin"],[ut.Msg.MATH_OCT,"oct"],[ut.Msg.MATH_HEX,"hex"]];this.setColour(ee),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]}))}},re={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(ee),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(ee),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]}))}},de={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(ee),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]}))}},Ie={init:function(){var t=[[ut.Msg.LANG_MATH_INT,"int"],[ut.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ee),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]}))}},Te={init:function(){this.setColour(ee),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(ee),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(ee),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)}},me={init:function(){this.setColour(ee),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)}},Ee={init:function(){this.setColour(ee),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)}},Oe={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(ee),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]}))}},Re={init:function(){var t=[[ut.Msg.MIXLY_TO_INT,"int"],[ut.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ee),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]}))}},ce=he,ge={init:function(){this.setColour(ee),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)}},Ce=160,Se={init:function(){this.setColour(Ce),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ut.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(ut.Msg.TEXT_TEXT_TOOLTIP)},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 ut.FieldImage(e,12,12,'"')}},Ae={init:function(){this.setColour(Ce),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ut.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(ut.Msg.TEXT_LINES_TOOLTIP)},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 ut.FieldImage(e,12,12,'"')}};ut.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 Le={init:function(){this.setColour(Ce),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,'"')}},Ne={init:function(){this.setColour(Ce),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)}},De={init:function(){this.setColour(Ce),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},fe={init:function(){this.setColour(Ce),this.appendValueInput("VAR").setCheck(String).appendField(ut.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Fe={init:function(){this.setColour(Ce),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Pe={init:function(){this.setColour(Ce),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ve={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(Ce),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)}},Ye={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ce),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)}},Xe={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ce),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(ut.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(ut.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},xe={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(Ce),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"))}},be={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ce),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)}},ye={init:function(){var t=[[ut.Msg.MIXLY_EQUALS,"==="],[ut.Msg.MIXLY_STARTSWITH,"startswith"],[ut.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ce),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new ut.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ve={init:function(){this.setColour(Ce),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)}},Be={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(Ce),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]}))}},Ge={init:function(){var t=[[ut.Msg.TEXT_LJUST,"ljust"],[ut.Msg.TEXT_CENTER,"center"],[ut.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ce),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)}},Ue={init:function(){this.setColour(Ce),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)}},we={init:function(){this.setColour(Ce),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)}},ke={init:function(){this.setColour(Ce),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)}},He={init:function(){this.setColour(Ce),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)}},We={init:function(){var t=[[ut.Msg.TEXT_TRIM_BOTH,"strip"],[ut.Msg.TEXT_TRIM_LEFT,"lstrip"],[ut.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ce),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]}))}},Ke={init:function(){this.setColour(Ce),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")}},Ui={init:function(){this.setColour(Bi),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},wi={init:function(){this.setColour(Bi),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}},ki={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_KEYS),this.setTooltip(ut.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Hi={init:function(){this.setColour(Bi),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)}},Wi={init:function(){this.setColour(Bi),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)}},Ki={init:function(){this.setColour(Bi),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)}},Ji={init:function(){this.setColour(Bi),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)}},Qi={init:function(){this.setColour(Bi),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)}},qi={init:function(){this.setColour(Bi),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)}},zi={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_ITEMS),this.setTooltip(ut.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ji={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_VALUES),this.setTooltip(ut.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Zi={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_LENGTH),this.setTooltip(ut.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},$i={init:function(){this.setColour(Bi),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)}},tn={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(Bi),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")}},en={init:function(){this.setColour(Bi),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)}},nn={init:function(){this.setColour(Bi),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)}},sn={init:function(){this.setColour(Bi),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")}},on={init:function(){this.setColour(Bi),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},_n={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TO_JSON),this.setTooltip(ut.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},pn={init:function(){this.setColour(Bi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(ut.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},an=210,un={init:function(){var t=ut.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 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]}},rn={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(an),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)}},ln={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(an),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]}))}},dn={init:function(){this.setColour(an),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(ut.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(ut.Msg.LOGIC_NEGATE_TOOLTIP)}},In={init:function(){var t=[[ut.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[ut.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(an),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new ut.FieldDropdown(t),"BOOL"),this.setTooltip(ut.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Tn={init:function(){this.setColour(an),this.setOutput(!0),this.appendDummyInput().appendField(ut.Msg.LOGIC_NULL),this.setTooltip(ut.Msg.LOGIC_NULL_TOOLTIP)}},hn={init:function(){this.setColour(an),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)}},Mn={init:function(){var t=[[ut.Msg.TEXT_APPEND_TO,"in"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(an),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)}},mn={init:function(){var t=[[ut.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(an),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)}},En={init:function(){this.setColour(an),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},On={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)}},Rn={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")}},cn={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+_}))}},gn={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+_}))}},Cn={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)}},Sn={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)}},An={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}))}},Ln={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)}},Nn={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)}},Dn={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)}},fn={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)}},Fn={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 Pn={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)}},vn={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)}},Yn={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)}},Xn={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}))}},xn={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)}},bn={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]}))}},yn={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)}},Vn={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)}},Bn={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]}))}},Gn={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)}},Un={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()}},wn={};wn.NAME_TYPE=ut.PROCEDURE_CATEGORY_NAME,wn.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s"),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)}},ys={init:function(){this.setColour(Ps),this.appendDummyInput().appendField(ut.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Vs={init:function(){this.setColour(Ps),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)}},Bs={init:function(){this.setColour(Ps),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gs={init:function(){this.setColour(Ps),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Us={init:function(){this.setColour(Ps),this.appendDummyInput().appendField(ut.Msg.HTML_TEXT).appendField(new ut.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws=160,ks={init:function(){this.setColour(ws),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new ut.FieldTable(""),"TEXT")}},Hs={init:function(){this.setColour(ws),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT")}},Ws={init:function(){this.setColour(ws),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ks={init:function(){this.setColour(ws),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Js={init:function(){this.setColour(ws),this.appendDummyInput().appendTitle("Comment:").appendTitle(new ut.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Qs={init:function(){this.setColour(ws),this.appendValueInput("VALUE").appendField(ut.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},qs={init:function(){this.setColour(ws),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 yp=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]},Vp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Bp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Gp=function(t,e){return["None",e.ORDER_ATOMIC]},Up=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]},wp=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]},kp=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]},Hp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Wp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Kp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Jp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Qp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},qp=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},zp=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},jp=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]},Zp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$p=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ta=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ea=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ia=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},na=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},sa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},_a=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"},pa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},aa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ua=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"},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]},da=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"),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]},Qa=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},za=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},ja=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'"},tu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},eu=function(){return this.getFieldValue("TEXT")+"\n"},iu=function(t){return t.getFieldValue("TEXT")+"\n"},nu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},su=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},ou=function(){return""},_u=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_),o=0;o0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.join("\n")},uu.scrubNakedValue=function(t){return t+"\n"},uu.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},uu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},uu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=ut.utils.string.wrap(o,uu.COMMENT_WRAP-3),n+=uu.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const ru="#74A55B",lu={init:function(){this.setColour(ru),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(ru),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)}},Iu={init:function(){this.setColour(ru),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)}},Tu={init:function(){this.setColour(ru),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)}},hu={init:function(){this.setColour(ru),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)}},Mu={init:function(){this.setColour(ru),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)}},mu={init:function(){this.setColour(ru),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)}},Eu={init:function(){this.setColour(ru),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ou={init:function(){this.setColour(ru),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)}},Ru={init:function(){this.setColour(ru),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)}},cu={init:function(){this.setColour(ru),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)}},gu={init:function(){this.setColour(ru),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)}},Cu={init:function(){this.setColour(ru),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)}},Su={init:function(){this.setColour(ru),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)}},Au={init:function(){this.setColour(ru),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)}},Lu={init:function(){this.setColour(ru),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)}},Nu={init:function(){this.setColour(ru),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)}},Du={init:function(){this.setColour(ru),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)}},fu={init:function(){this.setColour(ru),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)}},Fu={init:function(){this.setColour(ru),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通信")}},Pu={init:function(){this.setColour(ru),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)")}},vu={init:function(){this.setColour(ru),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)")}},Yu={init:function(){this.setColour(ru),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)}},Xu={init:function(){this.setColour(ru),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)}},xu={init:function(){this.setColour(ru),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)}},bu={init:function(){this.setColour(ru),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)}},yu={init:function(){this.setColour(ru),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+"SYN6288"+ut.Msg.MIXLY_AipSpeech_synthesis),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Vu={init:function(){this.setColour(ru),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)}},Bu={init:function(){this.setColour(ru),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)}},Gu={init:function(){this.setColour(ru),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)}},Uu={init:function(){this.setColour(ru),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)}},wu={init:function(){this.setColour(ru),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},ku={init:function(){this.setColour(ru),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)}},Hu={init:function(){this.setColour(ru),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)}},Wu={init:function(){this.setColour(ru),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)}},Ku={init:function(){this.setColour(ru),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)}},Ju={init:function(){this.setColour(ru),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)}},Qu={init:function(){this.setColour(ru),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)}},qu={init:function(){this.setColour(ru),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)}},zu={init:function(){this.setColour(ru),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)}},ju={init:function(){this.setColour(ru),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)}},Zu={init:function(){this.setColour(ru),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)}},$u={init:function(){this.setColour(ru),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)}},tr={init:function(){this.setColour(ru),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)}},er={init:function(){this.setColour(ru),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)}},ir={init:function(){this.setColour(ru),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="#6C9858",sr={init:function(){this.setColour(nr),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},or={init:function(){this.setColour(nr),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)}},_r={init:function(){this.setColour(nr),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)}},pr={init:function(){this.setColour(nr),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)}},ar={init:function(){this.setColour(nr),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)}},ur={init:function(){this.setColour(nr),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%)")}},rr={init:function(){this.setColour(nr),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()}},lr={init:function(){this.setColour(nr),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)}},dr={init:function(){this.setColour(nr),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)}},Ir={init:function(){this.setColour(nr),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)}},Tr={init:function(){this.setColour(nr),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)")}},hr={init:function(){this.setColour(nr),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Mr={init:function(){this.setColour(nr),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)}}},mr={init:function(){this.setColour(nr),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)}},Er={init:function(){this.setColour(nr),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("")}},Or={init:function(){this.setColour(nr),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("")}},Rr={init:function(){this.setColour(nr),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)}},cr={init:function(){this.setColour(nr),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)}}},gr={init:function(){this.setColour(nr),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)}},Cr={init:function(){this.setColour(nr),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("")}},Sr={init:function(){this.setColour(nr),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)}},Ar={init:function(){this.setColour(nr),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)}},Lr={init:function(){this.setColour(nr),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)}},Nr={init:function(){this.setColour(nr),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)}},Dr={init:function(){this.setColour(nr),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)}},fr={init:function(){this.setColour(nr),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fr={init:function(){this.setColour(nr),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)}},Pr={init:function(){this.setColour(nr),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)}},vr={init:function(){this.setColour(nr),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)}},Yr={init:function(){this.setColour(nr),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("")}},Xr={init:function(){this.setColour(nr),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)}},xr={init:function(){this.setColour(nr),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)}},br={init:function(){this.setColour(nr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},yr={init:function(){this.setColour(nr),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)}},Vr={init:function(){this.setColour(nr),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)}},Br={init:function(){this.setColour(nr),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)}},Gr={init:function(){this.setColour(nr),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)}},Ur={init:function(){this.setColour(nr),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)}},wr={init:function(){this.setColour(nr),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)}},kr={init:function(){this.setColour(nr),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)}},Hr={init:function(){this.setColour(nr),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)}},Wr={init:function(){this.setColour(nr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(nr),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)}},Jr={init:function(){this.setColour(nr),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)}},Qr={init:function(){this.setColour(nr),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)}},qr={init:function(){this.setColour(nr),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)}},zr={init:function(){this.setColour(nr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},jr={init:function(){this.setColour(nr),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)}},Zr={init:function(){this.setColour(nr),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$r={init:function(){this.setColour(nr),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"]]),"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()}},tl={init:function(){this.setColour(nr),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)}},el={init:function(){this.setColour(nr),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)}},il={init:function(){this.setColour(nr),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)}},nl={init:function(){this.setColour(nr),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_KEY1,"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)}},sl={init:function(){this.setColour(nr),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)}},ol={init:function(){this.setColour(nr),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;ne?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")}},Tm={init:function(){this.setColour(pm),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},hm={init:function(){this.setColour(pm),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}},Mm={init:function(){this.setColour(pm),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}},mm={init:function(){this.setColour(pm),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)}},Em={init:function(){this.setColour(pm),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)}},Om={init:function(){this.setColour(pm),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)}},Rm={init:function(){this.setColour(pm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cm={init:function(){this.setColour(pm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gm={init:function(){this.setColour(pm),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cm={init:function(){this.setColour(pm),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Sm={init:function(){this.setColour(pm),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Am={init:function(){this.setColour(pm),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},Lm={init:function(){this.setColour(pm),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Nm={init:function(){this.setColour(pm),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)}},Dm={init:function(){this.setColour(pm),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)}},fm={init:function(){this.setColour(pm),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)}},Fm={init:function(){this.setColour(pm),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)}},Pm={init:function(){this.VISITOR_ID=rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(pm),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")}},vm={init:function(){this.setColour(pm),this.appendDummyInput().appendField("MixIO").appendField(ut.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Ym={init:function(){this.setColour(pm),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)}},Xm={init:function(){this.setColour(pm),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)}},xm={init:function(){this.setColour(pm),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)}},bm={init:function(){this.setColour(pm),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)}},ym=am,Vm=um,Bm=rm,Gm=lm,Um=Im,wm=225,km={init:function(){this.setColour(wm),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)}},Hm={init:function(){this.setColour(wm),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}))}},Wm={init:function(){this.setColour(wm),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)}},Km={init:function(){this.setColour(wm),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}))}},Jm={init:function(){this.setColour(wm),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)}},Qm={init:function(){this.setColour(wm),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)}},qm={init:function(){this.setColour(wm),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]}))}},zm={init:function(){this.setColour(wm),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)}},jm={init:function(){this.setColour(wm),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)}},Zm={init:function(){this.setColour(wm),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)}},$m={init:function(){this.setColour(wm),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)}},tE={init:function(){this.setColour(wm),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]}))}},eE={init:function(){this.setColour(wm),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)}},iE={init:function(){this.setColour(wm),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)}},nE={init:function(){this.setColour(wm),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)}},sE={init:function(){this.setColour(wm),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)}},oE={init:function(){this.setColour(wm),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)}},_E={init:function(){this.setColour(wm),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)}},pE={init:function(){this.setColour(wm),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)}},aE={init:function(){this.setColour(wm),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)}},uE={init:function(){this.setColour(wm),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)}},rE={init:function(){this.setColour(wm),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")}},lE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(wm),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:ut.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:ut.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:ut.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},dE={init:function(){this.appendValueInput("VAR").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(wm),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"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]}))}},IE={init:function(){this.setColour(wm),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)}},TE={init:function(){this.setColour(wm),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)}},hE="#3288dd",ME={init:function(){this.setColour(hE),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("")}},mE={init:function(){this.setColour(hE),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("")}},EE={init:function(){this.appendValueInput("VAL");var t=[[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"]];this.setColour(hE),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},OE="#A58C5B",RE={init:function(){this.setColour(OE),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)}},cE={init:function(){this.setColour(OE),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)}},gE={init:function(){this.setColour(OE),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)}},CE={init:function(){this.setColour(OE),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)}},SE={init:function(){this.setColour(OE),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}))}},AE={init:function(){this.setColour(OE),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}))}},LE={init:function(){this.setColour(OE),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)}},NE={init:function(){var t=[[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]];this.setColour(OE),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(t),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.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}[t]}))}},DE={init:function(){this.setColour(OE),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)}},fE={init:function(){this.setColour(OE),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)}},FE={init:function(){this.setColour(OE),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}))}},PE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("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]}))}},vE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("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]}))}},YE={init:function(){this.setColour(OE),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)}},XE={init:function(){this.setColour(OE),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)}},xE={init:function(){this.setColour(OE),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([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"],["LTR308","LTR308"],["LTR381RGB","LTR381RGB"],["LTR390UV","LTR390UV"],["HP203X","HP203X"],["SHTC3","SHTC3"],["AHT21","AHT21"],["VL53L0X","VL53L0X"],["QMC5883L","QMC5883L"],["MAX30102","MAX30102"],["APDS9960","APDS9960"],["RFID","RFID"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},bE={init:function(){this.setColour(OE),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)}},yE={init:function(){this.setColour(OE),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)}},VE={init:function(){this.setColour(OE),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},BE={init:function(){this.setColour(OE),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)}},GE={init:function(){this.setColour(OE),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)}},UE={init:function(){this.setColour(OE),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)}},wE={init:function(){this.setColour(OE),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]}))}},kE={init:function(){this.setColour(OE),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]}))}},HE={init:function(){this.setColour(OE),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)}},WE={init:function(){this.setColour(OE),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)}},KE={init:function(){this.setColour(OE),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}))}},JE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("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}))}},QE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("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}))}},qE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("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}))}},zE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("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)}},jE={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_GETTEMPERATUE)}},ZE={init:function(){this.setColour(OE),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]}))}},$E={init:function(){this.setColour(OE),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)}},tO={init:function(){this.setColour(OE),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")}},eO={init:function(){this.setColour(OE),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)}},iO={init:function(){this.setColour(OE),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)}},nO={init:function(){this.setColour(OE),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)}},sO={init:function(){this.setColour(OE),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)}},oO={init:function(){this.setColour(OE),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)}},_O={init:function(){this.setColour(OE),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)}},pO={init:function(){this.setColour(OE),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)")}},aO={init:function(){this.setColour(OE),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},uO={init:function(){this.setColour(OE),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)}},rO={init:function(){this.setColour(OE),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_zero"].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},jL=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},ZL=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"},$L=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tN=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"},eN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},iN=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"},nN=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},sN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},oN=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]},_N=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"},pN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},aN=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},uN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},rN=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]},lN=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dN=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"},IN=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"},TN=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"},hN=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"}},MN=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"},mN=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},EN=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]},ON=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"},RN=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},cN=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"}},gN=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"}},CN=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"},SN=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"},AN=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},LN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},NN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},DN=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"},fN=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},FN=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_zero"].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"},PN=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},vN=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]},YN=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 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 = "+o+",size = "+_+",space = "+p+",center = "+u+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},XN=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},xN=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},bN=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},yN=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},VN=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"},BN=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"},GN=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"},UN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},wN=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},kN=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=rt.Boards.getSelectedBoardKey().split(":")[2],_="";return _=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_zero"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+",address="+s+",font_address="+_+")\n"},HN=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"},WN=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"},KN=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"},JN=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"},QN=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"},qN=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"},zN=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"},jN=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"},ZN=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"},$N=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"},tD=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]},eD=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"},iD=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"},nD=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"},sD=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"},oD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_D=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");return"mixgo_zero"==i||"mixgo_nova"==i?(e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+",space = "+s+",center = "+o+")\n"):(e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+",space = "+s+",center = "+o+")\n")},pD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},aD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",delay = "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},uD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==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{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},rD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.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"},lD=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]},dD=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]},ID=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&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},WD=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,"VAR",e.ORDER_ATOMIC);if("0x"==u.slice(0,2))var r="onboard_tft.shows("+n+",x = "+s+",y = "+o+",size = "+_+",space = "+p+",center = "+a+",color="+u+")\n";else{const t=u.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.shows("+n+",x = "+s+",y = "+o+",size = "+_+",space = "+p+",center = "+a+",color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},KD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},JD=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},QD=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_tft","onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+",color=0xffff)\n"},qD=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},zD=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");if("0x"==p.slice(0,2))var u="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", "+p+")\nonboard_tft.show()\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."+a+"("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\nonboard_tft.show()\n"}return u},jD=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");if("0x"==_.slice(0,2))var a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", "+_+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},ZD=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);if("0x"==p.slice(0,2))var a="onboard_tft.line("+n+", "+s+", "+o+", "+_+", "+p+")\nonboard_tft.show()\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="onboard_tft.line("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\nonboard_tft.show()\n"}return a},$D=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return"onboard_tft.fill(0)\nonboard_tft.show()\n"},tf=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},ef=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["hex(onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+")))",e.ORDER_ATOMIC]},nf=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);if("0x"==o.slice(0,2))var _="onboard_tft.pixel(int("+n+"), int("+s+"), "+o+")\nonboard_tft.show()\n";else{const t=o.match(/\d+/g);var p="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&p)>>8|(64512&p)>>5|(255&p)>>3).toString(16)+")\nonboard_tft.show()\n"}return _},sf=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";return["onboard_tft.get_brightness()",e.ORDER_ATOMIC]},of=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},_f=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);if("0x"==n.slice(0,2))var s="onboard_tft.fill("+n+")\nonboard_tft.show()\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");s="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\nonboard_tft.show()\n"}return s},pf=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},af=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"},uf=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"},rf=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"},lf=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},df=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");if("0x"==_.slice(0,2))var a="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", "+_+","+p+")\nonboard_tft.show()\n";else{const t=_.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+","+p+")\nonboard_tft.show()\n"}return a},If=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"},Tf=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},hf=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Mf=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},uX=function(){return"control.reset()\n"},rX=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||rt.Profile.default.serial)+")\n"},lX=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"},dX=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"},IX=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},TX=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},hX=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},MX=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},mX=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},EX=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},OX=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},RX=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]}},cX=function(){return"while True:\n pass\n"},gX=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},CX=function(t,e){return e.definitions_.import_os="import os","os.uname()"},SX=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"}},AX=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"}},LX=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"},NX=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"},DX=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]},fX=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},FX=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},PX=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},vX=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},YX=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},XX=fX,xX=NX,bX=DX,yX=SX,VX=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]},BX=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]},GX=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]},UX=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"},wX=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]},kX=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]},HX=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]},WX=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]},KX=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]},JX=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]},QX=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"},qX=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]},zX=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]},jX=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]},ZX=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]},$X={};$X["飞乙"]={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"])},$X["超霸大师"]={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"])},$X["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"]]},$X["机器人大师"]={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 tx=$X,ex=230,ix={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},nx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},sx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},ox={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},_x={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},px={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},ax={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},ux={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},rx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},lx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},dx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},Ix={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},Tx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},hx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},Mx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},mx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},Ex={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},Ox={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},Rx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},cx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},gx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Cx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Sx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},Ax={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},Lx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},Nx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},Dx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},fx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Fx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Px={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},vx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},Yx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},Xx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},xx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},bx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},yx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},Vx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},Bx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},Gx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},Ux={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},wx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},kx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},Hx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},Wx={init:function(){this.setColour(ex),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},Kx=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Jx=Kx,Qx=Kx,qx=Kx,zx=Kx,jx=Kx,Zx=Kx,$x=Kx,tb=Kx,eb=Kx,ib=Kx,nb=Kx,sb=Kx,ob=Kx,_b=Kx,pb=Kx,ab=Kx,ub=Kx,rb=Kx,lb=Kx,db=Kx,Ib=Kx,Tb=Kx,hb=Kx,Mb=Kx,mb=Kx,Eb=Kx,Ob=Kx,Rb=Kx,cb=Kx,gb=Kx,Cb=Kx,Sb=Kx,Ab=Kx,Lb=Kx;Object.assign(ut.Variables,dt),Object.assign(ut.Procedures,kn),ut.Python=uu,ut.generator=uu,rt.Profile.default={},Object.assign(rt.Profile,tx),Object.assign(rt.Profile.default,tx["ESP32 Generic"]),Object.assign(ut.Blocks,e,i,n,s,o,_,p,a,u,r,l,d,I,b,w,U,v,y,k,f,G,B,V,F,D,N,X,Y,x,P,pt),Object.assign(ut.Python.forBlock,T,h,M,m,E,O,R,c,g,C,S,A,L,$,ot,st,q,tt,_t,K,nt,it,et,J,W,H,j,z,Z,Q,at)})(); \ No newline at end of file diff --git a/boards/default/python_mixpy/main.bundle.js b/boards/default/python_mixpy/main.bundle.js index 13a48c60..62dc55bd 100644 --- a/boards/default/python_mixpy/main.bundle.js +++ b/boards/default/python_mixpy/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"use strict";var __webpack_modules__={131:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.imread("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_show_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imshow("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_write_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imwrite("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_waitkey=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.waitKey("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+")\n"},cv_destroy_all=function(e,t){t.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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.CascadeClassifier("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect_all=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+",minSize=("+t.valueToCode(this,"x1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y1",t.ORDER_ATOMIC)+"),maxSize=("+t.valueToCode(this,"x2",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y2",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={},blocks_variables_namespaceObject={};__webpack_require__.r(blocks_variables_namespaceObject),__webpack_require__.d(blocks_variables_namespaceObject,{controls_type:()=>controls_type,controls_typeLists:()=>controls_typeLists,lists_zip:()=>lists_zip,lists_zip_container:()=>lists_zip_container,lists_zip_item:()=>lists_zip_item,unpack_iterable_object:()=>unpack_iterable_object,variables_change:()=>variables_change,variables_get:()=>variables_get,variables_global:()=>variables_global,variables_set:()=>variables_set});var control_namespaceObject={};__webpack_require__.r(control_namespaceObject),__webpack_require__.d(control_namespaceObject,{base_setup:()=>base_setup,controls_delay:()=>controls_delay,controls_end_program:()=>controls_end_program,controls_except:()=>controls_except,controls_finally:()=>controls_finally,controls_flow_statements:()=>controls_flow_statements,controls_for:()=>controls_for,controls_forEach:()=>controls_forEach,controls_for_range:()=>controls_for_range,controls_if:()=>controls_if,controls_if_else:()=>controls_if_else,controls_if_elseif:()=>controls_if_elseif,controls_if_if:()=>controls_if_if,controls_lambda:()=>controls_lambda,controls_main:()=>controls_main,controls_pass:()=>controls_pass,controls_range:()=>controls_range,controls_repeat_ext:()=>controls_repeat_ext,controls_thread:()=>controls_thread,controls_try:()=>controls_try,controls_try_finally:()=>controls_try_finally,controls_whileUntil:()=>controls_whileUntil,do_while:()=>do_while,garbage_collection:()=>garbage_collection,get_mem_alloc:()=>get_mem_alloc,get_mem_free:()=>get_mem_free,get_unique_identifier:()=>get_unique_identifier});var math_namespaceObject={};__webpack_require__.r(math_namespaceObject),__webpack_require__.d(math_namespaceObject,{base_map:()=>base_map,math_arithmetic:()=>math_arithmetic,math_bit:()=>math_bit,math_constant:()=>math_constant,math_constant_mp:()=>math_constant_mp,math_constrain:()=>math_constrain,math_dec:()=>math_dec,math_indexer_number:()=>math_indexer_number,math_map:()=>math_map,math_max_min:()=>math_max_min,math_number:()=>math_number,math_number_base_conversion:()=>math_number_base_conversion,math_random:()=>math_random,math_random_seed:()=>math_random_seed,math_round:()=>math_round,math_selfcalcu:()=>math_selfcalcu,math_to_int:()=>math_to_int,math_trig:()=>math_trig,text_to_number:()=>text_to_number,text_to_number_skulpt:()=>text_to_number_skulpt,turn_to_int:()=>turn_to_int});var text_namespaceObject={};__webpack_require__.r(text_namespaceObject),__webpack_require__.d(text_namespaceObject,{ascii_to_char:()=>ascii_to_char,char_to_ascii:()=>char_to_ascii,number_to_text:()=>number_to_text,os_system:()=>os_system,text:()=>text_text,text_capital:()=>text_capital,text_center:()=>text_center,text_char:()=>text_char,text_char_at:()=>text_char_at,text_char_at2:()=>text_char_at2,text_char_at3:()=>text_char_at3,text_compareTo:()=>text_compareTo,text_compare_to:()=>text_compare_to,text_create_with_container:()=>text_create_with_container,text_create_with_item:()=>text_create_with_item,text_encode:()=>text_encode,text_equals_starts_ends:()=>text_equals_starts_ends,text_eval:()=>text_eval,text_find:()=>text_find,text_format:()=>text_format,text_format_noreturn:()=>text_format_noreturn,text_join:()=>text_join,text_join_seq:()=>text_join_seq,text_length:()=>text_length,text_random_char:()=>text_random_char,text_replace:()=>text_replace,text_split:()=>text_split,text_strip:()=>text_strip,text_substring:()=>text_substring,text_substring2:()=>text_substring2,text_substring3:()=>text_substring3,text_textarea:()=>text_textarea});var lists_namespaceObject={};__webpack_require__.r(lists_namespaceObject),__webpack_require__.d(lists_namespaceObject,{list_many_input:()=>list_many_input,list_tolist:()=>list_tolist,list_tolist2:()=>list_tolist2,list_trig:()=>list_trig,lists_2d_get_col_row_data:()=>lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_append_extend,lists_change_to:()=>lists_change_to,lists_change_to_general:()=>lists_change_to_general,lists_clear:()=>lists_clear,lists_create_with:()=>lists_create_with,lists_create_with2:()=>lists_create_with2,lists_create_with_container:()=>lists_create_with_container,lists_create_with_item:()=>lists_create_with_item,lists_create_with_noreturn:()=>lists_create_with_noreturn,lists_create_with_text:()=>lists_create_with_text,lists_create_with_text2:()=>lists_create_with_text2,lists_del_general:()=>lists_del_general,lists_find:()=>lists_find,lists_getIndex3:()=>lists_getIndex3,lists_getSublist3:()=>lists_getSublist3,lists_get_index:()=>lists_get_index,lists_get_random_item:()=>lists_get_random_item,lists_get_random_sublist:()=>lists_get_random_sublist,lists_get_sublist:()=>lists_get_sublist,lists_insert_value:()=>lists_insert_value,lists_insert_value2:()=>lists_insert_value2,lists_pop:()=>lists_pop,lists_remove_at:()=>lists_remove_at,lists_remove_at2:()=>lists_remove_at2,lists_reverse:()=>lists_reverse,lists_setIndex3:()=>lists_setIndex3,lists_set_index:()=>lists_set_index,lists_sort:()=>lists_sort});var dicts_namespaceObject={};__webpack_require__.r(dicts_namespaceObject),__webpack_require__.d(dicts_namespaceObject,{dicts_add_change_del:()=>dicts_add_change_del,dicts_add_or_change:()=>dicts_add_or_change,dicts_clear:()=>dicts_clear,dicts_create_with:()=>dicts_create_with,dicts_create_with_container:()=>dicts_create_with_container,dicts_create_with_item:()=>dicts_create_with_item,dicts_create_with_noreturn:()=>dicts_create_with_noreturn,dicts_deldict:()=>dicts_deldict,dicts_delete:()=>dicts_delete,dicts_get:()=>dicts_get,dicts_get_default:()=>dicts_get_default,dicts_items:()=>dicts_items,dicts_keys:()=>dicts_keys,dicts_length:()=>dicts_length,dicts_pop:()=>dicts_pop,dicts_setdefault:()=>dicts_setdefault,dicts_to_json:()=>dicts_to_json,dicts_todict:()=>dicts_todict,dicts_update:()=>dicts_update,dicts_values:()=>dicts_values,json_to_dicts:()=>json_to_dicts});var logic_namespaceObject={};__webpack_require__.r(logic_namespaceObject),__webpack_require__.d(logic_namespaceObject,{logic_boolean:()=>logic_boolean,logic_compare:()=>logic_compare,logic_compare_continous:()=>logic_compare_continous,logic_is:()=>logic_is,logic_is_in:()=>logic_is_in,logic_negate:()=>logic_negate,logic_null:()=>logic_null,logic_operation:()=>logic_operation,logic_tobool:()=>logic_tobool,logic_true_or_false:()=>logic_true_or_false});var storage_namespaceObject={};__webpack_require__.r(storage_namespaceObject),__webpack_require__.d(storage_namespaceObject,{sdcard_mount:()=>sdcard_mount,sdcard_use_spi_init:()=>sdcard_use_spi_init,storage_can_write_ornot:()=>storage_can_write_ornot,storage_change_dir:()=>storage_change_dir,storage_close_file:()=>storage_close_file,storage_delete_file:()=>storage_delete_file,storage_file_seek:()=>storage_file_seek,storage_file_tell:()=>storage_file_tell,storage_file_write:()=>storage_file_write,storage_fileopen:()=>storage_fileopen,storage_fileopen_new:()=>storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_fileopen_new_encoding,storage_get_a_line:()=>storage_get_a_line,storage_get_contents:()=>storage_get_contents,storage_get_contents_without_para:()=>storage_get_contents_without_para,storage_get_current_dir:()=>storage_get_current_dir,storage_get_file_size:()=>storage_get_file_size,storage_get_filename:()=>storage_get_filename,storage_is_file:()=>storage_is_file,storage_list_all_files:()=>storage_list_all_files,storage_make_dir:()=>storage_make_dir,storage_open_file_with_os:()=>storage_open_file_with_os,storage_rename:()=>storage_rename});var blocks_procedures_namespaceObject={};__webpack_require__.r(blocks_procedures_namespaceObject),__webpack_require__.d(blocks_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_callnoreturn,procedures_callreturn:()=>procedures_callreturn,procedures_defnoreturn:()=>procedures_defnoreturn,procedures_defreturn:()=>procedures_defreturn,procedures_ifreturn:()=>procedures_ifreturn,procedures_mutatorarg:()=>procedures_mutatorarg,procedures_mutatorcontainer:()=>procedures_mutatorcontainer,procedures_return:()=>procedures_return});var tuple_namespaceObject={};__webpack_require__.r(tuple_namespaceObject),__webpack_require__.d(tuple_namespaceObject,{tuple_change_to:()=>tuple_change_to,tuple_create_with:()=>tuple_create_with,tuple_create_with_container:()=>tuple_create_with_container,tuple_create_with_item:()=>tuple_create_with_item,tuple_create_with_noreturn:()=>tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_create_with_text_return,tuple_del:()=>tuple_del,tuple_find:()=>tuple_find,tuple_getIndex:()=>tuple_getIndex,tuple_getSublist:()=>tuple_getSublist,tuple_get_random_item:()=>tuple_get_random_item,tuple_get_sublist:()=>tuple_get_sublist,tuple_join:()=>tuple_join,tuple_length:()=>tuple_length,tuple_max:()=>tuple_max,tuple_totuple:()=>tuple_totuple,tuple_trig:()=>tuple_trig});var set_namespaceObject={};__webpack_require__.r(set_namespaceObject),__webpack_require__.d(set_namespaceObject,{set_add_discard:()=>set_add_discard,set_clear:()=>set_clear,set_create_with:()=>set_create_with,set_create_with_container:()=>set_create_with_container,set_create_with_item:()=>set_create_with_item,set_create_with_text_return:()=>set_create_with_text_return,set_length:()=>set_length,set_operate:()=>set_operate,set_operate_update:()=>set_operate_update,set_pop:()=>set_pop,set_sub:()=>set_sub,set_toset:()=>set_toset,set_update:()=>set_update});var html_namespaceObject={};__webpack_require__.r(html_namespaceObject),__webpack_require__.d(html_namespaceObject,{html_content:()=>html_content,html_content_more:()=>html_content_more,html_document:()=>html_document,html_form:()=>html_form,html_head_body:()=>html_head_body,html_style:()=>html_style,html_style_color:()=>html_style_color,html_style_content:()=>html_style_content,html_text:()=>html_text,html_title:()=>html_title});var utility_namespaceObject={};__webpack_require__.r(utility_namespaceObject),__webpack_require__.d(utility_namespaceObject,{attribute_access:()=>attribute_access,function_call:()=>function_call,function_call_container:()=>function_call_container,function_call_item:()=>function_call_item,raw_block:()=>raw_block,raw_empty:()=>raw_empty,raw_expression:()=>raw_expression,raw_table:()=>raw_table,text_comment:()=>text_comment,text_print_multiple:()=>text_print_multiple,text_print_multiple_container:()=>text_print_multiple_container,text_print_multiple_item:()=>text_print_multiple_item,type_check:()=>type_check});var generators_variables_namespaceObject={};__webpack_require__.r(generators_variables_namespaceObject),__webpack_require__.d(generators_variables_namespaceObject,{controls_type:()=>variables_controls_type,controls_typeLists:()=>variables_controls_typeLists,lists_zip:()=>variables_lists_zip,unpack_iterable_object:()=>variables_unpack_iterable_object,variables_change:()=>variables_variables_change,variables_get:()=>variables_variables_get,variables_global:()=>variables_variables_global,variables_set:()=>variables_variables_set});var generators_control_namespaceObject={};__webpack_require__.r(generators_control_namespaceObject),__webpack_require__.d(generators_control_namespaceObject,{Panic_with_status_code:()=>Panic_with_status_code,base_setup:()=>control_base_setup,controls_delay:()=>control_controls_delay,controls_flow_statements:()=>control_controls_flow_statements,controls_for:()=>control_controls_for,controls_forEach:()=>control_controls_forEach,controls_for_range:()=>control_controls_for_range,controls_if:()=>control_controls_if,controls_interrupts:()=>controls_interrupts,controls_lambda:()=>control_controls_lambda,controls_main:()=>control_controls_main,controls_millis:()=>controls_millis,controls_nointerrupts:()=>controls_nointerrupts,controls_pass:()=>control_controls_pass,controls_range:()=>control_controls_range,controls_repeat:()=>controls_repeat,controls_repeat_ext:()=>control_controls_repeat_ext,controls_thread:()=>control_controls_thread,controls_try_finally:()=>control_controls_try_finally,controls_whileUntil:()=>control_controls_whileUntil,do_while:()=>control_do_while,garbage_collection:()=>control_garbage_collection,get_mem_alloc:()=>control_get_mem_alloc,get_mem_free:()=>control_get_mem_free,get_unique_identifier:()=>control_get_unique_identifier,reset:()=>control_reset,time_sleep:()=>time_sleep});var generators_math_namespaceObject={};__webpack_require__.r(generators_math_namespaceObject),__webpack_require__.d(generators_math_namespaceObject,{base_map:()=>math_base_map,math_arithmetic:()=>math_math_arithmetic,math_bit:()=>math_math_bit,math_constant:()=>math_math_constant,math_constant_mp:()=>math_math_constant_mp,math_constrain:()=>math_math_constrain,math_dec:()=>math_math_dec,math_indexer_number:()=>math_math_indexer_number,math_map:()=>math_math_map,math_max_min:()=>math_math_max_min,math_number:()=>math_math_number,math_number_base_conversion:()=>math_math_number_base_conversion,math_random:()=>math_math_random,math_random_seed:()=>math_math_random_seed,math_round:()=>math_math_round,math_selfcalcu:()=>math_math_selfcalcu,math_single:()=>math_single,math_to_int:()=>math_math_to_int,math_trig:()=>math_math_trig,text_to_number:()=>math_text_to_number,text_to_number_skulpt:()=>math_text_to_number_skulpt,turn_to_int:()=>math_turn_to_int});var generators_text_namespaceObject={};__webpack_require__.r(generators_text_namespaceObject),__webpack_require__.d(generators_text_namespaceObject,{ascii_to_char:()=>text_ascii_to_char,char_to_ascii:()=>text_char_to_ascii,number_to_text:()=>text_number_to_text,os_system:()=>text_os_system,text:()=>generators_text_text,text_capital:()=>text_text_capital,text_center:()=>text_text_center,text_char:()=>text_text_char,text_char_at:()=>text_text_char_at,text_char_at2:()=>text_text_char_at2,text_char_at3:()=>text_text_char_at3,text_compareTo:()=>text_text_compareTo,text_compare_to:()=>text_text_compare_to,text_encode:()=>text_text_encode,text_equals_starts_ends:()=>text_text_equals_starts_ends,text_eval:()=>text_text_eval,text_find:()=>text_text_find,text_format:()=>text_text_format,text_format_noreturn:()=>text_text_format_noreturn,text_join:()=>text_text_join,text_join_seq:()=>text_text_join_seq,text_length:()=>text_text_length,text_random_char:()=>text_text_random_char,text_replace:()=>text_text_replace,text_split:()=>text_text_split,text_strip:()=>text_text_strip,text_substring:()=>text_text_substring,text_substring2:()=>text_text_substring2,text_substring3:()=>text_text_substring3,text_textarea:()=>text_text_textarea});var generators_lists_namespaceObject={};__webpack_require__.r(generators_lists_namespaceObject),__webpack_require__.d(generators_lists_namespaceObject,{list_many_input:()=>lists_list_many_input,list_tolist:()=>lists_list_tolist,list_tolist2:()=>lists_list_tolist2,list_trig:()=>lists_list_trig,lists_2d_get_col_row_data:()=>lists_lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_lists_append_extend,lists_change_to:()=>lists_lists_change_to,lists_change_to_general:()=>lists_lists_change_to_general,lists_clear:()=>lists_lists_clear,lists_create_with:()=>lists_lists_create_with,lists_create_with2:()=>lists_lists_create_with2,lists_create_with_noreturn:()=>lists_lists_create_with_noreturn,lists_create_with_text:()=>lists_lists_create_with_text,lists_create_with_text2:()=>lists_lists_create_with_text2,lists_del_general:()=>lists_lists_del_general,lists_find:()=>lists_lists_find,lists_getIndex3:()=>lists_lists_getIndex3,lists_getSublist3:()=>lists_lists_getSublist3,lists_get_index:()=>lists_lists_get_index,lists_get_random_item:()=>lists_lists_get_random_item,lists_get_random_sublist:()=>lists_lists_get_random_sublist,lists_get_sublist:()=>lists_lists_get_sublist,lists_insert_value:()=>lists_lists_insert_value,lists_insert_value2:()=>lists_lists_insert_value2,lists_pop:()=>lists_lists_pop,lists_remove_at:()=>lists_lists_remove_at,lists_remove_at2:()=>lists_lists_remove_at2,lists_reverse:()=>lists_lists_reverse,lists_setIndex3:()=>lists_lists_setIndex3,lists_set_index:()=>lists_lists_set_index,lists_sort:()=>lists_lists_sort});var generators_dicts_namespaceObject={};__webpack_require__.r(generators_dicts_namespaceObject),__webpack_require__.d(generators_dicts_namespaceObject,{dicts_add_change_del:()=>dicts_dicts_add_change_del,dicts_add_or_change:()=>dicts_dicts_add_or_change,dicts_clear:()=>dicts_dicts_clear,dicts_create_with:()=>dicts_dicts_create_with,dicts_create_with_noreturn:()=>dicts_dicts_create_with_noreturn,dicts_deldict:()=>dicts_dicts_deldict,dicts_delete:()=>dicts_dicts_delete,dicts_get:()=>dicts_dicts_get,dicts_get_default:()=>dicts_dicts_get_default,dicts_items:()=>dicts_dicts_items,dicts_keys:()=>dicts_dicts_keys,dicts_length:()=>dicts_dicts_length,dicts_pop:()=>dicts_dicts_pop,dicts_setdefault:()=>dicts_dicts_setdefault,dicts_to_json:()=>dicts_dicts_to_json,dicts_todict:()=>dicts_dicts_todict,dicts_update:()=>dicts_dicts_update,dicts_values:()=>dicts_dicts_values,json_to_dicts:()=>dicts_json_to_dicts});var generators_logic_namespaceObject={};__webpack_require__.r(generators_logic_namespaceObject),__webpack_require__.d(generators_logic_namespaceObject,{logic_boolean:()=>logic_logic_boolean,logic_compare:()=>logic_logic_compare,logic_compare_continous:()=>logic_logic_compare_continous,logic_is:()=>logic_logic_is,logic_is_in:()=>logic_logic_is_in,logic_negate:()=>logic_logic_negate,logic_null:()=>logic_logic_null,logic_operation:()=>logic_logic_operation,logic_tobool:()=>logic_logic_tobool,logic_true_or_false:()=>logic_logic_true_or_false});var generators_storage_namespaceObject={};__webpack_require__.r(generators_storage_namespaceObject),__webpack_require__.d(generators_storage_namespaceObject,{sdcard_mount:()=>storage_sdcard_mount,sdcard_use_spi_init:()=>storage_sdcard_use_spi_init,storage_can_write_ornot:()=>storage_storage_can_write_ornot,storage_change_dir:()=>storage_storage_change_dir,storage_close_file:()=>storage_storage_close_file,storage_delete_file:()=>storage_storage_delete_file,storage_file_seek:()=>storage_storage_file_seek,storage_file_tell:()=>storage_storage_file_tell,storage_file_write:()=>storage_storage_file_write,storage_fileopen:()=>storage_storage_fileopen,storage_fileopen_new:()=>storage_storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_storage_fileopen_new_encoding,storage_get_a_line:()=>storage_storage_get_a_line,storage_get_contents:()=>storage_storage_get_contents,storage_get_contents_without_para:()=>storage_storage_get_contents_without_para,storage_get_current_dir:()=>storage_storage_get_current_dir,storage_get_file_size:()=>storage_storage_get_file_size,storage_get_filename:()=>storage_storage_get_filename,storage_is_file:()=>storage_storage_is_file,storage_list_all_files:()=>storage_storage_list_all_files,storage_make_dir:()=>storage_storage_make_dir,storage_open_file_with_os:()=>storage_storage_open_file_with_os,storage_rename:()=>storage_storage_rename});var generators_procedures_namespaceObject={};__webpack_require__.r(generators_procedures_namespaceObject),__webpack_require__.d(generators_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_procedures_callnoreturn,procedures_callreturn:()=>procedures_procedures_callreturn,procedures_defnoreturn:()=>procedures_procedures_defnoreturn,procedures_defreturn:()=>procedures_procedures_defreturn,procedures_ifreturn:()=>procedures_procedures_ifreturn,procedures_return:()=>procedures_procedures_return});var generators_tuple_namespaceObject={};__webpack_require__.r(generators_tuple_namespaceObject),__webpack_require__.d(generators_tuple_namespaceObject,{tuple_change_to:()=>tuple_tuple_change_to,tuple_create_with:()=>tuple_tuple_create_with,tuple_create_with_noreturn:()=>tuple_tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_tuple_create_with_text_return,tuple_del:()=>tuple_tuple_del,tuple_find:()=>tuple_tuple_find,tuple_getIndex:()=>tuple_tuple_getIndex,tuple_getSublist:()=>tuple_tuple_getSublist,tuple_get_random_item:()=>tuple_tuple_get_random_item,tuple_get_sublist:()=>tuple_tuple_get_sublist,tuple_join:()=>tuple_tuple_join,tuple_length:()=>tuple_tuple_length,tuple_max:()=>tuple_tuple_max,tuple_totuple:()=>tuple_tuple_totuple,tuple_trig:()=>tuple_tuple_trig});var generators_set_namespaceObject={};__webpack_require__.r(generators_set_namespaceObject),__webpack_require__.d(generators_set_namespaceObject,{set_add_discard:()=>set_set_add_discard,set_clear:()=>set_set_clear,set_create_with:()=>set_set_create_with,set_create_with_text_return:()=>set_set_create_with_text_return,set_length:()=>set_set_length,set_operate:()=>set_set_operate,set_operate_update:()=>set_set_operate_update,set_pop:()=>set_set_pop,set_sub:()=>set_set_sub,set_toset:()=>set_set_toset,set_update:()=>set_set_update});var generators_html_namespaceObject={};__webpack_require__.r(generators_html_namespaceObject),__webpack_require__.d(generators_html_namespaceObject,{html_content:()=>html_html_content,html_content_more:()=>html_html_content_more,html_document:()=>html_html_document,html_form:()=>html_html_form,html_head_body:()=>html_html_head_body,html_style:()=>html_html_style,html_style_content:()=>html_html_style_content,html_text:()=>html_html_text,html_title:()=>html_html_title});var generators_utility_namespaceObject={};__webpack_require__.r(generators_utility_namespaceObject),__webpack_require__.d(generators_utility_namespaceObject,{attribute_access:()=>utility_attribute_access,function_call:()=>utility_function_call,raw_block:()=>utility_raw_block,raw_empty:()=>utility_raw_empty,raw_expression:()=>utility_raw_expression,raw_table:()=>utility_raw_table,type_check:()=>utility_type_check});var ai_namespaceObject={};__webpack_require__.r(ai_namespaceObject),__webpack_require__.d(ai_namespaceObject,{AI_ChooseAndGet:()=>AI_ChooseAndGet,AI_Face_match:()=>AI_Face_match,AI_ImageClassify:()=>AI_ImageClassify,AI_ImageClassify_Func:()=>AI_ImageClassify_Func,AI_Nlp:()=>AI_Nlp,AI_Nlp_Func:()=>AI_Nlp_Func,AI_Nlp_Func_sim:()=>AI_Nlp_Func_sim,AI_Nlp_Sim:()=>AI_Nlp_Sim,AI_Nlp_Topic:()=>AI_Nlp_Topic,AI_Nlp_newsSummary:()=>AI_Nlp_newsSummary,AI_Ocr:()=>AI_Ocr,AI_Ocr_Func:()=>AI_Ocr_Func,AI_Speech_asr:()=>AI_Speech_asr,AI_Speech_synthesis:()=>AI_Speech_synthesis,AI_audio:()=>AI_audio,AI_client:()=>AI_client,AI_photo:()=>AI_photo,AI_result:()=>AI_result});var algorithm_namespaceObject={};__webpack_require__.r(algorithm_namespaceObject),__webpack_require__.d(algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_add_path,algorithm_add_school:()=>algorithm_add_school,algorithm_all_books:()=>algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_book_scale,algorithm_check_feet:()=>algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_color_seclet,algorithm_current_school:()=>algorithm_current_school,algorithm_del_path:()=>algorithm_del_path,algorithm_delete_book:()=>algorithm_delete_book,algorithm_delete_books:()=>algorithm_delete_books,algorithm_delete_books2:()=>algorithm_delete_books2,algorithm_divide_books:()=>algorithm_divide_books,algorithm_find_path:()=>algorithm_find_path,algorithm_first_book:()=>algorithm_first_book,algorithm_fz_calc:()=>algorithm_fz_calc,algorithm_fz_calc_first_min:()=>algorithm_fz_calc_first_min,algorithm_fz_compare:()=>algorithm_fz_compare,algorithm_fz_move:()=>algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_fz_set_min,algorithm_get_book_num:()=>algorithm_get_book_num,algorithm_get_current_location:()=>algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_init_jttl,algorithm_move_recent:()=>algorithm_move_recent,algorithm_new_path:()=>algorithm_new_path,algorithm_next_book:()=>algorithm_next_book,algorithm_no_left:()=>algorithm_no_left,algorithm_no_path:()=>algorithm_no_path,algorithm_no_ring2:()=>algorithm_no_ring2,algorithm_not_home:()=>algorithm_not_home,algorithm_not_school:()=>algorithm_not_school,algorithm_number_add:()=>algorithm_number_add,algorithm_number_zero:()=>algorithm_number_zero,algorithm_prepare:()=>algorithm_prepare,algorithm_prepare2:()=>algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_print_book2,algorithm_print_divide:()=>algorithm_print_divide,algorithm_print_jttl_answer:()=>algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_print_number,algorithm_print_path:()=>algorithm_print_path,algorithm_print_path2:()=>algorithm_print_path2,algorithm_print_sequence:()=>algorithm_print_sequence,algorithm_rabbit_add:()=>algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_return_path,algorithm_set_path:()=>algorithm_set_path,algorithm_two_left:()=>algorithm_two_left,algorithm_void_path:()=>algorithm_void_path,algorithm_yes_ring2:()=>algorithm_yes_ring2,hanoi_init:()=>hanoi_init,hanoi_init_offline:()=>hanoi_init_offline,hanoi_move:()=>hanoi_move});var communicate_namespaceObject={};__webpack_require__.r(communicate_namespaceObject),__webpack_require__.d(communicate_namespaceObject,{requests_attribute:()=>requests_attribute,requests_get:()=>requests_get,requests_get_old:()=>requests_get_old,requests_method:()=>requests_method,requests_post:()=>requests_post});var cv_namespaceObject={};__webpack_require__.r(cv_namespaceObject),__webpack_require__.d(cv_namespaceObject,{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});var data_namespaceObject={};__webpack_require__.r(data_namespaceObject),__webpack_require__.d(data_namespaceObject,{array_create:()=>array_create,array_toarray:()=>array_toarray,dataframe_aggregate_func:()=>dataframe_aggregate_func,dataframe_create:()=>dataframe_create,dataframe_create_from_index:()=>dataframe_create_from_index,dataframe_create_from_one_index:()=>dataframe_create_from_one_index,dataframe_fillna:()=>dataframe_fillna,dataframe_get:()=>dataframe_get,dataframe_groupby:()=>dataframe_groupby,dataframe_head_tail:()=>dataframe_head_tail,dataframe_info:()=>dataframe_info,dataframe_median:()=>dataframe_median,dataframe_select:()=>dataframe_select,dataframe_sort_values:()=>dataframe_sort_values,matrix_multiplication:()=>matrix_multiplication,matrix_transpose:()=>matrix_transpose,numpy_argmin_template_match:()=>numpy_argmin_template_match,numpy_astype:()=>numpy_astype,numpy_c_:()=>numpy_c_,numpy_dot:()=>numpy_dot,numpy_linalg_det:()=>numpy_linalg_det,numpy_linalg_inv:()=>numpy_linalg_inv,numpy_max:()=>numpy_max,numpy_mean:()=>numpy_mean,numpy_mean_digit:()=>numpy_mean_digit,numpy_min:()=>numpy_min,numpy_ones:()=>numpy_ones,numpy_random_random:()=>numpy_random_random,numpy_reshape:()=>numpy_reshape,numpy_shape:()=>numpy_shape,numpy_size:()=>numpy_size,numpy_square:()=>numpy_square,numpy_std:()=>numpy_std,numpy_sum:()=>numpy_sum,numpy_trig:()=>numpy_trig,pandas_drop_columns:()=>pandas_drop_columns,pandas_dropna:()=>pandas_dropna,pandas_readcsv:()=>pandas_readcsv,pl_axes:()=>pl_axes,pl_bar:()=>pl_bar,pl_hist:()=>pl_hist,pl_label:()=>pl_label,pl_legend:()=>pl_legend,pl_pie:()=>pl_pie,pl_plot:()=>pl_plot,pl_plot_bar:()=>pl_plot_bar,pl_plot_easy:()=>pl_plot_easy,pl_plot_scatter:()=>pl_plot_scatter,pl_plot_xy:()=>pl_plot_xy,pl_savefig:()=>pl_savefig,pl_show:()=>pl_show,pl_subplot:()=>pl_subplot,pl_text:()=>pl_text,pl_ticks:()=>pl_ticks,pl_title:()=>pl_title,plot_axes:()=>plot_axes,plot_bar:()=>plot_bar,plot_cla:()=>plot_cla,plot_hist:()=>plot_hist,plot_label:()=>plot_label,plot_legend:()=>plot_legend,plot_pie:()=>plot_pie,plot_plot:()=>plot_plot,plot_plot_bar:()=>plot_plot_bar,plot_plot_easy:()=>plot_plot_easy,plot_plot_scatter:()=>plot_plot_scatter,plot_plot_xy:()=>plot_plot_xy,plot_savefig:()=>plot_savefig,plot_show:()=>plot_show,plot_subplot:()=>plot_subplot,plot_text:()=>plot_text,plot_ticks:()=>plot_ticks,plot_title:()=>plot_title,py_sum:()=>py_sum,pylab_imshow:()=>pylab_imshow,series_create:()=>series_create,series_create_from_index:()=>series_create_from_index,series_create_from_text:()=>series_create_from_text,series_get_num:()=>series_get_num,series_index_value:()=>series_index_value});var datastructure_namespaceObject={};__webpack_require__.r(datastructure_namespaceObject),__webpack_require__.d(datastructure_namespaceObject,{ds_add_node_by_attr:()=>ds_add_node_by_attr,ds_add_node_by_name:()=>ds_add_node_by_name,ds_create_linkedlist:()=>ds_create_linkedlist,ds_create_linkedlist_container:()=>ds_create_linkedlist_container,ds_create_linkedlist_item:()=>ds_create_linkedlist_item,ds_create_node:()=>ds_create_node,ds_del_node_by_attr:()=>ds_del_node_by_attr,ds_del_node_by_name:()=>ds_del_node_by_name,ds_get_node_attr:()=>ds_get_node_attr,ds_reverse_linkedlist:()=>ds_reverse_linkedlist,ds_set_node_attr:()=>ds_set_node_attr});var factory_namespaceObject={};__webpack_require__.r(factory_namespaceObject),__webpack_require__.d(factory_namespaceObject,{factory_block:()=>factory_block,factory_block_return:()=>factory_block_return,factory_block_return_with_textarea:()=>factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_callMethod_noreturn,factory_callMethod_return:()=>factory_callMethod_return,factory_create_with_container:()=>factory_create_with_container,factory_create_with_item:()=>factory_create_with_item,factory_declare:()=>factory_declare,factory_from_import:()=>factory_from_import,factory_function_noreturn:()=>factory_function_noreturn,factory_function_return:()=>factory_function_return,factory_import:()=>factory_import});var hardware_namespaceObject={};__webpack_require__.r(hardware_namespaceObject),__webpack_require__.d(hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_arduino_start,inout_highlow:()=>inout_highlow});var inout_namespaceObject={};__webpack_require__.r(inout_namespaceObject),__webpack_require__.d(inout_namespaceObject,{inout_input:()=>inout_input,inout_print:()=>inout_print,inout_print_container:()=>inout_print_container,inout_print_end:()=>inout_print_end,inout_print_inline:()=>inout_print_inline,inout_print_item:()=>inout_print_item,inout_print_many:()=>inout_print_many,inout_type_input:()=>inout_type_input,pyinout_type_input:()=>pyinout_type_input});var iot_namespaceObject={};__webpack_require__.r(iot_namespaceObject),__webpack_require__.d(iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>IOT_EMQX_PING,IOT_FORMATTING:()=>IOT_FORMATTING,IOT_FORMAT_STRING:()=>IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>IOT_MIXIO_UNSUBSCRIBE,iot_checkonenet:()=>iot_checkonenet,iot_client_onboard:()=>iot_client_onboard,iot_create_with_item:()=>iot_create_with_item,iot_http_client:()=>iot_http_client,iot_http_data:()=>iot_http_data,iot_mixio_check:()=>iot_mixio_check,iot_mixio_connect:()=>iot_mixio_connect,iot_mixio_connect_only:()=>iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_mixio_format_topic,iot_mixly_key:()=>iot_mixly_key,iot_mixly_key_py:()=>iot_mixly_key_py,iot_mqtt_client:()=>iot_mqtt_client,iot_mqtt_data:()=>iot_mqtt_data,iot_onenet_check:()=>iot_onenet_check,iot_onenet_connect:()=>iot_onenet_connect,iot_onenet_disconnect:()=>iot_onenet_disconnect,iot_onenet_publish:()=>iot_onenet_publish,iot_onenet_publish_dict:()=>iot_onenet_publish_dict,iot_onenetconnect:()=>iot_onenetconnect,iot_onenetdisconnect:()=>iot_onenetdisconnect,iot_publish:()=>iot_publish,iot_publish_container:()=>iot_publish_container,iot_publish_item:()=>iot_publish_item});var pins_namespaceObject={};__webpack_require__.r(pins_namespaceObject),__webpack_require__.d(pins_namespaceObject,{pins_analog_read:()=>pins_analog_read,pins_analog_write:()=>pins_analog_write,pins_digital_read:()=>pins_digital_read,pins_digital_write:()=>pins_digital_write});var serial_namespaceObject={};__webpack_require__.r(serial_namespaceObject),__webpack_require__.d(serial_namespaceObject,{serial_close:()=>serial_close,serial_open:()=>serial_open,serial_read_b:()=>serial_read_b,serial_write:()=>serial_write});var sklearn_namespaceObject={};__webpack_require__.r(sklearn_namespaceObject),__webpack_require__.d(sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_coef_intercept,sklearn_data_target:()=>sklearn_data_target,sklearn_fit:()=>sklearn_fit,sklearn_fit_no_target:()=>sklearn_fit_no_target,sklearn_load:()=>sklearn_load,sklearn_make_blobs:()=>sklearn_make_blobs,sklearn_make_classification:()=>sklearn_make_classification,sklearn_make_regression:()=>sklearn_make_regression,sklearn_predict:()=>sklearn_predict,sklearn_save_load_model:()=>sklearn_save_load_model,sklearn_score:()=>sklearn_score,sklearn_score_no_target:()=>sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_train_test_split_no_target});var system_namespaceObject={};__webpack_require__.r(system_namespaceObject),__webpack_require__.d(system_namespaceObject,{Panic_with_status_code:()=>system_Panic_with_status_code,base_delay:()=>base_delay,controls_millis:()=>system_controls_millis,controls_mstimer2:()=>controls_mstimer2,controls_mstimer2_start:()=>controls_mstimer2_start,controls_mstimer2_stop:()=>controls_mstimer2_stop,reset:()=>system_reset,time_localtime:()=>time_localtime,time_sleep:()=>system_time_sleep});var turtle_namespaceObject={};__webpack_require__.r(turtle_namespaceObject),__webpack_require__.d(turtle_namespaceObject,{turtle_bgcolor:()=>turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_bgcolor_hex_new,turtle_circle:()=>turtle_circle,turtle_circle_advanced:()=>turtle_circle_advanced,turtle_clear:()=>turtle_clear,turtle_clone:()=>turtle_clone,turtle_color:()=>turtle_color,turtle_color_hex:()=>turtle_color_hex,turtle_color_seclet:()=>turtle_color_seclet,turtle_create:()=>turtle_create,turtle_done:()=>turtle_done,turtle_exitonclick:()=>turtle_exitonclick,turtle_fill:()=>turtle_fill,turtle_fillcolor:()=>turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_getscreen,turtle_goto:()=>turtle_goto,turtle_listen:()=>turtle_listen,turtle_move:()=>turtle_move,turtle_numinput:()=>turtle_numinput,turtle_onclick:()=>turtle_onclick,turtle_onkey:()=>turtle_onkey,turtle_ontimer:()=>turtle_ontimer,turtle_pencolor:()=>turtle_pencolor,turtle_pencolor_hex:()=>turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_pencolor_hex_new,turtle_penup:()=>turtle_penup,turtle_pos_shape:()=>turtle_pos_shape,turtle_rotate:()=>turtle_rotate,turtle_screen_delay:()=>turtle_screen_delay,turtle_screen_savefig:()=>turtle_screen_savefig,turtle_setheading:()=>turtle_setheading,turtle_setxy:()=>turtle_setxy,turtle_shape:()=>turtle_shape,turtle_shapesize:()=>turtle_shapesize,turtle_size:()=>turtle_size,turtle_size_speed:()=>turtle_size_speed,turtle_speed:()=>turtle_speed,turtle_textinput:()=>turtle_textinput,turtle_visible:()=>turtle_visible,turtle_write:()=>turtle_write,turtle_write_format:()=>turtle_write_format,turtle_write_format_skulpt:()=>turtle_write_format_skulpt});var generators_ai_namespaceObject={};__webpack_require__.r(generators_ai_namespaceObject),__webpack_require__.d(generators_ai_namespaceObject,{AI_ChooseAndGet:()=>ai_AI_ChooseAndGet,AI_Face_match:()=>ai_AI_Face_match,AI_ImageClassify:()=>ai_AI_ImageClassify,AI_ImageClassify_Func:()=>ai_AI_ImageClassify_Func,AI_Nlp:()=>ai_AI_Nlp,AI_Nlp_Func:()=>ai_AI_Nlp_Func,AI_Nlp_Func_sim:()=>ai_AI_Nlp_Func_sim,AI_Nlp_Sim:()=>ai_AI_Nlp_Sim,AI_Nlp_Topic:()=>ai_AI_Nlp_Topic,AI_Nlp_newsSummary:()=>ai_AI_Nlp_newsSummary,AI_Ocr:()=>ai_AI_Ocr,AI_Ocr_Func:()=>ai_AI_Ocr_Func,AI_Speech_asr:()=>ai_AI_Speech_asr,AI_Speech_synthesis:()=>ai_AI_Speech_synthesis,AI_audio:()=>ai_AI_audio,AI_client:()=>ai_AI_client,AI_photo:()=>ai_AI_photo,AI_result:()=>ai_AI_result});var generators_algorithm_namespaceObject={};__webpack_require__.r(generators_algorithm_namespaceObject),__webpack_require__.d(generators_algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_algorithm_add_path,algorithm_add_school:()=>algorithm_algorithm_add_school,algorithm_all_books:()=>algorithm_algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_algorithm_book_scale,algorithm_check_feet:()=>algorithm_algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_algorithm_color_seclet,algorithm_current_school:()=>algorithm_algorithm_current_school,algorithm_del_path:()=>algorithm_algorithm_del_path,algorithm_delete_book:()=>algorithm_algorithm_delete_book,algorithm_divide_books:()=>algorithm_algorithm_divide_books,algorithm_find_path:()=>algorithm_algorithm_find_path,algorithm_first_book:()=>algorithm_algorithm_first_book,algorithm_fz_calc:()=>algorithm_algorithm_fz_calc,algorithm_fz_compare:()=>algorithm_algorithm_fz_compare,algorithm_fz_move:()=>algorithm_algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_algorithm_fz_set_min,algorithm_get_current_location:()=>algorithm_algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_algorithm_init_jttl,algorithm_move_recent:()=>algorithm_algorithm_move_recent,algorithm_new_path:()=>algorithm_algorithm_new_path,algorithm_next_book:()=>algorithm_algorithm_next_book,algorithm_no_left:()=>algorithm_algorithm_no_left,algorithm_no_path:()=>algorithm_algorithm_no_path,algorithm_no_ring2:()=>algorithm_algorithm_no_ring2,algorithm_not_home:()=>algorithm_algorithm_not_home,algorithm_not_school:()=>algorithm_algorithm_not_school,algorithm_number_add:()=>algorithm_algorithm_number_add,algorithm_number_zero:()=>algorithm_algorithm_number_zero,algorithm_prepare:()=>algorithm_algorithm_prepare,algorithm_prepare2:()=>algorithm_algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_algorithm_print_book2,algorithm_print_jttl_answer:()=>algorithm_algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_algorithm_print_number,algorithm_print_path:()=>algorithm_algorithm_print_path,algorithm_print_path2:()=>algorithm_algorithm_print_path2,algorithm_rabbit_add:()=>algorithm_algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_algorithm_return_path,algorithm_set_path:()=>algorithm_algorithm_set_path,algorithm_two_left:()=>algorithm_algorithm_two_left,algorithm_void_path:()=>algorithm_algorithm_void_path,algorithm_yes_ring2:()=>algorithm_algorithm_yes_ring2,hanoi_init:()=>algorithm_hanoi_init,hanoi_init_offline:()=>algorithm_hanoi_init_offline,hanoi_move:()=>algorithm_hanoi_move});var generators_communicate_namespaceObject={};__webpack_require__.r(generators_communicate_namespaceObject),__webpack_require__.d(generators_communicate_namespaceObject,{requests_attribute:()=>communicate_requests_attribute,requests_get:()=>communicate_requests_get,requests_get_old:()=>communicate_requests_get_old,requests_method:()=>communicate_requests_method,requests_post:()=>communicate_requests_post});var generators_data_namespaceObject={};__webpack_require__.r(generators_data_namespaceObject),__webpack_require__.d(generators_data_namespaceObject,{array_create:()=>data_array_create,array_toarray:()=>data_array_toarray,dataframe_aggregate_func:()=>data_dataframe_aggregate_func,dataframe_create:()=>data_dataframe_create,dataframe_create_from_index:()=>data_dataframe_create_from_index,dataframe_create_from_one_index:()=>data_dataframe_create_from_one_index,dataframe_fillna:()=>data_dataframe_fillna,dataframe_get:()=>data_dataframe_get,dataframe_groupby:()=>data_dataframe_groupby,dataframe_head_tail:()=>data_dataframe_head_tail,dataframe_info:()=>data_dataframe_info,dataframe_median:()=>data_dataframe_median,dataframe_select:()=>data_dataframe_select,dataframe_sort_values:()=>data_dataframe_sort_values,matrix_multiplication:()=>data_matrix_multiplication,matrix_transpose:()=>data_matrix_transpose,numpy_argmin_template_match:()=>data_numpy_argmin_template_match,numpy_astype:()=>data_numpy_astype,numpy_c_:()=>data_numpy_c_,numpy_dot:()=>data_numpy_dot,numpy_linalg_det:()=>data_numpy_linalg_det,numpy_linalg_inv:()=>data_numpy_linalg_inv,numpy_max:()=>data_numpy_max,numpy_mean:()=>data_numpy_mean,numpy_mean_digit:()=>data_numpy_mean_digit,numpy_min:()=>data_numpy_min,numpy_ones:()=>data_numpy_ones,numpy_random_random:()=>data_numpy_random_random,numpy_reshape:()=>data_numpy_reshape,numpy_shape:()=>data_numpy_shape,numpy_size:()=>data_numpy_size,numpy_square:()=>data_numpy_square,numpy_std:()=>data_numpy_std,numpy_sum:()=>data_numpy_sum,numpy_trig:()=>data_numpy_trig,pandas_drop_columns:()=>data_pandas_drop_columns,pandas_dropna:()=>data_pandas_dropna,pandas_readcsv:()=>data_pandas_readcsv,pl_axes:()=>data_pl_axes,pl_bar:()=>data_pl_bar,pl_hist:()=>data_pl_hist,pl_label:()=>data_pl_label,pl_legend:()=>data_pl_legend,pl_pie:()=>data_pl_pie,pl_plot:()=>data_pl_plot,pl_plot_bar:()=>data_pl_plot_bar,pl_plot_easy:()=>data_pl_plot_easy,pl_plot_scatter:()=>data_pl_plot_scatter,pl_plot_xy:()=>data_pl_plot_xy,pl_savefig:()=>data_pl_savefig,pl_show:()=>data_pl_show,pl_subplot:()=>data_pl_subplot,pl_text:()=>data_pl_text,pl_ticks:()=>data_pl_ticks,pl_title:()=>data_pl_title,plot_axes:()=>data_plot_axes,plot_bar:()=>data_plot_bar,plot_cla:()=>data_plot_cla,plot_hist:()=>data_plot_hist,plot_label:()=>data_plot_label,plot_legend:()=>data_plot_legend,plot_pie:()=>data_plot_pie,plot_plot:()=>data_plot_plot,plot_plot_bar:()=>data_plot_plot_bar,plot_plot_easy:()=>data_plot_plot_easy,plot_plot_scatter:()=>data_plot_plot_scatter,plot_plot_xy:()=>data_plot_plot_xy,plot_savefig:()=>data_plot_savefig,plot_show:()=>data_plot_show,plot_subplot:()=>data_plot_subplot,plot_text:()=>data_plot_text,plot_ticks:()=>data_plot_ticks,plot_title:()=>data_plot_title,py_sum:()=>data_py_sum,pylab_imshow:()=>data_pylab_imshow,series_create:()=>data_series_create,series_create_from_index:()=>data_series_create_from_index,series_create_from_text:()=>data_series_create_from_text,series_get_num:()=>data_series_get_num,series_index_value:()=>data_series_index_value});var generators_datastructure_namespaceObject={};__webpack_require__.r(generators_datastructure_namespaceObject),__webpack_require__.d(generators_datastructure_namespaceObject,{ds_add_node_by_attr:()=>datastructure_ds_add_node_by_attr,ds_add_node_by_name:()=>datastructure_ds_add_node_by_name,ds_create_linkedlist:()=>datastructure_ds_create_linkedlist,ds_create_node:()=>datastructure_ds_create_node,ds_del_node_by_attr:()=>datastructure_ds_del_node_by_attr,ds_del_node_by_name:()=>datastructure_ds_del_node_by_name,ds_get_node_attr:()=>datastructure_ds_get_node_attr,ds_reverse_linkedlist:()=>datastructure_ds_reverse_linkedlist,ds_set_node_attr:()=>datastructure_ds_set_node_attr});var generators_factory_namespaceObject={};__webpack_require__.r(generators_factory_namespaceObject),__webpack_require__.d(generators_factory_namespaceObject,{factory_block:()=>factory_factory_block,factory_block_return:()=>factory_factory_block_return,factory_block_return_with_textarea:()=>factory_factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_factory_callMethod_noreturn,factory_callMethod_return:()=>factory_factory_callMethod_return,factory_declare:()=>factory_factory_declare,factory_from_import:()=>factory_factory_from_import,factory_function_noreturn:()=>factory_factory_function_noreturn,factory_function_return:()=>factory_factory_function_return,factory_import:()=>factory_factory_import});var generators_hardware_namespaceObject={};__webpack_require__.r(generators_hardware_namespaceObject),__webpack_require__.d(generators_hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_hardware_arduino_start,inout_highlow:()=>hardware_inout_highlow});var generators_inout_namespaceObject={};__webpack_require__.r(generators_inout_namespaceObject),__webpack_require__.d(generators_inout_namespaceObject,{inout_input:()=>inout_inout_input,inout_print:()=>inout_inout_print,inout_print_end:()=>inout_inout_print_end,inout_print_inline:()=>inout_inout_print_inline,inout_print_many:()=>inout_inout_print_many,inout_type_input:()=>inout_inout_type_input,pyinout_type_input:()=>inout_pyinout_type_input});var generators_iot_namespaceObject={};__webpack_require__.r(generators_iot_namespaceObject),__webpack_require__.d(generators_iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>iot_IOT_EMQX_PING,IOT_FORMATTING:()=>iot_IOT_FORMATTING,IOT_FORMAT_STRING:()=>iot_IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>iot_IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>iot_IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>iot_IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>iot_IOT_MIXIO_UNSUBSCRIBE,iot_mixio_check:()=>iot_iot_mixio_check,iot_mixio_connect:()=>iot_iot_mixio_connect,iot_mixio_connect_only:()=>iot_iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_iot_mixio_format_topic,iot_mixly_key:()=>iot_iot_mixly_key,iot_mixly_key_py:()=>iot_iot_mixly_key_py});var generators_pins_namespaceObject={};__webpack_require__.r(generators_pins_namespaceObject),__webpack_require__.d(generators_pins_namespaceObject,{pins_analog_read:()=>pins_pins_analog_read,pins_analog_write:()=>pins_pins_analog_write,pins_digital:()=>pins_digital,pins_digital_read:()=>pins_pins_digital_read,pins_digital_write:()=>pins_pins_digital_write});var generators_serial_namespaceObject={};__webpack_require__.r(generators_serial_namespaceObject),__webpack_require__.d(generators_serial_namespaceObject,{serial_close:()=>serial_serial_close,serial_open:()=>serial_serial_open,serial_read_b:()=>serial_serial_read_b,serial_write:()=>serial_serial_write});var generators_sklearn_namespaceObject={};__webpack_require__.r(generators_sklearn_namespaceObject),__webpack_require__.d(generators_sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_sklearn_coef_intercept,sklearn_data_target:()=>sklearn_sklearn_data_target,sklearn_fit:()=>sklearn_sklearn_fit,sklearn_fit_no_target:()=>sklearn_sklearn_fit_no_target,sklearn_load:()=>sklearn_sklearn_load,sklearn_make_blobs:()=>sklearn_sklearn_make_blobs,sklearn_make_classification:()=>sklearn_sklearn_make_classification,sklearn_make_regression:()=>sklearn_sklearn_make_regression,sklearn_predict:()=>sklearn_sklearn_predict,sklearn_save_load_model:()=>sklearn_sklearn_save_load_model,sklearn_score:()=>sklearn_sklearn_score,sklearn_score_no_target:()=>sklearn_sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_sklearn_train_test_split_no_target});var generators_system_namespaceObject={};__webpack_require__.r(generators_system_namespaceObject),__webpack_require__.d(generators_system_namespaceObject,{controls_end_program:()=>system_controls_end_program,controls_millis:()=>generators_system_controls_millis,time_localtime:()=>system_time_localtime});var generators_turtle_namespaceObject={};__webpack_require__.r(generators_turtle_namespaceObject),__webpack_require__.d(generators_turtle_namespaceObject,{turtle_bgcolor:()=>turtle_turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_turtle_bgcolor_hex_new,turtle_circle:()=>turtle_turtle_circle,turtle_circle_advanced:()=>turtle_turtle_circle_advanced,turtle_clear:()=>turtle_turtle_clear,turtle_clone:()=>turtle_turtle_clone,turtle_color:()=>turtle_turtle_color,turtle_color_hex:()=>turtle_turtle_color_hex,turtle_color_seclet:()=>turtle_turtle_color_seclet,turtle_create:()=>turtle_turtle_create,turtle_done:()=>turtle_turtle_done,turtle_exitonclick:()=>turtle_turtle_exitonclick,turtle_fill:()=>turtle_turtle_fill,turtle_fillcolor:()=>turtle_turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_turtle_getscreen,turtle_goto:()=>turtle_turtle_goto,turtle_listen:()=>turtle_turtle_listen,turtle_move:()=>turtle_turtle_move,turtle_numinput:()=>turtle_turtle_numinput,turtle_onclick:()=>turtle_turtle_onclick,turtle_onkey:()=>turtle_turtle_onkey,turtle_ontimer:()=>turtle_turtle_ontimer,turtle_pencolor:()=>turtle_turtle_pencolor,turtle_pencolor_hex:()=>turtle_turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_turtle_pencolor_hex_new,turtle_penup:()=>turtle_turtle_penup,turtle_pos_shape:()=>turtle_turtle_pos_shape,turtle_rotate:()=>turtle_turtle_rotate,turtle_screen_delay:()=>turtle_turtle_screen_delay,turtle_screen_savefig:()=>turtle_turtle_screen_savefig,turtle_setheading:()=>turtle_turtle_setheading,turtle_setxy:()=>turtle_turtle_setxy,turtle_shape:()=>turtle_turtle_shape,turtle_shapesize:()=>turtle_turtle_shapesize,turtle_size:()=>turtle_turtle_size,turtle_size_speed:()=>turtle_turtle_size_speed,turtle_speed:()=>turtle_turtle_speed,turtle_textinput:()=>turtle_turtle_textinput,turtle_visible:()=>turtle_turtle_visible,turtle_write:()=>turtle_turtle_write,turtle_write_format:()=>turtle_turtle_write_format,turtle_write_format_skulpt:()=>turtle_turtle_write_format_skulpt});const external_Blockly_namespaceObject=Blockly,external_Mixly_namespaceObject=Mixly,Variables={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 n=Object.create(null),a=0;a1&&(s+=a)):n=s}else n="i";return n}},variables=Variables; +(()=>{"use strict";var __webpack_modules__={131:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.imread("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_show_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imshow("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_write_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imwrite("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_waitkey=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.waitKey("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+")\n"},cv_destroy_all=function(e,t){t.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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.CascadeClassifier("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect_all=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+",minSize=("+t.valueToCode(this,"x1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y1",t.ORDER_ATOMIC)+"),maxSize=("+t.valueToCode(this,"x2",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y2",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={},blocks_variables_namespaceObject={};__webpack_require__.r(blocks_variables_namespaceObject),__webpack_require__.d(blocks_variables_namespaceObject,{controls_type:()=>controls_type,controls_typeLists:()=>controls_typeLists,lists_zip:()=>lists_zip,lists_zip_container:()=>lists_zip_container,lists_zip_item:()=>lists_zip_item,unpack_iterable_object:()=>unpack_iterable_object,variables_change:()=>variables_change,variables_get:()=>variables_get,variables_global:()=>variables_global,variables_set:()=>variables_set});var control_namespaceObject={};__webpack_require__.r(control_namespaceObject),__webpack_require__.d(control_namespaceObject,{base_setup:()=>base_setup,controls_delay:()=>controls_delay,controls_end_program:()=>controls_end_program,controls_except:()=>controls_except,controls_finally:()=>controls_finally,controls_flow_statements:()=>controls_flow_statements,controls_for:()=>controls_for,controls_forEach:()=>controls_forEach,controls_for_range:()=>controls_for_range,controls_if:()=>controls_if,controls_if_else:()=>controls_if_else,controls_if_elseif:()=>controls_if_elseif,controls_if_if:()=>controls_if_if,controls_lambda:()=>controls_lambda,controls_main:()=>controls_main,controls_pass:()=>controls_pass,controls_range:()=>controls_range,controls_repeat_ext:()=>controls_repeat_ext,controls_thread:()=>controls_thread,controls_try:()=>controls_try,controls_try_finally:()=>controls_try_finally,controls_whileUntil:()=>controls_whileUntil,datetime_fromtimestamp:()=>datetime_fromtimestamp,do_while:()=>do_while,garbage_collection:()=>garbage_collection,get_mem_alloc:()=>get_mem_alloc,get_mem_free:()=>get_mem_free,get_unique_identifier:()=>get_unique_identifier});var math_namespaceObject={};__webpack_require__.r(math_namespaceObject),__webpack_require__.d(math_namespaceObject,{base_map:()=>base_map,math_arithmetic:()=>math_arithmetic,math_bit:()=>math_bit,math_constant:()=>math_constant,math_constant_mp:()=>math_constant_mp,math_constrain:()=>math_constrain,math_dec:()=>math_dec,math_indexer_number:()=>math_indexer_number,math_map:()=>math_map,math_max_min:()=>math_max_min,math_number:()=>math_number,math_number_base_conversion:()=>math_number_base_conversion,math_random:()=>math_random,math_random_seed:()=>math_random_seed,math_round:()=>math_round,math_selfcalcu:()=>math_selfcalcu,math_to_int:()=>math_to_int,math_trig:()=>math_trig,text_to_number:()=>text_to_number,text_to_number_skulpt:()=>text_to_number_skulpt,turn_to_int:()=>turn_to_int});var text_namespaceObject={};__webpack_require__.r(text_namespaceObject),__webpack_require__.d(text_namespaceObject,{ascii_to_char:()=>ascii_to_char,char_to_ascii:()=>char_to_ascii,number_to_text:()=>number_to_text,os_system:()=>os_system,text:()=>text_text,text_capital:()=>text_capital,text_center:()=>text_center,text_char:()=>text_char,text_char_at:()=>text_char_at,text_char_at2:()=>text_char_at2,text_char_at3:()=>text_char_at3,text_compareTo:()=>text_compareTo,text_compare_to:()=>text_compare_to,text_create_with_container:()=>text_create_with_container,text_create_with_item:()=>text_create_with_item,text_encode:()=>text_encode,text_equals_starts_ends:()=>text_equals_starts_ends,text_eval:()=>text_eval,text_find:()=>text_find,text_format:()=>text_format,text_format_noreturn:()=>text_format_noreturn,text_join:()=>text_join,text_join_seq:()=>text_join_seq,text_length:()=>text_length,text_random_char:()=>text_random_char,text_replace:()=>text_replace,text_split:()=>text_split,text_strip:()=>text_strip,text_substring:()=>text_substring,text_substring2:()=>text_substring2,text_substring3:()=>text_substring3,text_textarea:()=>text_textarea});var lists_namespaceObject={};__webpack_require__.r(lists_namespaceObject),__webpack_require__.d(lists_namespaceObject,{ENUMERATE:()=>ENUMERATE,enumerate:()=>enumerate,list_many_input:()=>list_many_input,list_tolist:()=>list_tolist,list_tolist2:()=>list_tolist2,list_trig:()=>list_trig,lists_2d_get_col_row_data:()=>lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_append_extend,lists_change_to:()=>lists_change_to,lists_change_to_general:()=>lists_change_to_general,lists_clear:()=>lists_clear,lists_create_with:()=>lists_create_with,lists_create_with2:()=>lists_create_with2,lists_create_with_container:()=>lists_create_with_container,lists_create_with_item:()=>lists_create_with_item,lists_create_with_noreturn:()=>lists_create_with_noreturn,lists_create_with_text:()=>lists_create_with_text,lists_create_with_text2:()=>lists_create_with_text2,lists_del_general:()=>lists_del_general,lists_find:()=>lists_find,lists_getIndex3:()=>lists_getIndex3,lists_getSublist3:()=>lists_getSublist3,lists_get_index:()=>lists_get_index,lists_get_random_item:()=>lists_get_random_item,lists_get_random_sublist:()=>lists_get_random_sublist,lists_get_sublist:()=>lists_get_sublist,lists_insert_value:()=>lists_insert_value,lists_insert_value2:()=>lists_insert_value2,lists_pop:()=>lists_pop,lists_remove_at:()=>lists_remove_at,lists_remove_at2:()=>lists_remove_at2,lists_reverse:()=>lists_reverse,lists_setIndex3:()=>lists_setIndex3,lists_set_index:()=>lists_set_index,lists_sort:()=>lists_sort});var dicts_namespaceObject={};__webpack_require__.r(dicts_namespaceObject),__webpack_require__.d(dicts_namespaceObject,{dicts_add_change_del:()=>dicts_add_change_del,dicts_add_or_change:()=>dicts_add_or_change,dicts_clear:()=>dicts_clear,dicts_create_with:()=>dicts_create_with,dicts_create_with_container:()=>dicts_create_with_container,dicts_create_with_item:()=>dicts_create_with_item,dicts_create_with_noreturn:()=>dicts_create_with_noreturn,dicts_deldict:()=>dicts_deldict,dicts_delete:()=>dicts_delete,dicts_get:()=>dicts_get,dicts_get_default:()=>dicts_get_default,dicts_items:()=>dicts_items,dicts_keys:()=>dicts_keys,dicts_length:()=>dicts_length,dicts_pop:()=>dicts_pop,dicts_setdefault:()=>dicts_setdefault,dicts_to_json:()=>dicts_to_json,dicts_todict:()=>dicts_todict,dicts_update:()=>dicts_update,dicts_values:()=>dicts_values,json_to_dicts:()=>json_to_dicts});var logic_namespaceObject={};__webpack_require__.r(logic_namespaceObject),__webpack_require__.d(logic_namespaceObject,{logic_boolean:()=>logic_boolean,logic_compare:()=>logic_compare,logic_compare_continous:()=>logic_compare_continous,logic_is:()=>logic_is,logic_is_in:()=>logic_is_in,logic_negate:()=>logic_negate,logic_null:()=>logic_null,logic_operation:()=>logic_operation,logic_tobool:()=>logic_tobool,logic_true_or_false:()=>logic_true_or_false});var storage_namespaceObject={};__webpack_require__.r(storage_namespaceObject),__webpack_require__.d(storage_namespaceObject,{sdcard_mount:()=>sdcard_mount,sdcard_use_spi_init:()=>sdcard_use_spi_init,storage_can_write_ornot:()=>storage_can_write_ornot,storage_change_dir:()=>storage_change_dir,storage_close_file:()=>storage_close_file,storage_delete_file:()=>storage_delete_file,storage_file_seek:()=>storage_file_seek,storage_file_tell:()=>storage_file_tell,storage_file_write:()=>storage_file_write,storage_fileopen:()=>storage_fileopen,storage_fileopen_new:()=>storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_fileopen_new_encoding,storage_get_a_line:()=>storage_get_a_line,storage_get_contents:()=>storage_get_contents,storage_get_contents_without_para:()=>storage_get_contents_without_para,storage_get_current_dir:()=>storage_get_current_dir,storage_get_file_size:()=>storage_get_file_size,storage_get_filename:()=>storage_get_filename,storage_is_file:()=>storage_is_file,storage_list_all_files:()=>storage_list_all_files,storage_make_dir:()=>storage_make_dir,storage_open_file_with_os:()=>storage_open_file_with_os,storage_rename:()=>storage_rename});var blocks_procedures_namespaceObject={};__webpack_require__.r(blocks_procedures_namespaceObject),__webpack_require__.d(blocks_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_callnoreturn,procedures_callreturn:()=>procedures_callreturn,procedures_defnoreturn:()=>procedures_defnoreturn,procedures_defreturn:()=>procedures_defreturn,procedures_ifreturn:()=>procedures_ifreturn,procedures_mutatorarg:()=>procedures_mutatorarg,procedures_mutatorcontainer:()=>procedures_mutatorcontainer,procedures_return:()=>procedures_return});var tuple_namespaceObject={};__webpack_require__.r(tuple_namespaceObject),__webpack_require__.d(tuple_namespaceObject,{tuple_change_to:()=>tuple_change_to,tuple_create_with:()=>tuple_create_with,tuple_create_with_container:()=>tuple_create_with_container,tuple_create_with_item:()=>tuple_create_with_item,tuple_create_with_noreturn:()=>tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_create_with_text_return,tuple_del:()=>tuple_del,tuple_find:()=>tuple_find,tuple_getIndex:()=>tuple_getIndex,tuple_getSublist:()=>tuple_getSublist,tuple_get_random_item:()=>tuple_get_random_item,tuple_get_sublist:()=>tuple_get_sublist,tuple_join:()=>tuple_join,tuple_length:()=>tuple_length,tuple_max:()=>tuple_max,tuple_totuple:()=>tuple_totuple,tuple_trig:()=>tuple_trig});var set_namespaceObject={};__webpack_require__.r(set_namespaceObject),__webpack_require__.d(set_namespaceObject,{set_add_discard:()=>set_add_discard,set_clear:()=>set_clear,set_create_with:()=>set_create_with,set_create_with_container:()=>set_create_with_container,set_create_with_item:()=>set_create_with_item,set_create_with_text_return:()=>set_create_with_text_return,set_length:()=>set_length,set_operate:()=>set_operate,set_operate_update:()=>set_operate_update,set_pop:()=>set_pop,set_sub:()=>set_sub,set_toset:()=>set_toset,set_update:()=>set_update});var html_namespaceObject={};__webpack_require__.r(html_namespaceObject),__webpack_require__.d(html_namespaceObject,{html_content:()=>html_content,html_content_more:()=>html_content_more,html_document:()=>html_document,html_form:()=>html_form,html_head_body:()=>html_head_body,html_style:()=>html_style,html_style_color:()=>html_style_color,html_style_content:()=>html_style_content,html_text:()=>html_text,html_title:()=>html_title});var utility_namespaceObject={};__webpack_require__.r(utility_namespaceObject),__webpack_require__.d(utility_namespaceObject,{attribute_access:()=>attribute_access,function_call:()=>function_call,function_call_container:()=>function_call_container,function_call_item:()=>function_call_item,raw_block:()=>raw_block,raw_empty:()=>raw_empty,raw_expression:()=>raw_expression,raw_table:()=>raw_table,text_comment:()=>text_comment,text_print_multiple:()=>text_print_multiple,text_print_multiple_container:()=>text_print_multiple_container,text_print_multiple_item:()=>text_print_multiple_item,type_check:()=>type_check});var generators_variables_namespaceObject={};__webpack_require__.r(generators_variables_namespaceObject),__webpack_require__.d(generators_variables_namespaceObject,{controls_type:()=>variables_controls_type,controls_typeLists:()=>variables_controls_typeLists,lists_zip:()=>variables_lists_zip,unpack_iterable_object:()=>variables_unpack_iterable_object,variables_change:()=>variables_variables_change,variables_get:()=>variables_variables_get,variables_global:()=>variables_variables_global,variables_set:()=>variables_variables_set});var generators_control_namespaceObject={};__webpack_require__.r(generators_control_namespaceObject),__webpack_require__.d(generators_control_namespaceObject,{Panic_with_status_code:()=>Panic_with_status_code,base_setup:()=>control_base_setup,controls_delay:()=>control_controls_delay,controls_flow_statements:()=>control_controls_flow_statements,controls_for:()=>control_controls_for,controls_forEach:()=>control_controls_forEach,controls_for_range:()=>control_controls_for_range,controls_if:()=>control_controls_if,controls_interrupts:()=>controls_interrupts,controls_lambda:()=>control_controls_lambda,controls_main:()=>control_controls_main,controls_millis:()=>controls_millis,controls_nointerrupts:()=>controls_nointerrupts,controls_pass:()=>control_controls_pass,controls_range:()=>control_controls_range,controls_repeat:()=>controls_repeat,controls_repeat_ext:()=>control_controls_repeat_ext,controls_thread:()=>control_controls_thread,controls_try_finally:()=>control_controls_try_finally,controls_whileUntil:()=>control_controls_whileUntil,datetime_fromtimestamp:()=>control_datetime_fromtimestamp,do_while:()=>control_do_while,garbage_collection:()=>control_garbage_collection,get_mem_alloc:()=>control_get_mem_alloc,get_mem_free:()=>control_get_mem_free,get_unique_identifier:()=>control_get_unique_identifier,reset:()=>control_reset,time_sleep:()=>time_sleep});var generators_math_namespaceObject={};__webpack_require__.r(generators_math_namespaceObject),__webpack_require__.d(generators_math_namespaceObject,{base_map:()=>math_base_map,math_arithmetic:()=>math_math_arithmetic,math_bit:()=>math_math_bit,math_constant:()=>math_math_constant,math_constant_mp:()=>math_math_constant_mp,math_constrain:()=>math_math_constrain,math_dec:()=>math_math_dec,math_indexer_number:()=>math_math_indexer_number,math_map:()=>math_math_map,math_max_min:()=>math_math_max_min,math_number:()=>math_math_number,math_number_base_conversion:()=>math_math_number_base_conversion,math_random:()=>math_math_random,math_random_seed:()=>math_math_random_seed,math_round:()=>math_math_round,math_selfcalcu:()=>math_math_selfcalcu,math_single:()=>math_single,math_to_int:()=>math_math_to_int,math_trig:()=>math_math_trig,text_to_number:()=>math_text_to_number,text_to_number_skulpt:()=>math_text_to_number_skulpt,turn_to_int:()=>math_turn_to_int});var generators_text_namespaceObject={};__webpack_require__.r(generators_text_namespaceObject),__webpack_require__.d(generators_text_namespaceObject,{ascii_to_char:()=>text_ascii_to_char,char_to_ascii:()=>text_char_to_ascii,number_to_text:()=>text_number_to_text,os_system:()=>text_os_system,text:()=>generators_text_text,text_capital:()=>text_text_capital,text_center:()=>text_text_center,text_char:()=>text_text_char,text_char_at:()=>text_text_char_at,text_char_at2:()=>text_text_char_at2,text_char_at3:()=>text_text_char_at3,text_compareTo:()=>text_text_compareTo,text_compare_to:()=>text_text_compare_to,text_encode:()=>text_text_encode,text_equals_starts_ends:()=>text_text_equals_starts_ends,text_eval:()=>text_text_eval,text_find:()=>text_text_find,text_format:()=>text_text_format,text_format_noreturn:()=>text_text_format_noreturn,text_join:()=>text_text_join,text_join_seq:()=>text_text_join_seq,text_length:()=>text_text_length,text_random_char:()=>text_text_random_char,text_replace:()=>text_text_replace,text_split:()=>text_text_split,text_strip:()=>text_text_strip,text_substring:()=>text_text_substring,text_substring2:()=>text_text_substring2,text_substring3:()=>text_text_substring3,text_textarea:()=>text_text_textarea});var generators_lists_namespaceObject={};__webpack_require__.r(generators_lists_namespaceObject),__webpack_require__.d(generators_lists_namespaceObject,{enumerate:()=>lists_enumerate,list_many_input:()=>lists_list_many_input,list_tolist:()=>lists_list_tolist,list_tolist2:()=>lists_list_tolist2,list_trig:()=>lists_list_trig,lists_2d_get_col_row_data:()=>lists_lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_lists_append_extend,lists_change_to:()=>lists_lists_change_to,lists_change_to_general:()=>lists_lists_change_to_general,lists_clear:()=>lists_lists_clear,lists_create_with:()=>lists_lists_create_with,lists_create_with2:()=>lists_lists_create_with2,lists_create_with_noreturn:()=>lists_lists_create_with_noreturn,lists_create_with_text:()=>lists_lists_create_with_text,lists_create_with_text2:()=>lists_lists_create_with_text2,lists_del_general:()=>lists_lists_del_general,lists_find:()=>lists_lists_find,lists_getIndex3:()=>lists_lists_getIndex3,lists_getSublist3:()=>lists_lists_getSublist3,lists_get_index:()=>lists_lists_get_index,lists_get_random_item:()=>lists_lists_get_random_item,lists_get_random_sublist:()=>lists_lists_get_random_sublist,lists_get_sublist:()=>lists_lists_get_sublist,lists_insert_value:()=>lists_lists_insert_value,lists_insert_value2:()=>lists_lists_insert_value2,lists_pop:()=>lists_lists_pop,lists_remove_at:()=>lists_lists_remove_at,lists_remove_at2:()=>lists_lists_remove_at2,lists_reverse:()=>lists_lists_reverse,lists_setIndex3:()=>lists_lists_setIndex3,lists_set_index:()=>lists_lists_set_index,lists_sort:()=>lists_lists_sort});var generators_dicts_namespaceObject={};__webpack_require__.r(generators_dicts_namespaceObject),__webpack_require__.d(generators_dicts_namespaceObject,{dicts_add_change_del:()=>dicts_dicts_add_change_del,dicts_add_or_change:()=>dicts_dicts_add_or_change,dicts_clear:()=>dicts_dicts_clear,dicts_create_with:()=>dicts_dicts_create_with,dicts_create_with_noreturn:()=>dicts_dicts_create_with_noreturn,dicts_deldict:()=>dicts_dicts_deldict,dicts_delete:()=>dicts_dicts_delete,dicts_get:()=>dicts_dicts_get,dicts_get_default:()=>dicts_dicts_get_default,dicts_items:()=>dicts_dicts_items,dicts_keys:()=>dicts_dicts_keys,dicts_length:()=>dicts_dicts_length,dicts_pop:()=>dicts_dicts_pop,dicts_setdefault:()=>dicts_dicts_setdefault,dicts_to_json:()=>dicts_dicts_to_json,dicts_todict:()=>dicts_dicts_todict,dicts_update:()=>dicts_dicts_update,dicts_values:()=>dicts_dicts_values,json_to_dicts:()=>dicts_json_to_dicts});var generators_logic_namespaceObject={};__webpack_require__.r(generators_logic_namespaceObject),__webpack_require__.d(generators_logic_namespaceObject,{logic_boolean:()=>logic_logic_boolean,logic_compare:()=>logic_logic_compare,logic_compare_continous:()=>logic_logic_compare_continous,logic_is:()=>logic_logic_is,logic_is_in:()=>logic_logic_is_in,logic_negate:()=>logic_logic_negate,logic_null:()=>logic_logic_null,logic_operation:()=>logic_logic_operation,logic_tobool:()=>logic_logic_tobool,logic_true_or_false:()=>logic_logic_true_or_false});var generators_storage_namespaceObject={};__webpack_require__.r(generators_storage_namespaceObject),__webpack_require__.d(generators_storage_namespaceObject,{sdcard_mount:()=>storage_sdcard_mount,sdcard_use_spi_init:()=>storage_sdcard_use_spi_init,storage_can_write_ornot:()=>storage_storage_can_write_ornot,storage_change_dir:()=>storage_storage_change_dir,storage_close_file:()=>storage_storage_close_file,storage_delete_file:()=>storage_storage_delete_file,storage_file_seek:()=>storage_storage_file_seek,storage_file_tell:()=>storage_storage_file_tell,storage_file_write:()=>storage_storage_file_write,storage_fileopen:()=>storage_storage_fileopen,storage_fileopen_new:()=>storage_storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_storage_fileopen_new_encoding,storage_get_a_line:()=>storage_storage_get_a_line,storage_get_contents:()=>storage_storage_get_contents,storage_get_contents_without_para:()=>storage_storage_get_contents_without_para,storage_get_current_dir:()=>storage_storage_get_current_dir,storage_get_file_size:()=>storage_storage_get_file_size,storage_get_filename:()=>storage_storage_get_filename,storage_is_file:()=>storage_storage_is_file,storage_list_all_files:()=>storage_storage_list_all_files,storage_make_dir:()=>storage_storage_make_dir,storage_open_file_with_os:()=>storage_storage_open_file_with_os,storage_rename:()=>storage_storage_rename});var generators_procedures_namespaceObject={};__webpack_require__.r(generators_procedures_namespaceObject),__webpack_require__.d(generators_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_procedures_callnoreturn,procedures_callreturn:()=>procedures_procedures_callreturn,procedures_defnoreturn:()=>procedures_procedures_defnoreturn,procedures_defreturn:()=>procedures_procedures_defreturn,procedures_ifreturn:()=>procedures_procedures_ifreturn,procedures_return:()=>procedures_procedures_return});var generators_tuple_namespaceObject={};__webpack_require__.r(generators_tuple_namespaceObject),__webpack_require__.d(generators_tuple_namespaceObject,{tuple_change_to:()=>tuple_tuple_change_to,tuple_create_with:()=>tuple_tuple_create_with,tuple_create_with_noreturn:()=>tuple_tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_tuple_create_with_text_return,tuple_del:()=>tuple_tuple_del,tuple_find:()=>tuple_tuple_find,tuple_getIndex:()=>tuple_tuple_getIndex,tuple_getSublist:()=>tuple_tuple_getSublist,tuple_get_random_item:()=>tuple_tuple_get_random_item,tuple_get_sublist:()=>tuple_tuple_get_sublist,tuple_join:()=>tuple_tuple_join,tuple_length:()=>tuple_tuple_length,tuple_max:()=>tuple_tuple_max,tuple_totuple:()=>tuple_tuple_totuple,tuple_trig:()=>tuple_tuple_trig});var generators_set_namespaceObject={};__webpack_require__.r(generators_set_namespaceObject),__webpack_require__.d(generators_set_namespaceObject,{set_add_discard:()=>set_set_add_discard,set_clear:()=>set_set_clear,set_create_with:()=>set_set_create_with,set_create_with_text_return:()=>set_set_create_with_text_return,set_length:()=>set_set_length,set_operate:()=>set_set_operate,set_operate_update:()=>set_set_operate_update,set_pop:()=>set_set_pop,set_sub:()=>set_set_sub,set_toset:()=>set_set_toset,set_update:()=>set_set_update});var generators_html_namespaceObject={};__webpack_require__.r(generators_html_namespaceObject),__webpack_require__.d(generators_html_namespaceObject,{html_content:()=>html_html_content,html_content_more:()=>html_html_content_more,html_document:()=>html_html_document,html_form:()=>html_html_form,html_head_body:()=>html_html_head_body,html_style:()=>html_html_style,html_style_content:()=>html_html_style_content,html_text:()=>html_html_text,html_title:()=>html_html_title});var generators_utility_namespaceObject={};__webpack_require__.r(generators_utility_namespaceObject),__webpack_require__.d(generators_utility_namespaceObject,{attribute_access:()=>utility_attribute_access,function_call:()=>utility_function_call,raw_block:()=>utility_raw_block,raw_empty:()=>utility_raw_empty,raw_expression:()=>utility_raw_expression,raw_table:()=>utility_raw_table,type_check:()=>utility_type_check});var ai_namespaceObject={};__webpack_require__.r(ai_namespaceObject),__webpack_require__.d(ai_namespaceObject,{AI_ChooseAndGet:()=>AI_ChooseAndGet,AI_Face_match:()=>AI_Face_match,AI_ImageClassify:()=>AI_ImageClassify,AI_ImageClassify_Func:()=>AI_ImageClassify_Func,AI_Nlp:()=>AI_Nlp,AI_Nlp_Func:()=>AI_Nlp_Func,AI_Nlp_Func_sim:()=>AI_Nlp_Func_sim,AI_Nlp_Sim:()=>AI_Nlp_Sim,AI_Nlp_Topic:()=>AI_Nlp_Topic,AI_Nlp_newsSummary:()=>AI_Nlp_newsSummary,AI_Ocr:()=>AI_Ocr,AI_Ocr_Func:()=>AI_Ocr_Func,AI_Speech_asr:()=>AI_Speech_asr,AI_Speech_synthesis:()=>AI_Speech_synthesis,AI_audio:()=>AI_audio,AI_client:()=>AI_client,AI_photo:()=>AI_photo,AI_result:()=>AI_result});var algorithm_namespaceObject={};__webpack_require__.r(algorithm_namespaceObject),__webpack_require__.d(algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_add_path,algorithm_add_school:()=>algorithm_add_school,algorithm_all_books:()=>algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_book_scale,algorithm_check_feet:()=>algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_color_seclet,algorithm_current_school:()=>algorithm_current_school,algorithm_del_path:()=>algorithm_del_path,algorithm_delete_book:()=>algorithm_delete_book,algorithm_delete_books:()=>algorithm_delete_books,algorithm_delete_books2:()=>algorithm_delete_books2,algorithm_divide_books:()=>algorithm_divide_books,algorithm_find_path:()=>algorithm_find_path,algorithm_first_book:()=>algorithm_first_book,algorithm_fz_calc:()=>algorithm_fz_calc,algorithm_fz_calc_first_min:()=>algorithm_fz_calc_first_min,algorithm_fz_compare:()=>algorithm_fz_compare,algorithm_fz_move:()=>algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_fz_set_min,algorithm_get_book_num:()=>algorithm_get_book_num,algorithm_get_current_location:()=>algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_init_jttl,algorithm_move_recent:()=>algorithm_move_recent,algorithm_new_path:()=>algorithm_new_path,algorithm_next_book:()=>algorithm_next_book,algorithm_no_left:()=>algorithm_no_left,algorithm_no_path:()=>algorithm_no_path,algorithm_no_ring2:()=>algorithm_no_ring2,algorithm_not_home:()=>algorithm_not_home,algorithm_not_school:()=>algorithm_not_school,algorithm_number_add:()=>algorithm_number_add,algorithm_number_zero:()=>algorithm_number_zero,algorithm_prepare:()=>algorithm_prepare,algorithm_prepare2:()=>algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_print_book2,algorithm_print_divide:()=>algorithm_print_divide,algorithm_print_jttl_answer:()=>algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_print_number,algorithm_print_path:()=>algorithm_print_path,algorithm_print_path2:()=>algorithm_print_path2,algorithm_print_sequence:()=>algorithm_print_sequence,algorithm_rabbit_add:()=>algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_return_path,algorithm_set_path:()=>algorithm_set_path,algorithm_two_left:()=>algorithm_two_left,algorithm_void_path:()=>algorithm_void_path,algorithm_yes_ring2:()=>algorithm_yes_ring2,hanoi_init:()=>hanoi_init,hanoi_init_offline:()=>hanoi_init_offline,hanoi_move:()=>hanoi_move});var communicate_namespaceObject={};__webpack_require__.r(communicate_namespaceObject),__webpack_require__.d(communicate_namespaceObject,{requests_attribute:()=>requests_attribute,requests_get:()=>requests_get,requests_get_old:()=>requests_get_old,requests_method:()=>requests_method,requests_post:()=>requests_post});var cv_namespaceObject={};__webpack_require__.r(cv_namespaceObject),__webpack_require__.d(cv_namespaceObject,{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});var data_namespaceObject={};__webpack_require__.r(data_namespaceObject),__webpack_require__.d(data_namespaceObject,{array_create:()=>array_create,array_toarray:()=>array_toarray,dataframe_aggregate_func:()=>dataframe_aggregate_func,dataframe_create:()=>dataframe_create,dataframe_create_from_index:()=>dataframe_create_from_index,dataframe_create_from_one_index:()=>dataframe_create_from_one_index,dataframe_fillna:()=>dataframe_fillna,dataframe_get:()=>dataframe_get,dataframe_groupby:()=>dataframe_groupby,dataframe_head_tail:()=>dataframe_head_tail,dataframe_info:()=>dataframe_info,dataframe_median:()=>dataframe_median,dataframe_select:()=>dataframe_select,dataframe_sort_values:()=>dataframe_sort_values,matrix_multiplication:()=>matrix_multiplication,matrix_transpose:()=>matrix_transpose,numpy_argmin_template_match:()=>numpy_argmin_template_match,numpy_astype:()=>numpy_astype,numpy_c_:()=>numpy_c_,numpy_dot:()=>numpy_dot,numpy_linalg_det:()=>numpy_linalg_det,numpy_linalg_inv:()=>numpy_linalg_inv,numpy_max:()=>numpy_max,numpy_mean:()=>numpy_mean,numpy_mean_digit:()=>numpy_mean_digit,numpy_min:()=>numpy_min,numpy_ones:()=>numpy_ones,numpy_random_random:()=>numpy_random_random,numpy_reshape:()=>numpy_reshape,numpy_shape:()=>numpy_shape,numpy_size:()=>numpy_size,numpy_square:()=>numpy_square,numpy_std:()=>numpy_std,numpy_sum:()=>numpy_sum,numpy_trig:()=>numpy_trig,pandas_drop_columns:()=>pandas_drop_columns,pandas_dropna:()=>pandas_dropna,pandas_readcsv:()=>pandas_readcsv,pl_axes:()=>pl_axes,pl_bar:()=>pl_bar,pl_hist:()=>pl_hist,pl_label:()=>pl_label,pl_legend:()=>pl_legend,pl_pie:()=>pl_pie,pl_plot:()=>pl_plot,pl_plot_bar:()=>pl_plot_bar,pl_plot_easy:()=>pl_plot_easy,pl_plot_scatter:()=>pl_plot_scatter,pl_plot_xy:()=>pl_plot_xy,pl_savefig:()=>pl_savefig,pl_show:()=>pl_show,pl_subplot:()=>pl_subplot,pl_text:()=>pl_text,pl_ticks:()=>pl_ticks,pl_title:()=>pl_title,plot_axes:()=>plot_axes,plot_bar:()=>plot_bar,plot_cla:()=>plot_cla,plot_hist:()=>plot_hist,plot_label:()=>plot_label,plot_legend:()=>plot_legend,plot_pie:()=>plot_pie,plot_plot:()=>plot_plot,plot_plot_bar:()=>plot_plot_bar,plot_plot_easy:()=>plot_plot_easy,plot_plot_scatter:()=>plot_plot_scatter,plot_plot_xy:()=>plot_plot_xy,plot_savefig:()=>plot_savefig,plot_show:()=>plot_show,plot_subplot:()=>plot_subplot,plot_text:()=>plot_text,plot_ticks:()=>plot_ticks,plot_title:()=>plot_title,py_sum:()=>py_sum,pylab_imshow:()=>pylab_imshow,series_create:()=>series_create,series_create_from_index:()=>series_create_from_index,series_create_from_text:()=>series_create_from_text,series_get_num:()=>series_get_num,series_index_value:()=>series_index_value});var datastructure_namespaceObject={};__webpack_require__.r(datastructure_namespaceObject),__webpack_require__.d(datastructure_namespaceObject,{ds_add_node_by_attr:()=>ds_add_node_by_attr,ds_add_node_by_name:()=>ds_add_node_by_name,ds_create_linkedlist:()=>ds_create_linkedlist,ds_create_linkedlist_container:()=>ds_create_linkedlist_container,ds_create_linkedlist_item:()=>ds_create_linkedlist_item,ds_create_node:()=>ds_create_node,ds_del_node_by_attr:()=>ds_del_node_by_attr,ds_del_node_by_name:()=>ds_del_node_by_name,ds_get_node_attr:()=>ds_get_node_attr,ds_reverse_linkedlist:()=>ds_reverse_linkedlist,ds_set_node_attr:()=>ds_set_node_attr});var factory_namespaceObject={};__webpack_require__.r(factory_namespaceObject),__webpack_require__.d(factory_namespaceObject,{factory_block:()=>factory_block,factory_block_return:()=>factory_block_return,factory_block_return_with_textarea:()=>factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_callMethod_noreturn,factory_callMethod_return:()=>factory_callMethod_return,factory_create_with_container:()=>factory_create_with_container,factory_create_with_item:()=>factory_create_with_item,factory_declare:()=>factory_declare,factory_from_import:()=>factory_from_import,factory_function_noreturn:()=>factory_function_noreturn,factory_function_return:()=>factory_function_return,factory_import:()=>factory_import});var hardware_namespaceObject={};__webpack_require__.r(hardware_namespaceObject),__webpack_require__.d(hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_arduino_start,inout_highlow:()=>inout_highlow});var inout_namespaceObject={};__webpack_require__.r(inout_namespaceObject),__webpack_require__.d(inout_namespaceObject,{inout_input:()=>inout_input,inout_print:()=>inout_print,inout_print_container:()=>inout_print_container,inout_print_end:()=>inout_print_end,inout_print_inline:()=>inout_print_inline,inout_print_item:()=>inout_print_item,inout_print_many:()=>inout_print_many,inout_type_input:()=>inout_type_input,pyinout_type_input:()=>pyinout_type_input});var iot_namespaceObject={};__webpack_require__.r(iot_namespaceObject),__webpack_require__.d(iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>IOT_EMQX_PING,IOT_FORMATTING:()=>IOT_FORMATTING,IOT_FORMAT_STRING:()=>IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>IOT_MIXIO_UNSUBSCRIBE,iot_checkonenet:()=>iot_checkonenet,iot_client_onboard:()=>iot_client_onboard,iot_create_with_item:()=>iot_create_with_item,iot_http_client:()=>iot_http_client,iot_http_data:()=>iot_http_data,iot_mixio_check:()=>iot_mixio_check,iot_mixio_connect:()=>iot_mixio_connect,iot_mixio_connect_only:()=>iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_mixio_format_topic,iot_mixly_key:()=>iot_mixly_key,iot_mixly_key_py:()=>iot_mixly_key_py,iot_mqtt_client:()=>iot_mqtt_client,iot_mqtt_data:()=>iot_mqtt_data,iot_onenet_check:()=>iot_onenet_check,iot_onenet_connect:()=>iot_onenet_connect,iot_onenet_disconnect:()=>iot_onenet_disconnect,iot_onenet_publish:()=>iot_onenet_publish,iot_onenet_publish_dict:()=>iot_onenet_publish_dict,iot_onenetconnect:()=>iot_onenetconnect,iot_onenetdisconnect:()=>iot_onenetdisconnect,iot_publish:()=>iot_publish,iot_publish_container:()=>iot_publish_container,iot_publish_item:()=>iot_publish_item});var pins_namespaceObject={};__webpack_require__.r(pins_namespaceObject),__webpack_require__.d(pins_namespaceObject,{pins_analog_read:()=>pins_analog_read,pins_analog_write:()=>pins_analog_write,pins_digital_read:()=>pins_digital_read,pins_digital_write:()=>pins_digital_write});var serial_namespaceObject={};__webpack_require__.r(serial_namespaceObject),__webpack_require__.d(serial_namespaceObject,{serial_close:()=>serial_close,serial_open:()=>serial_open,serial_read_b:()=>serial_read_b,serial_write:()=>serial_write});var sklearn_namespaceObject={};__webpack_require__.r(sklearn_namespaceObject),__webpack_require__.d(sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_coef_intercept,sklearn_data_target:()=>sklearn_data_target,sklearn_fit:()=>sklearn_fit,sklearn_fit_no_target:()=>sklearn_fit_no_target,sklearn_load:()=>sklearn_load,sklearn_make_blobs:()=>sklearn_make_blobs,sklearn_make_classification:()=>sklearn_make_classification,sklearn_make_regression:()=>sklearn_make_regression,sklearn_predict:()=>sklearn_predict,sklearn_save_load_model:()=>sklearn_save_load_model,sklearn_score:()=>sklearn_score,sklearn_score_no_target:()=>sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_train_test_split_no_target});var system_namespaceObject={};__webpack_require__.r(system_namespaceObject),__webpack_require__.d(system_namespaceObject,{Panic_with_status_code:()=>system_Panic_with_status_code,base_delay:()=>base_delay,controls_millis:()=>system_controls_millis,controls_mstimer2:()=>controls_mstimer2,controls_mstimer2_start:()=>controls_mstimer2_start,controls_mstimer2_stop:()=>controls_mstimer2_stop,reset:()=>system_reset,time_localtime:()=>time_localtime,time_sleep:()=>system_time_sleep});var turtle_namespaceObject={};__webpack_require__.r(turtle_namespaceObject),__webpack_require__.d(turtle_namespaceObject,{turtle_bgcolor:()=>turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_bgcolor_hex_new,turtle_circle:()=>turtle_circle,turtle_circle_advanced:()=>turtle_circle_advanced,turtle_clear:()=>turtle_clear,turtle_clone:()=>turtle_clone,turtle_color:()=>turtle_color,turtle_color_hex:()=>turtle_color_hex,turtle_color_seclet:()=>turtle_color_seclet,turtle_create:()=>turtle_create,turtle_done:()=>turtle_done,turtle_exitonclick:()=>turtle_exitonclick,turtle_fill:()=>turtle_fill,turtle_fillcolor:()=>turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_getscreen,turtle_goto:()=>turtle_goto,turtle_listen:()=>turtle_listen,turtle_move:()=>turtle_move,turtle_numinput:()=>turtle_numinput,turtle_onclick:()=>turtle_onclick,turtle_onkey:()=>turtle_onkey,turtle_ontimer:()=>turtle_ontimer,turtle_pencolor:()=>turtle_pencolor,turtle_pencolor_hex:()=>turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_pencolor_hex_new,turtle_penup:()=>turtle_penup,turtle_pos_shape:()=>turtle_pos_shape,turtle_rotate:()=>turtle_rotate,turtle_screen_delay:()=>turtle_screen_delay,turtle_screen_savefig:()=>turtle_screen_savefig,turtle_setheading:()=>turtle_setheading,turtle_setxy:()=>turtle_setxy,turtle_shape:()=>turtle_shape,turtle_shapesize:()=>turtle_shapesize,turtle_size:()=>turtle_size,turtle_size_speed:()=>turtle_size_speed,turtle_speed:()=>turtle_speed,turtle_textinput:()=>turtle_textinput,turtle_visible:()=>turtle_visible,turtle_write:()=>turtle_write,turtle_write_format:()=>turtle_write_format,turtle_write_format_skulpt:()=>turtle_write_format_skulpt});var generators_ai_namespaceObject={};__webpack_require__.r(generators_ai_namespaceObject),__webpack_require__.d(generators_ai_namespaceObject,{AI_ChooseAndGet:()=>ai_AI_ChooseAndGet,AI_Face_match:()=>ai_AI_Face_match,AI_ImageClassify:()=>ai_AI_ImageClassify,AI_ImageClassify_Func:()=>ai_AI_ImageClassify_Func,AI_Nlp:()=>ai_AI_Nlp,AI_Nlp_Func:()=>ai_AI_Nlp_Func,AI_Nlp_Func_sim:()=>ai_AI_Nlp_Func_sim,AI_Nlp_Sim:()=>ai_AI_Nlp_Sim,AI_Nlp_Topic:()=>ai_AI_Nlp_Topic,AI_Nlp_newsSummary:()=>ai_AI_Nlp_newsSummary,AI_Ocr:()=>ai_AI_Ocr,AI_Ocr_Func:()=>ai_AI_Ocr_Func,AI_Speech_asr:()=>ai_AI_Speech_asr,AI_Speech_synthesis:()=>ai_AI_Speech_synthesis,AI_audio:()=>ai_AI_audio,AI_client:()=>ai_AI_client,AI_photo:()=>ai_AI_photo,AI_result:()=>ai_AI_result});var generators_algorithm_namespaceObject={};__webpack_require__.r(generators_algorithm_namespaceObject),__webpack_require__.d(generators_algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_algorithm_add_path,algorithm_add_school:()=>algorithm_algorithm_add_school,algorithm_all_books:()=>algorithm_algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_algorithm_book_scale,algorithm_check_feet:()=>algorithm_algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_algorithm_color_seclet,algorithm_current_school:()=>algorithm_algorithm_current_school,algorithm_del_path:()=>algorithm_algorithm_del_path,algorithm_delete_book:()=>algorithm_algorithm_delete_book,algorithm_divide_books:()=>algorithm_algorithm_divide_books,algorithm_find_path:()=>algorithm_algorithm_find_path,algorithm_first_book:()=>algorithm_algorithm_first_book,algorithm_fz_calc:()=>algorithm_algorithm_fz_calc,algorithm_fz_compare:()=>algorithm_algorithm_fz_compare,algorithm_fz_move:()=>algorithm_algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_algorithm_fz_set_min,algorithm_get_current_location:()=>algorithm_algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_algorithm_init_jttl,algorithm_move_recent:()=>algorithm_algorithm_move_recent,algorithm_new_path:()=>algorithm_algorithm_new_path,algorithm_next_book:()=>algorithm_algorithm_next_book,algorithm_no_left:()=>algorithm_algorithm_no_left,algorithm_no_path:()=>algorithm_algorithm_no_path,algorithm_no_ring2:()=>algorithm_algorithm_no_ring2,algorithm_not_home:()=>algorithm_algorithm_not_home,algorithm_not_school:()=>algorithm_algorithm_not_school,algorithm_number_add:()=>algorithm_algorithm_number_add,algorithm_number_zero:()=>algorithm_algorithm_number_zero,algorithm_prepare:()=>algorithm_algorithm_prepare,algorithm_prepare2:()=>algorithm_algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_algorithm_print_book2,algorithm_print_jttl_answer:()=>algorithm_algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_algorithm_print_number,algorithm_print_path:()=>algorithm_algorithm_print_path,algorithm_print_path2:()=>algorithm_algorithm_print_path2,algorithm_rabbit_add:()=>algorithm_algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_algorithm_return_path,algorithm_set_path:()=>algorithm_algorithm_set_path,algorithm_two_left:()=>algorithm_algorithm_two_left,algorithm_void_path:()=>algorithm_algorithm_void_path,algorithm_yes_ring2:()=>algorithm_algorithm_yes_ring2,hanoi_init:()=>algorithm_hanoi_init,hanoi_init_offline:()=>algorithm_hanoi_init_offline,hanoi_move:()=>algorithm_hanoi_move});var generators_communicate_namespaceObject={};__webpack_require__.r(generators_communicate_namespaceObject),__webpack_require__.d(generators_communicate_namespaceObject,{requests_attribute:()=>communicate_requests_attribute,requests_get:()=>communicate_requests_get,requests_get_old:()=>communicate_requests_get_old,requests_method:()=>communicate_requests_method,requests_post:()=>communicate_requests_post});var generators_data_namespaceObject={};__webpack_require__.r(generators_data_namespaceObject),__webpack_require__.d(generators_data_namespaceObject,{array_create:()=>data_array_create,array_toarray:()=>data_array_toarray,dataframe_aggregate_func:()=>data_dataframe_aggregate_func,dataframe_create:()=>data_dataframe_create,dataframe_create_from_index:()=>data_dataframe_create_from_index,dataframe_create_from_one_index:()=>data_dataframe_create_from_one_index,dataframe_fillna:()=>data_dataframe_fillna,dataframe_get:()=>data_dataframe_get,dataframe_groupby:()=>data_dataframe_groupby,dataframe_head_tail:()=>data_dataframe_head_tail,dataframe_info:()=>data_dataframe_info,dataframe_median:()=>data_dataframe_median,dataframe_select:()=>data_dataframe_select,dataframe_sort_values:()=>data_dataframe_sort_values,matrix_multiplication:()=>data_matrix_multiplication,matrix_transpose:()=>data_matrix_transpose,numpy_argmin_template_match:()=>data_numpy_argmin_template_match,numpy_astype:()=>data_numpy_astype,numpy_c_:()=>data_numpy_c_,numpy_dot:()=>data_numpy_dot,numpy_linalg_det:()=>data_numpy_linalg_det,numpy_linalg_inv:()=>data_numpy_linalg_inv,numpy_max:()=>data_numpy_max,numpy_mean:()=>data_numpy_mean,numpy_mean_digit:()=>data_numpy_mean_digit,numpy_min:()=>data_numpy_min,numpy_ones:()=>data_numpy_ones,numpy_random_random:()=>data_numpy_random_random,numpy_reshape:()=>data_numpy_reshape,numpy_shape:()=>data_numpy_shape,numpy_size:()=>data_numpy_size,numpy_square:()=>data_numpy_square,numpy_std:()=>data_numpy_std,numpy_sum:()=>data_numpy_sum,numpy_trig:()=>data_numpy_trig,pandas_drop_columns:()=>data_pandas_drop_columns,pandas_dropna:()=>data_pandas_dropna,pandas_readcsv:()=>data_pandas_readcsv,pl_axes:()=>data_pl_axes,pl_bar:()=>data_pl_bar,pl_hist:()=>data_pl_hist,pl_label:()=>data_pl_label,pl_legend:()=>data_pl_legend,pl_pie:()=>data_pl_pie,pl_plot:()=>data_pl_plot,pl_plot_bar:()=>data_pl_plot_bar,pl_plot_easy:()=>data_pl_plot_easy,pl_plot_scatter:()=>data_pl_plot_scatter,pl_plot_xy:()=>data_pl_plot_xy,pl_savefig:()=>data_pl_savefig,pl_show:()=>data_pl_show,pl_subplot:()=>data_pl_subplot,pl_text:()=>data_pl_text,pl_ticks:()=>data_pl_ticks,pl_title:()=>data_pl_title,plot_axes:()=>data_plot_axes,plot_bar:()=>data_plot_bar,plot_cla:()=>data_plot_cla,plot_hist:()=>data_plot_hist,plot_label:()=>data_plot_label,plot_legend:()=>data_plot_legend,plot_pie:()=>data_plot_pie,plot_plot:()=>data_plot_plot,plot_plot_bar:()=>data_plot_plot_bar,plot_plot_easy:()=>data_plot_plot_easy,plot_plot_scatter:()=>data_plot_plot_scatter,plot_plot_xy:()=>data_plot_plot_xy,plot_savefig:()=>data_plot_savefig,plot_show:()=>data_plot_show,plot_subplot:()=>data_plot_subplot,plot_text:()=>data_plot_text,plot_ticks:()=>data_plot_ticks,plot_title:()=>data_plot_title,py_sum:()=>data_py_sum,pylab_imshow:()=>data_pylab_imshow,series_create:()=>data_series_create,series_create_from_index:()=>data_series_create_from_index,series_create_from_text:()=>data_series_create_from_text,series_get_num:()=>data_series_get_num,series_index_value:()=>data_series_index_value});var generators_datastructure_namespaceObject={};__webpack_require__.r(generators_datastructure_namespaceObject),__webpack_require__.d(generators_datastructure_namespaceObject,{ds_add_node_by_attr:()=>datastructure_ds_add_node_by_attr,ds_add_node_by_name:()=>datastructure_ds_add_node_by_name,ds_create_linkedlist:()=>datastructure_ds_create_linkedlist,ds_create_node:()=>datastructure_ds_create_node,ds_del_node_by_attr:()=>datastructure_ds_del_node_by_attr,ds_del_node_by_name:()=>datastructure_ds_del_node_by_name,ds_get_node_attr:()=>datastructure_ds_get_node_attr,ds_reverse_linkedlist:()=>datastructure_ds_reverse_linkedlist,ds_set_node_attr:()=>datastructure_ds_set_node_attr});var generators_factory_namespaceObject={};__webpack_require__.r(generators_factory_namespaceObject),__webpack_require__.d(generators_factory_namespaceObject,{factory_block:()=>factory_factory_block,factory_block_return:()=>factory_factory_block_return,factory_block_return_with_textarea:()=>factory_factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_factory_callMethod_noreturn,factory_callMethod_return:()=>factory_factory_callMethod_return,factory_declare:()=>factory_factory_declare,factory_from_import:()=>factory_factory_from_import,factory_function_noreturn:()=>factory_factory_function_noreturn,factory_function_return:()=>factory_factory_function_return,factory_import:()=>factory_factory_import});var generators_hardware_namespaceObject={};__webpack_require__.r(generators_hardware_namespaceObject),__webpack_require__.d(generators_hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_hardware_arduino_start,inout_highlow:()=>hardware_inout_highlow});var generators_inout_namespaceObject={};__webpack_require__.r(generators_inout_namespaceObject),__webpack_require__.d(generators_inout_namespaceObject,{inout_input:()=>inout_inout_input,inout_print:()=>inout_inout_print,inout_print_end:()=>inout_inout_print_end,inout_print_inline:()=>inout_inout_print_inline,inout_print_many:()=>inout_inout_print_many,inout_type_input:()=>inout_inout_type_input,pyinout_type_input:()=>inout_pyinout_type_input});var generators_iot_namespaceObject={};__webpack_require__.r(generators_iot_namespaceObject),__webpack_require__.d(generators_iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>iot_IOT_EMQX_PING,IOT_FORMATTING:()=>iot_IOT_FORMATTING,IOT_FORMAT_STRING:()=>iot_IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>iot_IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>iot_IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>iot_IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>iot_IOT_MIXIO_UNSUBSCRIBE,iot_mixio_check:()=>iot_iot_mixio_check,iot_mixio_connect:()=>iot_iot_mixio_connect,iot_mixio_connect_only:()=>iot_iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_iot_mixio_format_topic,iot_mixly_key:()=>iot_iot_mixly_key,iot_mixly_key_py:()=>iot_iot_mixly_key_py});var generators_pins_namespaceObject={};__webpack_require__.r(generators_pins_namespaceObject),__webpack_require__.d(generators_pins_namespaceObject,{pins_analog_read:()=>pins_pins_analog_read,pins_analog_write:()=>pins_pins_analog_write,pins_digital:()=>pins_digital,pins_digital_read:()=>pins_pins_digital_read,pins_digital_write:()=>pins_pins_digital_write});var generators_serial_namespaceObject={};__webpack_require__.r(generators_serial_namespaceObject),__webpack_require__.d(generators_serial_namespaceObject,{serial_close:()=>serial_serial_close,serial_open:()=>serial_serial_open,serial_read_b:()=>serial_serial_read_b,serial_write:()=>serial_serial_write});var generators_sklearn_namespaceObject={};__webpack_require__.r(generators_sklearn_namespaceObject),__webpack_require__.d(generators_sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_sklearn_coef_intercept,sklearn_data_target:()=>sklearn_sklearn_data_target,sklearn_fit:()=>sklearn_sklearn_fit,sklearn_fit_no_target:()=>sklearn_sklearn_fit_no_target,sklearn_load:()=>sklearn_sklearn_load,sklearn_make_blobs:()=>sklearn_sklearn_make_blobs,sklearn_make_classification:()=>sklearn_sklearn_make_classification,sklearn_make_regression:()=>sklearn_sklearn_make_regression,sklearn_predict:()=>sklearn_sklearn_predict,sklearn_save_load_model:()=>sklearn_sklearn_save_load_model,sklearn_score:()=>sklearn_sklearn_score,sklearn_score_no_target:()=>sklearn_sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_sklearn_train_test_split_no_target});var generators_system_namespaceObject={};__webpack_require__.r(generators_system_namespaceObject),__webpack_require__.d(generators_system_namespaceObject,{controls_end_program:()=>system_controls_end_program,controls_millis:()=>generators_system_controls_millis,time_localtime:()=>system_time_localtime});var generators_turtle_namespaceObject={};__webpack_require__.r(generators_turtle_namespaceObject),__webpack_require__.d(generators_turtle_namespaceObject,{turtle_bgcolor:()=>turtle_turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_turtle_bgcolor_hex_new,turtle_circle:()=>turtle_turtle_circle,turtle_circle_advanced:()=>turtle_turtle_circle_advanced,turtle_clear:()=>turtle_turtle_clear,turtle_clone:()=>turtle_turtle_clone,turtle_color:()=>turtle_turtle_color,turtle_color_hex:()=>turtle_turtle_color_hex,turtle_color_seclet:()=>turtle_turtle_color_seclet,turtle_create:()=>turtle_turtle_create,turtle_done:()=>turtle_turtle_done,turtle_exitonclick:()=>turtle_turtle_exitonclick,turtle_fill:()=>turtle_turtle_fill,turtle_fillcolor:()=>turtle_turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_turtle_getscreen,turtle_goto:()=>turtle_turtle_goto,turtle_listen:()=>turtle_turtle_listen,turtle_move:()=>turtle_turtle_move,turtle_numinput:()=>turtle_turtle_numinput,turtle_onclick:()=>turtle_turtle_onclick,turtle_onkey:()=>turtle_turtle_onkey,turtle_ontimer:()=>turtle_turtle_ontimer,turtle_pencolor:()=>turtle_turtle_pencolor,turtle_pencolor_hex:()=>turtle_turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_turtle_pencolor_hex_new,turtle_penup:()=>turtle_turtle_penup,turtle_pos_shape:()=>turtle_turtle_pos_shape,turtle_rotate:()=>turtle_turtle_rotate,turtle_screen_delay:()=>turtle_turtle_screen_delay,turtle_screen_savefig:()=>turtle_turtle_screen_savefig,turtle_setheading:()=>turtle_turtle_setheading,turtle_setxy:()=>turtle_turtle_setxy,turtle_shape:()=>turtle_turtle_shape,turtle_shapesize:()=>turtle_turtle_shapesize,turtle_size:()=>turtle_turtle_size,turtle_size_speed:()=>turtle_turtle_size_speed,turtle_speed:()=>turtle_turtle_speed,turtle_textinput:()=>turtle_turtle_textinput,turtle_visible:()=>turtle_turtle_visible,turtle_write:()=>turtle_turtle_write,turtle_write_format:()=>turtle_turtle_write_format,turtle_write_format_skulpt:()=>turtle_turtle_write_format_skulpt});const external_Blockly_namespaceObject=Blockly,external_Mixly_namespaceObject=Mixly,Variables={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 n=Object.create(null),a=0;a1&&(s+=a)):n=s}else n="i";return n}},variables=Variables; /** * @license * Visual Blocks Editor @@ -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)}},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)}},TEXTS_HUE=160,text_text={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_TEXT_TOOLTIP)},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,'"')}},text_textarea={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_LINES_TOOLTIP)},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,'"')}};external_Blockly_namespaceObject.FieldTextInput.char_validator=function(e){if(e.length>1&&"\\"===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)}},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={};Procedures.NAME_TYPE=external_Blockly_namespaceObject.PROCEDURE_CATEGORY_NAME,Procedures.allProcedures=function(e){for(var t=e.getAllBlocks(!1),n=[],a=[],_=0;_"),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,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")',Blockly.Python.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]},generators_text_text=function(e,t){return[t.quote_(this.getFieldValue("TEXT")),t.ORDER_ATOMIC]},text_text_textarea=function(e,t){return['"""'+this.getFieldValue("VALUE")+'"""',t.ORDER_ATOMIC]},text_text_char=function(e,t){return["'"+this.getFieldValue("TEXT")+"'",t.ORDER_ATOMIC]},text_text_join=function(e,t){return[t.valueToCode(this,"A",t.ORDER_ATOMIC)+" + "+t.valueToCode(this,"B",t.ORDER_ATOMIC),t.ORDER_ADDITIVE]},text_ascii_to_char=function(e,t){return["chr("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_char_to_ascii=function(e,t){return["ord("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"a")+")",t.ORDER_ATOMIC]},text_number_to_text=function(e,t){return["str("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_text_length=function(e,t){return["len("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_char_at2=function(e,t){var n=e.getFieldValue("WHERE")||"FROM_START",a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';switch(n){case"FROM_START":return[a+"["+(e=t.getAdjustedInt(e,"AT"))+"]",t.ORDER_ATOMIC];case"FROM_END":return[a+"["+(e=t.getAdjustedInt(e,"AT",1,!0))+"]",t.ORDER_ATOMIC];case"RANDOM":return t.definitions_.import_random="import random",["random.choice("+a+")",t.ORDER_FUNCTION_CALL]}throw"Unhandled combination (lists_getIndex)."},text_text_char_at=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+(t.valueToCode(this,"AT",t.ORDER_ATOMIC)||0)+"]",t.ORDER_ATOMIC]},text_text_random_char=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';return t.definitions_.import_random="import random",["random.choice("+n+")",t.ORDER_FUNCTION_CALL]},text_text_equals_starts_ends=function(e,t){var n=t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""',a=t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""',_=this.getFieldValue("DOWHAT");return"==="===_?[n+" == "+a,t.ORDER_ATOMIC]:[n+"."+_+"("+a+")",t.ORDER_ATOMIC]},text_text_compare_to=function(e,t){return["cmp("+(t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_substring2=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""',a=e.getFieldValue("WHERE1"),_=e.getFieldValue("WHERE2");switch(a){case"FROM_START":"0"==(l=t.getAdjustedInt(e,"AT1"))&&(l="");break;case"FROM_END":var l=t.getAdjustedInt(e,"AT1",0,!0);break;case"FIRST":l="0";break;default:throw"Unhandled option (lists_getSublist)"}switch(_){case"FROM_START":var s=t.getAdjustedInt(e,"AT2");break;case"FROM_END":s=t.getAdjustedInt(e,"AT2",0,!0);external_Blockly_namespaceObject.isNumber(String(s))?"0"==s&&(s=""):(t.definitions_.import_sys="import sys",s+=" or sys.maxsize");break;case"LAST":s="-1";break;default:throw"Unhandled option (lists_getSublist)"}return[n+"["+l+" : "+s+"]",t.ORDER_ATOMIC]},text_text_substring=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+t.valueToCode(this,"AT1",t.ORDER_ATOMIC)+" : "+t.valueToCode(this,"AT2",t.ORDER_ATOMIC)+"]",t.ORDER_ATOMIC]},text_text_capital=function(e,t){var n=this.getFieldValue("CAPITAL");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_center=function(e,t){var n=this.getFieldValue("CENTER");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"WID",t.ORDER_ATOMIC)+","+t.valueToCode(this,"Symbol",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_find=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".find("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_join_seq=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".join("+(t.valueToCode(this,"LIST",t.ORDER_ASSIGNMENT)||"0")+")",t.ORDER_ATOMIC]},text_text_replace=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".replace("+t.valueToCode(this,"STR1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"STR2",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_split=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+".split("+(t.valueToCode(this,"VAL",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_strip=function(e,t){var n=this.getFieldValue("TOWHAT");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_format=function(e,t){for(var n=this.getFieldValue("VAR"),a=new Array(this.itemCount_),_=0;_",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"+a.join("\n")+"\n"+_.join("")+"\n"+e+"while True:\n"+l.join("")+s.join("\n"):t.join("\n")+"\n"+a.join("\n")+"\n"+_.join("")+"\n"+e+s.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("中删除列"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Drops columns from dataframe.")}},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_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.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_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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nfor i in house:\n i.hide()\n"},algorithm_algorithm_add_school=function(){return"path = [1]\ncar = sprite.Sprite('car', 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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nbarricade = sprite.Sprite('barricade', 570, 170)\nbarricade.enlargeTo(100)\nfor i in house:\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)}},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)}},TEXTS_HUE=160,text_text={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_TEXT_TOOLTIP)},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,'"')}},text_textarea={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_LINES_TOOLTIP)},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,'"')}};external_Blockly_namespaceObject.FieldTextInput.char_validator=function(e){if(e.length>1&&"\\"===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)}},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={};Procedures.NAME_TYPE=external_Blockly_namespaceObject.PROCEDURE_CATEGORY_NAME,Procedures.allProcedures=function(e){for(var t=e.getAllBlocks(!1),n=[],a=[],_=0;_"),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_datatime="import datatime",["datatime.datatime.fromtimestamp("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+")",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")',Blockly.Python.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]},generators_text_text=function(e,t){return[t.quote_(this.getFieldValue("TEXT")),t.ORDER_ATOMIC]},text_text_textarea=function(e,t){return['"""'+this.getFieldValue("VALUE")+'"""',t.ORDER_ATOMIC]},text_text_char=function(e,t){return["'"+this.getFieldValue("TEXT")+"'",t.ORDER_ATOMIC]},text_text_join=function(e,t){return[t.valueToCode(this,"A",t.ORDER_ATOMIC)+" + "+t.valueToCode(this,"B",t.ORDER_ATOMIC),t.ORDER_ADDITIVE]},text_ascii_to_char=function(e,t){return["chr("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_char_to_ascii=function(e,t){return["ord("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"a")+")",t.ORDER_ATOMIC]},text_number_to_text=function(e,t){return["str("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_text_length=function(e,t){return["len("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_char_at2=function(e,t){var n=e.getFieldValue("WHERE")||"FROM_START",a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';switch(n){case"FROM_START":return[a+"["+(e=t.getAdjustedInt(e,"AT"))+"]",t.ORDER_ATOMIC];case"FROM_END":return[a+"["+(e=t.getAdjustedInt(e,"AT",1,!0))+"]",t.ORDER_ATOMIC];case"RANDOM":return t.definitions_.import_random="import random",["random.choice("+a+")",t.ORDER_FUNCTION_CALL]}throw"Unhandled combination (lists_getIndex)."},text_text_char_at=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+(t.valueToCode(this,"AT",t.ORDER_ATOMIC)||0)+"]",t.ORDER_ATOMIC]},text_text_random_char=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';return t.definitions_.import_random="import random",["random.choice("+n+")",t.ORDER_FUNCTION_CALL]},text_text_equals_starts_ends=function(e,t){var n=t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""',a=t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""',_=this.getFieldValue("DOWHAT");return"==="===_?[n+" == "+a,t.ORDER_ATOMIC]:[n+"."+_+"("+a+")",t.ORDER_ATOMIC]},text_text_compare_to=function(e,t){return["cmp("+(t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_substring2=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""',a=e.getFieldValue("WHERE1"),_=e.getFieldValue("WHERE2");switch(a){case"FROM_START":"0"==(l=t.getAdjustedInt(e,"AT1"))&&(l="");break;case"FROM_END":var l=t.getAdjustedInt(e,"AT1",0,!0);break;case"FIRST":l="0";break;default:throw"Unhandled option (lists_getSublist)"}switch(_){case"FROM_START":var s=t.getAdjustedInt(e,"AT2");break;case"FROM_END":s=t.getAdjustedInt(e,"AT2",0,!0);external_Blockly_namespaceObject.isNumber(String(s))?"0"==s&&(s=""):(t.definitions_.import_sys="import sys",s+=" or sys.maxsize");break;case"LAST":s="-1";break;default:throw"Unhandled option (lists_getSublist)"}return[n+"["+l+" : "+s+"]",t.ORDER_ATOMIC]},text_text_substring=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+t.valueToCode(this,"AT1",t.ORDER_ATOMIC)+" : "+t.valueToCode(this,"AT2",t.ORDER_ATOMIC)+"]",t.ORDER_ATOMIC]},text_text_capital=function(e,t){var n=this.getFieldValue("CAPITAL");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_center=function(e,t){var n=this.getFieldValue("CENTER");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"WID",t.ORDER_ATOMIC)+","+t.valueToCode(this,"Symbol",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_find=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".find("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_join_seq=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".join("+(t.valueToCode(this,"LIST",t.ORDER_ASSIGNMENT)||"0")+")",t.ORDER_ATOMIC]},text_text_replace=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".replace("+t.valueToCode(this,"STR1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"STR2",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_split=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+".split("+(t.valueToCode(this,"VAL",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_strip=function(e,t){var n=this.getFieldValue("TOWHAT");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_format=function(e,t){for(var n=this.getFieldValue("VAR"),a=new Array(this.itemCount_),_=0;_",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"+a.join("\n")+"\n"+_.join("")+"\n"+e+"while True:\n"+l.join("")+s.join("\n"):t.join("\n")+"\n"+a.join("\n")+"\n"+_.join("")+"\n"+e+s.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("中删除列"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Drops columns from dataframe.")}},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_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.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_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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nfor i in house:\n i.hide()\n"},algorithm_algorithm_add_school=function(){return"path = [1]\ncar = sprite.Sprite('car', 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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nbarricade = sprite.Sprite('barricade', 570, 170)\nbarricade.enlargeTo(100)\nfor i in house:\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!1090x151100a10.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,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?df1data.csvdfdfarrayNonearrayNonearrayarrayarraydfvalueFalsedfdfcolumns0x1.55.50.511array1array2myMatrixmyMatrixmyMatrixarraymatrix1matrix2array1array20,1,2,3xmyArraymyArraymyDimensionsmyArraymyArraymyFeatures0imagetemplatesmyArray0myArray0mylistmylist0,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.png10020220221001001010.00.010021.0-10.0,10.0TRUEirisiris_Xiris_y0.3modelTRUEFALSEmodel1.0TRUEFALSE300modelmodel100model5modelmodel8300modelX_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.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,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmylist0mytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,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?df1data.csvdfdfarrayNonearrayNonearrayarrayarraydfvalueFalsedfdfcolumns0x1.55.50.511array1array2myMatrixmyMatrixmyMatrixarraymatrix1matrix2array1array20,1,2,3xmyArraymyArraymyDimensionsmyArraymyArraymyFeatures0imagetemplatesmyArray0myArray0mylistmylist0,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.png10020220221001001010.00.010021.0-10.0,10.0TRUEirisiris_Xiris_y0.3modelTRUEFALSEmodel1.0TRUEFALSE300modelmodel100model5modelmodel8300modelX_trainy_trainmodelX_testy_testmodelX_testmodelmodelmodelD:/mixly/test.pkl \ No newline at end of file diff --git a/boards/default/python_pyodide/main.bundle.js b/boards/default/python_pyodide/main.bundle.js index 1322707a..507ca7b7 100644 --- a/boards/default/python_pyodide/main.bundle.js +++ b/boards/default/python_pyodide/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"use strict";var __webpack_modules__={936:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.imread("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_show_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imshow("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_write_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imwrite("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_waitkey=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.waitKey("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+")\n"},cv_destroy_all=function(e,t){t.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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.CascadeClassifier("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect_all=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+",minSize=("+t.valueToCode(this,"x1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y1",t.ORDER_ATOMIC)+"),maxSize=("+t.valueToCode(this,"x2",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y2",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]}},9610:(e,t,n)=>{n.d(t,{D:()=>a});var a=function(){function e(e){var t=this;void 0===e&&(e=!1),this.ignoreMultipleSettles=e,this.isSettled=!1,this.promise=new Promise((function(e,n){t.resolveCallback=e,t.rejectCallback=n}))}return e.prototype.markAsSettled=function(){var e=this.isSettled;if(e&&!this.ignoreMultipleSettles)throw new Error("PromiseDelegate is already settled!");return this.isSettled=!0,!e},Object.defineProperty(e.prototype,"settled",{get:function(){return this.isSettled},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this.markAsSettled()&&this.resolveCallback(e)},e.prototype.reject=function(e){this.markAsSettled()&&this.rejectCallback(e)},e}()},6944:e=>{e.exports=path}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);__webpack_require__.r(n);var a={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var _=2&t&&e;"object"==typeof _&&!~leafPrototypes.indexOf(_);_=getProto(_))Object.getOwnPropertyNames(_).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,__webpack_require__.d(n,a),n},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,n)=>(__webpack_require__.f[n](e,t),t)),[])),__webpack_require__.u=e=>e+".bundle.js",__webpack_require__.miniCssF=e=>"styles/"+e+".45554be0.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="@mixly/python-pyodide:",__webpack_require__.l=(e,t,n,a)=>{if(inProgress[e])inProgress[e].push(t);else{var _,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),i=0;i{_.onerror=_.onload=null,clearTimeout(p);var a=inProgress[e];if(delete inProgress[e],_.parentNode&&_.parentNode.removeChild(_),a&&a.forEach((e=>e(n))),t)return t(n)},p=setTimeout(r.bind(null,void 0,{type:"timeout",target:_}),12e4);_.onerror=r.bind(null,_.onerror),_.onload=r.bind(null,_.onload),l&&document.head.appendChild(_)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((t,n)=>{var a=__webpack_require__.miniCssF(e),_=__webpack_require__.p+a;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),a=0;a{var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",__webpack_require__.nc&&(l.nonce=__webpack_require__.nc),l.onerror=l.onload=n=>{if(l.onerror=l.onload=null,"load"===n.type)a();else{var s=n&&n.type,i=n&&n.target&&n.target.href||t,o=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+i+")");o.name="ChunkLoadError",o.code="CSS_CHUNK_LOAD_FAILED",o.type=s,o.request=i,l.parentNode&&l.parentNode.removeChild(l),_(o)}},l.href=t,n?n.parentNode.insertBefore(l,n.nextSibling):document.head.appendChild(l)})(e,_,null,t,n)})),t={792:0};__webpack_require__.f.miniCss=(n,a)=>{t[n]?a.push(t[n]):0!==t[n]&&{317:1}[n]&&a.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))}}})(),(()=>{var e={792:0};__webpack_require__.f.j=(t,n)=>{var a=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var _=new Promise(((n,_)=>a=e[t]=[n,_]));n.push(a[2]=_);var l=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(l,(n=>{if(__webpack_require__.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var _=n&&("load"===n.type?"missing":n.type),l=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+_+": "+l+")",s.name="ChunkLoadError",s.type=_,s.request=l,a[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var a,_,[l,s,i]=n,o=0;if(l.some((t=>0!==e[t]))){for(a in s)__webpack_require__.o(s,a)&&(__webpack_require__.m[a]=s[a]);if(i)i(__webpack_require__)}for(t&&t(n);ocontrols_type,controls_typeLists:()=>controls_typeLists,lists_zip:()=>lists_zip,lists_zip_container:()=>lists_zip_container,lists_zip_item:()=>lists_zip_item,unpack_iterable_object:()=>unpack_iterable_object,variables_change:()=>variables_change,variables_get:()=>variables_get,variables_global:()=>variables_global,variables_set:()=>variables_set});var control_namespaceObject={};__webpack_require__.r(control_namespaceObject),__webpack_require__.d(control_namespaceObject,{base_setup:()=>base_setup,controls_delay:()=>controls_delay,controls_end_program:()=>controls_end_program,controls_except:()=>controls_except,controls_finally:()=>controls_finally,controls_flow_statements:()=>controls_flow_statements,controls_for:()=>controls_for,controls_forEach:()=>controls_forEach,controls_for_range:()=>controls_for_range,controls_if:()=>controls_if,controls_if_else:()=>controls_if_else,controls_if_elseif:()=>controls_if_elseif,controls_if_if:()=>controls_if_if,controls_lambda:()=>controls_lambda,controls_main:()=>controls_main,controls_pass:()=>controls_pass,controls_range:()=>controls_range,controls_repeat_ext:()=>controls_repeat_ext,controls_thread:()=>controls_thread,controls_try:()=>controls_try,controls_try_finally:()=>controls_try_finally,controls_whileUntil:()=>controls_whileUntil,do_while:()=>do_while,garbage_collection:()=>garbage_collection,get_mem_alloc:()=>get_mem_alloc,get_mem_free:()=>get_mem_free,get_unique_identifier:()=>get_unique_identifier});var math_namespaceObject={};__webpack_require__.r(math_namespaceObject),__webpack_require__.d(math_namespaceObject,{base_map:()=>base_map,math_arithmetic:()=>math_arithmetic,math_bit:()=>math_bit,math_constant:()=>math_constant,math_constant_mp:()=>math_constant_mp,math_constrain:()=>math_constrain,math_dec:()=>math_dec,math_indexer_number:()=>math_indexer_number,math_map:()=>math_map,math_max_min:()=>math_max_min,math_number:()=>math_number,math_number_base_conversion:()=>math_number_base_conversion,math_random:()=>math_random,math_random_seed:()=>math_random_seed,math_round:()=>math_round,math_selfcalcu:()=>math_selfcalcu,math_to_int:()=>math_to_int,math_trig:()=>math_trig,text_to_number:()=>text_to_number,text_to_number_skulpt:()=>text_to_number_skulpt,turn_to_int:()=>turn_to_int});var text_namespaceObject={};__webpack_require__.r(text_namespaceObject),__webpack_require__.d(text_namespaceObject,{ascii_to_char:()=>ascii_to_char,char_to_ascii:()=>char_to_ascii,number_to_text:()=>number_to_text,os_system:()=>os_system,text:()=>text_text,text_capital:()=>text_capital,text_center:()=>text_center,text_char:()=>text_char,text_char_at:()=>text_char_at,text_char_at2:()=>text_char_at2,text_char_at3:()=>text_char_at3,text_compareTo:()=>text_compareTo,text_compare_to:()=>text_compare_to,text_create_with_container:()=>text_create_with_container,text_create_with_item:()=>text_create_with_item,text_encode:()=>text_encode,text_equals_starts_ends:()=>text_equals_starts_ends,text_eval:()=>text_eval,text_find:()=>text_find,text_format:()=>text_format,text_format_noreturn:()=>text_format_noreturn,text_join:()=>text_join,text_join_seq:()=>text_join_seq,text_length:()=>text_length,text_random_char:()=>text_random_char,text_replace:()=>text_replace,text_split:()=>text_split,text_strip:()=>text_strip,text_substring:()=>text_substring,text_substring2:()=>text_substring2,text_substring3:()=>text_substring3,text_textarea:()=>text_textarea});var lists_namespaceObject={};__webpack_require__.r(lists_namespaceObject),__webpack_require__.d(lists_namespaceObject,{list_many_input:()=>list_many_input,list_tolist:()=>list_tolist,list_tolist2:()=>list_tolist2,list_trig:()=>list_trig,lists_2d_get_col_row_data:()=>lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_append_extend,lists_change_to:()=>lists_change_to,lists_change_to_general:()=>lists_change_to_general,lists_clear:()=>lists_clear,lists_create_with:()=>lists_create_with,lists_create_with2:()=>lists_create_with2,lists_create_with_container:()=>lists_create_with_container,lists_create_with_item:()=>lists_create_with_item,lists_create_with_noreturn:()=>lists_create_with_noreturn,lists_create_with_text:()=>lists_create_with_text,lists_create_with_text2:()=>lists_create_with_text2,lists_del_general:()=>lists_del_general,lists_find:()=>lists_find,lists_getIndex3:()=>lists_getIndex3,lists_getSublist3:()=>lists_getSublist3,lists_get_index:()=>lists_get_index,lists_get_random_item:()=>lists_get_random_item,lists_get_random_sublist:()=>lists_get_random_sublist,lists_get_sublist:()=>lists_get_sublist,lists_insert_value:()=>lists_insert_value,lists_insert_value2:()=>lists_insert_value2,lists_pop:()=>lists_pop,lists_remove_at:()=>lists_remove_at,lists_remove_at2:()=>lists_remove_at2,lists_reverse:()=>lists_reverse,lists_setIndex3:()=>lists_setIndex3,lists_set_index:()=>lists_set_index,lists_sort:()=>lists_sort});var dicts_namespaceObject={};__webpack_require__.r(dicts_namespaceObject),__webpack_require__.d(dicts_namespaceObject,{dicts_add_change_del:()=>dicts_add_change_del,dicts_add_or_change:()=>dicts_add_or_change,dicts_clear:()=>dicts_clear,dicts_create_with:()=>dicts_create_with,dicts_create_with_container:()=>dicts_create_with_container,dicts_create_with_item:()=>dicts_create_with_item,dicts_create_with_noreturn:()=>dicts_create_with_noreturn,dicts_deldict:()=>dicts_deldict,dicts_delete:()=>dicts_delete,dicts_get:()=>dicts_get,dicts_get_default:()=>dicts_get_default,dicts_items:()=>dicts_items,dicts_keys:()=>dicts_keys,dicts_length:()=>dicts_length,dicts_pop:()=>dicts_pop,dicts_setdefault:()=>dicts_setdefault,dicts_to_json:()=>dicts_to_json,dicts_todict:()=>dicts_todict,dicts_update:()=>dicts_update,dicts_values:()=>dicts_values,json_to_dicts:()=>json_to_dicts});var logic_namespaceObject={};__webpack_require__.r(logic_namespaceObject),__webpack_require__.d(logic_namespaceObject,{logic_boolean:()=>logic_boolean,logic_compare:()=>logic_compare,logic_compare_continous:()=>logic_compare_continous,logic_is:()=>logic_is,logic_is_in:()=>logic_is_in,logic_negate:()=>logic_negate,logic_null:()=>logic_null,logic_operation:()=>logic_operation,logic_tobool:()=>logic_tobool,logic_true_or_false:()=>logic_true_or_false});var storage_namespaceObject={};__webpack_require__.r(storage_namespaceObject),__webpack_require__.d(storage_namespaceObject,{sdcard_mount:()=>sdcard_mount,sdcard_use_spi_init:()=>sdcard_use_spi_init,storage_can_write_ornot:()=>storage_can_write_ornot,storage_change_dir:()=>storage_change_dir,storage_close_file:()=>storage_close_file,storage_delete_file:()=>storage_delete_file,storage_file_seek:()=>storage_file_seek,storage_file_tell:()=>storage_file_tell,storage_file_write:()=>storage_file_write,storage_fileopen:()=>storage_fileopen,storage_fileopen_new:()=>storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_fileopen_new_encoding,storage_get_a_line:()=>storage_get_a_line,storage_get_contents:()=>storage_get_contents,storage_get_contents_without_para:()=>storage_get_contents_without_para,storage_get_current_dir:()=>storage_get_current_dir,storage_get_file_size:()=>storage_get_file_size,storage_get_filename:()=>storage_get_filename,storage_is_file:()=>storage_is_file,storage_list_all_files:()=>storage_list_all_files,storage_make_dir:()=>storage_make_dir,storage_open_file_with_os:()=>storage_open_file_with_os,storage_rename:()=>storage_rename});var blocks_procedures_namespaceObject={};__webpack_require__.r(blocks_procedures_namespaceObject),__webpack_require__.d(blocks_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_callnoreturn,procedures_callreturn:()=>procedures_callreturn,procedures_defnoreturn:()=>procedures_defnoreturn,procedures_defreturn:()=>procedures_defreturn,procedures_ifreturn:()=>procedures_ifreturn,procedures_mutatorarg:()=>procedures_mutatorarg,procedures_mutatorcontainer:()=>procedures_mutatorcontainer,procedures_return:()=>procedures_return});var tuple_namespaceObject={};__webpack_require__.r(tuple_namespaceObject),__webpack_require__.d(tuple_namespaceObject,{tuple_change_to:()=>tuple_change_to,tuple_create_with:()=>tuple_create_with,tuple_create_with_container:()=>tuple_create_with_container,tuple_create_with_item:()=>tuple_create_with_item,tuple_create_with_noreturn:()=>tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_create_with_text_return,tuple_del:()=>tuple_del,tuple_find:()=>tuple_find,tuple_getIndex:()=>tuple_getIndex,tuple_getSublist:()=>tuple_getSublist,tuple_get_random_item:()=>tuple_get_random_item,tuple_get_sublist:()=>tuple_get_sublist,tuple_join:()=>tuple_join,tuple_length:()=>tuple_length,tuple_max:()=>tuple_max,tuple_totuple:()=>tuple_totuple,tuple_trig:()=>tuple_trig});var set_namespaceObject={};__webpack_require__.r(set_namespaceObject),__webpack_require__.d(set_namespaceObject,{set_add_discard:()=>set_add_discard,set_clear:()=>set_clear,set_create_with:()=>set_create_with,set_create_with_container:()=>set_create_with_container,set_create_with_item:()=>set_create_with_item,set_create_with_text_return:()=>set_create_with_text_return,set_length:()=>set_length,set_operate:()=>set_operate,set_operate_update:()=>set_operate_update,set_pop:()=>set_pop,set_sub:()=>set_sub,set_toset:()=>set_toset,set_update:()=>set_update});var html_namespaceObject={};__webpack_require__.r(html_namespaceObject),__webpack_require__.d(html_namespaceObject,{html_content:()=>html_content,html_content_more:()=>html_content_more,html_document:()=>html_document,html_form:()=>html_form,html_head_body:()=>html_head_body,html_style:()=>html_style,html_style_color:()=>html_style_color,html_style_content:()=>html_style_content,html_text:()=>html_text,html_title:()=>html_title});var utility_namespaceObject={};__webpack_require__.r(utility_namespaceObject),__webpack_require__.d(utility_namespaceObject,{attribute_access:()=>attribute_access,function_call:()=>function_call,function_call_container:()=>function_call_container,function_call_item:()=>function_call_item,raw_block:()=>raw_block,raw_empty:()=>raw_empty,raw_expression:()=>raw_expression,raw_table:()=>raw_table,text_comment:()=>text_comment,text_print_multiple:()=>text_print_multiple,text_print_multiple_container:()=>text_print_multiple_container,text_print_multiple_item:()=>text_print_multiple_item,type_check:()=>type_check});var generators_variables_namespaceObject={};__webpack_require__.r(generators_variables_namespaceObject),__webpack_require__.d(generators_variables_namespaceObject,{controls_type:()=>variables_controls_type,controls_typeLists:()=>variables_controls_typeLists,lists_zip:()=>variables_lists_zip,unpack_iterable_object:()=>variables_unpack_iterable_object,variables_change:()=>variables_variables_change,variables_get:()=>variables_variables_get,variables_global:()=>variables_variables_global,variables_set:()=>variables_variables_set});var generators_control_namespaceObject={};__webpack_require__.r(generators_control_namespaceObject),__webpack_require__.d(generators_control_namespaceObject,{Panic_with_status_code:()=>Panic_with_status_code,base_setup:()=>control_base_setup,controls_delay:()=>control_controls_delay,controls_flow_statements:()=>control_controls_flow_statements,controls_for:()=>control_controls_for,controls_forEach:()=>control_controls_forEach,controls_for_range:()=>control_controls_for_range,controls_if:()=>control_controls_if,controls_interrupts:()=>controls_interrupts,controls_lambda:()=>control_controls_lambda,controls_main:()=>control_controls_main,controls_millis:()=>controls_millis,controls_nointerrupts:()=>controls_nointerrupts,controls_pass:()=>control_controls_pass,controls_range:()=>control_controls_range,controls_repeat:()=>controls_repeat,controls_repeat_ext:()=>control_controls_repeat_ext,controls_thread:()=>control_controls_thread,controls_try_finally:()=>control_controls_try_finally,controls_whileUntil:()=>control_controls_whileUntil,do_while:()=>control_do_while,garbage_collection:()=>control_garbage_collection,get_mem_alloc:()=>control_get_mem_alloc,get_mem_free:()=>control_get_mem_free,get_unique_identifier:()=>control_get_unique_identifier,reset:()=>control_reset,time_sleep:()=>time_sleep});var generators_math_namespaceObject={};__webpack_require__.r(generators_math_namespaceObject),__webpack_require__.d(generators_math_namespaceObject,{base_map:()=>math_base_map,math_arithmetic:()=>math_math_arithmetic,math_bit:()=>math_math_bit,math_constant:()=>math_math_constant,math_constant_mp:()=>math_math_constant_mp,math_constrain:()=>math_math_constrain,math_dec:()=>math_math_dec,math_indexer_number:()=>math_math_indexer_number,math_map:()=>math_math_map,math_max_min:()=>math_math_max_min,math_number:()=>math_math_number,math_number_base_conversion:()=>math_math_number_base_conversion,math_random:()=>math_math_random,math_random_seed:()=>math_math_random_seed,math_round:()=>math_math_round,math_selfcalcu:()=>math_math_selfcalcu,math_single:()=>math_single,math_to_int:()=>math_math_to_int,math_trig:()=>math_math_trig,text_to_number:()=>math_text_to_number,text_to_number_skulpt:()=>math_text_to_number_skulpt,turn_to_int:()=>math_turn_to_int});var generators_text_namespaceObject={};__webpack_require__.r(generators_text_namespaceObject),__webpack_require__.d(generators_text_namespaceObject,{ascii_to_char:()=>text_ascii_to_char,char_to_ascii:()=>text_char_to_ascii,number_to_text:()=>text_number_to_text,os_system:()=>text_os_system,text:()=>generators_text_text,text_capital:()=>text_text_capital,text_center:()=>text_text_center,text_char:()=>text_text_char,text_char_at:()=>text_text_char_at,text_char_at2:()=>text_text_char_at2,text_char_at3:()=>text_text_char_at3,text_compareTo:()=>text_text_compareTo,text_compare_to:()=>text_text_compare_to,text_encode:()=>text_text_encode,text_equals_starts_ends:()=>text_text_equals_starts_ends,text_eval:()=>text_text_eval,text_find:()=>text_text_find,text_format:()=>text_text_format,text_format_noreturn:()=>text_text_format_noreturn,text_join:()=>text_text_join,text_join_seq:()=>text_text_join_seq,text_length:()=>text_text_length,text_random_char:()=>text_text_random_char,text_replace:()=>text_text_replace,text_split:()=>text_text_split,text_strip:()=>text_text_strip,text_substring:()=>text_text_substring,text_substring2:()=>text_text_substring2,text_substring3:()=>text_text_substring3,text_textarea:()=>text_text_textarea});var generators_lists_namespaceObject={};__webpack_require__.r(generators_lists_namespaceObject),__webpack_require__.d(generators_lists_namespaceObject,{list_many_input:()=>lists_list_many_input,list_tolist:()=>lists_list_tolist,list_tolist2:()=>lists_list_tolist2,list_trig:()=>lists_list_trig,lists_2d_get_col_row_data:()=>lists_lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_lists_append_extend,lists_change_to:()=>lists_lists_change_to,lists_change_to_general:()=>lists_lists_change_to_general,lists_clear:()=>lists_lists_clear,lists_create_with:()=>lists_lists_create_with,lists_create_with2:()=>lists_lists_create_with2,lists_create_with_noreturn:()=>lists_lists_create_with_noreturn,lists_create_with_text:()=>lists_lists_create_with_text,lists_create_with_text2:()=>lists_lists_create_with_text2,lists_del_general:()=>lists_lists_del_general,lists_find:()=>lists_lists_find,lists_getIndex3:()=>lists_lists_getIndex3,lists_getSublist3:()=>lists_lists_getSublist3,lists_get_index:()=>lists_lists_get_index,lists_get_random_item:()=>lists_lists_get_random_item,lists_get_random_sublist:()=>lists_lists_get_random_sublist,lists_get_sublist:()=>lists_lists_get_sublist,lists_insert_value:()=>lists_lists_insert_value,lists_insert_value2:()=>lists_lists_insert_value2,lists_pop:()=>lists_lists_pop,lists_remove_at:()=>lists_lists_remove_at,lists_remove_at2:()=>lists_lists_remove_at2,lists_reverse:()=>lists_lists_reverse,lists_setIndex3:()=>lists_lists_setIndex3,lists_set_index:()=>lists_lists_set_index,lists_sort:()=>lists_lists_sort});var generators_dicts_namespaceObject={};__webpack_require__.r(generators_dicts_namespaceObject),__webpack_require__.d(generators_dicts_namespaceObject,{dicts_add_change_del:()=>dicts_dicts_add_change_del,dicts_add_or_change:()=>dicts_dicts_add_or_change,dicts_clear:()=>dicts_dicts_clear,dicts_create_with:()=>dicts_dicts_create_with,dicts_create_with_noreturn:()=>dicts_dicts_create_with_noreturn,dicts_deldict:()=>dicts_dicts_deldict,dicts_delete:()=>dicts_dicts_delete,dicts_get:()=>dicts_dicts_get,dicts_get_default:()=>dicts_dicts_get_default,dicts_items:()=>dicts_dicts_items,dicts_keys:()=>dicts_dicts_keys,dicts_length:()=>dicts_dicts_length,dicts_pop:()=>dicts_dicts_pop,dicts_setdefault:()=>dicts_dicts_setdefault,dicts_to_json:()=>dicts_dicts_to_json,dicts_todict:()=>dicts_dicts_todict,dicts_update:()=>dicts_dicts_update,dicts_values:()=>dicts_dicts_values,json_to_dicts:()=>dicts_json_to_dicts});var generators_logic_namespaceObject={};__webpack_require__.r(generators_logic_namespaceObject),__webpack_require__.d(generators_logic_namespaceObject,{logic_boolean:()=>logic_logic_boolean,logic_compare:()=>logic_logic_compare,logic_compare_continous:()=>logic_logic_compare_continous,logic_is:()=>logic_logic_is,logic_is_in:()=>logic_logic_is_in,logic_negate:()=>logic_logic_negate,logic_null:()=>logic_logic_null,logic_operation:()=>logic_logic_operation,logic_tobool:()=>logic_logic_tobool,logic_true_or_false:()=>logic_logic_true_or_false});var generators_storage_namespaceObject={};__webpack_require__.r(generators_storage_namespaceObject),__webpack_require__.d(generators_storage_namespaceObject,{sdcard_mount:()=>storage_sdcard_mount,sdcard_use_spi_init:()=>storage_sdcard_use_spi_init,storage_can_write_ornot:()=>storage_storage_can_write_ornot,storage_change_dir:()=>storage_storage_change_dir,storage_close_file:()=>storage_storage_close_file,storage_delete_file:()=>storage_storage_delete_file,storage_file_seek:()=>storage_storage_file_seek,storage_file_tell:()=>storage_storage_file_tell,storage_file_write:()=>storage_storage_file_write,storage_fileopen:()=>storage_storage_fileopen,storage_fileopen_new:()=>storage_storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_storage_fileopen_new_encoding,storage_get_a_line:()=>storage_storage_get_a_line,storage_get_contents:()=>storage_storage_get_contents,storage_get_contents_without_para:()=>storage_storage_get_contents_without_para,storage_get_current_dir:()=>storage_storage_get_current_dir,storage_get_file_size:()=>storage_storage_get_file_size,storage_get_filename:()=>storage_storage_get_filename,storage_is_file:()=>storage_storage_is_file,storage_list_all_files:()=>storage_storage_list_all_files,storage_make_dir:()=>storage_storage_make_dir,storage_open_file_with_os:()=>storage_storage_open_file_with_os,storage_rename:()=>storage_storage_rename});var generators_procedures_namespaceObject={};__webpack_require__.r(generators_procedures_namespaceObject),__webpack_require__.d(generators_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_procedures_callnoreturn,procedures_callreturn:()=>procedures_procedures_callreturn,procedures_defnoreturn:()=>procedures_procedures_defnoreturn,procedures_defreturn:()=>procedures_procedures_defreturn,procedures_ifreturn:()=>procedures_procedures_ifreturn,procedures_return:()=>procedures_procedures_return});var generators_tuple_namespaceObject={};__webpack_require__.r(generators_tuple_namespaceObject),__webpack_require__.d(generators_tuple_namespaceObject,{tuple_change_to:()=>tuple_tuple_change_to,tuple_create_with:()=>tuple_tuple_create_with,tuple_create_with_noreturn:()=>tuple_tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_tuple_create_with_text_return,tuple_del:()=>tuple_tuple_del,tuple_find:()=>tuple_tuple_find,tuple_getIndex:()=>tuple_tuple_getIndex,tuple_getSublist:()=>tuple_tuple_getSublist,tuple_get_random_item:()=>tuple_tuple_get_random_item,tuple_get_sublist:()=>tuple_tuple_get_sublist,tuple_join:()=>tuple_tuple_join,tuple_length:()=>tuple_tuple_length,tuple_max:()=>tuple_tuple_max,tuple_totuple:()=>tuple_tuple_totuple,tuple_trig:()=>tuple_tuple_trig});var generators_set_namespaceObject={};__webpack_require__.r(generators_set_namespaceObject),__webpack_require__.d(generators_set_namespaceObject,{set_add_discard:()=>set_set_add_discard,set_clear:()=>set_set_clear,set_create_with:()=>set_set_create_with,set_create_with_text_return:()=>set_set_create_with_text_return,set_length:()=>set_set_length,set_operate:()=>set_set_operate,set_operate_update:()=>set_set_operate_update,set_pop:()=>set_set_pop,set_sub:()=>set_set_sub,set_toset:()=>set_set_toset,set_update:()=>set_set_update});var generators_html_namespaceObject={};__webpack_require__.r(generators_html_namespaceObject),__webpack_require__.d(generators_html_namespaceObject,{html_content:()=>html_html_content,html_content_more:()=>html_html_content_more,html_document:()=>html_html_document,html_form:()=>html_html_form,html_head_body:()=>html_html_head_body,html_style:()=>html_html_style,html_style_content:()=>html_html_style_content,html_text:()=>html_html_text,html_title:()=>html_html_title});var generators_utility_namespaceObject={};__webpack_require__.r(generators_utility_namespaceObject),__webpack_require__.d(generators_utility_namespaceObject,{attribute_access:()=>utility_attribute_access,function_call:()=>utility_function_call,raw_block:()=>utility_raw_block,raw_empty:()=>utility_raw_empty,raw_expression:()=>utility_raw_expression,raw_table:()=>utility_raw_table,type_check:()=>utility_type_check});var ai_namespaceObject={};__webpack_require__.r(ai_namespaceObject),__webpack_require__.d(ai_namespaceObject,{AI_ChooseAndGet:()=>AI_ChooseAndGet,AI_Face_match:()=>AI_Face_match,AI_ImageClassify:()=>AI_ImageClassify,AI_ImageClassify_Func:()=>AI_ImageClassify_Func,AI_Nlp:()=>AI_Nlp,AI_Nlp_Func:()=>AI_Nlp_Func,AI_Nlp_Func_sim:()=>AI_Nlp_Func_sim,AI_Nlp_Sim:()=>AI_Nlp_Sim,AI_Nlp_Topic:()=>AI_Nlp_Topic,AI_Nlp_newsSummary:()=>AI_Nlp_newsSummary,AI_Ocr:()=>AI_Ocr,AI_Ocr_Func:()=>AI_Ocr_Func,AI_Speech_asr:()=>AI_Speech_asr,AI_Speech_synthesis:()=>AI_Speech_synthesis,AI_audio:()=>AI_audio,AI_client:()=>AI_client,AI_photo:()=>AI_photo,AI_result:()=>AI_result});var algorithm_namespaceObject={};__webpack_require__.r(algorithm_namespaceObject),__webpack_require__.d(algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_add_path,algorithm_add_school:()=>algorithm_add_school,algorithm_all_books:()=>algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_book_scale,algorithm_check_feet:()=>algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_color_seclet,algorithm_current_school:()=>algorithm_current_school,algorithm_del_path:()=>algorithm_del_path,algorithm_delete_book:()=>algorithm_delete_book,algorithm_delete_books:()=>algorithm_delete_books,algorithm_delete_books2:()=>algorithm_delete_books2,algorithm_divide_books:()=>algorithm_divide_books,algorithm_find_path:()=>algorithm_find_path,algorithm_first_book:()=>algorithm_first_book,algorithm_fz_calc:()=>algorithm_fz_calc,algorithm_fz_calc_first_min:()=>algorithm_fz_calc_first_min,algorithm_fz_compare:()=>algorithm_fz_compare,algorithm_fz_move:()=>algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_fz_set_min,algorithm_get_book_num:()=>algorithm_get_book_num,algorithm_get_current_location:()=>algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_init_jttl,algorithm_move_recent:()=>algorithm_move_recent,algorithm_new_path:()=>algorithm_new_path,algorithm_next_book:()=>algorithm_next_book,algorithm_no_left:()=>algorithm_no_left,algorithm_no_path:()=>algorithm_no_path,algorithm_no_ring2:()=>algorithm_no_ring2,algorithm_not_home:()=>algorithm_not_home,algorithm_not_school:()=>algorithm_not_school,algorithm_number_add:()=>algorithm_number_add,algorithm_number_zero:()=>algorithm_number_zero,algorithm_prepare:()=>algorithm_prepare,algorithm_prepare2:()=>algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_print_book2,algorithm_print_divide:()=>algorithm_print_divide,algorithm_print_jttl_answer:()=>algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_print_number,algorithm_print_path:()=>algorithm_print_path,algorithm_print_path2:()=>algorithm_print_path2,algorithm_print_sequence:()=>algorithm_print_sequence,algorithm_rabbit_add:()=>algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_return_path,algorithm_set_path:()=>algorithm_set_path,algorithm_two_left:()=>algorithm_two_left,algorithm_void_path:()=>algorithm_void_path,algorithm_yes_ring2:()=>algorithm_yes_ring2,hanoi_init:()=>hanoi_init,hanoi_init_offline:()=>hanoi_init_offline,hanoi_move:()=>hanoi_move});var communicate_namespaceObject={};__webpack_require__.r(communicate_namespaceObject),__webpack_require__.d(communicate_namespaceObject,{requests_attribute:()=>requests_attribute,requests_get:()=>requests_get,requests_get_old:()=>requests_get_old,requests_method:()=>requests_method,requests_post:()=>requests_post});var cv_namespaceObject={};__webpack_require__.r(cv_namespaceObject),__webpack_require__.d(cv_namespaceObject,{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});var data_namespaceObject={};__webpack_require__.r(data_namespaceObject),__webpack_require__.d(data_namespaceObject,{array_create:()=>array_create,array_toarray:()=>array_toarray,dataframe_aggregate_func:()=>dataframe_aggregate_func,dataframe_create:()=>dataframe_create,dataframe_create_from_index:()=>dataframe_create_from_index,dataframe_create_from_one_index:()=>dataframe_create_from_one_index,dataframe_fillna:()=>dataframe_fillna,dataframe_get:()=>dataframe_get,dataframe_groupby:()=>dataframe_groupby,dataframe_head_tail:()=>dataframe_head_tail,dataframe_info:()=>dataframe_info,dataframe_median:()=>dataframe_median,dataframe_select:()=>dataframe_select,dataframe_sort_values:()=>dataframe_sort_values,matrix_multiplication:()=>matrix_multiplication,matrix_transpose:()=>matrix_transpose,numpy_argmin_template_match:()=>numpy_argmin_template_match,numpy_astype:()=>numpy_astype,numpy_c_:()=>numpy_c_,numpy_dot:()=>numpy_dot,numpy_linalg_det:()=>numpy_linalg_det,numpy_linalg_inv:()=>numpy_linalg_inv,numpy_max:()=>numpy_max,numpy_mean:()=>numpy_mean,numpy_mean_digit:()=>numpy_mean_digit,numpy_min:()=>numpy_min,numpy_ones:()=>numpy_ones,numpy_random_random:()=>numpy_random_random,numpy_reshape:()=>numpy_reshape,numpy_shape:()=>numpy_shape,numpy_size:()=>numpy_size,numpy_square:()=>numpy_square,numpy_std:()=>numpy_std,numpy_sum:()=>numpy_sum,numpy_trig:()=>numpy_trig,pandas_drop_columns:()=>pandas_drop_columns,pandas_dropna:()=>pandas_dropna,pandas_readcsv:()=>pandas_readcsv,pl_axes:()=>pl_axes,pl_bar:()=>pl_bar,pl_hist:()=>pl_hist,pl_label:()=>pl_label,pl_legend:()=>pl_legend,pl_pie:()=>pl_pie,pl_plot:()=>pl_plot,pl_plot_bar:()=>pl_plot_bar,pl_plot_easy:()=>pl_plot_easy,pl_plot_scatter:()=>pl_plot_scatter,pl_plot_xy:()=>pl_plot_xy,pl_savefig:()=>pl_savefig,pl_show:()=>pl_show,pl_subplot:()=>pl_subplot,pl_text:()=>pl_text,pl_ticks:()=>pl_ticks,pl_title:()=>pl_title,plot_axes:()=>plot_axes,plot_bar:()=>plot_bar,plot_cla:()=>plot_cla,plot_hist:()=>plot_hist,plot_label:()=>plot_label,plot_legend:()=>plot_legend,plot_pie:()=>plot_pie,plot_plot:()=>plot_plot,plot_plot_bar:()=>plot_plot_bar,plot_plot_easy:()=>plot_plot_easy,plot_plot_scatter:()=>plot_plot_scatter,plot_plot_xy:()=>plot_plot_xy,plot_savefig:()=>plot_savefig,plot_show:()=>plot_show,plot_subplot:()=>plot_subplot,plot_text:()=>plot_text,plot_ticks:()=>plot_ticks,plot_title:()=>plot_title,py_sum:()=>py_sum,pylab_imshow:()=>pylab_imshow,series_create:()=>series_create,series_create_from_index:()=>series_create_from_index,series_create_from_text:()=>series_create_from_text,series_get_num:()=>series_get_num,series_index_value:()=>series_index_value});var datastructure_namespaceObject={};__webpack_require__.r(datastructure_namespaceObject),__webpack_require__.d(datastructure_namespaceObject,{ds_add_node_by_attr:()=>ds_add_node_by_attr,ds_add_node_by_name:()=>ds_add_node_by_name,ds_create_linkedlist:()=>ds_create_linkedlist,ds_create_linkedlist_container:()=>ds_create_linkedlist_container,ds_create_linkedlist_item:()=>ds_create_linkedlist_item,ds_create_node:()=>ds_create_node,ds_del_node_by_attr:()=>ds_del_node_by_attr,ds_del_node_by_name:()=>ds_del_node_by_name,ds_get_node_attr:()=>ds_get_node_attr,ds_reverse_linkedlist:()=>ds_reverse_linkedlist,ds_set_node_attr:()=>ds_set_node_attr});var factory_namespaceObject={};__webpack_require__.r(factory_namespaceObject),__webpack_require__.d(factory_namespaceObject,{factory_block:()=>factory_block,factory_block_return:()=>factory_block_return,factory_block_return_with_textarea:()=>factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_callMethod_noreturn,factory_callMethod_return:()=>factory_callMethod_return,factory_create_with_container:()=>factory_create_with_container,factory_create_with_item:()=>factory_create_with_item,factory_declare:()=>factory_declare,factory_from_import:()=>factory_from_import,factory_function_noreturn:()=>factory_function_noreturn,factory_function_return:()=>factory_function_return,factory_import:()=>factory_import});var hardware_namespaceObject={};__webpack_require__.r(hardware_namespaceObject),__webpack_require__.d(hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_arduino_start,inout_highlow:()=>inout_highlow});var inout_namespaceObject={};__webpack_require__.r(inout_namespaceObject),__webpack_require__.d(inout_namespaceObject,{inout_input:()=>inout_input,inout_print:()=>inout_print,inout_print_container:()=>inout_print_container,inout_print_end:()=>inout_print_end,inout_print_inline:()=>inout_print_inline,inout_print_item:()=>inout_print_item,inout_print_many:()=>inout_print_many,inout_type_input:()=>inout_type_input,pyinout_type_input:()=>pyinout_type_input});var iot_namespaceObject={};__webpack_require__.r(iot_namespaceObject),__webpack_require__.d(iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>IOT_EMQX_PING,IOT_FORMATTING:()=>IOT_FORMATTING,IOT_FORMAT_STRING:()=>IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>IOT_MIXIO_UNSUBSCRIBE,iot_checkonenet:()=>iot_checkonenet,iot_client_onboard:()=>iot_client_onboard,iot_create_with_item:()=>iot_create_with_item,iot_http_client:()=>iot_http_client,iot_http_data:()=>iot_http_data,iot_mixio_check:()=>iot_mixio_check,iot_mixio_connect:()=>iot_mixio_connect,iot_mixio_connect_only:()=>iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_mixio_format_topic,iot_mixly_key:()=>iot_mixly_key,iot_mixly_key_py:()=>iot_mixly_key_py,iot_mqtt_client:()=>iot_mqtt_client,iot_mqtt_data:()=>iot_mqtt_data,iot_onenet_check:()=>iot_onenet_check,iot_onenet_connect:()=>iot_onenet_connect,iot_onenet_disconnect:()=>iot_onenet_disconnect,iot_onenet_publish:()=>iot_onenet_publish,iot_onenet_publish_dict:()=>iot_onenet_publish_dict,iot_onenetconnect:()=>iot_onenetconnect,iot_onenetdisconnect:()=>iot_onenetdisconnect,iot_publish:()=>iot_publish,iot_publish_container:()=>iot_publish_container,iot_publish_item:()=>iot_publish_item});var pins_namespaceObject={};__webpack_require__.r(pins_namespaceObject),__webpack_require__.d(pins_namespaceObject,{pins_analog_read:()=>pins_analog_read,pins_analog_write:()=>pins_analog_write,pins_digital_read:()=>pins_digital_read,pins_digital_write:()=>pins_digital_write});var serial_namespaceObject={};__webpack_require__.r(serial_namespaceObject),__webpack_require__.d(serial_namespaceObject,{serial_close:()=>serial_close,serial_open:()=>serial_open,serial_read_b:()=>serial_read_b,serial_write:()=>serial_write});var sklearn_namespaceObject={};__webpack_require__.r(sklearn_namespaceObject),__webpack_require__.d(sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_coef_intercept,sklearn_data_target:()=>sklearn_data_target,sklearn_fit:()=>sklearn_fit,sklearn_fit_no_target:()=>sklearn_fit_no_target,sklearn_load:()=>sklearn_load,sklearn_make_blobs:()=>sklearn_make_blobs,sklearn_make_classification:()=>sklearn_make_classification,sklearn_make_regression:()=>sklearn_make_regression,sklearn_predict:()=>sklearn_predict,sklearn_save_load_model:()=>sklearn_save_load_model,sklearn_score:()=>sklearn_score,sklearn_score_no_target:()=>sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_train_test_split_no_target});var system_namespaceObject={};__webpack_require__.r(system_namespaceObject),__webpack_require__.d(system_namespaceObject,{Panic_with_status_code:()=>system_Panic_with_status_code,base_delay:()=>base_delay,controls_millis:()=>system_controls_millis,controls_mstimer2:()=>controls_mstimer2,controls_mstimer2_start:()=>controls_mstimer2_start,controls_mstimer2_stop:()=>controls_mstimer2_stop,reset:()=>system_reset,time_localtime:()=>time_localtime,time_sleep:()=>system_time_sleep});var turtle_namespaceObject={};__webpack_require__.r(turtle_namespaceObject),__webpack_require__.d(turtle_namespaceObject,{turtle_bgcolor:()=>turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_bgcolor_hex_new,turtle_circle:()=>turtle_circle,turtle_circle_advanced:()=>turtle_circle_advanced,turtle_clear:()=>turtle_clear,turtle_clone:()=>turtle_clone,turtle_color:()=>turtle_color,turtle_color_hex:()=>turtle_color_hex,turtle_color_seclet:()=>turtle_color_seclet,turtle_create:()=>turtle_create,turtle_done:()=>turtle_done,turtle_exitonclick:()=>turtle_exitonclick,turtle_fill:()=>turtle_fill,turtle_fillcolor:()=>turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_getscreen,turtle_goto:()=>turtle_goto,turtle_listen:()=>turtle_listen,turtle_move:()=>turtle_move,turtle_numinput:()=>turtle_numinput,turtle_onclick:()=>turtle_onclick,turtle_onkey:()=>turtle_onkey,turtle_ontimer:()=>turtle_ontimer,turtle_pencolor:()=>turtle_pencolor,turtle_pencolor_hex:()=>turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_pencolor_hex_new,turtle_penup:()=>turtle_penup,turtle_pos_shape:()=>turtle_pos_shape,turtle_rotate:()=>turtle_rotate,turtle_screen_delay:()=>turtle_screen_delay,turtle_screen_savefig:()=>turtle_screen_savefig,turtle_setheading:()=>turtle_setheading,turtle_setxy:()=>turtle_setxy,turtle_shape:()=>turtle_shape,turtle_shapesize:()=>turtle_shapesize,turtle_size:()=>turtle_size,turtle_size_speed:()=>turtle_size_speed,turtle_speed:()=>turtle_speed,turtle_textinput:()=>turtle_textinput,turtle_visible:()=>turtle_visible,turtle_write:()=>turtle_write,turtle_write_format:()=>turtle_write_format,turtle_write_format_skulpt:()=>turtle_write_format_skulpt});var generators_ai_namespaceObject={};__webpack_require__.r(generators_ai_namespaceObject),__webpack_require__.d(generators_ai_namespaceObject,{AI_ChooseAndGet:()=>ai_AI_ChooseAndGet,AI_Face_match:()=>ai_AI_Face_match,AI_ImageClassify:()=>ai_AI_ImageClassify,AI_ImageClassify_Func:()=>ai_AI_ImageClassify_Func,AI_Nlp:()=>ai_AI_Nlp,AI_Nlp_Func:()=>ai_AI_Nlp_Func,AI_Nlp_Func_sim:()=>ai_AI_Nlp_Func_sim,AI_Nlp_Sim:()=>ai_AI_Nlp_Sim,AI_Nlp_Topic:()=>ai_AI_Nlp_Topic,AI_Nlp_newsSummary:()=>ai_AI_Nlp_newsSummary,AI_Ocr:()=>ai_AI_Ocr,AI_Ocr_Func:()=>ai_AI_Ocr_Func,AI_Speech_asr:()=>ai_AI_Speech_asr,AI_Speech_synthesis:()=>ai_AI_Speech_synthesis,AI_audio:()=>ai_AI_audio,AI_client:()=>ai_AI_client,AI_photo:()=>ai_AI_photo,AI_result:()=>ai_AI_result});var generators_algorithm_namespaceObject={};__webpack_require__.r(generators_algorithm_namespaceObject),__webpack_require__.d(generators_algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_algorithm_add_path,algorithm_add_school:()=>algorithm_algorithm_add_school,algorithm_all_books:()=>algorithm_algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_algorithm_book_scale,algorithm_check_feet:()=>algorithm_algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_algorithm_color_seclet,algorithm_current_school:()=>algorithm_algorithm_current_school,algorithm_del_path:()=>algorithm_algorithm_del_path,algorithm_delete_book:()=>algorithm_algorithm_delete_book,algorithm_divide_books:()=>algorithm_algorithm_divide_books,algorithm_find_path:()=>algorithm_algorithm_find_path,algorithm_first_book:()=>algorithm_algorithm_first_book,algorithm_fz_calc:()=>algorithm_algorithm_fz_calc,algorithm_fz_compare:()=>algorithm_algorithm_fz_compare,algorithm_fz_move:()=>algorithm_algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_algorithm_fz_set_min,algorithm_get_current_location:()=>algorithm_algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_algorithm_init_jttl,algorithm_move_recent:()=>algorithm_algorithm_move_recent,algorithm_new_path:()=>algorithm_algorithm_new_path,algorithm_next_book:()=>algorithm_algorithm_next_book,algorithm_no_left:()=>algorithm_algorithm_no_left,algorithm_no_path:()=>algorithm_algorithm_no_path,algorithm_no_ring2:()=>algorithm_algorithm_no_ring2,algorithm_not_home:()=>algorithm_algorithm_not_home,algorithm_not_school:()=>algorithm_algorithm_not_school,algorithm_number_add:()=>algorithm_algorithm_number_add,algorithm_number_zero:()=>algorithm_algorithm_number_zero,algorithm_prepare:()=>algorithm_algorithm_prepare,algorithm_prepare2:()=>algorithm_algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_algorithm_print_book2,algorithm_print_jttl_answer:()=>algorithm_algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_algorithm_print_number,algorithm_print_path:()=>algorithm_algorithm_print_path,algorithm_print_path2:()=>algorithm_algorithm_print_path2,algorithm_rabbit_add:()=>algorithm_algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_algorithm_return_path,algorithm_set_path:()=>algorithm_algorithm_set_path,algorithm_two_left:()=>algorithm_algorithm_two_left,algorithm_void_path:()=>algorithm_algorithm_void_path,algorithm_yes_ring2:()=>algorithm_algorithm_yes_ring2,hanoi_init:()=>algorithm_hanoi_init,hanoi_init_offline:()=>algorithm_hanoi_init_offline,hanoi_move:()=>algorithm_hanoi_move});var generators_communicate_namespaceObject={};__webpack_require__.r(generators_communicate_namespaceObject),__webpack_require__.d(generators_communicate_namespaceObject,{requests_attribute:()=>communicate_requests_attribute,requests_get:()=>communicate_requests_get,requests_get_old:()=>communicate_requests_get_old,requests_method:()=>communicate_requests_method,requests_post:()=>communicate_requests_post});var generators_data_namespaceObject={};__webpack_require__.r(generators_data_namespaceObject),__webpack_require__.d(generators_data_namespaceObject,{array_create:()=>data_array_create,array_toarray:()=>data_array_toarray,dataframe_aggregate_func:()=>data_dataframe_aggregate_func,dataframe_create:()=>data_dataframe_create,dataframe_create_from_index:()=>data_dataframe_create_from_index,dataframe_create_from_one_index:()=>data_dataframe_create_from_one_index,dataframe_fillna:()=>data_dataframe_fillna,dataframe_get:()=>data_dataframe_get,dataframe_groupby:()=>data_dataframe_groupby,dataframe_head_tail:()=>data_dataframe_head_tail,dataframe_info:()=>data_dataframe_info,dataframe_median:()=>data_dataframe_median,dataframe_select:()=>data_dataframe_select,dataframe_sort_values:()=>data_dataframe_sort_values,matrix_multiplication:()=>data_matrix_multiplication,matrix_transpose:()=>data_matrix_transpose,numpy_argmin_template_match:()=>data_numpy_argmin_template_match,numpy_astype:()=>data_numpy_astype,numpy_c_:()=>data_numpy_c_,numpy_dot:()=>data_numpy_dot,numpy_linalg_det:()=>data_numpy_linalg_det,numpy_linalg_inv:()=>data_numpy_linalg_inv,numpy_max:()=>data_numpy_max,numpy_mean:()=>data_numpy_mean,numpy_mean_digit:()=>data_numpy_mean_digit,numpy_min:()=>data_numpy_min,numpy_ones:()=>data_numpy_ones,numpy_random_random:()=>data_numpy_random_random,numpy_reshape:()=>data_numpy_reshape,numpy_shape:()=>data_numpy_shape,numpy_size:()=>data_numpy_size,numpy_square:()=>data_numpy_square,numpy_std:()=>data_numpy_std,numpy_sum:()=>data_numpy_sum,numpy_trig:()=>data_numpy_trig,pandas_drop_columns:()=>data_pandas_drop_columns,pandas_dropna:()=>data_pandas_dropna,pandas_readcsv:()=>data_pandas_readcsv,pl_axes:()=>data_pl_axes,pl_bar:()=>data_pl_bar,pl_hist:()=>data_pl_hist,pl_label:()=>data_pl_label,pl_legend:()=>data_pl_legend,pl_pie:()=>data_pl_pie,pl_plot:()=>data_pl_plot,pl_plot_bar:()=>data_pl_plot_bar,pl_plot_easy:()=>data_pl_plot_easy,pl_plot_scatter:()=>data_pl_plot_scatter,pl_plot_xy:()=>data_pl_plot_xy,pl_savefig:()=>data_pl_savefig,pl_show:()=>data_pl_show,pl_subplot:()=>data_pl_subplot,pl_text:()=>data_pl_text,pl_ticks:()=>data_pl_ticks,pl_title:()=>data_pl_title,plot_axes:()=>data_plot_axes,plot_bar:()=>data_plot_bar,plot_cla:()=>data_plot_cla,plot_hist:()=>data_plot_hist,plot_label:()=>data_plot_label,plot_legend:()=>data_plot_legend,plot_pie:()=>data_plot_pie,plot_plot:()=>data_plot_plot,plot_plot_bar:()=>data_plot_plot_bar,plot_plot_easy:()=>data_plot_plot_easy,plot_plot_scatter:()=>data_plot_plot_scatter,plot_plot_xy:()=>data_plot_plot_xy,plot_savefig:()=>data_plot_savefig,plot_show:()=>data_plot_show,plot_subplot:()=>data_plot_subplot,plot_text:()=>data_plot_text,plot_ticks:()=>data_plot_ticks,plot_title:()=>data_plot_title,py_sum:()=>data_py_sum,pylab_imshow:()=>data_pylab_imshow,series_create:()=>data_series_create,series_create_from_index:()=>data_series_create_from_index,series_create_from_text:()=>data_series_create_from_text,series_get_num:()=>data_series_get_num,series_index_value:()=>data_series_index_value});var generators_datastructure_namespaceObject={};__webpack_require__.r(generators_datastructure_namespaceObject),__webpack_require__.d(generators_datastructure_namespaceObject,{ds_add_node_by_attr:()=>datastructure_ds_add_node_by_attr,ds_add_node_by_name:()=>datastructure_ds_add_node_by_name,ds_create_linkedlist:()=>datastructure_ds_create_linkedlist,ds_create_node:()=>datastructure_ds_create_node,ds_del_node_by_attr:()=>datastructure_ds_del_node_by_attr,ds_del_node_by_name:()=>datastructure_ds_del_node_by_name,ds_get_node_attr:()=>datastructure_ds_get_node_attr,ds_reverse_linkedlist:()=>datastructure_ds_reverse_linkedlist,ds_set_node_attr:()=>datastructure_ds_set_node_attr});var generators_factory_namespaceObject={};__webpack_require__.r(generators_factory_namespaceObject),__webpack_require__.d(generators_factory_namespaceObject,{factory_block:()=>factory_factory_block,factory_block_return:()=>factory_factory_block_return,factory_block_return_with_textarea:()=>factory_factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_factory_callMethod_noreturn,factory_callMethod_return:()=>factory_factory_callMethod_return,factory_declare:()=>factory_factory_declare,factory_from_import:()=>factory_factory_from_import,factory_function_noreturn:()=>factory_factory_function_noreturn,factory_function_return:()=>factory_factory_function_return,factory_import:()=>factory_factory_import});var generators_hardware_namespaceObject={};__webpack_require__.r(generators_hardware_namespaceObject),__webpack_require__.d(generators_hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_hardware_arduino_start,inout_highlow:()=>hardware_inout_highlow});var generators_inout_namespaceObject={};__webpack_require__.r(generators_inout_namespaceObject),__webpack_require__.d(generators_inout_namespaceObject,{inout_input:()=>inout_inout_input,inout_print:()=>inout_inout_print,inout_print_end:()=>inout_inout_print_end,inout_print_inline:()=>inout_inout_print_inline,inout_print_many:()=>inout_inout_print_many,inout_type_input:()=>inout_inout_type_input,pyinout_type_input:()=>inout_pyinout_type_input});var generators_iot_namespaceObject={};__webpack_require__.r(generators_iot_namespaceObject),__webpack_require__.d(generators_iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>iot_IOT_EMQX_PING,IOT_FORMATTING:()=>iot_IOT_FORMATTING,IOT_FORMAT_STRING:()=>iot_IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>iot_IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>iot_IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>iot_IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>iot_IOT_MIXIO_UNSUBSCRIBE,iot_mixio_check:()=>iot_iot_mixio_check,iot_mixio_connect:()=>iot_iot_mixio_connect,iot_mixio_connect_only:()=>iot_iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_iot_mixio_format_topic,iot_mixly_key:()=>iot_iot_mixly_key,iot_mixly_key_py:()=>iot_iot_mixly_key_py});var generators_pins_namespaceObject={};__webpack_require__.r(generators_pins_namespaceObject),__webpack_require__.d(generators_pins_namespaceObject,{pins_analog_read:()=>pins_pins_analog_read,pins_analog_write:()=>pins_pins_analog_write,pins_digital:()=>pins_digital,pins_digital_read:()=>pins_pins_digital_read,pins_digital_write:()=>pins_pins_digital_write});var generators_serial_namespaceObject={};__webpack_require__.r(generators_serial_namespaceObject),__webpack_require__.d(generators_serial_namespaceObject,{serial_close:()=>serial_serial_close,serial_open:()=>serial_serial_open,serial_read_b:()=>serial_serial_read_b,serial_write:()=>serial_serial_write});var generators_sklearn_namespaceObject={};__webpack_require__.r(generators_sklearn_namespaceObject),__webpack_require__.d(generators_sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_sklearn_coef_intercept,sklearn_data_target:()=>sklearn_sklearn_data_target,sklearn_fit:()=>sklearn_sklearn_fit,sklearn_fit_no_target:()=>sklearn_sklearn_fit_no_target,sklearn_load:()=>sklearn_sklearn_load,sklearn_make_blobs:()=>sklearn_sklearn_make_blobs,sklearn_make_classification:()=>sklearn_sklearn_make_classification,sklearn_make_regression:()=>sklearn_sklearn_make_regression,sklearn_predict:()=>sklearn_sklearn_predict,sklearn_save_load_model:()=>sklearn_sklearn_save_load_model,sklearn_score:()=>sklearn_sklearn_score,sklearn_score_no_target:()=>sklearn_sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_sklearn_train_test_split_no_target});var generators_system_namespaceObject={};__webpack_require__.r(generators_system_namespaceObject),__webpack_require__.d(generators_system_namespaceObject,{controls_end_program:()=>system_controls_end_program,controls_millis:()=>generators_system_controls_millis,time_localtime:()=>system_time_localtime});var generators_turtle_namespaceObject={};__webpack_require__.r(generators_turtle_namespaceObject),__webpack_require__.d(generators_turtle_namespaceObject,{turtle_bgcolor:()=>turtle_turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_turtle_bgcolor_hex_new,turtle_circle:()=>turtle_turtle_circle,turtle_circle_advanced:()=>turtle_turtle_circle_advanced,turtle_clear:()=>turtle_turtle_clear,turtle_clone:()=>turtle_turtle_clone,turtle_color:()=>turtle_turtle_color,turtle_color_hex:()=>turtle_turtle_color_hex,turtle_color_seclet:()=>turtle_turtle_color_seclet,turtle_create:()=>turtle_turtle_create,turtle_done:()=>turtle_turtle_done,turtle_exitonclick:()=>turtle_turtle_exitonclick,turtle_fill:()=>turtle_turtle_fill,turtle_fillcolor:()=>turtle_turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_turtle_getscreen,turtle_goto:()=>turtle_turtle_goto,turtle_listen:()=>turtle_turtle_listen,turtle_move:()=>turtle_turtle_move,turtle_numinput:()=>turtle_turtle_numinput,turtle_onclick:()=>turtle_turtle_onclick,turtle_onkey:()=>turtle_turtle_onkey,turtle_ontimer:()=>turtle_turtle_ontimer,turtle_pencolor:()=>turtle_turtle_pencolor,turtle_pencolor_hex:()=>turtle_turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_turtle_pencolor_hex_new,turtle_penup:()=>turtle_turtle_penup,turtle_pos_shape:()=>turtle_turtle_pos_shape,turtle_rotate:()=>turtle_turtle_rotate,turtle_screen_delay:()=>turtle_turtle_screen_delay,turtle_screen_savefig:()=>turtle_turtle_screen_savefig,turtle_setheading:()=>turtle_turtle_setheading,turtle_setxy:()=>turtle_turtle_setxy,turtle_shape:()=>turtle_turtle_shape,turtle_shapesize:()=>turtle_turtle_shapesize,turtle_size:()=>turtle_turtle_size,turtle_size_speed:()=>turtle_turtle_size_speed,turtle_speed:()=>turtle_turtle_speed,turtle_textinput:()=>turtle_turtle_textinput,turtle_visible:()=>turtle_turtle_visible,turtle_write:()=>turtle_turtle_write,turtle_write_format:()=>turtle_turtle_write_format,turtle_write_format_skulpt:()=>turtle_turtle_write_format_skulpt});const external_Blockly_namespaceObject=Blockly,ZhHansMsg={PYTHON_PYODIDE_IMAGE:"图像"},ZhHansCatgories={},ZhHantMsg={PYTHON_PYODIDE_IMAGE:"影像"},ZhHantCatgories={},EnMsg={PYTHON_PYODIDE_IMAGE:"Image"},EnCatgories={};Object.assign(external_Blockly_namespaceObject.Lang.ZhHans,ZhHansMsg),Object.assign(external_Blockly_namespaceObject.Lang.ZhHant,ZhHantMsg),Object.assign(external_Blockly_namespaceObject.Lang.En,EnMsg),Object.assign(external_Blockly_namespaceObject.Lang.ZhHans.MSG,ZhHansCatgories),Object.assign(external_Blockly_namespaceObject.Lang.ZhHant.MSG,ZhHantCatgories),Object.assign(external_Blockly_namespaceObject.Lang.En.MSG,EnCatgories);const external_Mixly_namespaceObject=Mixly,Variables={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 n=Object.create(null),a=0;a1&&(s+=a)):n=s}else n="i";return n}},variables=Variables; +(()=>{"use strict";var __webpack_modules__={936:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.imread("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_show_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imshow("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_write_image=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.imwrite("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+","+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},cv_waitkey=function(e,t){return t.definitions_.import_cv2="import cv2","cv2.waitKey("+t.valueToCode(this,"data",t.ORDER_ATOMIC)+")\n"},cv_destroy_all=function(e,t){t.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(e,t){return t.definitions_.import_cv2="import cv2",["cv2.CascadeClassifier("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},cv_face_detect_all=function(e,t){t.definitions_.import_cv2="import cv2";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return[t.valueToCode(this,"FACE",t.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+t.valueToCode(this,"SCALE",t.ORDER_ATOMIC)+",minNeighbors="+t.valueToCode(this,"NEIGHBOR",t.ORDER_ATOMIC)+",minSize=("+t.valueToCode(this,"x1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y1",t.ORDER_ATOMIC)+"),maxSize=("+t.valueToCode(this,"x2",t.ORDER_ATOMIC)+","+t.valueToCode(this,"y2",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]}},9610:(e,t,n)=>{n.d(t,{D:()=>a});var a=function(){function e(e){var t=this;void 0===e&&(e=!1),this.ignoreMultipleSettles=e,this.isSettled=!1,this.promise=new Promise((function(e,n){t.resolveCallback=e,t.rejectCallback=n}))}return e.prototype.markAsSettled=function(){var e=this.isSettled;if(e&&!this.ignoreMultipleSettles)throw new Error("PromiseDelegate is already settled!");return this.isSettled=!0,!e},Object.defineProperty(e.prototype,"settled",{get:function(){return this.isSettled},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this.markAsSettled()&&this.resolveCallback(e)},e.prototype.reject=function(e){this.markAsSettled()&&this.rejectCallback(e)},e}()},6944:e=>{e.exports=path}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);__webpack_require__.r(n);var a={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var _=2&t&&e;"object"==typeof _&&!~leafPrototypes.indexOf(_);_=getProto(_))Object.getOwnPropertyNames(_).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,__webpack_require__.d(n,a),n},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,n)=>(__webpack_require__.f[n](e,t),t)),[])),__webpack_require__.u=e=>e+".bundle.js",__webpack_require__.miniCssF=e=>"styles/"+e+".45554be0.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="@mixly/python-pyodide:",__webpack_require__.l=(e,t,n,a)=>{if(inProgress[e])inProgress[e].push(t);else{var _,l;if(void 0!==n)for(var s=document.getElementsByTagName("script"),i=0;i{_.onerror=_.onload=null,clearTimeout(p);var a=inProgress[e];if(delete inProgress[e],_.parentNode&&_.parentNode.removeChild(_),a&&a.forEach((e=>e(n))),t)return t(n)},p=setTimeout(r.bind(null,void 0,{type:"timeout",target:_}),12e4);_.onerror=r.bind(null,_.onerror),_.onload=r.bind(null,_.onload),l&&document.head.appendChild(_)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((t,n)=>{var a=__webpack_require__.miniCssF(e),_=__webpack_require__.p+a;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),a=0;a{var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",__webpack_require__.nc&&(l.nonce=__webpack_require__.nc),l.onerror=l.onload=n=>{if(l.onerror=l.onload=null,"load"===n.type)a();else{var s=n&&n.type,i=n&&n.target&&n.target.href||t,o=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+i+")");o.name="ChunkLoadError",o.code="CSS_CHUNK_LOAD_FAILED",o.type=s,o.request=i,l.parentNode&&l.parentNode.removeChild(l),_(o)}},l.href=t,n?n.parentNode.insertBefore(l,n.nextSibling):document.head.appendChild(l)})(e,_,null,t,n)})),t={792:0};__webpack_require__.f.miniCss=(n,a)=>{t[n]?a.push(t[n]):0!==t[n]&&{317:1}[n]&&a.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))}}})(),(()=>{var e={792:0};__webpack_require__.f.j=(t,n)=>{var a=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var _=new Promise(((n,_)=>a=e[t]=[n,_]));n.push(a[2]=_);var l=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(l,(n=>{if(__webpack_require__.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var _=n&&("load"===n.type?"missing":n.type),l=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+_+": "+l+")",s.name="ChunkLoadError",s.type=_,s.request=l,a[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var a,_,[l,s,i]=n,o=0;if(l.some((t=>0!==e[t]))){for(a in s)__webpack_require__.o(s,a)&&(__webpack_require__.m[a]=s[a]);if(i)i(__webpack_require__)}for(t&&t(n);ocontrols_type,controls_typeLists:()=>controls_typeLists,lists_zip:()=>lists_zip,lists_zip_container:()=>lists_zip_container,lists_zip_item:()=>lists_zip_item,unpack_iterable_object:()=>unpack_iterable_object,variables_change:()=>variables_change,variables_get:()=>variables_get,variables_global:()=>variables_global,variables_set:()=>variables_set});var control_namespaceObject={};__webpack_require__.r(control_namespaceObject),__webpack_require__.d(control_namespaceObject,{base_setup:()=>base_setup,controls_delay:()=>controls_delay,controls_end_program:()=>controls_end_program,controls_except:()=>controls_except,controls_finally:()=>controls_finally,controls_flow_statements:()=>controls_flow_statements,controls_for:()=>controls_for,controls_forEach:()=>controls_forEach,controls_for_range:()=>controls_for_range,controls_if:()=>controls_if,controls_if_else:()=>controls_if_else,controls_if_elseif:()=>controls_if_elseif,controls_if_if:()=>controls_if_if,controls_lambda:()=>controls_lambda,controls_main:()=>controls_main,controls_pass:()=>controls_pass,controls_range:()=>controls_range,controls_repeat_ext:()=>controls_repeat_ext,controls_thread:()=>controls_thread,controls_try:()=>controls_try,controls_try_finally:()=>controls_try_finally,controls_whileUntil:()=>controls_whileUntil,datetime_fromtimestamp:()=>datetime_fromtimestamp,do_while:()=>do_while,garbage_collection:()=>garbage_collection,get_mem_alloc:()=>get_mem_alloc,get_mem_free:()=>get_mem_free,get_unique_identifier:()=>get_unique_identifier});var math_namespaceObject={};__webpack_require__.r(math_namespaceObject),__webpack_require__.d(math_namespaceObject,{base_map:()=>base_map,math_arithmetic:()=>math_arithmetic,math_bit:()=>math_bit,math_constant:()=>math_constant,math_constant_mp:()=>math_constant_mp,math_constrain:()=>math_constrain,math_dec:()=>math_dec,math_indexer_number:()=>math_indexer_number,math_map:()=>math_map,math_max_min:()=>math_max_min,math_number:()=>math_number,math_number_base_conversion:()=>math_number_base_conversion,math_random:()=>math_random,math_random_seed:()=>math_random_seed,math_round:()=>math_round,math_selfcalcu:()=>math_selfcalcu,math_to_int:()=>math_to_int,math_trig:()=>math_trig,text_to_number:()=>text_to_number,text_to_number_skulpt:()=>text_to_number_skulpt,turn_to_int:()=>turn_to_int});var text_namespaceObject={};__webpack_require__.r(text_namespaceObject),__webpack_require__.d(text_namespaceObject,{ascii_to_char:()=>ascii_to_char,char_to_ascii:()=>char_to_ascii,number_to_text:()=>number_to_text,os_system:()=>os_system,text:()=>text_text,text_capital:()=>text_capital,text_center:()=>text_center,text_char:()=>text_char,text_char_at:()=>text_char_at,text_char_at2:()=>text_char_at2,text_char_at3:()=>text_char_at3,text_compareTo:()=>text_compareTo,text_compare_to:()=>text_compare_to,text_create_with_container:()=>text_create_with_container,text_create_with_item:()=>text_create_with_item,text_encode:()=>text_encode,text_equals_starts_ends:()=>text_equals_starts_ends,text_eval:()=>text_eval,text_find:()=>text_find,text_format:()=>text_format,text_format_noreturn:()=>text_format_noreturn,text_join:()=>text_join,text_join_seq:()=>text_join_seq,text_length:()=>text_length,text_random_char:()=>text_random_char,text_replace:()=>text_replace,text_split:()=>text_split,text_strip:()=>text_strip,text_substring:()=>text_substring,text_substring2:()=>text_substring2,text_substring3:()=>text_substring3,text_textarea:()=>text_textarea});var lists_namespaceObject={};__webpack_require__.r(lists_namespaceObject),__webpack_require__.d(lists_namespaceObject,{ENUMERATE:()=>ENUMERATE,enumerate:()=>enumerate,list_many_input:()=>list_many_input,list_tolist:()=>list_tolist,list_tolist2:()=>list_tolist2,list_trig:()=>list_trig,lists_2d_get_col_row_data:()=>lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_append_extend,lists_change_to:()=>lists_change_to,lists_change_to_general:()=>lists_change_to_general,lists_clear:()=>lists_clear,lists_create_with:()=>lists_create_with,lists_create_with2:()=>lists_create_with2,lists_create_with_container:()=>lists_create_with_container,lists_create_with_item:()=>lists_create_with_item,lists_create_with_noreturn:()=>lists_create_with_noreturn,lists_create_with_text:()=>lists_create_with_text,lists_create_with_text2:()=>lists_create_with_text2,lists_del_general:()=>lists_del_general,lists_find:()=>lists_find,lists_getIndex3:()=>lists_getIndex3,lists_getSublist3:()=>lists_getSublist3,lists_get_index:()=>lists_get_index,lists_get_random_item:()=>lists_get_random_item,lists_get_random_sublist:()=>lists_get_random_sublist,lists_get_sublist:()=>lists_get_sublist,lists_insert_value:()=>lists_insert_value,lists_insert_value2:()=>lists_insert_value2,lists_pop:()=>lists_pop,lists_remove_at:()=>lists_remove_at,lists_remove_at2:()=>lists_remove_at2,lists_reverse:()=>lists_reverse,lists_setIndex3:()=>lists_setIndex3,lists_set_index:()=>lists_set_index,lists_sort:()=>lists_sort});var dicts_namespaceObject={};__webpack_require__.r(dicts_namespaceObject),__webpack_require__.d(dicts_namespaceObject,{dicts_add_change_del:()=>dicts_add_change_del,dicts_add_or_change:()=>dicts_add_or_change,dicts_clear:()=>dicts_clear,dicts_create_with:()=>dicts_create_with,dicts_create_with_container:()=>dicts_create_with_container,dicts_create_with_item:()=>dicts_create_with_item,dicts_create_with_noreturn:()=>dicts_create_with_noreturn,dicts_deldict:()=>dicts_deldict,dicts_delete:()=>dicts_delete,dicts_get:()=>dicts_get,dicts_get_default:()=>dicts_get_default,dicts_items:()=>dicts_items,dicts_keys:()=>dicts_keys,dicts_length:()=>dicts_length,dicts_pop:()=>dicts_pop,dicts_setdefault:()=>dicts_setdefault,dicts_to_json:()=>dicts_to_json,dicts_todict:()=>dicts_todict,dicts_update:()=>dicts_update,dicts_values:()=>dicts_values,json_to_dicts:()=>json_to_dicts});var logic_namespaceObject={};__webpack_require__.r(logic_namespaceObject),__webpack_require__.d(logic_namespaceObject,{logic_boolean:()=>logic_boolean,logic_compare:()=>logic_compare,logic_compare_continous:()=>logic_compare_continous,logic_is:()=>logic_is,logic_is_in:()=>logic_is_in,logic_negate:()=>logic_negate,logic_null:()=>logic_null,logic_operation:()=>logic_operation,logic_tobool:()=>logic_tobool,logic_true_or_false:()=>logic_true_or_false});var storage_namespaceObject={};__webpack_require__.r(storage_namespaceObject),__webpack_require__.d(storage_namespaceObject,{sdcard_mount:()=>sdcard_mount,sdcard_use_spi_init:()=>sdcard_use_spi_init,storage_can_write_ornot:()=>storage_can_write_ornot,storage_change_dir:()=>storage_change_dir,storage_close_file:()=>storage_close_file,storage_delete_file:()=>storage_delete_file,storage_file_seek:()=>storage_file_seek,storage_file_tell:()=>storage_file_tell,storage_file_write:()=>storage_file_write,storage_fileopen:()=>storage_fileopen,storage_fileopen_new:()=>storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_fileopen_new_encoding,storage_get_a_line:()=>storage_get_a_line,storage_get_contents:()=>storage_get_contents,storage_get_contents_without_para:()=>storage_get_contents_without_para,storage_get_current_dir:()=>storage_get_current_dir,storage_get_file_size:()=>storage_get_file_size,storage_get_filename:()=>storage_get_filename,storage_is_file:()=>storage_is_file,storage_list_all_files:()=>storage_list_all_files,storage_make_dir:()=>storage_make_dir,storage_open_file_with_os:()=>storage_open_file_with_os,storage_rename:()=>storage_rename});var blocks_procedures_namespaceObject={};__webpack_require__.r(blocks_procedures_namespaceObject),__webpack_require__.d(blocks_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_callnoreturn,procedures_callreturn:()=>procedures_callreturn,procedures_defnoreturn:()=>procedures_defnoreturn,procedures_defreturn:()=>procedures_defreturn,procedures_ifreturn:()=>procedures_ifreturn,procedures_mutatorarg:()=>procedures_mutatorarg,procedures_mutatorcontainer:()=>procedures_mutatorcontainer,procedures_return:()=>procedures_return});var tuple_namespaceObject={};__webpack_require__.r(tuple_namespaceObject),__webpack_require__.d(tuple_namespaceObject,{tuple_change_to:()=>tuple_change_to,tuple_create_with:()=>tuple_create_with,tuple_create_with_container:()=>tuple_create_with_container,tuple_create_with_item:()=>tuple_create_with_item,tuple_create_with_noreturn:()=>tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_create_with_text_return,tuple_del:()=>tuple_del,tuple_find:()=>tuple_find,tuple_getIndex:()=>tuple_getIndex,tuple_getSublist:()=>tuple_getSublist,tuple_get_random_item:()=>tuple_get_random_item,tuple_get_sublist:()=>tuple_get_sublist,tuple_join:()=>tuple_join,tuple_length:()=>tuple_length,tuple_max:()=>tuple_max,tuple_totuple:()=>tuple_totuple,tuple_trig:()=>tuple_trig});var set_namespaceObject={};__webpack_require__.r(set_namespaceObject),__webpack_require__.d(set_namespaceObject,{set_add_discard:()=>set_add_discard,set_clear:()=>set_clear,set_create_with:()=>set_create_with,set_create_with_container:()=>set_create_with_container,set_create_with_item:()=>set_create_with_item,set_create_with_text_return:()=>set_create_with_text_return,set_length:()=>set_length,set_operate:()=>set_operate,set_operate_update:()=>set_operate_update,set_pop:()=>set_pop,set_sub:()=>set_sub,set_toset:()=>set_toset,set_update:()=>set_update});var html_namespaceObject={};__webpack_require__.r(html_namespaceObject),__webpack_require__.d(html_namespaceObject,{html_content:()=>html_content,html_content_more:()=>html_content_more,html_document:()=>html_document,html_form:()=>html_form,html_head_body:()=>html_head_body,html_style:()=>html_style,html_style_color:()=>html_style_color,html_style_content:()=>html_style_content,html_text:()=>html_text,html_title:()=>html_title});var utility_namespaceObject={};__webpack_require__.r(utility_namespaceObject),__webpack_require__.d(utility_namespaceObject,{attribute_access:()=>attribute_access,function_call:()=>function_call,function_call_container:()=>function_call_container,function_call_item:()=>function_call_item,raw_block:()=>raw_block,raw_empty:()=>raw_empty,raw_expression:()=>raw_expression,raw_table:()=>raw_table,text_comment:()=>text_comment,text_print_multiple:()=>text_print_multiple,text_print_multiple_container:()=>text_print_multiple_container,text_print_multiple_item:()=>text_print_multiple_item,type_check:()=>type_check});var generators_variables_namespaceObject={};__webpack_require__.r(generators_variables_namespaceObject),__webpack_require__.d(generators_variables_namespaceObject,{controls_type:()=>variables_controls_type,controls_typeLists:()=>variables_controls_typeLists,lists_zip:()=>variables_lists_zip,unpack_iterable_object:()=>variables_unpack_iterable_object,variables_change:()=>variables_variables_change,variables_get:()=>variables_variables_get,variables_global:()=>variables_variables_global,variables_set:()=>variables_variables_set});var generators_control_namespaceObject={};__webpack_require__.r(generators_control_namespaceObject),__webpack_require__.d(generators_control_namespaceObject,{Panic_with_status_code:()=>Panic_with_status_code,base_setup:()=>control_base_setup,controls_delay:()=>control_controls_delay,controls_flow_statements:()=>control_controls_flow_statements,controls_for:()=>control_controls_for,controls_forEach:()=>control_controls_forEach,controls_for_range:()=>control_controls_for_range,controls_if:()=>control_controls_if,controls_interrupts:()=>controls_interrupts,controls_lambda:()=>control_controls_lambda,controls_main:()=>control_controls_main,controls_millis:()=>controls_millis,controls_nointerrupts:()=>controls_nointerrupts,controls_pass:()=>control_controls_pass,controls_range:()=>control_controls_range,controls_repeat:()=>controls_repeat,controls_repeat_ext:()=>control_controls_repeat_ext,controls_thread:()=>control_controls_thread,controls_try_finally:()=>control_controls_try_finally,controls_whileUntil:()=>control_controls_whileUntil,datetime_fromtimestamp:()=>control_datetime_fromtimestamp,do_while:()=>control_do_while,garbage_collection:()=>control_garbage_collection,get_mem_alloc:()=>control_get_mem_alloc,get_mem_free:()=>control_get_mem_free,get_unique_identifier:()=>control_get_unique_identifier,reset:()=>control_reset,time_sleep:()=>time_sleep});var generators_math_namespaceObject={};__webpack_require__.r(generators_math_namespaceObject),__webpack_require__.d(generators_math_namespaceObject,{base_map:()=>math_base_map,math_arithmetic:()=>math_math_arithmetic,math_bit:()=>math_math_bit,math_constant:()=>math_math_constant,math_constant_mp:()=>math_math_constant_mp,math_constrain:()=>math_math_constrain,math_dec:()=>math_math_dec,math_indexer_number:()=>math_math_indexer_number,math_map:()=>math_math_map,math_max_min:()=>math_math_max_min,math_number:()=>math_math_number,math_number_base_conversion:()=>math_math_number_base_conversion,math_random:()=>math_math_random,math_random_seed:()=>math_math_random_seed,math_round:()=>math_math_round,math_selfcalcu:()=>math_math_selfcalcu,math_single:()=>math_single,math_to_int:()=>math_math_to_int,math_trig:()=>math_math_trig,text_to_number:()=>math_text_to_number,text_to_number_skulpt:()=>math_text_to_number_skulpt,turn_to_int:()=>math_turn_to_int});var generators_text_namespaceObject={};__webpack_require__.r(generators_text_namespaceObject),__webpack_require__.d(generators_text_namespaceObject,{ascii_to_char:()=>text_ascii_to_char,char_to_ascii:()=>text_char_to_ascii,number_to_text:()=>text_number_to_text,os_system:()=>text_os_system,text:()=>generators_text_text,text_capital:()=>text_text_capital,text_center:()=>text_text_center,text_char:()=>text_text_char,text_char_at:()=>text_text_char_at,text_char_at2:()=>text_text_char_at2,text_char_at3:()=>text_text_char_at3,text_compareTo:()=>text_text_compareTo,text_compare_to:()=>text_text_compare_to,text_encode:()=>text_text_encode,text_equals_starts_ends:()=>text_text_equals_starts_ends,text_eval:()=>text_text_eval,text_find:()=>text_text_find,text_format:()=>text_text_format,text_format_noreturn:()=>text_text_format_noreturn,text_join:()=>text_text_join,text_join_seq:()=>text_text_join_seq,text_length:()=>text_text_length,text_random_char:()=>text_text_random_char,text_replace:()=>text_text_replace,text_split:()=>text_text_split,text_strip:()=>text_text_strip,text_substring:()=>text_text_substring,text_substring2:()=>text_text_substring2,text_substring3:()=>text_text_substring3,text_textarea:()=>text_text_textarea});var generators_lists_namespaceObject={};__webpack_require__.r(generators_lists_namespaceObject),__webpack_require__.d(generators_lists_namespaceObject,{enumerate:()=>lists_enumerate,list_many_input:()=>lists_list_many_input,list_tolist:()=>lists_list_tolist,list_tolist2:()=>lists_list_tolist2,list_trig:()=>lists_list_trig,lists_2d_get_col_row_data:()=>lists_lists_2d_get_col_row_data,lists_2d_get_data_with_col_row:()=>lists_lists_2d_get_data_with_col_row,lists_append_extend:()=>lists_lists_append_extend,lists_change_to:()=>lists_lists_change_to,lists_change_to_general:()=>lists_lists_change_to_general,lists_clear:()=>lists_lists_clear,lists_create_with:()=>lists_lists_create_with,lists_create_with2:()=>lists_lists_create_with2,lists_create_with_noreturn:()=>lists_lists_create_with_noreturn,lists_create_with_text:()=>lists_lists_create_with_text,lists_create_with_text2:()=>lists_lists_create_with_text2,lists_del_general:()=>lists_lists_del_general,lists_find:()=>lists_lists_find,lists_getIndex3:()=>lists_lists_getIndex3,lists_getSublist3:()=>lists_lists_getSublist3,lists_get_index:()=>lists_lists_get_index,lists_get_random_item:()=>lists_lists_get_random_item,lists_get_random_sublist:()=>lists_lists_get_random_sublist,lists_get_sublist:()=>lists_lists_get_sublist,lists_insert_value:()=>lists_lists_insert_value,lists_insert_value2:()=>lists_lists_insert_value2,lists_pop:()=>lists_lists_pop,lists_remove_at:()=>lists_lists_remove_at,lists_remove_at2:()=>lists_lists_remove_at2,lists_reverse:()=>lists_lists_reverse,lists_setIndex3:()=>lists_lists_setIndex3,lists_set_index:()=>lists_lists_set_index,lists_sort:()=>lists_lists_sort});var generators_dicts_namespaceObject={};__webpack_require__.r(generators_dicts_namespaceObject),__webpack_require__.d(generators_dicts_namespaceObject,{dicts_add_change_del:()=>dicts_dicts_add_change_del,dicts_add_or_change:()=>dicts_dicts_add_or_change,dicts_clear:()=>dicts_dicts_clear,dicts_create_with:()=>dicts_dicts_create_with,dicts_create_with_noreturn:()=>dicts_dicts_create_with_noreturn,dicts_deldict:()=>dicts_dicts_deldict,dicts_delete:()=>dicts_dicts_delete,dicts_get:()=>dicts_dicts_get,dicts_get_default:()=>dicts_dicts_get_default,dicts_items:()=>dicts_dicts_items,dicts_keys:()=>dicts_dicts_keys,dicts_length:()=>dicts_dicts_length,dicts_pop:()=>dicts_dicts_pop,dicts_setdefault:()=>dicts_dicts_setdefault,dicts_to_json:()=>dicts_dicts_to_json,dicts_todict:()=>dicts_dicts_todict,dicts_update:()=>dicts_dicts_update,dicts_values:()=>dicts_dicts_values,json_to_dicts:()=>dicts_json_to_dicts});var generators_logic_namespaceObject={};__webpack_require__.r(generators_logic_namespaceObject),__webpack_require__.d(generators_logic_namespaceObject,{logic_boolean:()=>logic_logic_boolean,logic_compare:()=>logic_logic_compare,logic_compare_continous:()=>logic_logic_compare_continous,logic_is:()=>logic_logic_is,logic_is_in:()=>logic_logic_is_in,logic_negate:()=>logic_logic_negate,logic_null:()=>logic_logic_null,logic_operation:()=>logic_logic_operation,logic_tobool:()=>logic_logic_tobool,logic_true_or_false:()=>logic_logic_true_or_false});var generators_storage_namespaceObject={};__webpack_require__.r(generators_storage_namespaceObject),__webpack_require__.d(generators_storage_namespaceObject,{sdcard_mount:()=>storage_sdcard_mount,sdcard_use_spi_init:()=>storage_sdcard_use_spi_init,storage_can_write_ornot:()=>storage_storage_can_write_ornot,storage_change_dir:()=>storage_storage_change_dir,storage_close_file:()=>storage_storage_close_file,storage_delete_file:()=>storage_storage_delete_file,storage_file_seek:()=>storage_storage_file_seek,storage_file_tell:()=>storage_storage_file_tell,storage_file_write:()=>storage_storage_file_write,storage_fileopen:()=>storage_storage_fileopen,storage_fileopen_new:()=>storage_storage_fileopen_new,storage_fileopen_new_encoding:()=>storage_storage_fileopen_new_encoding,storage_get_a_line:()=>storage_storage_get_a_line,storage_get_contents:()=>storage_storage_get_contents,storage_get_contents_without_para:()=>storage_storage_get_contents_without_para,storage_get_current_dir:()=>storage_storage_get_current_dir,storage_get_file_size:()=>storage_storage_get_file_size,storage_get_filename:()=>storage_storage_get_filename,storage_is_file:()=>storage_storage_is_file,storage_list_all_files:()=>storage_storage_list_all_files,storage_make_dir:()=>storage_storage_make_dir,storage_open_file_with_os:()=>storage_storage_open_file_with_os,storage_rename:()=>storage_storage_rename});var generators_procedures_namespaceObject={};__webpack_require__.r(generators_procedures_namespaceObject),__webpack_require__.d(generators_procedures_namespaceObject,{procedures_callnoreturn:()=>procedures_procedures_callnoreturn,procedures_callreturn:()=>procedures_procedures_callreturn,procedures_defnoreturn:()=>procedures_procedures_defnoreturn,procedures_defreturn:()=>procedures_procedures_defreturn,procedures_ifreturn:()=>procedures_procedures_ifreturn,procedures_return:()=>procedures_procedures_return});var generators_tuple_namespaceObject={};__webpack_require__.r(generators_tuple_namespaceObject),__webpack_require__.d(generators_tuple_namespaceObject,{tuple_change_to:()=>tuple_tuple_change_to,tuple_create_with:()=>tuple_tuple_create_with,tuple_create_with_noreturn:()=>tuple_tuple_create_with_noreturn,tuple_create_with_text2:()=>tuple_tuple_create_with_text2,tuple_create_with_text_return:()=>tuple_tuple_create_with_text_return,tuple_del:()=>tuple_tuple_del,tuple_find:()=>tuple_tuple_find,tuple_getIndex:()=>tuple_tuple_getIndex,tuple_getSublist:()=>tuple_tuple_getSublist,tuple_get_random_item:()=>tuple_tuple_get_random_item,tuple_get_sublist:()=>tuple_tuple_get_sublist,tuple_join:()=>tuple_tuple_join,tuple_length:()=>tuple_tuple_length,tuple_max:()=>tuple_tuple_max,tuple_totuple:()=>tuple_tuple_totuple,tuple_trig:()=>tuple_tuple_trig});var generators_set_namespaceObject={};__webpack_require__.r(generators_set_namespaceObject),__webpack_require__.d(generators_set_namespaceObject,{set_add_discard:()=>set_set_add_discard,set_clear:()=>set_set_clear,set_create_with:()=>set_set_create_with,set_create_with_text_return:()=>set_set_create_with_text_return,set_length:()=>set_set_length,set_operate:()=>set_set_operate,set_operate_update:()=>set_set_operate_update,set_pop:()=>set_set_pop,set_sub:()=>set_set_sub,set_toset:()=>set_set_toset,set_update:()=>set_set_update});var generators_html_namespaceObject={};__webpack_require__.r(generators_html_namespaceObject),__webpack_require__.d(generators_html_namespaceObject,{html_content:()=>html_html_content,html_content_more:()=>html_html_content_more,html_document:()=>html_html_document,html_form:()=>html_html_form,html_head_body:()=>html_html_head_body,html_style:()=>html_html_style,html_style_content:()=>html_html_style_content,html_text:()=>html_html_text,html_title:()=>html_html_title});var generators_utility_namespaceObject={};__webpack_require__.r(generators_utility_namespaceObject),__webpack_require__.d(generators_utility_namespaceObject,{attribute_access:()=>utility_attribute_access,function_call:()=>utility_function_call,raw_block:()=>utility_raw_block,raw_empty:()=>utility_raw_empty,raw_expression:()=>utility_raw_expression,raw_table:()=>utility_raw_table,type_check:()=>utility_type_check});var ai_namespaceObject={};__webpack_require__.r(ai_namespaceObject),__webpack_require__.d(ai_namespaceObject,{AI_ChooseAndGet:()=>AI_ChooseAndGet,AI_Face_match:()=>AI_Face_match,AI_ImageClassify:()=>AI_ImageClassify,AI_ImageClassify_Func:()=>AI_ImageClassify_Func,AI_Nlp:()=>AI_Nlp,AI_Nlp_Func:()=>AI_Nlp_Func,AI_Nlp_Func_sim:()=>AI_Nlp_Func_sim,AI_Nlp_Sim:()=>AI_Nlp_Sim,AI_Nlp_Topic:()=>AI_Nlp_Topic,AI_Nlp_newsSummary:()=>AI_Nlp_newsSummary,AI_Ocr:()=>AI_Ocr,AI_Ocr_Func:()=>AI_Ocr_Func,AI_Speech_asr:()=>AI_Speech_asr,AI_Speech_synthesis:()=>AI_Speech_synthesis,AI_audio:()=>AI_audio,AI_client:()=>AI_client,AI_photo:()=>AI_photo,AI_result:()=>AI_result});var algorithm_namespaceObject={};__webpack_require__.r(algorithm_namespaceObject),__webpack_require__.d(algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_add_path,algorithm_add_school:()=>algorithm_add_school,algorithm_all_books:()=>algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_book_scale,algorithm_check_feet:()=>algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_color_seclet,algorithm_current_school:()=>algorithm_current_school,algorithm_del_path:()=>algorithm_del_path,algorithm_delete_book:()=>algorithm_delete_book,algorithm_delete_books:()=>algorithm_delete_books,algorithm_delete_books2:()=>algorithm_delete_books2,algorithm_divide_books:()=>algorithm_divide_books,algorithm_find_path:()=>algorithm_find_path,algorithm_first_book:()=>algorithm_first_book,algorithm_fz_calc:()=>algorithm_fz_calc,algorithm_fz_calc_first_min:()=>algorithm_fz_calc_first_min,algorithm_fz_compare:()=>algorithm_fz_compare,algorithm_fz_move:()=>algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_fz_set_min,algorithm_get_book_num:()=>algorithm_get_book_num,algorithm_get_current_location:()=>algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_init_jttl,algorithm_move_recent:()=>algorithm_move_recent,algorithm_new_path:()=>algorithm_new_path,algorithm_next_book:()=>algorithm_next_book,algorithm_no_left:()=>algorithm_no_left,algorithm_no_path:()=>algorithm_no_path,algorithm_no_ring2:()=>algorithm_no_ring2,algorithm_not_home:()=>algorithm_not_home,algorithm_not_school:()=>algorithm_not_school,algorithm_number_add:()=>algorithm_number_add,algorithm_number_zero:()=>algorithm_number_zero,algorithm_prepare:()=>algorithm_prepare,algorithm_prepare2:()=>algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_print_book2,algorithm_print_divide:()=>algorithm_print_divide,algorithm_print_jttl_answer:()=>algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_print_number,algorithm_print_path:()=>algorithm_print_path,algorithm_print_path2:()=>algorithm_print_path2,algorithm_print_sequence:()=>algorithm_print_sequence,algorithm_rabbit_add:()=>algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_return_path,algorithm_set_path:()=>algorithm_set_path,algorithm_two_left:()=>algorithm_two_left,algorithm_void_path:()=>algorithm_void_path,algorithm_yes_ring2:()=>algorithm_yes_ring2,hanoi_init:()=>hanoi_init,hanoi_init_offline:()=>hanoi_init_offline,hanoi_move:()=>hanoi_move});var communicate_namespaceObject={};__webpack_require__.r(communicate_namespaceObject),__webpack_require__.d(communicate_namespaceObject,{requests_attribute:()=>requests_attribute,requests_get:()=>requests_get,requests_get_old:()=>requests_get_old,requests_method:()=>requests_method,requests_post:()=>requests_post});var cv_namespaceObject={};__webpack_require__.r(cv_namespaceObject),__webpack_require__.d(cv_namespaceObject,{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});var data_namespaceObject={};__webpack_require__.r(data_namespaceObject),__webpack_require__.d(data_namespaceObject,{array_create:()=>array_create,array_toarray:()=>array_toarray,dataframe_aggregate_func:()=>dataframe_aggregate_func,dataframe_create:()=>dataframe_create,dataframe_create_from_index:()=>dataframe_create_from_index,dataframe_create_from_one_index:()=>dataframe_create_from_one_index,dataframe_fillna:()=>dataframe_fillna,dataframe_get:()=>dataframe_get,dataframe_groupby:()=>dataframe_groupby,dataframe_head_tail:()=>dataframe_head_tail,dataframe_info:()=>dataframe_info,dataframe_median:()=>dataframe_median,dataframe_select:()=>dataframe_select,dataframe_sort_values:()=>dataframe_sort_values,matrix_multiplication:()=>matrix_multiplication,matrix_transpose:()=>matrix_transpose,numpy_argmin_template_match:()=>numpy_argmin_template_match,numpy_astype:()=>numpy_astype,numpy_c_:()=>numpy_c_,numpy_dot:()=>numpy_dot,numpy_linalg_det:()=>numpy_linalg_det,numpy_linalg_inv:()=>numpy_linalg_inv,numpy_max:()=>numpy_max,numpy_mean:()=>numpy_mean,numpy_mean_digit:()=>numpy_mean_digit,numpy_min:()=>numpy_min,numpy_ones:()=>numpy_ones,numpy_random_random:()=>numpy_random_random,numpy_reshape:()=>numpy_reshape,numpy_shape:()=>numpy_shape,numpy_size:()=>numpy_size,numpy_square:()=>numpy_square,numpy_std:()=>numpy_std,numpy_sum:()=>numpy_sum,numpy_trig:()=>numpy_trig,pandas_drop_columns:()=>pandas_drop_columns,pandas_dropna:()=>pandas_dropna,pandas_readcsv:()=>pandas_readcsv,pl_axes:()=>pl_axes,pl_bar:()=>pl_bar,pl_hist:()=>pl_hist,pl_label:()=>pl_label,pl_legend:()=>pl_legend,pl_pie:()=>pl_pie,pl_plot:()=>pl_plot,pl_plot_bar:()=>pl_plot_bar,pl_plot_easy:()=>pl_plot_easy,pl_plot_scatter:()=>pl_plot_scatter,pl_plot_xy:()=>pl_plot_xy,pl_savefig:()=>pl_savefig,pl_show:()=>pl_show,pl_subplot:()=>pl_subplot,pl_text:()=>pl_text,pl_ticks:()=>pl_ticks,pl_title:()=>pl_title,plot_axes:()=>plot_axes,plot_bar:()=>plot_bar,plot_cla:()=>plot_cla,plot_hist:()=>plot_hist,plot_label:()=>plot_label,plot_legend:()=>plot_legend,plot_pie:()=>plot_pie,plot_plot:()=>plot_plot,plot_plot_bar:()=>plot_plot_bar,plot_plot_easy:()=>plot_plot_easy,plot_plot_scatter:()=>plot_plot_scatter,plot_plot_xy:()=>plot_plot_xy,plot_savefig:()=>plot_savefig,plot_show:()=>plot_show,plot_subplot:()=>plot_subplot,plot_text:()=>plot_text,plot_ticks:()=>plot_ticks,plot_title:()=>plot_title,py_sum:()=>py_sum,pylab_imshow:()=>pylab_imshow,series_create:()=>series_create,series_create_from_index:()=>series_create_from_index,series_create_from_text:()=>series_create_from_text,series_get_num:()=>series_get_num,series_index_value:()=>series_index_value});var datastructure_namespaceObject={};__webpack_require__.r(datastructure_namespaceObject),__webpack_require__.d(datastructure_namespaceObject,{ds_add_node_by_attr:()=>ds_add_node_by_attr,ds_add_node_by_name:()=>ds_add_node_by_name,ds_create_linkedlist:()=>ds_create_linkedlist,ds_create_linkedlist_container:()=>ds_create_linkedlist_container,ds_create_linkedlist_item:()=>ds_create_linkedlist_item,ds_create_node:()=>ds_create_node,ds_del_node_by_attr:()=>ds_del_node_by_attr,ds_del_node_by_name:()=>ds_del_node_by_name,ds_get_node_attr:()=>ds_get_node_attr,ds_reverse_linkedlist:()=>ds_reverse_linkedlist,ds_set_node_attr:()=>ds_set_node_attr});var factory_namespaceObject={};__webpack_require__.r(factory_namespaceObject),__webpack_require__.d(factory_namespaceObject,{factory_block:()=>factory_block,factory_block_return:()=>factory_block_return,factory_block_return_with_textarea:()=>factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_callMethod_noreturn,factory_callMethod_return:()=>factory_callMethod_return,factory_create_with_container:()=>factory_create_with_container,factory_create_with_item:()=>factory_create_with_item,factory_declare:()=>factory_declare,factory_from_import:()=>factory_from_import,factory_function_noreturn:()=>factory_function_noreturn,factory_function_return:()=>factory_function_return,factory_import:()=>factory_import});var hardware_namespaceObject={};__webpack_require__.r(hardware_namespaceObject),__webpack_require__.d(hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_arduino_start,inout_highlow:()=>inout_highlow});var inout_namespaceObject={};__webpack_require__.r(inout_namespaceObject),__webpack_require__.d(inout_namespaceObject,{inout_input:()=>inout_input,inout_print:()=>inout_print,inout_print_container:()=>inout_print_container,inout_print_end:()=>inout_print_end,inout_print_inline:()=>inout_print_inline,inout_print_item:()=>inout_print_item,inout_print_many:()=>inout_print_many,inout_type_input:()=>inout_type_input,pyinout_type_input:()=>pyinout_type_input});var iot_namespaceObject={};__webpack_require__.r(iot_namespaceObject),__webpack_require__.d(iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>IOT_EMQX_PING,IOT_FORMATTING:()=>IOT_FORMATTING,IOT_FORMAT_STRING:()=>IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>IOT_MIXIO_UNSUBSCRIBE,iot_checkonenet:()=>iot_checkonenet,iot_client_onboard:()=>iot_client_onboard,iot_create_with_item:()=>iot_create_with_item,iot_http_client:()=>iot_http_client,iot_http_data:()=>iot_http_data,iot_mixio_check:()=>iot_mixio_check,iot_mixio_connect:()=>iot_mixio_connect,iot_mixio_connect_only:()=>iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_mixio_format_topic,iot_mixly_key:()=>iot_mixly_key,iot_mixly_key_py:()=>iot_mixly_key_py,iot_mqtt_client:()=>iot_mqtt_client,iot_mqtt_data:()=>iot_mqtt_data,iot_onenet_check:()=>iot_onenet_check,iot_onenet_connect:()=>iot_onenet_connect,iot_onenet_disconnect:()=>iot_onenet_disconnect,iot_onenet_publish:()=>iot_onenet_publish,iot_onenet_publish_dict:()=>iot_onenet_publish_dict,iot_onenetconnect:()=>iot_onenetconnect,iot_onenetdisconnect:()=>iot_onenetdisconnect,iot_publish:()=>iot_publish,iot_publish_container:()=>iot_publish_container,iot_publish_item:()=>iot_publish_item});var pins_namespaceObject={};__webpack_require__.r(pins_namespaceObject),__webpack_require__.d(pins_namespaceObject,{pins_analog_read:()=>pins_analog_read,pins_analog_write:()=>pins_analog_write,pins_digital_read:()=>pins_digital_read,pins_digital_write:()=>pins_digital_write});var serial_namespaceObject={};__webpack_require__.r(serial_namespaceObject),__webpack_require__.d(serial_namespaceObject,{serial_close:()=>serial_close,serial_open:()=>serial_open,serial_read_b:()=>serial_read_b,serial_write:()=>serial_write});var sklearn_namespaceObject={};__webpack_require__.r(sklearn_namespaceObject),__webpack_require__.d(sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_coef_intercept,sklearn_data_target:()=>sklearn_data_target,sklearn_fit:()=>sklearn_fit,sklearn_fit_no_target:()=>sklearn_fit_no_target,sklearn_load:()=>sklearn_load,sklearn_make_blobs:()=>sklearn_make_blobs,sklearn_make_classification:()=>sklearn_make_classification,sklearn_make_regression:()=>sklearn_make_regression,sklearn_predict:()=>sklearn_predict,sklearn_save_load_model:()=>sklearn_save_load_model,sklearn_score:()=>sklearn_score,sklearn_score_no_target:()=>sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_train_test_split_no_target});var system_namespaceObject={};__webpack_require__.r(system_namespaceObject),__webpack_require__.d(system_namespaceObject,{Panic_with_status_code:()=>system_Panic_with_status_code,base_delay:()=>base_delay,controls_millis:()=>system_controls_millis,controls_mstimer2:()=>controls_mstimer2,controls_mstimer2_start:()=>controls_mstimer2_start,controls_mstimer2_stop:()=>controls_mstimer2_stop,reset:()=>system_reset,time_localtime:()=>time_localtime,time_sleep:()=>system_time_sleep});var turtle_namespaceObject={};__webpack_require__.r(turtle_namespaceObject),__webpack_require__.d(turtle_namespaceObject,{turtle_bgcolor:()=>turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_bgcolor_hex_new,turtle_circle:()=>turtle_circle,turtle_circle_advanced:()=>turtle_circle_advanced,turtle_clear:()=>turtle_clear,turtle_clone:()=>turtle_clone,turtle_color:()=>turtle_color,turtle_color_hex:()=>turtle_color_hex,turtle_color_seclet:()=>turtle_color_seclet,turtle_create:()=>turtle_create,turtle_done:()=>turtle_done,turtle_exitonclick:()=>turtle_exitonclick,turtle_fill:()=>turtle_fill,turtle_fillcolor:()=>turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_getscreen,turtle_goto:()=>turtle_goto,turtle_listen:()=>turtle_listen,turtle_move:()=>turtle_move,turtle_numinput:()=>turtle_numinput,turtle_onclick:()=>turtle_onclick,turtle_onkey:()=>turtle_onkey,turtle_ontimer:()=>turtle_ontimer,turtle_pencolor:()=>turtle_pencolor,turtle_pencolor_hex:()=>turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_pencolor_hex_new,turtle_penup:()=>turtle_penup,turtle_pos_shape:()=>turtle_pos_shape,turtle_rotate:()=>turtle_rotate,turtle_screen_delay:()=>turtle_screen_delay,turtle_screen_savefig:()=>turtle_screen_savefig,turtle_setheading:()=>turtle_setheading,turtle_setxy:()=>turtle_setxy,turtle_shape:()=>turtle_shape,turtle_shapesize:()=>turtle_shapesize,turtle_size:()=>turtle_size,turtle_size_speed:()=>turtle_size_speed,turtle_speed:()=>turtle_speed,turtle_textinput:()=>turtle_textinput,turtle_visible:()=>turtle_visible,turtle_write:()=>turtle_write,turtle_write_format:()=>turtle_write_format,turtle_write_format_skulpt:()=>turtle_write_format_skulpt});var generators_ai_namespaceObject={};__webpack_require__.r(generators_ai_namespaceObject),__webpack_require__.d(generators_ai_namespaceObject,{AI_ChooseAndGet:()=>ai_AI_ChooseAndGet,AI_Face_match:()=>ai_AI_Face_match,AI_ImageClassify:()=>ai_AI_ImageClassify,AI_ImageClassify_Func:()=>ai_AI_ImageClassify_Func,AI_Nlp:()=>ai_AI_Nlp,AI_Nlp_Func:()=>ai_AI_Nlp_Func,AI_Nlp_Func_sim:()=>ai_AI_Nlp_Func_sim,AI_Nlp_Sim:()=>ai_AI_Nlp_Sim,AI_Nlp_Topic:()=>ai_AI_Nlp_Topic,AI_Nlp_newsSummary:()=>ai_AI_Nlp_newsSummary,AI_Ocr:()=>ai_AI_Ocr,AI_Ocr_Func:()=>ai_AI_Ocr_Func,AI_Speech_asr:()=>ai_AI_Speech_asr,AI_Speech_synthesis:()=>ai_AI_Speech_synthesis,AI_audio:()=>ai_AI_audio,AI_client:()=>ai_AI_client,AI_photo:()=>ai_AI_photo,AI_result:()=>ai_AI_result});var generators_algorithm_namespaceObject={};__webpack_require__.r(generators_algorithm_namespaceObject),__webpack_require__.d(generators_algorithm_namespaceObject,{algorithm_add_path:()=>algorithm_algorithm_add_path,algorithm_add_school:()=>algorithm_algorithm_add_school,algorithm_all_books:()=>algorithm_algorithm_all_books,algorithm_all_books_sequence:()=>algorithm_algorithm_all_books_sequence,algorithm_book_scale:()=>algorithm_algorithm_book_scale,algorithm_check_feet:()=>algorithm_algorithm_check_feet,algorithm_chick_calculate:()=>algorithm_algorithm_chick_calculate,algorithm_color_seclet:()=>algorithm_algorithm_color_seclet,algorithm_current_school:()=>algorithm_algorithm_current_school,algorithm_del_path:()=>algorithm_algorithm_del_path,algorithm_delete_book:()=>algorithm_algorithm_delete_book,algorithm_divide_books:()=>algorithm_algorithm_divide_books,algorithm_find_path:()=>algorithm_algorithm_find_path,algorithm_first_book:()=>algorithm_algorithm_first_book,algorithm_fz_calc:()=>algorithm_algorithm_fz_calc,algorithm_fz_compare:()=>algorithm_algorithm_fz_compare,algorithm_fz_move:()=>algorithm_algorithm_fz_move,algorithm_fz_set_min:()=>algorithm_algorithm_fz_set_min,algorithm_get_current_location:()=>algorithm_algorithm_get_current_location,algorithm_get_half_books:()=>algorithm_algorithm_get_half_books,algorithm_hxdb_add:()=>algorithm_algorithm_hxdb_add,algorithm_hxdb_init_soldier:()=>algorithm_algorithm_hxdb_init_soldier,algorithm_hxdb_last_line:()=>algorithm_algorithm_hxdb_last_line,algorithm_hxdb_result:()=>algorithm_algorithm_hxdb_result,algorithm_hxdb_stand_in_line:()=>algorithm_algorithm_hxdb_stand_in_line,algorithm_init_fzsf:()=>algorithm_algorithm_init_fzsf,algorithm_init_hxdb:()=>algorithm_algorithm_init_hxdb,algorithm_init_jttl:()=>algorithm_algorithm_init_jttl,algorithm_move_recent:()=>algorithm_algorithm_move_recent,algorithm_new_path:()=>algorithm_algorithm_new_path,algorithm_next_book:()=>algorithm_algorithm_next_book,algorithm_no_left:()=>algorithm_algorithm_no_left,algorithm_no_path:()=>algorithm_algorithm_no_path,algorithm_no_ring2:()=>algorithm_algorithm_no_ring2,algorithm_not_home:()=>algorithm_algorithm_not_home,algorithm_not_school:()=>algorithm_algorithm_not_school,algorithm_number_add:()=>algorithm_algorithm_number_add,algorithm_number_zero:()=>algorithm_algorithm_number_zero,algorithm_prepare:()=>algorithm_algorithm_prepare,algorithm_prepare2:()=>algorithm_algorithm_prepare2,algorithm_prepare_2_1:()=>algorithm_algorithm_prepare_2_1,algorithm_prepare_2_2:()=>algorithm_algorithm_prepare_2_2,algorithm_print_book2:()=>algorithm_algorithm_print_book2,algorithm_print_jttl_answer:()=>algorithm_algorithm_print_jttl_answer,algorithm_print_number:()=>algorithm_algorithm_print_number,algorithm_print_path:()=>algorithm_algorithm_print_path,algorithm_print_path2:()=>algorithm_algorithm_print_path2,algorithm_rabbit_add:()=>algorithm_algorithm_rabbit_add,algorithm_rabbit_number_in_range:()=>algorithm_algorithm_rabbit_number_in_range,algorithm_rabbit_zero:()=>algorithm_algorithm_rabbit_zero,algorithm_return_path:()=>algorithm_algorithm_return_path,algorithm_set_path:()=>algorithm_algorithm_set_path,algorithm_two_left:()=>algorithm_algorithm_two_left,algorithm_void_path:()=>algorithm_algorithm_void_path,algorithm_yes_ring2:()=>algorithm_algorithm_yes_ring2,hanoi_init:()=>algorithm_hanoi_init,hanoi_init_offline:()=>algorithm_hanoi_init_offline,hanoi_move:()=>algorithm_hanoi_move});var generators_communicate_namespaceObject={};__webpack_require__.r(generators_communicate_namespaceObject),__webpack_require__.d(generators_communicate_namespaceObject,{requests_attribute:()=>communicate_requests_attribute,requests_get:()=>communicate_requests_get,requests_get_old:()=>communicate_requests_get_old,requests_method:()=>communicate_requests_method,requests_post:()=>communicate_requests_post});var generators_data_namespaceObject={};__webpack_require__.r(generators_data_namespaceObject),__webpack_require__.d(generators_data_namespaceObject,{array_create:()=>data_array_create,array_toarray:()=>data_array_toarray,dataframe_aggregate_func:()=>data_dataframe_aggregate_func,dataframe_create:()=>data_dataframe_create,dataframe_create_from_index:()=>data_dataframe_create_from_index,dataframe_create_from_one_index:()=>data_dataframe_create_from_one_index,dataframe_fillna:()=>data_dataframe_fillna,dataframe_get:()=>data_dataframe_get,dataframe_groupby:()=>data_dataframe_groupby,dataframe_head_tail:()=>data_dataframe_head_tail,dataframe_info:()=>data_dataframe_info,dataframe_median:()=>data_dataframe_median,dataframe_select:()=>data_dataframe_select,dataframe_sort_values:()=>data_dataframe_sort_values,matrix_multiplication:()=>data_matrix_multiplication,matrix_transpose:()=>data_matrix_transpose,numpy_argmin_template_match:()=>data_numpy_argmin_template_match,numpy_astype:()=>data_numpy_astype,numpy_c_:()=>data_numpy_c_,numpy_dot:()=>data_numpy_dot,numpy_linalg_det:()=>data_numpy_linalg_det,numpy_linalg_inv:()=>data_numpy_linalg_inv,numpy_max:()=>data_numpy_max,numpy_mean:()=>data_numpy_mean,numpy_mean_digit:()=>data_numpy_mean_digit,numpy_min:()=>data_numpy_min,numpy_ones:()=>data_numpy_ones,numpy_random_random:()=>data_numpy_random_random,numpy_reshape:()=>data_numpy_reshape,numpy_shape:()=>data_numpy_shape,numpy_size:()=>data_numpy_size,numpy_square:()=>data_numpy_square,numpy_std:()=>data_numpy_std,numpy_sum:()=>data_numpy_sum,numpy_trig:()=>data_numpy_trig,pandas_drop_columns:()=>data_pandas_drop_columns,pandas_dropna:()=>data_pandas_dropna,pandas_readcsv:()=>data_pandas_readcsv,pl_axes:()=>data_pl_axes,pl_bar:()=>data_pl_bar,pl_hist:()=>data_pl_hist,pl_label:()=>data_pl_label,pl_legend:()=>data_pl_legend,pl_pie:()=>data_pl_pie,pl_plot:()=>data_pl_plot,pl_plot_bar:()=>data_pl_plot_bar,pl_plot_easy:()=>data_pl_plot_easy,pl_plot_scatter:()=>data_pl_plot_scatter,pl_plot_xy:()=>data_pl_plot_xy,pl_savefig:()=>data_pl_savefig,pl_show:()=>data_pl_show,pl_subplot:()=>data_pl_subplot,pl_text:()=>data_pl_text,pl_ticks:()=>data_pl_ticks,pl_title:()=>data_pl_title,plot_axes:()=>data_plot_axes,plot_bar:()=>data_plot_bar,plot_cla:()=>data_plot_cla,plot_hist:()=>data_plot_hist,plot_label:()=>data_plot_label,plot_legend:()=>data_plot_legend,plot_pie:()=>data_plot_pie,plot_plot:()=>data_plot_plot,plot_plot_bar:()=>data_plot_plot_bar,plot_plot_easy:()=>data_plot_plot_easy,plot_plot_scatter:()=>data_plot_plot_scatter,plot_plot_xy:()=>data_plot_plot_xy,plot_savefig:()=>data_plot_savefig,plot_show:()=>data_plot_show,plot_subplot:()=>data_plot_subplot,plot_text:()=>data_plot_text,plot_ticks:()=>data_plot_ticks,plot_title:()=>data_plot_title,py_sum:()=>data_py_sum,pylab_imshow:()=>data_pylab_imshow,series_create:()=>data_series_create,series_create_from_index:()=>data_series_create_from_index,series_create_from_text:()=>data_series_create_from_text,series_get_num:()=>data_series_get_num,series_index_value:()=>data_series_index_value});var generators_datastructure_namespaceObject={};__webpack_require__.r(generators_datastructure_namespaceObject),__webpack_require__.d(generators_datastructure_namespaceObject,{ds_add_node_by_attr:()=>datastructure_ds_add_node_by_attr,ds_add_node_by_name:()=>datastructure_ds_add_node_by_name,ds_create_linkedlist:()=>datastructure_ds_create_linkedlist,ds_create_node:()=>datastructure_ds_create_node,ds_del_node_by_attr:()=>datastructure_ds_del_node_by_attr,ds_del_node_by_name:()=>datastructure_ds_del_node_by_name,ds_get_node_attr:()=>datastructure_ds_get_node_attr,ds_reverse_linkedlist:()=>datastructure_ds_reverse_linkedlist,ds_set_node_attr:()=>datastructure_ds_set_node_attr});var generators_factory_namespaceObject={};__webpack_require__.r(generators_factory_namespaceObject),__webpack_require__.d(generators_factory_namespaceObject,{factory_block:()=>factory_factory_block,factory_block_return:()=>factory_factory_block_return,factory_block_return_with_textarea:()=>factory_factory_block_return_with_textarea,factory_block_with_textarea:()=>factory_factory_block_with_textarea,factory_callMethod_noreturn:()=>factory_factory_callMethod_noreturn,factory_callMethod_return:()=>factory_factory_callMethod_return,factory_declare:()=>factory_factory_declare,factory_from_import:()=>factory_factory_from_import,factory_function_noreturn:()=>factory_factory_function_noreturn,factory_function_return:()=>factory_factory_function_return,factory_import:()=>factory_factory_import});var generators_hardware_namespaceObject={};__webpack_require__.r(generators_hardware_namespaceObject),__webpack_require__.d(generators_hardware_namespaceObject,{hardware_arduino_analog_read:()=>hardware_hardware_arduino_analog_read,hardware_arduino_analog_write:()=>hardware_hardware_arduino_analog_write,hardware_arduino_digital_read:()=>hardware_hardware_arduino_digital_read,hardware_arduino_digital_write:()=>hardware_hardware_arduino_digital_write,hardware_arduino_start:()=>hardware_hardware_arduino_start,inout_highlow:()=>hardware_inout_highlow});var generators_inout_namespaceObject={};__webpack_require__.r(generators_inout_namespaceObject),__webpack_require__.d(generators_inout_namespaceObject,{inout_input:()=>inout_inout_input,inout_print:()=>inout_inout_print,inout_print_end:()=>inout_inout_print_end,inout_print_inline:()=>inout_inout_print_inline,inout_print_many:()=>inout_inout_print_many,inout_type_input:()=>inout_inout_type_input,pyinout_type_input:()=>inout_pyinout_type_input});var generators_iot_namespaceObject={};__webpack_require__.r(generators_iot_namespaceObject),__webpack_require__.d(generators_iot_namespaceObject,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>iot_IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE,IOT_EMQX_PING:()=>iot_IOT_EMQX_PING,IOT_FORMATTING:()=>iot_IOT_FORMATTING,IOT_FORMAT_STRING:()=>iot_IOT_FORMAT_STRING,IOT_MIXIO_NTP:()=>iot_IOT_MIXIO_NTP,IOT_MIXIO_PUBLISH:()=>iot_IOT_MIXIO_PUBLISH,IOT_MIXIO_SUBSCRIBE:()=>iot_IOT_MIXIO_SUBSCRIBE,IOT_MIXIO_UNSUBSCRIBE:()=>iot_IOT_MIXIO_UNSUBSCRIBE,iot_mixio_check:()=>iot_iot_mixio_check,iot_mixio_connect:()=>iot_iot_mixio_connect,iot_mixio_connect_only:()=>iot_iot_mixio_connect_only,iot_mixio_disconnect:()=>iot_iot_mixio_disconnect,iot_mixio_format_msg:()=>iot_iot_mixio_format_msg,iot_mixio_format_topic:()=>iot_iot_mixio_format_topic,iot_mixly_key:()=>iot_iot_mixly_key,iot_mixly_key_py:()=>iot_iot_mixly_key_py});var generators_pins_namespaceObject={};__webpack_require__.r(generators_pins_namespaceObject),__webpack_require__.d(generators_pins_namespaceObject,{pins_analog_read:()=>pins_pins_analog_read,pins_analog_write:()=>pins_pins_analog_write,pins_digital:()=>pins_digital,pins_digital_read:()=>pins_pins_digital_read,pins_digital_write:()=>pins_pins_digital_write});var generators_serial_namespaceObject={};__webpack_require__.r(generators_serial_namespaceObject),__webpack_require__.d(generators_serial_namespaceObject,{serial_close:()=>serial_serial_close,serial_open:()=>serial_serial_open,serial_read_b:()=>serial_serial_read_b,serial_write:()=>serial_serial_write});var generators_sklearn_namespaceObject={};__webpack_require__.r(generators_sklearn_namespaceObject),__webpack_require__.d(generators_sklearn_namespaceObject,{sklearn_DecisionTreeClassifier_Regressor:()=>sklearn_sklearn_DecisionTreeClassifier_Regressor,sklearn_GaussianNB:()=>sklearn_sklearn_GaussianNB,sklearn_KMeans:()=>sklearn_sklearn_KMeans,sklearn_KNeighborsClassifier_Regressor:()=>sklearn_sklearn_KNeighborsClassifier_Regressor,sklearn_LinearRegression:()=>sklearn_sklearn_LinearRegression,sklearn_RandomForestClassifier_Regressor:()=>sklearn_sklearn_RandomForestClassifier_Regressor,sklearn_Ridge:()=>sklearn_sklearn_Ridge,sklearn_cluster_centers_labels_inertia:()=>sklearn_sklearn_cluster_centers_labels_inertia,sklearn_coef_intercept:()=>sklearn_sklearn_coef_intercept,sklearn_data_target:()=>sklearn_sklearn_data_target,sklearn_fit:()=>sklearn_sklearn_fit,sklearn_fit_no_target:()=>sklearn_sklearn_fit_no_target,sklearn_load:()=>sklearn_sklearn_load,sklearn_make_blobs:()=>sklearn_sklearn_make_blobs,sklearn_make_classification:()=>sklearn_sklearn_make_classification,sklearn_make_regression:()=>sklearn_sklearn_make_regression,sklearn_predict:()=>sklearn_sklearn_predict,sklearn_save_load_model:()=>sklearn_sklearn_save_load_model,sklearn_score:()=>sklearn_sklearn_score,sklearn_score_no_target:()=>sklearn_sklearn_score_no_target,sklearn_train_test_split:()=>sklearn_sklearn_train_test_split,sklearn_train_test_split_no_target:()=>sklearn_sklearn_train_test_split_no_target});var generators_system_namespaceObject={};__webpack_require__.r(generators_system_namespaceObject),__webpack_require__.d(generators_system_namespaceObject,{controls_end_program:()=>system_controls_end_program,controls_millis:()=>generators_system_controls_millis,time_localtime:()=>system_time_localtime});var generators_turtle_namespaceObject={};__webpack_require__.r(generators_turtle_namespaceObject),__webpack_require__.d(generators_turtle_namespaceObject,{turtle_bgcolor:()=>turtle_turtle_bgcolor,turtle_bgcolor_hex:()=>turtle_turtle_bgcolor_hex,turtle_bgcolor_hex_new:()=>turtle_turtle_bgcolor_hex_new,turtle_circle:()=>turtle_turtle_circle,turtle_circle_advanced:()=>turtle_turtle_circle_advanced,turtle_clear:()=>turtle_turtle_clear,turtle_clone:()=>turtle_turtle_clone,turtle_color:()=>turtle_turtle_color,turtle_color_hex:()=>turtle_turtle_color_hex,turtle_color_seclet:()=>turtle_turtle_color_seclet,turtle_create:()=>turtle_turtle_create,turtle_done:()=>turtle_turtle_done,turtle_exitonclick:()=>turtle_turtle_exitonclick,turtle_fill:()=>turtle_turtle_fill,turtle_fillcolor:()=>turtle_turtle_fillcolor,turtle_fillcolor_hex:()=>turtle_turtle_fillcolor_hex,turtle_fillcolor_hex_new:()=>turtle_turtle_fillcolor_hex_new,turtle_getscreen:()=>turtle_turtle_getscreen,turtle_goto:()=>turtle_turtle_goto,turtle_listen:()=>turtle_turtle_listen,turtle_move:()=>turtle_turtle_move,turtle_numinput:()=>turtle_turtle_numinput,turtle_onclick:()=>turtle_turtle_onclick,turtle_onkey:()=>turtle_turtle_onkey,turtle_ontimer:()=>turtle_turtle_ontimer,turtle_pencolor:()=>turtle_turtle_pencolor,turtle_pencolor_hex:()=>turtle_turtle_pencolor_hex,turtle_pencolor_hex_new:()=>turtle_turtle_pencolor_hex_new,turtle_penup:()=>turtle_turtle_penup,turtle_pos_shape:()=>turtle_turtle_pos_shape,turtle_rotate:()=>turtle_turtle_rotate,turtle_screen_delay:()=>turtle_turtle_screen_delay,turtle_screen_savefig:()=>turtle_turtle_screen_savefig,turtle_setheading:()=>turtle_turtle_setheading,turtle_setxy:()=>turtle_turtle_setxy,turtle_shape:()=>turtle_turtle_shape,turtle_shapesize:()=>turtle_turtle_shapesize,turtle_size:()=>turtle_turtle_size,turtle_size_speed:()=>turtle_turtle_size_speed,turtle_speed:()=>turtle_turtle_speed,turtle_textinput:()=>turtle_turtle_textinput,turtle_visible:()=>turtle_turtle_visible,turtle_write:()=>turtle_turtle_write,turtle_write_format:()=>turtle_turtle_write_format,turtle_write_format_skulpt:()=>turtle_turtle_write_format_skulpt});const external_Blockly_namespaceObject=Blockly,ZhHansMsg={PYTHON_PYODIDE_IMAGE:"图像"},ZhHansCatgories={},ZhHantMsg={PYTHON_PYODIDE_IMAGE:"影像"},ZhHantCatgories={},EnMsg={PYTHON_PYODIDE_IMAGE:"Image"},EnCatgories={};Object.assign(external_Blockly_namespaceObject.Lang.ZhHans,ZhHansMsg),Object.assign(external_Blockly_namespaceObject.Lang.ZhHant,ZhHantMsg),Object.assign(external_Blockly_namespaceObject.Lang.En,EnMsg),Object.assign(external_Blockly_namespaceObject.Lang.ZhHans.MSG,ZhHansCatgories),Object.assign(external_Blockly_namespaceObject.Lang.ZhHant.MSG,ZhHantCatgories),Object.assign(external_Blockly_namespaceObject.Lang.En.MSG,EnCatgories);const external_Mixly_namespaceObject=Mixly,Variables={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 n=Object.create(null),a=0;a1&&(s+=a)):n=s}else n="i";return n}},variables=Variables; /** * @license * Visual Blocks Editor @@ -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)}},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)}},TEXTS_HUE=160,text_text={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_TEXT_TOOLTIP)},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,'"')}},text_textarea={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_LINES_TOOLTIP)},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,'"')}};external_Blockly_namespaceObject.FieldTextInput.char_validator=function(e){if(e.length>1&&"\\"===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)}},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={};Procedures.NAME_TYPE=external_Blockly_namespaceObject.PROCEDURE_CATEGORY_NAME,Procedures.allProcedures=function(e){for(var t=e.getAllBlocks(!1),n=[],a=[],_=0;_"),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 "+r()+"("+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():r(),e+="("+a+", "+_+", "+l+")");else{var p=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=p(a,"_start"),_=p(_,"_end");p(l,"_inc"),e="number"==typeof a&&"number"==typeof _?a<_?o(0,_):r(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,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")',Blockly.Python.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]},generators_text_text=function(e,t){return[t.quote_(this.getFieldValue("TEXT")),t.ORDER_ATOMIC]},text_text_textarea=function(e,t){return['"""'+this.getFieldValue("VALUE")+'"""',t.ORDER_ATOMIC]},text_text_char=function(e,t){return["'"+this.getFieldValue("TEXT")+"'",t.ORDER_ATOMIC]},text_text_join=function(e,t){return[t.valueToCode(this,"A",t.ORDER_ATOMIC)+" + "+t.valueToCode(this,"B",t.ORDER_ATOMIC),t.ORDER_ADDITIVE]},text_ascii_to_char=function(e,t){return["chr("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_char_to_ascii=function(e,t){return["ord("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"a")+")",t.ORDER_ATOMIC]},text_number_to_text=function(e,t){return["str("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_text_length=function(e,t){return["len("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_char_at2=function(e,t){var n=e.getFieldValue("WHERE")||"FROM_START",a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';switch(n){case"FROM_START":return[a+"["+(e=t.getAdjustedInt(e,"AT"))+"]",t.ORDER_ATOMIC];case"FROM_END":return[a+"["+(e=t.getAdjustedInt(e,"AT",1,!0))+"]",t.ORDER_ATOMIC];case"RANDOM":return t.definitions_.import_random="import random",["random.choice("+a+")",t.ORDER_FUNCTION_CALL]}throw"Unhandled combination (lists_getIndex)."},text_text_char_at=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+(t.valueToCode(this,"AT",t.ORDER_ATOMIC)||0)+"]",t.ORDER_ATOMIC]},text_text_random_char=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';return t.definitions_.import_random="import random",["random.choice("+n+")",t.ORDER_FUNCTION_CALL]},text_text_equals_starts_ends=function(e,t){var n=t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""',a=t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""',_=this.getFieldValue("DOWHAT");return"==="===_?[n+" == "+a,t.ORDER_ATOMIC]:[n+"."+_+"("+a+")",t.ORDER_ATOMIC]},text_text_compare_to=function(e,t){return["cmp("+(t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_substring2=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""',a=e.getFieldValue("WHERE1"),_=e.getFieldValue("WHERE2");switch(a){case"FROM_START":"0"==(l=t.getAdjustedInt(e,"AT1"))&&(l="");break;case"FROM_END":var l=t.getAdjustedInt(e,"AT1",0,!0);break;case"FIRST":l="0";break;default:throw"Unhandled option (lists_getSublist)"}switch(_){case"FROM_START":var s=t.getAdjustedInt(e,"AT2");break;case"FROM_END":s=t.getAdjustedInt(e,"AT2",0,!0);external_Blockly_namespaceObject.isNumber(String(s))?"0"==s&&(s=""):(t.definitions_.import_sys="import sys",s+=" or sys.maxsize");break;case"LAST":s="-1";break;default:throw"Unhandled option (lists_getSublist)"}return[n+"["+l+" : "+s+"]",t.ORDER_ATOMIC]},text_text_substring=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+t.valueToCode(this,"AT1",t.ORDER_ATOMIC)+" : "+t.valueToCode(this,"AT2",t.ORDER_ATOMIC)+"]",t.ORDER_ATOMIC]},text_text_capital=function(e,t){var n=this.getFieldValue("CAPITAL");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_center=function(e,t){var n=this.getFieldValue("CENTER");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"WID",t.ORDER_ATOMIC)+","+t.valueToCode(this,"Symbol",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_find=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".find("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_join_seq=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".join("+(t.valueToCode(this,"LIST",t.ORDER_ASSIGNMENT)||"0")+")",t.ORDER_ATOMIC]},text_text_replace=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".replace("+t.valueToCode(this,"STR1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"STR2",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_split=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+".split("+(t.valueToCode(this,"VAL",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_strip=function(e,t){var n=this.getFieldValue("TOWHAT");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_format=function(e,t){for(var n=this.getFieldValue("VAR"),a=new Array(this.itemCount_),_=0;_",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"+a.join("\n")+"\n"+_.join("")+"\n"+e+"while True:\n"+l.join("")+s.join("\n"):t.join("\n")+"\n"+a.join("\n")+"\n"+_.join("")+"\n"+e+s.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("中删除列"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Drops columns from dataframe.")}},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_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.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_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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nfor i in house:\n i.hide()\n"},algorithm_algorithm_add_school=function(){return"path = [1]\ncar = sprite.Sprite('car', 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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nbarricade = sprite.Sprite('barricade', 570, 170)\nbarricade.enlargeTo(100)\nfor i in house:\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;s{document.removeEventListener("DOMContentLoaded",e),this._pageLoad.resolve()};document.addEventListener("DOMContentLoaded",e)}else this._pageLoad.resolve();(async()=>{switch(n){case"python":case"python3":case"python3.11":const{KernelPython3:t}=await __webpack_require__.e(211).then(__webpack_require__.bind(__webpack_require__,211));this._kernel=new t(e);break;case"python3-old":case"python3.8":const{KernelPython3Old:a}=await __webpack_require__.e(195).then(__webpack_require__.bind(__webpack_require__,5195));this._kernel=new a(e);break;case"js":case"javascript":const{KernelJavaScript:_}=await __webpack_require__.e(97).then(__webpack_require__.bind(__webpack_require__,4097));this._kernel=new _(e);break;case"sql":const{KernelSQL:l}=await Promise.all([__webpack_require__.e(960),__webpack_require__.e(837)]).then(__webpack_require__.bind(__webpack_require__,592));this._kernel=new l(e);break;case"ocaml":const{KernelOCaml:s}=await __webpack_require__.e(38).then(__webpack_require__.bind(__webpack_require__,38));this._kernel=new s(e);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 e=await this.kernelAvailable();return await e.loaded(),e}get kernel(){return this._kernel}get kernelSafe(){var e;return(null===(e=this.kernel)||void 0===e?void 0:e.ready)?this.kernel:null}async showLoader(e,t=!1,n=!0){this.kernelAvailable().then((()=>{var e;return null===(e=this.kernel)||void 0===e?void 0:e.init()})),__webpack_require__.e(317).then(__webpack_require__.bind(__webpack_require__,1317));const a="basthon-loader-"+(t?"full":"foot"),_=document.createElement("div");_.id=this._loaderId,_.classList.add("darklighted"),_.classList.add("basthon-loader-root"),_.classList.add(a);const l=document.createElement("div");l.classList.add("basthon-loader-container"),l.classList.add(a),_.appendChild(l);const s=document.createElement("div");s.classList.add("basthon-loader-spinner"),s.classList.add(a),s.innerHTML="",l.appendChild(s);const i=document.createElement("div");i.classList.add("basthon-loader-break"),i.classList.add(a),l.appendChild(i);const o=document.createElement("div");o.classList.add("basthon-loader-text"),o.classList.add(a),o.innerHTML=e,l.appendChild(o),this._loaderTextElem=o;const r=document.createElement("div");r.classList.add("basthon-loader-text"),r.classList.add(a),r.style.display="none",l.appendChild(r),this._loaderTextError=r,await this.pageLoad(),document.body.appendChild(_),this._rootLoader=_;try{await this.kernelLoaded()}catch(e){const t=this.browser();this.setErrorText(`Erreur de chargement de Basthon !!!
Vérifiez que votre navigateur est à jour.
Version détectée : ${t.name} ${t.version}.`);for(const e of document.body.querySelectorAll(".basthon-loader-foot"))e.classList.remove("basthon-loader-foot"),e.classList.add("basthon-loader-full");return s.classList.remove("basthon-loader-spinner"),s.classList.add("basthon-loader-error"),void(this._doNotHideLoader=!0)}this._doNotHideLoader=!1,n&&this.hideLoader()}setLoaderText(e){null!=this._loaderTextElem&&(this._loaderTextElem.innerHTML=e)}setErrorText(e){null!=this._loaderTextElem&&(this._loaderTextElem.style.display="none"),null!=this._loaderTextError&&(this._loaderTextError.style.display="",this._loaderTextError.innerHTML=e)}hideLoader(){if(this._doNotHideLoader)return;const e=this._rootLoader;null!=e&&(e.classList.add("basthon-loader-hide"),window.setTimeout((()=>{this._rootLoader=void 0,e.remove()}),1100))}browser(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\bOPR|Edge\/(\d+)/))?{name:"Opera",version:e[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}}const external_$_namespaceObject=$;var external_$_default=__webpack_require__.n(external_$_namespaceObject);const statusbar_image_namespaceObject='\r\n
\r\n\r\n
';class StatusBarImage extends external_Mixly_namespaceObject.PageBase{static{external_Mixly_namespaceObject.HTMLTemplate.add("html/statusbar/statusbar-image.html",new external_Mixly_namespaceObject.HTMLTemplate(statusbar_image_namespaceObject)),this.init=function(){external_Mixly_namespaceObject.StatusBarsManager.typesRegistry.register(["images"],StatusBarImage);const e=external_Mixly_namespaceObject.Workspace.getMain().getStatusBarsManager();e.add("images","images",external_Blockly_namespaceObject.Msg.PYTHON_PYODIDE_IMAGE),e.changeTo("output")}}constructor(){super();const e=external_$_default()(external_Mixly_namespaceObject.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 a=e.content,_=null,l=null;switch(e.display_type){case"p5":a.style.width="100%",a.style.height="100%",a.style.display="flex",a.style.justifyContent="center",a.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(a,{childList:!0}),a.querySelectorAll("canvas,video").forEach(n),t.append(a);break;case"matplotlib":_=a.querySelector("canvas"),_&&(a=_),a.style.width="",a.style.height="",a.style.maxWidth="100%",a.style.maxHeight="100%",t.append(a);break;case"ocaml-canvas":a.style.width="",a.style.height="",a.style.maxWidth="100%",a.style.maxHeight="100%",t.append(a);break;case"turtle":a.setAttribute("width","100%"),a.setAttribute("height","100%"),t.append(a.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 a=e.content[n];"image/png"===n&&(a=''),t.append(a);break}break;case"tutor":if(t.append(external_$_default()(e.content.replace("overflow-y%3A%20hidden%3B",""))),l=this.getContent()[0].getElementsByTagName("iframe")[0],null==l)return;l.style.maxHeight=l.style.minHeight="100%",new IntersectionObserver(((e,t)=>{const n=e[0];n&&!n.isIntersecting||(l.contentWindow?.postMessage({type:"redraw"},"*"),t.disconnect())})).observe(l);break;default:console.error(`Not supported node type '${e.display_type}' in eval.display result processing.`)}}}const statusbar_image=StatusBarImage;class PythonShell{static{this.pythonShell=null,this.init=async function(){statusbar_image.init();const e=external_path_.relative(external_Mixly_namespaceObject.Env.indexDirPath,external_Mixly_namespaceObject.Env.boardDirPath),t=new KernelLoader({rootPath:external_path_.join(e,"deps"),language:"python3"}),n=await t.kernelAvailable();n&&(await n.init(),await n.loaded(),this.loader=t,this.kernel=n,this.pythonShell=new PythonShell,this.pyodide=window.pyodide,this.interruptBuffer=new Uint8Array(new ArrayBuffer(1)),this.pyodide.setInterruptBuffer(this.interruptBuffer))},this.run=function(){const e=external_Mixly_namespaceObject.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(e)},this.stop=function(){return this.pythonShell.stop()}}#e=null;#t=null;#n=null;#a={row:0,column:0};#_="";#l=null;#s=null;#i=!1;#o=!1;#r=null;#p=()=>this.#c();#u=[{name:"REPL-Enter",bindKey:"Enter",exec:e=>{if(e.getSession().selection.getCursor().row===this.#a.row){const e=this.#e.getEndPos();let t=this.#e.getValueRange(this.#a,e);t=t.replace(this.#_,""),this.#l?.(t),this.#l=null,this.#s=null,this.#e.addValue("\n"),this.#m()}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:e=>{const t=e.getSession().selection.getCursor();return t.row{this.#o=!1,this.#e.addValue(`\n==${external_Mixly_namespaceObject.Msg.Lang["shell.finish"]}==`)})),this.#r.addEventListener("eval.output",(e=>{this.#e.addValue(e.content)})),this.#r.addEventListener("eval.error",(()=>{this.#o=!1,this.#e.addValue(`\n==${external_Mixly_namespaceObject.Msg.Lang["shell.finish"]}==`)})),this.#r.addEventListener("eval.input",(e=>{const t=String(e?.content?.prompt);this.#e.addValue(t),this.#_=t,this.#l=e.resolve,this.#s=e.reject,this.#O()})),this.#r.addEventListener("eval.display",(e=>{this.#n.changeTo("images"),this.#t.display(e)}))}#c(){const e=this.#e.getEditor(),t=e.getSession().selection.getCursor();e.setReadOnly(t.row{-1!==e.indexOf("import turtle")&&(e+="\nturtle.done()\n"),-1!==e.indexOf("import matplotlib.pyplot")&&(e+="\nplt.clf()\n"),this.#n.changeTo("output"),this.#n.show(),this.#e.setValue(`${external_Mixly_namespaceObject.Msg.Lang["shell.running"]}...\n`),this.#o=!0,this.#r.dispatchEvent("eval.request",{code:e,interactive:!1})})).catch(external_Mixly_namespaceObject.Debug.error)}async stop(){if(this.#i&&this.#m(),this.#o){const e=5;PythonShell.interruptBuffer[0]=2;const t=Number(new Date);for(;Number(new Date)-t<1e3*e&&this.#o;)PythonShell.interruptBuffer[0]=2,await this.sleep(100);this.#o=!1}}sleep(e){return new Promise((t=>setTimeout(t,e)))}}const python_shell=PythonShell,NavExt={init:async function(){const e=external_Mixly_namespaceObject.app.getNav();e.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:external_Blockly_namespaceObject.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{python_shell.run()},scopeType:external_Mixly_namespaceObject.Nav.Scope.LEFT,weight:4}),e.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:external_Blockly_namespaceObject.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{python_shell.stop()},scopeType:external_Mixly_namespaceObject.Nav.Scope.LEFT,weight:5}),await python_shell.init()}},nav_ext=NavExt;nav_ext.init(),Object.assign(external_Blockly_namespaceObject.Variables,variables),Object.assign(external_Blockly_namespaceObject.Procedures,procedures),external_Blockly_namespaceObject.Python=Python,external_Blockly_namespaceObject.generator=Python,external_Mixly_namespaceObject.Profile.default={},Object.assign(external_Blockly_namespaceObject.Blocks,blocks_variables_namespaceObject,control_namespaceObject,math_namespaceObject,text_namespaceObject,lists_namespaceObject,dicts_namespaceObject,logic_namespaceObject,storage_namespaceObject,blocks_procedures_namespaceObject,tuple_namespaceObject,set_namespaceObject,html_namespaceObject,utility_namespaceObject,ai_namespaceObject,algorithm_namespaceObject,communicate_namespaceObject,cv_namespaceObject,data_namespaceObject,datastructure_namespaceObject,factory_namespaceObject,hardware_namespaceObject,inout_namespaceObject,iot_namespaceObject,pins_namespaceObject,serial_namespaceObject,sklearn_namespaceObject,system_namespaceObject,turtle_namespaceObject),Object.assign(external_Blockly_namespaceObject.Python.forBlock,generators_variables_namespaceObject,generators_control_namespaceObject,generators_math_namespaceObject,generators_text_namespaceObject,generators_lists_namespaceObject,generators_dicts_namespaceObject,generators_logic_namespaceObject,generators_storage_namespaceObject,generators_procedures_namespaceObject,generators_tuple_namespaceObject,generators_set_namespaceObject,generators_html_namespaceObject,generators_utility_namespaceObject,generators_ai_namespaceObject,generators_algorithm_namespaceObject,generators_communicate_namespaceObject,cv,generators_data_namespaceObject,generators_datastructure_namespaceObject,generators_factory_namespaceObject,generators_hardware_namespaceObject,generators_inout_namespaceObject,generators_iot_namespaceObject,generators_pins_namespaceObject,generators_serial_namespaceObject,generators_sklearn_namespaceObject,generators_system_namespaceObject,generators_turtle_namespaceObject)})(); \ No newline at end of file +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)}},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)}},TEXTS_HUE=160,text_text={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_TEXT_TOOLTIP)},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,'"')}},text_textarea={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_LINES_TOOLTIP)},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,'"')}};external_Blockly_namespaceObject.FieldTextInput.char_validator=function(e){if(e.length>1&&"\\"===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)}},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={};Procedures.NAME_TYPE=external_Blockly_namespaceObject.PROCEDURE_CATEGORY_NAME,Procedures.allProcedures=function(e){for(var t=e.getAllBlocks(!1),n=[],a=[],_=0;_"),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 "+r()+"("+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():r(),e+="("+a+", "+_+", "+l+")");else{var p=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=p(a,"_start"),_=p(_,"_end");p(l,"_inc"),e="number"==typeof a&&"number"==typeof _?a<_?o(0,_):r(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_datatime="import datatime",["datatime.datatime.fromtimestamp("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+")",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")',Blockly.Python.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]},generators_text_text=function(e,t){return[t.quote_(this.getFieldValue("TEXT")),t.ORDER_ATOMIC]},text_text_textarea=function(e,t){return['"""'+this.getFieldValue("VALUE")+'"""',t.ORDER_ATOMIC]},text_text_char=function(e,t){return["'"+this.getFieldValue("TEXT")+"'",t.ORDER_ATOMIC]},text_text_join=function(e,t){return[t.valueToCode(this,"A",t.ORDER_ATOMIC)+" + "+t.valueToCode(this,"B",t.ORDER_ATOMIC),t.ORDER_ADDITIVE]},text_ascii_to_char=function(e,t){return["chr("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_char_to_ascii=function(e,t){return["ord("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"a")+")",t.ORDER_ATOMIC]},text_number_to_text=function(e,t){return["str("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},text_text_length=function(e,t){return["len("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_char_at2=function(e,t){var n=e.getFieldValue("WHERE")||"FROM_START",a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';switch(n){case"FROM_START":return[a+"["+(e=t.getAdjustedInt(e,"AT"))+"]",t.ORDER_ATOMIC];case"FROM_END":return[a+"["+(e=t.getAdjustedInt(e,"AT",1,!0))+"]",t.ORDER_ATOMIC];case"RANDOM":return t.definitions_.import_random="import random",["random.choice("+a+")",t.ORDER_FUNCTION_CALL]}throw"Unhandled combination (lists_getIndex)."},text_text_char_at=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+(t.valueToCode(this,"AT",t.ORDER_ATOMIC)||0)+"]",t.ORDER_ATOMIC]},text_text_random_char=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""';return t.definitions_.import_random="import random",["random.choice("+n+")",t.ORDER_FUNCTION_CALL]},text_text_equals_starts_ends=function(e,t){var n=t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""',a=t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""',_=this.getFieldValue("DOWHAT");return"==="===_?[n+" == "+a,t.ORDER_ATOMIC]:[n+"."+_+"("+a+")",t.ORDER_ATOMIC]},text_text_compare_to=function(e,t){return["cmp("+(t.valueToCode(this,"STR1",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"STR2",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_substring2=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""',a=e.getFieldValue("WHERE1"),_=e.getFieldValue("WHERE2");switch(a){case"FROM_START":"0"==(l=t.getAdjustedInt(e,"AT1"))&&(l="");break;case"FROM_END":var l=t.getAdjustedInt(e,"AT1",0,!0);break;case"FIRST":l="0";break;default:throw"Unhandled option (lists_getSublist)"}switch(_){case"FROM_START":var s=t.getAdjustedInt(e,"AT2");break;case"FROM_END":s=t.getAdjustedInt(e,"AT2",0,!0);external_Blockly_namespaceObject.isNumber(String(s))?"0"==s&&(s=""):(t.definitions_.import_sys="import sys",s+=" or sys.maxsize");break;case"LAST":s="-1";break;default:throw"Unhandled option (lists_getSublist)"}return[n+"["+l+" : "+s+"]",t.ORDER_ATOMIC]},text_text_substring=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+"["+t.valueToCode(this,"AT1",t.ORDER_ATOMIC)+" : "+t.valueToCode(this,"AT2",t.ORDER_ATOMIC)+"]",t.ORDER_ATOMIC]},text_text_capital=function(e,t){var n=this.getFieldValue("CAPITAL");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_center=function(e,t){var n=this.getFieldValue("CENTER");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"WID",t.ORDER_ATOMIC)+","+t.valueToCode(this,"Symbol",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_find=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".find("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_join_seq=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".join("+(t.valueToCode(this,"LIST",t.ORDER_ASSIGNMENT)||"0")+")",t.ORDER_ATOMIC]},text_text_replace=function(e,t){return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".replace("+t.valueToCode(this,"STR1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"STR2",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},text_text_split=function(e,t){return[(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+".split("+(t.valueToCode(this,"VAL",t.ORDER_ATOMIC)||'""')+")",t.ORDER_ATOMIC]},text_text_strip=function(e,t){var n=this.getFieldValue("TOWHAT");return[t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},text_text_format=function(e,t){for(var n=this.getFieldValue("VAR"),a=new Array(this.itemCount_),_=0;_",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"+a.join("\n")+"\n"+_.join("")+"\n"+e+"while True:\n"+l.join("")+s.join("\n"):t.join("\n")+"\n"+a.join("\n")+"\n"+_.join("")+"\n"+e+s.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("中删除列"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Drops columns from dataframe.")}},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_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.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_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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nfor i in house:\n i.hide()\n"},algorithm_algorithm_add_school=function(){return"path = [1]\ncar = sprite.Sprite('car', 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('map_xuexiao')\n\nhouse = [ sprite.Sprite('mark', 150, 380),\n sprite.Sprite('School', 115, 195),\n sprite.Sprite('House25', 264, 67),\n sprite.Sprite('House36', 320, 200),\n sprite.Sprite('House47', 290, 371),\n sprite.Sprite('House25', 479, 233),\n sprite.Sprite('House36', 674, 96),\n sprite.Sprite('House47', 642, 318)\n]\nbarricade = sprite.Sprite('barricade', 570, 170)\nbarricade.enlargeTo(100)\nfor i in house:\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;s{document.removeEventListener("DOMContentLoaded",e),this._pageLoad.resolve()};document.addEventListener("DOMContentLoaded",e)}else this._pageLoad.resolve();(async()=>{switch(n){case"python":case"python3":case"python3.11":const{KernelPython3:t}=await __webpack_require__.e(211).then(__webpack_require__.bind(__webpack_require__,211));this._kernel=new t(e);break;case"python3-old":case"python3.8":const{KernelPython3Old:a}=await __webpack_require__.e(195).then(__webpack_require__.bind(__webpack_require__,5195));this._kernel=new a(e);break;case"js":case"javascript":const{KernelJavaScript:_}=await __webpack_require__.e(97).then(__webpack_require__.bind(__webpack_require__,4097));this._kernel=new _(e);break;case"sql":const{KernelSQL:l}=await Promise.all([__webpack_require__.e(960),__webpack_require__.e(837)]).then(__webpack_require__.bind(__webpack_require__,592));this._kernel=new l(e);break;case"ocaml":const{KernelOCaml:s}=await __webpack_require__.e(38).then(__webpack_require__.bind(__webpack_require__,38));this._kernel=new s(e);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 e=await this.kernelAvailable();return await e.loaded(),e}get kernel(){return this._kernel}get kernelSafe(){var e;return(null===(e=this.kernel)||void 0===e?void 0:e.ready)?this.kernel:null}async showLoader(e,t=!1,n=!0){this.kernelAvailable().then((()=>{var e;return null===(e=this.kernel)||void 0===e?void 0:e.init()})),__webpack_require__.e(317).then(__webpack_require__.bind(__webpack_require__,1317));const a="basthon-loader-"+(t?"full":"foot"),_=document.createElement("div");_.id=this._loaderId,_.classList.add("darklighted"),_.classList.add("basthon-loader-root"),_.classList.add(a);const l=document.createElement("div");l.classList.add("basthon-loader-container"),l.classList.add(a),_.appendChild(l);const s=document.createElement("div");s.classList.add("basthon-loader-spinner"),s.classList.add(a),s.innerHTML="",l.appendChild(s);const i=document.createElement("div");i.classList.add("basthon-loader-break"),i.classList.add(a),l.appendChild(i);const o=document.createElement("div");o.classList.add("basthon-loader-text"),o.classList.add(a),o.innerHTML=e,l.appendChild(o),this._loaderTextElem=o;const r=document.createElement("div");r.classList.add("basthon-loader-text"),r.classList.add(a),r.style.display="none",l.appendChild(r),this._loaderTextError=r,await this.pageLoad(),document.body.appendChild(_),this._rootLoader=_;try{await this.kernelLoaded()}catch(e){const t=this.browser();this.setErrorText(`Erreur de chargement de Basthon !!!
Vérifiez que votre navigateur est à jour.
Version détectée : ${t.name} ${t.version}.`);for(const e of document.body.querySelectorAll(".basthon-loader-foot"))e.classList.remove("basthon-loader-foot"),e.classList.add("basthon-loader-full");return s.classList.remove("basthon-loader-spinner"),s.classList.add("basthon-loader-error"),void(this._doNotHideLoader=!0)}this._doNotHideLoader=!1,n&&this.hideLoader()}setLoaderText(e){null!=this._loaderTextElem&&(this._loaderTextElem.innerHTML=e)}setErrorText(e){null!=this._loaderTextElem&&(this._loaderTextElem.style.display="none"),null!=this._loaderTextError&&(this._loaderTextError.style.display="",this._loaderTextError.innerHTML=e)}hideLoader(){if(this._doNotHideLoader)return;const e=this._rootLoader;null!=e&&(e.classList.add("basthon-loader-hide"),window.setTimeout((()=>{this._rootLoader=void 0,e.remove()}),1100))}browser(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\bOPR|Edge\/(\d+)/))?{name:"Opera",version:e[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})}}const external_$_namespaceObject=$;var external_$_default=__webpack_require__.n(external_$_namespaceObject);const statusbar_image_namespaceObject='\r\n
\r\n\r\n
';class StatusBarImage extends external_Mixly_namespaceObject.PageBase{static{external_Mixly_namespaceObject.HTMLTemplate.add("html/statusbar/statusbar-image.html",new external_Mixly_namespaceObject.HTMLTemplate(statusbar_image_namespaceObject)),this.init=function(){external_Mixly_namespaceObject.StatusBarsManager.typesRegistry.register(["images"],StatusBarImage);const e=external_Mixly_namespaceObject.Workspace.getMain().getStatusBarsManager();e.add("images","images",external_Blockly_namespaceObject.Msg.PYTHON_PYODIDE_IMAGE),e.changeTo("output")}}constructor(){super();const e=external_$_default()(external_Mixly_namespaceObject.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 a=e.content,_=null,l=null;switch(e.display_type){case"p5":a.style.width="100%",a.style.height="100%",a.style.display="flex",a.style.justifyContent="center",a.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(a,{childList:!0}),a.querySelectorAll("canvas,video").forEach(n),t.append(a);break;case"matplotlib":_=a.querySelector("canvas"),_&&(a=_),a.style.width="",a.style.height="",a.style.maxWidth="100%",a.style.maxHeight="100%",t.append(a);break;case"ocaml-canvas":a.style.width="",a.style.height="",a.style.maxWidth="100%",a.style.maxHeight="100%",t.append(a);break;case"turtle":a.setAttribute("width","100%"),a.setAttribute("height","100%"),t.append(a.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 a=e.content[n];"image/png"===n&&(a=''),t.append(a);break}break;case"tutor":if(t.append(external_$_default()(e.content.replace("overflow-y%3A%20hidden%3B",""))),l=this.getContent()[0].getElementsByTagName("iframe")[0],null==l)return;l.style.maxHeight=l.style.minHeight="100%",new IntersectionObserver(((e,t)=>{const n=e[0];n&&!n.isIntersecting||(l.contentWindow?.postMessage({type:"redraw"},"*"),t.disconnect())})).observe(l);break;default:console.error(`Not supported node type '${e.display_type}' in eval.display result processing.`)}}}const statusbar_image=StatusBarImage;class PythonShell{static{this.pythonShell=null,this.init=async function(){statusbar_image.init();const e=external_path_.relative(external_Mixly_namespaceObject.Env.indexDirPath,external_Mixly_namespaceObject.Env.boardDirPath),t=new KernelLoader({rootPath:external_path_.join(e,"deps"),language:"python3"}),n=await t.kernelAvailable();n&&(await n.init(),await n.loaded(),this.loader=t,this.kernel=n,this.pythonShell=new PythonShell,this.pyodide=window.pyodide,this.interruptBuffer=new Uint8Array(new ArrayBuffer(1)),this.pyodide.setInterruptBuffer(this.interruptBuffer))},this.run=function(){const e=external_Mixly_namespaceObject.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(e)},this.stop=function(){return this.pythonShell.stop()}}#e=null;#t=null;#n=null;#a={row:0,column:0};#_="";#l=null;#s=null;#i=!1;#o=!1;#r=null;#p=()=>this.#c();#u=[{name:"REPL-Enter",bindKey:"Enter",exec:e=>{if(e.getSession().selection.getCursor().row===this.#a.row){const e=this.#e.getEndPos();let t=this.#e.getValueRange(this.#a,e);t=t.replace(this.#_,""),this.#l?.(t),this.#l=null,this.#s=null,this.#e.addValue("\n"),this.#m()}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:e=>{const t=e.getSession().selection.getCursor();return t.row{this.#o=!1,this.#e.addValue(`\n==${external_Mixly_namespaceObject.Msg.Lang["shell.finish"]}==`)})),this.#r.addEventListener("eval.output",(e=>{this.#e.addValue(e.content)})),this.#r.addEventListener("eval.error",(()=>{this.#o=!1,this.#e.addValue(`\n==${external_Mixly_namespaceObject.Msg.Lang["shell.finish"]}==`)})),this.#r.addEventListener("eval.input",(e=>{const t=String(e?.content?.prompt);this.#e.addValue(t),this.#_=t,this.#l=e.resolve,this.#s=e.reject,this.#O()})),this.#r.addEventListener("eval.display",(e=>{this.#n.changeTo("images"),this.#t.display(e)}))}#c(){const e=this.#e.getEditor(),t=e.getSession().selection.getCursor();e.setReadOnly(t.row{-1!==e.indexOf("import turtle")&&(e+="\nturtle.done()\n"),-1!==e.indexOf("import matplotlib.pyplot")&&(e+="\nplt.clf()\n"),this.#n.changeTo("output"),this.#n.show(),this.#e.setValue(`${external_Mixly_namespaceObject.Msg.Lang["shell.running"]}...\n`),this.#o=!0,this.#r.dispatchEvent("eval.request",{code:e,interactive:!1})})).catch(external_Mixly_namespaceObject.Debug.error)}async stop(){if(this.#i&&this.#m(),this.#o){const e=5;PythonShell.interruptBuffer[0]=2;const t=Number(new Date);for(;Number(new Date)-t<1e3*e&&this.#o;)PythonShell.interruptBuffer[0]=2,await this.sleep(100);this.#o=!1}}sleep(e){return new Promise((t=>setTimeout(t,e)))}}const python_shell=PythonShell,NavExt={init:async function(){const e=external_Mixly_namespaceObject.app.getNav();e.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:external_Blockly_namespaceObject.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{python_shell.run()},scopeType:external_Mixly_namespaceObject.Nav.Scope.LEFT,weight:4}),e.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:external_Blockly_namespaceObject.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{python_shell.stop()},scopeType:external_Mixly_namespaceObject.Nav.Scope.LEFT,weight:5}),await python_shell.init()}},nav_ext=NavExt;nav_ext.init(),Object.assign(external_Blockly_namespaceObject.Variables,variables),Object.assign(external_Blockly_namespaceObject.Procedures,procedures),external_Blockly_namespaceObject.Python=Python,external_Blockly_namespaceObject.generator=Python,external_Mixly_namespaceObject.Profile.default={},Object.assign(external_Blockly_namespaceObject.Blocks,blocks_variables_namespaceObject,control_namespaceObject,math_namespaceObject,text_namespaceObject,lists_namespaceObject,dicts_namespaceObject,logic_namespaceObject,storage_namespaceObject,blocks_procedures_namespaceObject,tuple_namespaceObject,set_namespaceObject,html_namespaceObject,utility_namespaceObject,ai_namespaceObject,algorithm_namespaceObject,communicate_namespaceObject,cv_namespaceObject,data_namespaceObject,datastructure_namespaceObject,factory_namespaceObject,hardware_namespaceObject,inout_namespaceObject,iot_namespaceObject,pins_namespaceObject,serial_namespaceObject,sklearn_namespaceObject,system_namespaceObject,turtle_namespaceObject),Object.assign(external_Blockly_namespaceObject.Python.forBlock,generators_variables_namespaceObject,generators_control_namespaceObject,generators_math_namespaceObject,generators_text_namespaceObject,generators_lists_namespaceObject,generators_dicts_namespaceObject,generators_logic_namespaceObject,generators_storage_namespaceObject,generators_procedures_namespaceObject,generators_tuple_namespaceObject,generators_set_namespaceObject,generators_html_namespaceObject,generators_utility_namespaceObject,generators_ai_namespaceObject,generators_algorithm_namespaceObject,generators_communicate_namespaceObject,cv,generators_data_namespaceObject,generators_datastructure_namespaceObject,generators_factory_namespaceObject,generators_hardware_namespaceObject,generators_inout_namespaceObject,generators_iot_namespaceObject,generators_pins_namespaceObject,generators_serial_namespaceObject,generators_sklearn_namespaceObject,generators_system_namespaceObject,generators_turtle_namespaceObject)})(); \ No newline at end of file diff --git a/boards/default/python_skulpt/main.bundle.js b/boards/default/python_skulpt/main.bundle.js index 15addb59..ee5efd50 100644 --- a/boards/default/python_skulpt/main.bundle.js +++ b/boards/default/python_skulpt/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{var t={23:()=>{Sk.builtinFiles={files:{"src/builtin/this.py":'s = """Gur Mra bs Clguba, ol Gvz Crgref\n\nOrnhgvshy vf orggre guna htyl.\nRkcyvpvg vf orggre guna vzcyvpvg.\nFvzcyr vf orggre guna pbzcyrk.\nPbzcyrk vf orggre guna pbzcyvpngrq.\nSyng vf orggre guna arfgrq.\nFcnefr vf orggre guna qrafr.\nErnqnovyvgl pbhagf.\nFcrpvny pnfrf nera\'g fcrpvny rabhtu gb oernx gur ehyrf.\nNygubhtu cenpgvpnyvgl orngf chevgl.\nReebef fubhyq arire cnff fvyragyl.\nHayrff rkcyvpvgyl fvyraprq.\nVa gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.\nGurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.\nNygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh\'er Qhgpu.\nAbj vf orggre guna arire.\nNygubhtu arire vf bsgra orggre guna *evtug* abj.\nVs gur vzcyrzragngvba vf uneq gb rkcynva, vg\'f n onq vqrn.\nVs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.\nAnzrfcnprf ner bar ubaxvat terng vqrn -- yrg\'f qb zber bs gubfr!"""\n\nd = {}\nfor c in (65, 97):\n for i in range(26):\n d[chr(i+c)] = chr((i+13) % 26 + c)\n\nprint("".join([d.get(c, c) for c in s]))\n',"src/lib/abc.py":'import _sk_fail; _sk_fail._("abc")\n',"src/lib/aifc.py":'import _sk_fail; _sk_fail._("aifc")\n',"src/lib/antigravity.py":'import webbrowser\n\nwebbrowser.open("https://xkcd.com/353/")\n',"src/lib/anydbm.py":'import _sk_fail; _sk_fail._("anydbm")\n',"src/lib/ast.py":'import _sk_fail; _sk_fail._("ast")\n',"src/lib/asynchat.py":'import _sk_fail; _sk_fail._("asynchat")\n',"src/lib/asyncore.py":'import _sk_fail; _sk_fail._("asyncore")\n',"src/lib/atexit.py":'import _sk_fail; _sk_fail._("atexit")\n',"src/lib/audiodev.py":'import _sk_fail; _sk_fail._("audiodev")\n',"src/lib/base64.py":'import _sk_fail; _sk_fail._("base64")\n',"src/lib/BaseHTTPServer.py":'import _sk_fail; _sk_fail._("BaseHTTPServer")\n',"src/lib/Bastion.py":'import _sk_fail; _sk_fail._("Bastion")\n',"src/lib/bdb.py":'import _sk_fail; _sk_fail._("bdb")\n',"src/lib/binhex.py":'import _sk_fail; _sk_fail._("binhex")\n',"src/lib/bisect.py":'"""Bisection algorithms."""\n\ndef insort_right(a, x, lo=0, hi=None):\n """Insert item x in list a, and keep it sorted assuming a is sorted.\n\n If x is already in a, insert it to the right of the rightmost x.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if x < a[mid]: hi = mid\n else: lo = mid+1\n a.insert(lo, x)\n\ndef bisect_right(a, x, lo=0, hi=None):\n """Return the index where to insert item x in list a, assuming a is sorted.\n\n The return value i is such that all e in a[:i] have e <= x, and all e in\n a[i:] have e > x. So if x already appears in the list, a.insert(x) will\n insert just after the rightmost x already there.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if x < a[mid]: hi = mid\n else: lo = mid+1\n return lo\n\ndef insort_left(a, x, lo=0, hi=None):\n """Insert item x in list a, and keep it sorted assuming a is sorted.\n\n If x is already in a, insert it to the left of the leftmost x.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if a[mid] < x: lo = mid+1\n else: hi = mid\n a.insert(lo, x)\n\n\ndef bisect_left(a, x, lo=0, hi=None):\n """Return the index where to insert item x in list a, assuming a is sorted.\n\n The return value i is such that all e in a[:i] have e < x, and all e in\n a[i:] have e >= x. So if x already appears in the list, a.insert(x) will\n insert just before the leftmost x already there.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if a[mid] < x: lo = mid+1\n else: hi = mid\n return lo\n\n# Overwrite above definitions with a fast C implementation\ntry:\n from _bisect import *\nexcept ImportError:\n pass\n\n# Create aliases\nbisect = bisect_right\ninsort = insort_right\n',"src/lib/bsddb/__init__.py":'import _sk_fail; _sk_fail._("bsddb")\n',"src/lib/cgi.py":'import _sk_fail; _sk_fail._("cgi")\n',"src/lib/CGIHTTPServer.py":'import _sk_fail; _sk_fail._("CGIHTTPServer")\n',"src/lib/cgitb.py":'import _sk_fail; _sk_fail._("cgitb")\n',"src/lib/chunk.py":'import _sk_fail; _sk_fail._("chunk")\n',"src/lib/cmd.py":'import _sk_fail; _sk_fail._("cmd")\n',"src/lib/code.py":'import _sk_fail; _sk_fail._("code")\n',"src/lib/codecs.py":'import _sk_fail; _sk_fail._("codecs")\n',"src/lib/codeop.py":'import _sk_fail; _sk_fail._("codeop")\n',"src/lib/colorsys.py":'import _sk_fail; _sk_fail._("colorsys")\n',"src/lib/commands.py":'import _sk_fail; _sk_fail._("commands")\n',"src/lib/compileall.py":'import _sk_fail; _sk_fail._("compileall")\n',"src/lib/compiler/__init__.py":'import _sk_fail; _sk_fail._("compiler")\n',"src/lib/config/__init__.py":'import _sk_fail; _sk_fail._("config")\n',"src/lib/ConfigParser.py":'import _sk_fail; _sk_fail._("ConfigParser")\n',"src/lib/contextlib.py":'import _sk_fail; _sk_fail._("contextlib")\n',"src/lib/Cookie.py":'import _sk_fail; _sk_fail._("Cookie")\n',"src/lib/cookielib.py":'import _sk_fail; _sk_fail._("cookielib")\n',"src/lib/copy.py":'"""\nThis file was modified from CPython.\nCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved\n"""\nimport types\nclass Error(Exception):\n pass\nerror = Error \nclass _EmptyClass:\n pass\ntry:\n long\nexcept NameError:\n long = int\ntry:\n bytes\nexcept NameError:\n bytes = str\n\ndef check_notimplemented_state(x):\n getstate = getattr(x, "__getstate__", None)\n setstate = getattr(x, "__setstate__", None)\n initargs = getattr(x, "__getinitargs__", None)\n if getstate or setstate or initargs:\n raise NotImplementedError("Skulpt does not yet support copying with user-defined __getstate__, __setstate__ or __getinitargs__()")\n\n\ndef copy(x):\n cls = type(x)\n if callable(x):\n return x\n copier = getattr(cls, "__copy__", None)\n if copier:\n return copier(x)\n if cls in (type(None), int, float, bool, str, bytes, tuple, type, frozenset, long):\n return x\n if (cls == list) or (cls == dict) or (cls == set) or (cls == slice):\n return cls(x)\n reductor = getattr(x, "__reduce_ex__", None)\n if reductor:\n rv = reductor(4)\n else:\n reductor = getattr(x, "__reduce__", None)\n if reductor:\n rv = reductor()\n elif str(cls)[1:6] == "class":\n check_notimplemented_state(x)\n copier = _copy_inst\n return copier(x)\n else:\n raise Error("un(shallow)copyable object of type %s" % cls)\n if isinstance(rv, str):\n return x\n return _reconstruct(x, rv, 0)\n\ndef _copy_inst(x):\n if hasattr(x, \'__copy__\'):\n return x.__copy__()\n if hasattr(x, \'__getinitargs__\'):\n args = x.__getinitargs__()\n y = x.__class__(*args)\n else:\n y = _EmptyClass()\n y.__class__ = x.__class__\n if hasattr(x, \'__getstate__\'):\n state = x.__getstate__()\n else:\n state = x.__dict__\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n y.__dict__.update(state)\n return y\n\nd = _deepcopy_dispatch = {}\n\ndef deepcopy(x, memo=None, _nil=[]):\n """Deep copy operation on arbitrary Python objects.\n See the module\'s __doc__ string for more info.\n """\n if memo is None:\n memo = {}\n idx = id(x)\n y = memo.get(idx, _nil)\n if y is not _nil:\n return y\n cls = type(x)\n copier = _deepcopy_dispatch.get(cls)\n if copier:\n y = copier(x, memo)\n else:\n try:\n issc = issubclass(cls, type)\n except TypeError: # cls is not a class (old Boost; see SF #502085)\n issc = 0\n if issc:\n y = _deepcopy_atomic(x, memo)\n else:\n copier = getattr(x, "__deepcopy__", None)\n if copier:\n y = copier(memo)\n else:\n reductor = getattr(x, "__reduce_ex__", None)\n if reductor:\n rv = reductor(2)\n else:\n rv = None\n reductor = getattr(x, "__reduce__", None)\n if reductor:\n rv = reductor()\n elif str(cls)[1:6] == "class":\n check_notimplemented_state(x)\n copier = _deepcopy_dispatch["InstanceType"]\n y = copier(x, memo)\n else:\n raise Error(\n "un(deep)copyable object of type %s" % cls)\n if rv is not None:\n y = _reconstruct(x, rv, 1, memo)\n memo[idx] = y\n _keep_alive(x, memo) # Make sure x lives at least as long as d\n return y\n\ndef _deepcopy_atomic(x, memo):\n return x\nd[type(None)] = _deepcopy_atomic\n# d[type(Ellipsis)] = _deepcopy_atomic\nd[type(NotImplemented)] = _deepcopy_atomic\nd[int] = _deepcopy_atomic\nd[float] = _deepcopy_atomic\nd[bool] = _deepcopy_atomic\nd[complex] = _deepcopy_atomic\nd[bytes] = _deepcopy_atomic\nd[str] = _deepcopy_atomic\n# try:\n# d[types.CodeType] = _deepcopy_atomic\n# except AttributeError:\n# pass\nd[type] = _deepcopy_atomic\n# d[types.BuiltinFunctionType] = _deepcopy_atomic\nd[types.FunctionType] = _deepcopy_atomic\n# d[weakref.ref] = _deepcopy_atomic\n\ndef _deepcopy_list(x, memo):\n y = []\n memo[id(x)] = y\n for a in x:\n y.append(deepcopy(a, memo))\n return y\nd[list] = _deepcopy_list\n\ndef _deepcopy_set(x, memo):\n result = set([]) # make empty set\n memo[id(x)] = result # register this set in the memo for loop checking\n for a in x: # go through elements of set\n result.add(deepcopy(a, memo)) # add the copied elements into the new set\n return result # return the new set\nd[set] = _deepcopy_set\n\ndef _deepcopy_frozenset(x, memo):\n result = frozenset(_deepcopy_set(x,memo)) \n memo[id(x)] = result \n return result\nd[frozenset] = _deepcopy_frozenset\n\ndef _deepcopy_tuple(x, memo):\n y = [deepcopy(a, memo) for a in x]\n # We\'re not going to put the tuple in the memo, but it\'s still important we\n # check for it, in case the tuple contains recursive mutable structures.\n try:\n return memo[id(x)]\n except KeyError:\n pass\n for k, j in zip(x, y):\n if k is not j:\n y = tuple(y)\n break\n else:\n y = x\n return y\nd[tuple] = _deepcopy_tuple\n\ndef _deepcopy_dict(x, memo):\n y = {}\n memo[id(x)] = y\n for key, value in x.items():\n y[deepcopy(key, memo)] = deepcopy(value, memo)\n return y\nd[dict] = _deepcopy_dict\n\n# def _deepcopy_method(x, memo): # Copy instance methods\n# y = type(x)(x.im_func, deepcopy(x.im_self, memo), x.im_class);\n# return y\nd[types.MethodType] = _deepcopy_atomic\n\ndef _deepcopy_inst(x, memo):\n if hasattr(x, \'__deepcopy__\'):\n return x.__deepcopy__(memo)\n if hasattr(x, \'__getinitargs__\'):\n args = x.__getinitargs__()\n args = deepcopy(args, memo)\n y = x.__class__(*args)\n else:\n y = _EmptyClass()\n y.__class__ = x.__class__\n memo[id(x)] = y\n if hasattr(x, \'__getstate__\'):\n state = x.__getstate__()\n else:\n state = x.__dict__\n state = deepcopy(state, memo)\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n y.__dict__.update(state)\n return y\nd["InstanceType"] = _deepcopy_inst\n\ndef _keep_alive(x, memo):\n """Keeps a reference to the object x in the memo.\n Because we remember objects by their id, we have\n to assure that possibly temporary objects are kept\n alive by referencing them.\n We store a reference at the id of the memo, which should\n normally not be used unless someone tries to deepcopy\n the memo itself...\n """\n try:\n memo[id(memo)].append(x)\n except KeyError:\n # aha, this is the first one :-)\n memo[id(memo)]=[x]\n\ndef _reconstruct(x, info, deep, memo=None):\n if isinstance(info, str):\n return x\n assert isinstance(info, tuple)\n if memo is None:\n memo = {}\n n = len(info)\n assert n in (2, 3, 4, 5)\n callable, args = info[:2]\n if n > 2:\n state = info[2]\n else:\n state = None\n if n > 3:\n listiter = info[3]\n else:\n listiter = None\n if n > 4:\n dictiter = info[4]\n else:\n dictiter = None\n if deep:\n args = deepcopy(args, memo)\n y = callable(*args)\n memo[id(x)] = y\n\n if state is not None:\n if deep:\n state = deepcopy(state, memo)\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n if isinstance(state, tuple) and len(state) == 2:\n state, slotstate = state\n else:\n slotstate = None\n if state is not None:\n y.__dict__.update(state)\n if slotstate is not None:\n for key, value in slotstate.items():\n setattr(y, key, value)\n\n if listiter is not None:\n for item in listiter:\n if deep:\n item = deepcopy(item, memo)\n y.append(item)\n if dictiter is not None:\n for key, value in dictiter:\n if deep:\n key = deepcopy(key, memo)\n value = deepcopy(value, memo)\n y[key] = value\n return y\n\ndel d\n\ndel types\n\n# Helper for instance creation without calling __init__\nclass _EmptyClass:\n pass',"src/lib/copy_reg.py":'import _sk_fail; _sk_fail._("copy_reg")\n',"src/lib/cProfile.py":'import _sk_fail; _sk_fail._("cProfile")\n',"src/lib/csv.py":'import _sk_fail; _sk_fail._("csv")\n',"src/lib/ctypes/macholib/__init__.py":'import _sk_fail; _sk_fail._("macholib")\n',"src/lib/ctypes/__init__.py":'import _sk_fail; _sk_fail._("ctypes")\n',"src/lib/curses/__init__.py":'import _sk_fail; _sk_fail._("curses")\n',"src/lib/dbhash.py":'import _sk_fail; _sk_fail._("dbhash")\n',"src/lib/decimal.py":'import _sk_fail; _sk_fail._("decimal")\n',"src/lib/difflib.py":'import _sk_fail; _sk_fail._("difflib")\n',"src/lib/dircache.py":'import _sk_fail; _sk_fail._("dircache")\n',"src/lib/dis.py":'import _sk_fail; _sk_fail._("dis")\n',"src/lib/distutils/command/__init__.py":'import _sk_fail; _sk_fail._("command")\n',"src/lib/distutils/tests/__init__.py":'import _sk_fail; _sk_fail._("tests")\n',"src/lib/distutils/__init__.py":'import _sk_fail; _sk_fail._("distutils")\n',"src/lib/doctest.py":'import _sk_fail; _sk_fail._("doctest")\n',"src/lib/DocXMLRPCServer.py":'import _sk_fail; _sk_fail._("DocXMLRPCServer")\n',"src/lib/dumbdbm.py":'import _sk_fail; _sk_fail._("dumbdbm")\n',"src/lib/dummy_thread.py":'import _sk_fail; _sk_fail._("dummy_thread")\n',"src/lib/dummy_threading.py":'import _sk_fail; _sk_fail._("dummy_threading")\n',"src/lib/email/mime/__init__.py":'import _sk_fail; _sk_fail._("mime")\n',"src/lib/email/test/data/__init__.py":'import _sk_fail; _sk_fail._("data")\n',"src/lib/email/__init__.py":'import _sk_fail; _sk_fail._("email")\n',"src/lib/encodings/__init__.py":'import _sk_fail; _sk_fail._("encodings")\n',"src/lib/filecmp.py":'import _sk_fail; _sk_fail._("filecmp")\n',"src/lib/fileinput.py":'import _sk_fail; _sk_fail._("fileinput")\n',"src/lib/fnmatch.py":'import _sk_fail; _sk_fail._("fnmatch")\n',"src/lib/formatter.py":'import _sk_fail; _sk_fail._("formatter")\n',"src/lib/fpformat.py":'import _sk_fail; _sk_fail._("fpformat")\n',"src/lib/fractions.py":'import _sk_fail; _sk_fail._("fractions")\n',"src/lib/ftplib.py":'import _sk_fail; _sk_fail._("ftplib")\n',"src/lib/genericpath.py":'import _sk_fail; _sk_fail._("genericpath")\n',"src/lib/getopt.py":'import _sk_fail; _sk_fail._("getopt")\n',"src/lib/getpass.py":'import _sk_fail; _sk_fail._("getpass")\n',"src/lib/gettext.py":'import _sk_fail; _sk_fail._("gettext")\n',"src/lib/glob.py":'import _sk_fail; _sk_fail._("glob")\n',"src/lib/gzip.py":'import _sk_fail; _sk_fail._("gzip")\n',"src/lib/hashlib.py":'import _sk_fail; _sk_fail._("hashlib")\n',"src/lib/heapq.py":'import _sk_fail; _sk_fail._("heapq")\n',"src/lib/hmac.py":'import _sk_fail; _sk_fail._("hmac")\n',"src/lib/hotshot/__init__.py":'import _sk_fail; _sk_fail._("hotshot")\n',"src/lib/htmlentitydefs.py":'import _sk_fail; _sk_fail._("htmlentitydefs")\n',"src/lib/htmllib.py":'import _sk_fail; _sk_fail._("htmllib")\n',"src/lib/HTMLParser.py":'import _sk_fail; _sk_fail._("HTMLParser")\n',"src/lib/httplib.py":'import _sk_fail; _sk_fail._("httplib")\n',"src/lib/idlelib/Icons/__init__.py":'import _sk_fail; _sk_fail._("Icons")\n',"src/lib/idlelib/__init__.py":'import _sk_fail; _sk_fail._("idlelib")\n',"src/lib/ihooks.py":'import _sk_fail; _sk_fail._("ihooks")\n',"src/lib/imaplib.py":'import _sk_fail; _sk_fail._("imaplib")\n',"src/lib/imghdr.py":'import _sk_fail; _sk_fail._("imghdr")\n',"src/lib/imputil.py":'import _sk_fail; _sk_fail._("imputil")\n',"src/lib/io.py":'import _sk_fail; _sk_fail._("io")\n',"src/lib/lib-dynload/__init__.py":'import _sk_fail; _sk_fail._("lib-dynload")\n',"src/lib/lib-tk/__init__.py":'import _sk_fail; _sk_fail._("lib-tk")\n',"src/lib/lib2to3/fixes/__init__.py":'import _sk_fail; _sk_fail._("fixes")\n',"src/lib/lib2to3/pgen2/__init__.py":'import _sk_fail; _sk_fail._("pgen2")\n',"src/lib/lib2to3/tests/__init__.py":'import _sk_fail; _sk_fail._("tests")\n',"src/lib/lib2to3/__init__.py":'import _sk_fail; _sk_fail._("lib2to3")\n',"src/lib/linecache.py":'import _sk_fail; _sk_fail._("linecache")\n',"src/lib/locale.py":'import _sk_fail; _sk_fail._("locale")\n',"src/lib/logging/__init__.py":'import _sk_fail; _sk_fail._("logging")\n',"src/lib/macpath.py":'import _sk_fail; _sk_fail._("macpath")\n',"src/lib/macurl2path.py":'import _sk_fail; _sk_fail._("macurl2path")\n',"src/lib/mailbox.py":'import _sk_fail; _sk_fail._("mailbox")\n',"src/lib/mailcap.py":'import _sk_fail; _sk_fail._("mailcap")\n',"src/lib/markupbase.py":'import _sk_fail; _sk_fail._("markupbase")\n',"src/lib/md5.py":'import _sk_fail; _sk_fail._("md5")\n',"src/lib/mhlib.py":'import _sk_fail; _sk_fail._("mhlib")\n',"src/lib/mimetools.py":'import _sk_fail; _sk_fail._("mimetools")\n',"src/lib/mimetypes.py":'import _sk_fail; _sk_fail._("mimetypes")\n',"src/lib/MimeWriter.py":'import _sk_fail; _sk_fail._("MimeWriter")\n',"src/lib/mimify.py":'import _sk_fail; _sk_fail._("mimify")\n',"src/lib/modulefinder.py":'import _sk_fail; _sk_fail._("modulefinder")\n',"src/lib/multifile.py":'import _sk_fail; _sk_fail._("multifile")\n',"src/lib/multiprocessing/dummy/__init__.py":'import _sk_fail; _sk_fail._("dummy")\n',"src/lib/multiprocessing/__init__.py":'import _sk_fail; _sk_fail._("multiprocessing")\n',"src/lib/mutex.py":'import _sk_fail; _sk_fail._("mutex")\n',"src/lib/netrc.py":'import _sk_fail; _sk_fail._("netrc")\n',"src/lib/new.py":'import _sk_fail; _sk_fail._("new")\n',"src/lib/nntplib.py":'import _sk_fail; _sk_fail._("nntplib")\n',"src/lib/ntpath.py":'import _sk_fail; _sk_fail._("ntpath")\n',"src/lib/nturl2path.py":'import _sk_fail; _sk_fail._("nturl2path")\n',"src/lib/numbers.py":"Number = (int, float, complex)\nIntegral = int\nComplex = complex\n","src/lib/opcode.py":'import _sk_fail; _sk_fail._("opcode")\n',"src/lib/optparse.py":'import _sk_fail; _sk_fail._("optparse")\n',"src/lib/os.py":'import _sk_fail; _sk_fail._("os")\n',"src/lib/os2emxpath.py":'import _sk_fail; _sk_fail._("os2emxpath")\n',"src/lib/pdb.py":'import _sk_fail; _sk_fail._("pdb")\n',"src/lib/pickle.py":'import _sk_fail; _sk_fail._("pickle")\n',"src/lib/pickletools.py":'import _sk_fail; _sk_fail._("pickletools")\n',"src/lib/pipes.py":'import _sk_fail; _sk_fail._("pipes")\n',"src/lib/pkgutil.py":'import _sk_fail; _sk_fail._("pkgutil")\n',"src/lib/platform.py":'import _sk_fail; _sk_fail._("platform")\n',"src/lib/plistlib.py":'import _sk_fail; _sk_fail._("plistlib")\n',"src/lib/popen2.py":'import _sk_fail; _sk_fail._("popen2")\n',"src/lib/poplib.py":'import _sk_fail; _sk_fail._("poplib")\n',"src/lib/posixfile.py":'import _sk_fail; _sk_fail._("posixfile")\n',"src/lib/posixpath.py":'import _sk_fail; _sk_fail._("posixpath")\n',"src/lib/pprint.py":'import _sk_fail; _sk_fail._("pprint")\n',"src/lib/profile.py":'import _sk_fail; _sk_fail._("profile")\n',"src/lib/pstats.py":'import _sk_fail; _sk_fail._("pstats")\n',"src/lib/pty.py":'import _sk_fail; _sk_fail._("pty")\n',"src/lib/pyclbr.py":'import _sk_fail; _sk_fail._("pyclbr")\n',"src/lib/pydoc.py":'import _sk_fail; _sk_fail._("pydoc")\n',"src/lib/pydoc_topics.py":'import _sk_fail; _sk_fail._("pydoc_topics")\n',"src/lib/pythonds/basic/deque.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#deque.py\n\n\nclass Deque:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def addFront(self, item):\n self.items.append(item)\n\n def addRear(self, item):\n self.items.insert(0,item)\n\n def removeFront(self):\n return self.items.pop()\n\n def removeRear(self):\n return self.items.pop(0)\n\n def size(self):\n return len(self.items)\n","src/lib/pythonds/basic/queue.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#queue.py\n\nclass Queue:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def enqueue(self, item):\n self.items.insert(0,item)\n\n def dequeue(self):\n return self.items.pop()\n\n def size(self):\n return len(self.items)\n","src/lib/pythonds/basic/stack.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#stack.py\n\nclass Stack:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def push(self, item):\n self.items.append(item)\n\n def pop(self):\n return self.items.pop()\n\n def peek(self):\n return self.items[len(self.items)-1]\n\n def size(self):\n return len(self.items)\n\n","src/lib/pythonds/basic/__init__.py":'\n#__all__ = ["stack"]\n\n\n#from .stack import Stack\n#from .queue import Queue\n\n\n\n',"src/lib/pythonds/graphs/adjGraph.py":'#\n# adjGraph\n#\n# Created by Brad Miller on 2005-02-24.\n# Copyright (c) 2005 Brad Miller, David Ranum, Luther College. All rights reserved.\n#\n\nimport sys\nimport os\nimport unittest\n\nclass Graph:\n def __init__(self):\n self.vertices = {}\n self.numVertices = 0\n \n def addVertex(self,key):\n self.numVertices = self.numVertices + 1\n newVertex = Vertex(key)\n self.vertices[key] = newVertex\n return newVertex\n \n def getVertex(self,n):\n if n in self.vertices:\n return self.vertices[n]\n else:\n return None\n\n def __contains__(self,n):\n return n in self.vertices\n \n def addEdge(self,f,t,cost=0):\n if f not in self.vertices:\n nv = self.addVertex(f)\n if t not in self.vertices:\n nv = self.addVertex(t)\n self.vertices[f].addNeighbor(self.vertices[t],cost)\n \n def getVertices(self):\n return list(self.vertices.keys())\n \n def __iter__(self):\n return iter(self.vertices.values())\n \nclass Vertex:\n def __init__(self,num):\n self.id = num\n self.connectedTo = {}\n self.color = \'white\'\n self.dist = sys.maxsize\n self.pred = None\n self.disc = 0\n self.fin = 0\n\n # def __lt__(self,o):\n # return self.id < o.id\n \n def addNeighbor(self,nbr,weight=0):\n self.connectedTo[nbr] = weight\n \n def setColor(self,color):\n self.color = color\n \n def setDistance(self,d):\n self.dist = d\n\n def setPred(self,p):\n self.pred = p\n\n def setDiscovery(self,dtime):\n self.disc = dtime\n \n def setFinish(self,ftime):\n self.fin = ftime\n \n def getFinish(self):\n return self.fin\n \n def getDiscovery(self):\n return self.disc\n \n def getPred(self):\n return self.pred\n \n def getDistance(self):\n return self.dist\n \n def getColor(self):\n return self.color\n \n def getConnections(self):\n return self.connectedTo.keys()\n \n def getWeight(self,nbr):\n return self.connectedTo[nbr]\n \n def __str__(self):\n return str(self.id) + ":color " + self.color + ":disc " + str(self.disc) + ":fin " + str(self.fin) + ":dist " + str(self.dist) + ":pred \\n\\t[" + str(self.pred)+ "]\\n"\n \n def getId(self):\n return self.id\n\nclass adjGraphTests(unittest.TestCase):\n def setUp(self):\n self.tGraph = Graph()\n \n def testMakeGraph(self):\n gFile = open("test.dat")\n for line in gFile:\n fVertex, tVertex = line.split(\'|\')\n fVertex = int(fVertex)\n tVertex = int(tVertex)\n self.tGraph.addEdge(fVertex,tVertex)\n for i in self.tGraph:\n adj = i.getAdj()\n for k in adj:\n print(i, k)\n\n \nif __name__ == \'__main__\':\n unittest.main()\n \n',"src/lib/pythonds/graphs/priorityQueue.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \nimport unittest\n\n# this implementation of binary heap takes key value pairs,\n# we will assume that the keys are all comparable\n\nclass PriorityQueue:\n def __init__(self):\n self.heapArray = [(0,0)]\n self.currentSize = 0\n\n def buildHeap(self,alist):\n self.currentSize = len(alist)\n self.heapArray = [(0,0)]\n for i in alist:\n self.heapArray.append(i)\n i = len(alist) // 2 \n while (i > 0):\n self.percDown(i)\n i = i - 1\n \n def percDown(self,i):\n while (i * 2) <= self.currentSize:\n mc = self.minChild(i)\n if self.heapArray[i][0] > self.heapArray[mc][0]:\n tmp = self.heapArray[i]\n self.heapArray[i] = self.heapArray[mc]\n self.heapArray[mc] = tmp\n i = mc\n \n def minChild(self,i):\n if i*2 > self.currentSize:\n return -1\n else:\n if i*2 + 1 > self.currentSize:\n return i*2\n else:\n if self.heapArray[i*2][0] < self.heapArray[i*2+1][0]:\n return i*2\n else:\n return i*2+1\n\n def percUp(self,i):\n while i // 2 > 0:\n if self.heapArray[i][0] < self.heapArray[i//2][0]:\n tmp = self.heapArray[i//2]\n self.heapArray[i//2] = self.heapArray[i]\n self.heapArray[i] = tmp\n i = i//2\n \n def add(self,k):\n self.heapArray.append(k)\n self.currentSize = self.currentSize + 1\n self.percUp(self.currentSize)\n\n def delMin(self):\n retval = self.heapArray[1][1]\n self.heapArray[1] = self.heapArray[self.currentSize]\n self.currentSize = self.currentSize - 1\n self.heapArray.pop()\n self.percDown(1)\n return retval\n \n def isEmpty(self):\n if self.currentSize == 0:\n return True\n else:\n return False\n\n def decreaseKey(self,val,amt):\n # this is a little wierd, but we need to find the heap thing to decrease by\n # looking at its value\n done = False\n i = 1\n myKey = 0\n while not done and i <= self.currentSize:\n if self.heapArray[i][1] == val:\n done = True\n myKey = i\n else:\n i = i + 1\n if myKey > 0:\n self.heapArray[myKey] = (amt,self.heapArray[myKey][1])\n self.percUp(myKey)\n \n def __contains__(self,vtx):\n for pair in self.heapArray:\n if pair[1] == vtx:\n return True\n return False\n \nclass TestBinHeap(unittest.TestCase):\n def setUp(self):\n self.theHeap = PriorityQueue()\n self.theHeap.add((2,'x'))\n self.theHeap.add((3,'y'))\n self.theHeap.add((5,'z'))\n self.theHeap.add((6,'a'))\n self.theHeap.add((4,'d'))\n\n\n def testInsert(self):\n assert self.theHeap.currentSize == 5\n\n def testDelmin(self):\n assert self.theHeap.delMin() == 'x'\n assert self.theHeap.delMin() == 'y'\n \n def testDecKey(self):\n self.theHeap.decreaseKey('d',1)\n assert self.theHeap.delMin() == 'd'\n \nif __name__ == '__main__':\n unittest.main()\n","src/lib/pythonds/graphs/__init__.py":"\n\nfrom .adjGraph import Graph\nfrom .adjGraph import Vertex\nfrom .priorityQueue import PriorityQueue\n","src/lib/pythonds/trees/balance.py":"#!/bin/env python3.1\n# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005, 2010\n# \n\nfrom .bst import BinarySearchTree, TreeNode\n\nclass AVLTree(BinarySearchTree):\n '''\n Author: Brad Miller\n Date: 1/15/2005\n Description: Imlement a binary search tree with the following interface\n functions: \n __contains__(y) <==> y in x\n __getitem__(y) <==> x[y]\n __init__()\n __len__() <==> len(x)\n __setitem__(k,v) <==> x[k] = v\n clear()\n get(k)\n has_key(k)\n items() \n keys() \n values()\n put(k,v)\n '''\n\n\n def _put(self,key,val,currentNode):\n if key < currentNode.key:\n if currentNode.hasLeftChild():\n self._put(key,val,currentNode.leftChild)\n else:\n currentNode.leftChild = TreeNode(key,val,parent=currentNode)\n self.updateBalance(currentNode.leftChild)\n else:\n if currentNode.hasRightChild():\n self._put(key,val,currentNode.rightChild)\n else:\n currentNode.rightChild = TreeNode(key,val,parent=currentNode)\n self.updateBalance(currentNode.rightChild) \n\n def updateBalance(self,node):\n if node.balanceFactor > 1 or node.balanceFactor < -1:\n self.rebalance(node)\n return\n if node.parent != None:\n if node.isLeftChild():\n node.parent.balanceFactor += 1\n elif node.isRightChild():\n node.parent.balanceFactor -= 1\n\n if node.parent.balanceFactor != 0:\n self.updateBalance(node.parent)\n\n def rebalance(self,node):\n if node.balanceFactor < 0:\n if node.rightChild.balanceFactor > 0:\n # Do an LR Rotation\n self.rotateRight(node.rightChild)\n self.rotateLeft(node)\n else:\n # single left\n self.rotateLeft(node)\n elif node.balanceFactor > 0:\n if node.leftChild.balanceFactor < 0:\n # Do an RL Rotation\n self.rotateLeft(node.leftChild)\n self.rotateRight(node)\n else:\n # single right\n self.rotateRight(node)\n\n def rotateLeft(self,rotRoot):\n newRoot = rotRoot.rightChild\n rotRoot.rightChild = newRoot.leftChild\n if newRoot.leftChild != None:\n newRoot.leftChild.parent = rotRoot\n newRoot.parent = rotRoot.parent\n if rotRoot.isRoot():\n self.root = newRoot\n else:\n if rotRoot.isLeftChild():\n rotRoot.parent.leftChild = newRoot\n else:\n rotRoot.parent.rightChild = newRoot\n newRoot.leftChild = rotRoot\n rotRoot.parent = newRoot\n rotRoot.balanceFactor = rotRoot.balanceFactor + 1 - min(newRoot.balanceFactor, 0)\n newRoot.balanceFactor = newRoot.balanceFactor + 1 + max(rotRoot.balanceFactor, 0)\n\n\n def rotateRight(self,rotRoot):\n newRoot = rotRoot.leftChild\n rotRoot.leftChild = newRoot.rightChild\n if newRoot.rightChild != None:\n newRoot.rightChild.parent = rotRoot\n newRoot.parent = rotRoot.parent\n if rotRoot.isRoot():\n self.root = newRoot\n else:\n if rotRoot.isRightChild():\n rotRoot.parent.rightChild = newRoot\n else:\n rotRoot.parent.leftChild = newRoot\n newRoot.rightChild = rotRoot\n rotRoot.parent = newRoot\n rotRoot.balanceFactor = rotRoot.balanceFactor - 1 - max(newRoot.balanceFactor, 0)\n newRoot.balanceFactor = newRoot.balanceFactor - 1 + min(rotRoot.balanceFactor, 0)\n \n","src/lib/pythonds/trees/binaryTree.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n\nclass BinaryTree:\n \"\"\"\n A recursive implementation of Binary Tree\n Using links and Nodes approach.\n \"\"\" \n def __init__(self,rootObj):\n self.key = rootObj\n self.leftChild = None\n self.rightChild = None\n\n def insertLeft(self,newNode):\n if self.leftChild == None:\n self.leftChild = BinaryTree(newNode)\n else:\n t = BinaryTree(newNode)\n t.left = self.leftChild\n self.leftChild = t\n \n def insertRight(self,newNode):\n if self.rightChild == None:\n self.rightChild = BinaryTree(newNode)\n else:\n t = BinaryTree(newNode)\n t.right = self.rightChild\n self.rightChild = t\n\n def isLeaf(self):\n return ((not self.leftChild) and (not self.rightChild))\n\n def getRightChild(self):\n return self.rightChild\n\n def getLeftChild(self):\n return self.leftChild\n\n def setRootVal(self,obj):\n self.key = obj\n\n def getRootVal(self,):\n return self.key\n\n def inorder(self):\n if self.leftChild:\n self.leftChild.inorder()\n print(self.key)\n if self.rightChild:\n self.rightChild.inorder()\n\n def postorder(self):\n if self.leftChild:\n self.leftChild.postorder()\n if self.rightChild:\n self.rightChild.postorder()\n print(self.key)\n\n\n def preorder(self):\n print(self.key)\n if self.leftChild:\n self.leftChild.preorder()\n if self.rightChild:\n self.rightChild.preorder()\n\n def printexp(self):\n if self.leftChild:\n print('(')\n self.leftChild.printexp()\n print(self.key)\n if self.rightChild:\n self.rightChild.printexp()\n print(')')\n\n def postordereval(self):\n opers = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}\n res1 = None\n res2 = None\n if self.leftChild:\n res1 = self.leftChild.postordereval() #// \\label{peleft}\n if self.rightChild:\n res2 = self.rightChild.postordereval() #// \\label{peright}\n if res1 and res2:\n return opers[self.key](res1,res2) #// \\label{peeval}\n else:\n return self.key\n\ndef inorder(tree):\n if tree != None:\n inorder(tree.getLeftChild())\n print(tree.getRootVal())\n inorder(tree.getRightChild())\n\ndef printexp(tree):\n if tree.leftChild:\n print('(')\n printexp(tree.getLeftChild())\n print(tree.getRootVal())\n if tree.rightChild:\n printexp(tree.getRightChild())\n print(')') \n\ndef printexp(tree):\n sVal = \"\"\n if tree:\n sVal = '(' + printexp(tree.getLeftChild())\n sVal = sVal + str(tree.getRootVal())\n sVal = sVal + printexp(tree.getRightChild()) + ')'\n return sVal\n\ndef postordereval(tree):\n opers = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}\n res1 = None\n res2 = None\n if tree:\n res1 = postordereval(tree.getLeftChild()) #// \\label{peleft}\n res2 = postordereval(tree.getRightChild()) #// \\label{peright}\n if res1 and res2:\n return opers[tree.getRootVal()](res1,res2) #// \\label{peeval}\n else:\n return tree.getRootVal()\n\ndef height(tree):\n if tree == None:\n return -1\n else:\n return 1 + max(height(tree.leftChild),height(tree.rightChild))\n\n# t = BinaryTree(7)\n# t.insertLeft(3)\n# t.insertRight(9)\n# inorder(t)\n# import operator\n# x = BinaryTree('*')\n# x.insertLeft('+')\n# l = x.getLeftChild()\n# l.insertLeft(4)\n# l.insertRight(5)\n# x.insertRight(7)\n# print(printexp(x))\n# print(postordereval(x))\n# print(height(x))\n","src/lib/pythonds/trees/binheap.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n\n# this heap takes key value pairs, we will assume that the keys are integers\nclass BinHeap:\n def __init__(self):\n self.heapList = [0]\n self.currentSize = 0\n\n\n def buildHeap(self,alist):\n i = len(alist) // 2\n self.currentSize = len(alist)\n self.heapList = [0] + alist[:]\n print(len(self.heapList), i)\n while (i > 0):\n print(self.heapList, i)\n self.percDown(i)\n i = i - 1\n print(self.heapList,i)\n \n def percDown(self,i):\n while (i * 2) <= self.currentSize:\n mc = self.minChild(i)\n if self.heapList[i] > self.heapList[mc]:\n tmp = self.heapList[i]\n self.heapList[i] = self.heapList[mc]\n self.heapList[mc] = tmp\n i = mc\n \n def minChild(self,i):\n if i * 2 + 1 > self.currentSize:\n return i * 2\n else:\n if self.heapList[i * 2] < self.heapList[i * 2 + 1]:\n return i * 2\n else:\n return i * 2 + 1\n\n def percUp(self,i):\n while i // 2 > 0:\n if self.heapList[i] < self.heapList[i//2]:\n tmp = self.heapList[i // 2]\n self.heapList[i // 2] = self.heapList[i]\n self.heapList[i] = tmp\n i = i // 2\n \n def insert(self,k):\n self.heapList.append(k)\n self.currentSize = self.currentSize + 1\n self.percUp(self.currentSize)\n\n def delMin(self):\n retval = self.heapList[1]\n self.heapList[1] = self.heapList[self.currentSize]\n self.currentSize = self.currentSize - 1\n self.heapList.pop()\n self.percDown(1)\n return retval\n \n def isEmpty(self):\n if currentSize == 0:\n return True\n else:\n return False\n","src/lib/pythonds/trees/bst.py":"#!/bin/env python3.1\n# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005, 2010\n# \n\nclass BinarySearchTree:\n '''\n Author: Brad Miller\n Date: 1/15/2005\n Description: Imlement a binary search tree with the following interface\n functions: \n __contains__(y) <==> y in x\n __getitem__(y) <==> x[y]\n __init__()\n __len__() <==> len(x)\n __setitem__(k,v) <==> x[k] = v\n clear()\n get(k)\n items() \n keys() \n values()\n put(k,v)\n in\n del <==> \n '''\n\n def __init__(self):\n self.root = None\n self.size = 0\n \n def put(self,key,val):\n if self.root:\n self._put(key,val,self.root)\n else:\n self.root = TreeNode(key,val)\n self.size = self.size + 1\n\n def _put(self,key,val,currentNode):\n if key < currentNode.key:\n if currentNode.hasLeftChild():\n self._put(key,val,currentNode.leftChild)\n else:\n currentNode.leftChild = TreeNode(key,val,parent=currentNode)\n else:\n if currentNode.hasRightChild():\n self._put(key,val,currentNode.rightChild)\n else:\n currentNode.rightChild = TreeNode(key,val,parent=currentNode)\n \n def __setitem__(self,k,v):\n self.put(k,v)\n\n def get(self,key):\n if self.root:\n res = self._get(key,self.root)\n if res:\n return res.payload\n else:\n return None\n else:\n return None\n \n def _get(self,key,currentNode):\n if not currentNode:\n return None\n elif currentNode.key == key:\n return currentNode\n elif key < currentNode.key:\n return self._get(key,currentNode.leftChild)\n else:\n return self._get(key,currentNode.rightChild)\n \n \n def __getitem__(self,key):\n res = self.get(key)\n if res:\n return res\n else:\n raise KeyError('Error, key not in tree')\n \n\n def __contains__(self,key):\n if self._get(key,self.root):\n return True\n else:\n return False\n \n def length(self):\n return self.size\n\n def __len__(self):\n return self.size\n\n def __iter__(self):\n return self.root.__iter__()\n \n def delete(self,key):\n if self.size > 1:\n nodeToRemove = self._get(key,self.root)\n if nodeToRemove:\n self.remove(nodeToRemove)\n self.size = self.size-1\n else:\n raise KeyError('Error, key not in tree')\n elif self.size == 1 and self.root.key == key:\n self.root = None\n self.size = self.size - 1\n else:\n raise KeyError('Error, key not in tree')\n\n def __delitem__(self,key):\n self.delete(key)\n \n def remove(self,currentNode):\n if currentNode.isLeaf(): #leaf\n if currentNode == currentNode.parent.leftChild:\n currentNode.parent.leftChild = None\n else:\n currentNode.parent.rightChild = None\n elif currentNode.hasBothChildren(): #interior\n succ = currentNode.findSuccessor()\n succ.spliceOut()\n currentNode.key = succ.key\n currentNode.payload = succ.payload\n else: # this node has one child\n if currentNode.hasLeftChild():\n if currentNode.isLeftChild():\n currentNode.leftChild.parent = currentNode.parent\n currentNode.parent.leftChild = currentNode.leftChild\n elif currentNode.isRightChild():\n currentNode.leftChild.parent = currentNode.parent\n currentNode.parent.rightChild = currentNode.leftChild\n else:\n currentNode.replaceNodeData(currentNode.leftChild.key,\n currentNode.leftChild.payload,\n currentNode.leftChild.leftChild,\n currentNode.leftChild.rightChild)\n else:\n if currentNode.isLeftChild():\n currentNode.rightChild.parent = currentNode.parent\n currentNode.parent.leftChild = currentNode.rightChild\n elif currentNode.isRightChild():\n currentNode.rightChild.parent = currentNode.parent\n currentNode.parent.rightChild = currentNode.rightChild\n else:\n currentNode.replaceNodeData(currentNode.rightChild.key,\n currentNode.rightChild.payload,\n currentNode.rightChild.leftChild,\n currentNode.rightChild.rightChild)\n\n def inorder(self):\n self._inorder(self.root)\n\n def _inorder(self,tree):\n if tree != None:\n self._inorder(tree.leftChild)\n print(tree.key)\n self._inorder(tree.rightChild)\n\n def postorder(self):\n self._postorder(self.root)\n\n def _postorder(self, tree):\n if tree:\n self._postorder(tree.rightChild)\n self._postorder(tree.leftChild)\n print(tree.key) \n\n def preorder(self):\n self._preorder(self,self.root)\n\n def _preorder(self,tree):\n if tree:\n print(tree.key) \n self._preorder(tree.leftChild)\n self._preorder(tree.rightChild)\n\n \nclass TreeNode:\n def __init__(self,key,val,left=None,right=None,parent=None):\n self.key = key\n self.payload = val\n self.leftChild = left\n self.rightChild = right\n self.parent = parent\n self.balanceFactor = 0\n \n def hasLeftChild(self):\n return self.leftChild\n\n def hasRightChild(self):\n return self.rightChild\n \n def isLeftChild(self):\n return self.parent and self.parent.leftChild == self\n\n def isRightChild(self):\n return self.parent and self.parent.rightChild == self\n\n def isRoot(self):\n return not self.parent\n\n def isLeaf(self):\n return not (self.rightChild or self.leftChild)\n\n def hasAnyChildren(self):\n return self.rightChild or self.leftChild\n\n def hasBothChildren(self):\n return self.rightChild and self.leftChild\n \n def replaceNodeData(self,key,value,lc,rc):\n self.key = key\n self.payload = value\n self.leftChild = lc\n self.rightChild = rc\n if self.hasLeftChild():\n self.leftChild.parent = self\n if self.hasRightChild():\n self.rightChild.parent = self\n \n def findSuccessor(self):\n succ = None\n if self.hasRightChild():\n succ = self.rightChild.findMin()\n else:\n if self.parent:\n if self.isLeftChild():\n succ = self.parent\n else:\n self.parent.rightChild = None\n succ = self.parent.findSuccessor()\n self.parent.rightChild = self\n return succ\n\n\n def spliceOut(self):\n if self.isLeaf():\n if self.isLeftChild():\n self.parent.leftChild = None\n else:\n self.parent.rightChild = None\n elif self.hasAnyChildren():\n if self.hasLeftChild():\n if self.isLeftChild():\n self.parent.leftChild = self.leftChild\n else:\n self.parent.rightChild = self.leftChild\n self.leftChild.parent = self.parent\n else:\n if self.isLeftChild():\n self.parent.leftChild = self.rightChild\n else:\n self.parent.rightChild = self.rightChild\n self.rightChild.parent = self.parent\n\n def findMin(self):\n current = self\n while current.hasLeftChild():\n current = current.leftChild\n return current\n\n def __iter__(self):\n \"\"\"The standard inorder traversal of a binary tree.\"\"\"\n if self:\n if self.hasLeftChild():\n for elem in self.leftChild:\n yield elem\n yield self.key\n if self.hasRightChild():\n for elem in self.rightChild:\n yield elem\n\n \n","src/lib/pythonds/trees/__init__.py":"\n# from .binaryTree import BinaryTree\n# from .balance import AVLTree\n# from .bst import BinarySearchTree\n# from .binheap import BinHeap\n\n\n","src/lib/pythonds/__init__.py":"","src/lib/py_compile.py":'import _sk_fail; _sk_fail._("py_compile")\n',"src/lib/Queue.py":'import _sk_fail; _sk_fail._("Queue")\n',"src/lib/quopri.py":'import _sk_fail; _sk_fail._("quopri")\n',"src/lib/repr.py":'import _sk_fail; _sk_fail._("repr")\n',"src/lib/rexec.py":'import _sk_fail; _sk_fail._("rexec")\n',"src/lib/rfc822.py":'import _sk_fail; _sk_fail._("rfc822")\n',"src/lib/rlcompleter.py":'import _sk_fail; _sk_fail._("rlcompleter")\n',"src/lib/robotparser.py":'import _sk_fail; _sk_fail._("robotparser")\n',"src/lib/runpy.py":'import _sk_fail; _sk_fail._("runpy")\n',"src/lib/sched.py":'import _sk_fail; _sk_fail._("sched")\n',"src/lib/sets.py":'import _sk_fail; _sk_fail._("sets")\n',"src/lib/sgmllib.py":'import _sk_fail; _sk_fail._("sgmllib")\n',"src/lib/sha.py":'import _sk_fail; _sk_fail._("sha")\n',"src/lib/shelve.py":'import _sk_fail; _sk_fail._("shelve")\n',"src/lib/shlex.py":'import _sk_fail; _sk_fail._("shlex")\n',"src/lib/shutil.py":'import _sk_fail; _sk_fail._("shutil")\n',"src/lib/SimpleHTTPServer.py":'import _sk_fail; _sk_fail._("SimpleHTTPServer")\n',"src/lib/SimpleXMLRPCServer.py":'import _sk_fail; _sk_fail._("SimpleXMLRPCServer")\n',"src/lib/site.py":'import _sk_fail; _sk_fail._("site")\n',"src/lib/smtpd.py":'import _sk_fail; _sk_fail._("smtpd")\n',"src/lib/smtplib.py":'import _sk_fail; _sk_fail._("smtplib")\n',"src/lib/sndhdr.py":'import _sk_fail; _sk_fail._("sndhdr")\n',"src/lib/socket.py":'import _sk_fail; _sk_fail._("socket")\n',"src/lib/SocketServer.py":'import _sk_fail; _sk_fail._("SocketServer")\n',"src/lib/sqlite3/__init__.py":'import _sk_fail; _sk_fail._("sqlite3")\n',"src/lib/sre.py":'import _sk_fail; _sk_fail._("sre")\n',"src/lib/sre_compile.py":'import _sk_fail; _sk_fail._("sre_compile")\n',"src/lib/sre_constants.py":'import _sk_fail; _sk_fail._("sre_constants")\n',"src/lib/sre_parse.py":'import _sk_fail; _sk_fail._("sre_parse")\n',"src/lib/ssl.py":'import _sk_fail; _sk_fail._("ssl")\n',"src/lib/stat.py":'import _sk_fail; _sk_fail._("stat")\n',"src/lib/statvfs.py":'import _sk_fail; _sk_fail._("statvfs")\n',"src/lib/StringIO.py":'r"""File-like objects that read from or write to a string buffer.\n\nThis implements (nearly) all stdio methods.\n\nf = StringIO() # ready for writing\nf = StringIO(buf) # ready for reading\nf.close() # explicitly release resources held\nflag = f.isatty() # always false\npos = f.tell() # get current position\nf.seek(pos) # set current position\nf.seek(pos, mode) # mode 0: absolute; 1: relative; 2: relative to EOF\nbuf = f.read() # read until EOF\nbuf = f.read(n) # read up to n bytes\nbuf = f.readline() # read until end of line (\'\\n\') or EOF\nlist = f.readlines()# list of f.readline() results until EOF\nf.truncate([size]) # truncate file at to at most size (default: current pos)\nf.write(buf) # write at current position\nf.writelines(list) # for line in list: f.write(line)\nf.getvalue() # return whole file\'s contents as a string\n\nNotes:\n- Using a real file is often faster (but less convenient).\n- There\'s also a much faster implementation in C, called cStringIO, but\n it\'s not subclassable.\n- fileno() is left unimplemented so that code which uses it triggers\n an exception early.\n- Seeking far beyond EOF and then writing will insert real null\n bytes that occupy space in the buffer.\n- There\'s a simple test set (see end of this file).\n"""\n\n__all__ = ["StringIO"]\n\ndef _complain_ifclosed(closed):\n if closed:\n raise ValueError("I/O operation on closed file")\n\nclass StringIO:\n """class StringIO([buffer])\n\n When a StringIO object is created, it can be initialized to an existing\n string by passing the string to the constructor. If no string is given,\n the StringIO will start empty.\n\n The StringIO object can accept either Unicode or 8-bit strings, but\n mixing the two may take some care. If both are used, 8-bit strings that\n cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause\n a UnicodeError to be raised when getvalue() is called.\n """\n def __init__(self, buf = \'\'):\n # Force self.buf to be a string or unicode\n if not isinstance(buf, str):\n buf = str(buf)\n self.buf = buf\n self.len = len(buf)\n self.buflist = []\n self.pos = 0\n self.closed = False\n self.softspace = 0\n\n def __iter__(self):\n return self\n\n def next(self):\n """A file object is its own iterator, for example iter(f) returns f\n (unless f is closed). When a file is used as an iterator, typically\n in a for loop (for example, for line in f: print line), the next()\n method is called repeatedly. This method returns the next input line,\n or raises StopIteration when EOF is hit.\n """\n _complain_ifclosed(self.closed)\n r = self.readline()\n if not r:\n raise StopIteration\n return r\n\n def close(self):\n """Free the memory buffer.\n """\n if not self.closed:\n self.closed = True\n self.buf = None\n self.pos = None\n\n def isatty(self):\n """Returns False because StringIO objects are not connected to a\n tty-like device.\n """\n _complain_ifclosed(self.closed)\n return False\n\n def seek(self, pos, mode = 0):\n """Set the file\'s current position.\n\n The mode argument is optional and defaults to 0 (absolute file\n positioning); other values are 1 (seek relative to the current\n position) and 2 (seek relative to the file\'s end).\n\n There is no return value.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n if mode == 1:\n pos += self.pos\n elif mode == 2:\n pos += self.len\n self.pos = max(0, pos)\n\n def tell(self):\n """Return the file\'s current position."""\n _complain_ifclosed(self.closed)\n return self.pos\n\n def read(self, n = -1):\n """Read at most size bytes from the file\n (less if the read hits EOF before obtaining size bytes).\n\n If the size argument is negative or omitted, read all data until EOF\n is reached. The bytes are returned as a string object. An empty\n string is returned when EOF is encountered immediately.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n if n is None or n < 0:\n newpos = self.len\n else:\n newpos = min(self.pos+n, self.len)\n r = self.buf[self.pos:newpos]\n self.pos = newpos\n return r\n\n def readline(self, length=None):\n r"""Read one entire line from the file.\n\n A trailing newline character is kept in the string (but may be absent\n when a file ends with an incomplete line). If the size argument is\n present and non-negative, it is a maximum byte count (including the\n trailing newline) and an incomplete line may be returned.\n\n An empty string is returned only when EOF is encountered immediately.\n\n Note: Unlike stdio\'s fgets(), the returned string contains null\n characters (\'\\0\') if they occurred in the input.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n i = self.buf.find(\'\\n\', self.pos)\n if i < 0:\n newpos = self.len\n else:\n newpos = i+1\n if length is not None and length >= 0:\n if self.pos + length < newpos:\n newpos = self.pos + length\n r = self.buf[self.pos:newpos]\n self.pos = newpos\n return r\n\n def readlines(self, sizehint = 0):\n """Read until EOF using readline() and return a list containing the\n lines thus read.\n\n If the optional sizehint argument is present, instead of reading up\n to EOF, whole lines totalling approximately sizehint bytes (or more\n to accommodate a final whole line).\n """\n total = 0\n lines = []\n line = self.readline()\n while line:\n lines.append(line)\n total += len(line)\n if 0 < sizehint <= total:\n break\n line = self.readline()\n return lines\n\n def truncate(self, size=None):\n """Truncate the file\'s size.\n\n If the optional size argument is present, the file is truncated to\n (at most) that size. The size defaults to the current position.\n The current file position is not changed unless the position\n is beyond the new file size.\n\n If the specified size exceeds the file\'s current size, the\n file remains unchanged.\n """\n _complain_ifclosed(self.closed)\n if size is None:\n size = self.pos\n elif size < 0:\n raise IOError(22, "Negative size not allowed")\n elif size < self.pos:\n self.pos = size\n self.buf = self.getvalue()[:size]\n self.len = size\n\n def write(self, s):\n """Write a string to the file.\n\n There is no return value.\n """\n _complain_ifclosed(self.closed)\n if not s: return\n # Force s to be a string or unicode\n if not isinstance(s, str):\n s = str(s)\n spos = self.pos\n slen = self.len\n if spos == slen:\n self.buflist.append(s)\n self.len = self.pos = spos + len(s)\n return\n if spos > slen:\n self.buflist.append(\'\\0\'*(spos - slen))\n slen = spos\n newpos = spos + len(s)\n if spos < slen:\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = [self.buf[:spos], s, self.buf[newpos:]]\n self.buf = \'\'\n if newpos > slen:\n slen = newpos\n else:\n self.buflist.append(s)\n slen = newpos\n self.len = slen\n self.pos = newpos\n\n def writelines(self, iterable):\n """Write a sequence of strings to the file. The sequence can be any\n iterable object producing strings, typically a list of strings. There\n is no return value.\n\n (The name is intended to match readlines(); writelines() does not add\n line separators.)\n """\n write = self.write\n for line in iterable:\n write(line)\n\n def flush(self):\n """Flush the internal buffer\n """\n _complain_ifclosed(self.closed)\n\n def getvalue(self):\n """\n Retrieve the entire contents of the "file" at any time before\n the StringIO object\'s close() method is called.\n\n The StringIO object can accept either Unicode or 8-bit strings,\n but mixing the two may take some care. If both are used, 8-bit\n strings that cannot be interpreted as 7-bit ASCII (that use the\n 8th bit) will cause a UnicodeError to be raised when getvalue()\n is called.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n return self.buf\n',"src/lib/stringold.py":'import _sk_fail; _sk_fail._("stringold")\n',"src/lib/stringprep.py":'import _sk_fail; _sk_fail._("stringprep")\n',"src/lib/struct.py":'import _sk_fail; _sk_fail._("struct")\n',"src/lib/subprocess.py":'import _sk_fail; _sk_fail._("subprocess")\n',"src/lib/sunau.py":'import _sk_fail; _sk_fail._("sunau")\n',"src/lib/sunaudio.py":'import _sk_fail; _sk_fail._("sunaudio")\n',"src/lib/symbol.py":'import _sk_fail; _sk_fail._("symbol")\n',"src/lib/symtable.py":'import _sk_fail; _sk_fail._("symtable")\n',"src/lib/tabnanny.py":'import _sk_fail; _sk_fail._("tabnanny")\n',"src/lib/tarfile.py":'import _sk_fail; _sk_fail._("tarfile")\n',"src/lib/telnetlib.py":'import _sk_fail; _sk_fail._("telnetlib")\n',"src/lib/tempfile.py":'import _sk_fail; _sk_fail._("tempfile")\n',"src/lib/test/ann_module.py":"\n\n\"\"\"\nThe module for testing variable annotations.\nEmpty lines above are for good reason (testing for correct line numbers)\n\"\"\"\n\n# from typing import Optional\n# from functools import wraps\n\n__annotations__[1] = 2\n\nclass C:\n\n x = 5; #y: Optional['C'] = None\n\n# from typing import Tuple\nx: int = 5; y: str = x;# f: Tuple[int, int]\n\nclass M(type):\n\n __annotations__['123'] = 123\n o: type = object\n\n(pars): bool = True\n\nclass D(C):\n j: str = 'hi'; k: str= 'bye'\n\n# from types import new_class\n# h_class = new_class('H', (C,))\n# j_class = new_class('J')\n\nclass F():\n z: int = 5\n def __init__(self, x):\n pass\n\nclass Y(F):\n def __init__(self):\n super(F, self).__init__(123)\n\nclass Meta(type):\n def __new__(meta, name, bases, namespace):\n return super().__new__(meta, name, bases, namespace)\n\nclass S(metaclass = Meta):\n x: str = 'something'\n y: str = 'something else'\n\n# def foo(x: int = 10):\n# def bar(y: List[str]):\n# x: str = 'yes'\n# bar()\n\n# def dec(func):\n# @wraps(func)\n# def wrapper(*args, **kwargs):\n# return func(*args, **kwargs)\n# return wrapper\n","src/lib/test/ann_module2.py":'"""\nSome correct syntax for variable annotation here.\nMore examples are in test_grammar and test_parser.\n"""\n\n# from typing import no_type_check, ClassVar\n\ni: int = 1\nj: int\nx: float = i/10\n\ndef f():\n # class C: ...\n class C: pass\n return C()\n\nf().new_attr: object = object()\n\nclass C:\n def __init__(self, x: int) -> None:\n self.x = x\n\nc = C(5)\nc.new_attr: int = 10\n\n__annotations__ = {}\n\n\n# @no_type_check\n# class NTC:\n# def meth(self, param: complex) -> None:\n# ...\n\n# class CV:\n# var: ClassVar[\'CV\']\n\n# CV.var = CV()\n',"src/lib/test/ann_module3.py":'"""\nCorrect syntax for variable annotation that should fail at runtime\nin a certain manner. More examples are in test_grammar and test_parser.\n"""\n\ndef f_bad_ann():\n __annotations__[1] = 2\n\nclass C_OK:\n def __init__(self, x: int) -> None:\n self.x: no_such_name = x # This one is OK as proposed by Guido\n\nclass D_bad_ann:\n def __init__(self, x: int) -> None:\n sfel.y: int = 0\n\ndef g_bad_ann():\n no_such_name.attr: int = 0\n',"src/lib/test/bad_getattr.py":'x = 1\n\n__getattr__ = "Surprise!"\n__dir__ = "Surprise again!"\n',"src/lib/test/bad_getattr2.py":'def __getattr__():\n "Bad one"\n\nx = 1\n\ndef __dir__(bad_sig):\n return []\n',"src/lib/test/bad_getattr3.py":"def __getattr__(name):\n global __getattr__\n if name != 'delgetattr':\n raise AttributeError\n del __getattr__\n raise AttributeError\n","src/lib/test/decimaltestdata/__init__.py":'import _sk_fail; _sk_fail._("decimaltestdata")\n',"src/lib/test/good_getattr.py":"x = 1\n\ndef __dir__():\n return ['a', 'b', 'c']\n\ndef __getattr__(name):\n if name == \"yolo\":\n raise AttributeError(\"Deprecated, use whatever instead\")\n return f\"There is {name}\"\n\ny = 2\n","src/lib/test/test_support.py":'"""Supporting definitions for the Python regression tests."""\n\nif __name__ != \'test.test_support\':\n raise ImportError(\'test_support must be imported from the test package\')\n\nimport unittest\n\n\n# def run_unittest(*classes):\n# """Run tests from unittest.TestCase-derived classes."""\n# valid_types = (unittest.TestSuite, unittest.TestCase)\n# suite = unittest.TestSuite()\n# for cls in classes:\n# if isinstance(cls, str):\n# if cls in sys.modules:\n# suite.addTest(unittest.findTestCases(sys.modules[cls]))\n# else:\n# raise ValueError("str arguments must be keys in sys.modules")\n# elif isinstance(cls, valid_types):\n# suite.addTest(cls)\n# else:\n# suite.addTest(unittest.makeSuite(cls))\n# _run_suite(suite)\n\ndef run_unittest(*classes):\n """Run tests from unittest.TestCase-derived classes."""\n for cls in classes:\n print cls\n if issubclass(cls, unittest.TestCase):\n cls().main()\n else:\n print "Don\'t know what to do with ", cls\n',"src/lib/test/__init__.py":"__author__ = 'bmiller'\n\ndef testEqual(actual, expected):\n if type(expected) == type(1):\n if actual == expected:\n print('Pass')\n return True\n elif type(expected) == type(1.11):\n if abs(actual-expected) < 0.00001:\n print('Pass')\n return True\n else:\n if actual == expected:\n print('Pass')\n return True\n print('Test Failed: expected ' + str(expected) + ' but got ' + str(actual))\n return False\n\ndef testNotEqual(actual, expected):\n pass\n\n","src/lib/textwrap.py":"\"\"\"Text wrapping and filling.\n\"\"\"\n\n# Copyright (C) 1999-2001 Gregory P. Ward.\n# Copyright (C) 2002, 2003 Python Software Foundation.\n# Written by Greg Ward \n\nimport re, string\n\n__all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten']\n\n# Hardcode the recognized whitespace characters to the US-ASCII\n# whitespace characters. The main reason for doing this is that\n# some Unicode spaces (like \\u00a0) are non-breaking whitespaces.\n_whitespace = '\\t\\n\\x0b\\x0c\\r '\n\nclass TextWrapper:\n \"\"\"\n Object for wrapping/filling text. The public interface consists of\n the wrap() and fill() methods; the other methods are just there for\n subclasses to override in order to tweak the default behaviour.\n If you want to completely replace the main wrapping algorithm,\n you'll probably have to override _wrap_chunks().\n Several instance attributes control various aspects of wrapping:\n width (default: 70)\n the maximum width of wrapped lines (unless break_long_words\n is false)\n initial_indent (default: \"\")\n string that will be prepended to the first line of wrapped\n output. Counts towards the line's width.\n subsequent_indent (default: \"\")\n string that will be prepended to all lines save the first\n of wrapped output; also counts towards each line's width.\n expand_tabs (default: true)\n Expand tabs in input text to spaces before further processing.\n Each tab will become 0 .. 'tabsize' spaces, depending on its position\n in its line. If false, each tab is treated as a single character.\n tabsize (default: 8)\n Expand tabs in input text to 0 .. 'tabsize' spaces, unless\n 'expand_tabs' is false.\n replace_whitespace (default: true)\n Replace all whitespace characters in the input text by spaces\n after tab expansion. Note that if expand_tabs is false and\n replace_whitespace is true, every tab will be converted to a\n single space!\n fix_sentence_endings (default: false)\n Ensure that sentence-ending punctuation is always followed\n by two spaces. Off by default because the algorithm is\n (unavoidably) imperfect.\n break_long_words (default: true)\n Break words longer than 'width'. If false, those words will not\n be broken, and some lines might be longer than 'width'.\n break_on_hyphens (default: true)\n Allow breaking hyphenated words. If true, wrapping will occur\n preferably on whitespaces and right after hyphens part of\n compound words.\n drop_whitespace (default: true)\n Drop leading and trailing whitespace from lines.\n max_lines (default: None)\n Truncate wrapped lines.\n placeholder (default: ' [...]')\n Append to the last line of truncated text.\n \"\"\"\n\n unicode_whitespace_trans = {}\n # uspace = ord(' ')\n uspace = ' '\n for x in _whitespace:\n # unicode_whitespace_trans[ord(x)] = uspace\n unicode_whitespace_trans[x] = uspace\n\n # This funky little regex is just the trick for splitting\n # text up into word-wrappable chunks. E.g.\n # \"Hello there -- you goof-ball, use the -b option!\"\n # splits into\n # Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option!\n # (after stripping out empty strings).\n wordsep_re = re.compile(\n r'(\\s+|' # any whitespace\n r'[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W]))') # hyphenated words\n em_dash = re.compile(r'(\\s+|' # any whitespace\n r'[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W])|' # hyphenated words\n r'(?!^)-{2,}(?=\\w))') # em-dash\n\n \n # This less funky little regex just split on recognized spaces. E.g.\n # \"Hello there -- you goof-ball, use the -b option!\"\n # splits into\n # Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/\n wordsep_simple_re = re.compile(r'(\\s+)')\n\n\n # XXX this is not locale- or charset-aware -- string.lowercase\n # is US-ASCII only (and therefore English-only)\n sentence_end_re = re.compile(r'[a-z]' # lowercase letter\n r'[\\.\\!\\?]' # sentence-ending punct.\n r'[\\\"\\']?' # optional end-of-quote\n r'\\Z') # end of chunk\n sentence_end_re = r'[a-z][\\.\\!\\?][\\\"\\']?'\n\n def __init__(self,\n width=70,\n initial_indent=\"\",\n subsequent_indent=\"\",\n expand_tabs=True,\n replace_whitespace=True,\n fix_sentence_endings=False,\n break_long_words=True,\n drop_whitespace=True,\n break_on_hyphens=True,\n tabsize=8,\n max_lines=None,\n placeholder=' [...]'):\n self.width = width\n self.initial_indent = initial_indent\n self.subsequent_indent = subsequent_indent\n self.expand_tabs = expand_tabs\n self.replace_whitespace = replace_whitespace\n self.fix_sentence_endings = fix_sentence_endings\n self.break_long_words = break_long_words\n self.drop_whitespace = drop_whitespace\n self.break_on_hyphens = break_on_hyphens\n self.tabsize = tabsize\n self.max_lines = max_lines\n self.placeholder = placeholder\n\n\n # -- Private methods -----------------------------------------------\n # (possibly useful for subclasses to override)\n\n def _munge_whitespace(self, text):\n \"\"\"_munge_whitespace(text : string) -> string\n Munge whitespace in text: expand tabs and convert all other\n whitespace characters to spaces. Eg. \" foo\\\\tbar\\\\n\\\\nbaz\"\n becomes \" foo bar baz\".\n \"\"\"\n if self.expand_tabs:\n text = text.expandtabs(self.tabsize)\n if self.replace_whitespace:\n for key, val in self.unicode_whitespace_trans.items():\n text = text.replace(key, val)\n return text\n\n\n def _split(self, text):\n \"\"\"_split(text : string) -> [string]\n Split the text to wrap into indivisible chunks. Chunks are\n not quite the same as words; see _wrap_chunks() for full\n details. As an example, the text\n Look, goof-ball -- use the -b option!\n breaks into the following chunks:\n 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',\n 'use', ' ', 'the', ' ', '-b', ' ', 'option!'\n if break_on_hyphens is True, or in:\n 'Look,', ' ', 'goof-ball', ' ', '--', ' ',\n 'use', ' ', 'the', ' ', '-b', ' ', option!'\n otherwise.\n \"\"\"\n if self.break_on_hyphens is True:\n chunks = self.wordsep_re.split(text)\n if \"--\" in text:\n chunks = [item \n for sublist in [self.em_dash.split(chunk) for chunk in chunks] \n for item in sublist]\n else:\n chunks = self.wordsep_simple_re.split(text)\n chunks = [c for c in chunks if c]\n return chunks\n\n def _fix_sentence_endings(self, chunks):\n \"\"\"_fix_sentence_endings(chunks : [string])\n Correct for sentence endings buried in 'chunks'. Eg. when the\n original text contains \"... foo.\\\\nBar ...\", munge_whitespace()\n and split() will convert that to [..., \"foo.\", \" \", \"Bar\", ...]\n which has one too few spaces; this method simply changes the one\n space to two.\n \"\"\"\n i = 0\n # patsearch = self.sentence_end_re.search\n while i < len(chunks)-1:\n if chunks[i+1] == \" \" and re.search(self.sentence_end_re, chunks[i]) and chunks[i][-1] in \".!?\\\"\\'\":\n chunks[i+1] = \" \"\n i += 2\n else:\n i += 1\n\n def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width):\n \"\"\"_handle_long_word(chunks : [string],\n cur_line : [string],\n cur_len : int, width : int)\n Handle a chunk of text (most likely a word, not whitespace) that\n is too long to fit in any line.\n \"\"\"\n # Figure out when indent is larger than the specified width, and make\n # sure at least one character is stripped off on every pass\n if width < 1:\n space_left = 1\n else:\n space_left = width - cur_len\n\n # If we're allowed to break long words, then do so: put as much\n # of the next chunk onto the current line as will fit.\n if self.break_long_words:\n cur_line.append(reversed_chunks[-1][:space_left])\n reversed_chunks[-1] = reversed_chunks[-1][space_left:]\n\n # Otherwise, we have to preserve the long word intact. Only add\n # it to the current line if there's nothing already there --\n # that minimizes how much we violate the width constraint.\n elif not cur_line:\n cur_line.append(reversed_chunks.pop())\n\n # If we're not allowed to break long words, and there's already\n # text on the current line, do nothing. Next time through the\n # main loop of _wrap_chunks(), we'll wind up here again, but\n # cur_len will be zero, so the next line will be entirely\n # devoted to the long word that we can't handle right now.\n\n def _wrap_chunks(self, chunks):\n \"\"\"_wrap_chunks(chunks : [string]) -> [string]\n Wrap a sequence of text chunks and return a list of lines of\n length 'self.width' or less. (If 'break_long_words' is false,\n some lines may be longer than this.) Chunks correspond roughly\n to words and the whitespace between them: each chunk is\n indivisible (modulo 'break_long_words'), but a line break can\n come between any two chunks. Chunks should not have internal\n whitespace; ie. a chunk is either all whitespace or a \"word\".\n Whitespace chunks will be removed from the beginning and end of\n lines, but apart from that whitespace is preserved.\n \"\"\"\n lines = []\n if self.width <= 0:\n raise ValueError(\"invalid width %r (must be > 0)\" % self.width)\n if self.max_lines is not None:\n if self.max_lines > 1:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n if len(indent) + len(self.placeholder.lstrip()) > self.width:\n raise ValueError(\"placeholder too large for max width\")\n\n # Arrange in reverse order so items can be efficiently popped\n # from a stack of chucks.\n chunks.reverse()\n\n while chunks:\n\n # Start the list of chunks that will make up the current line.\n # cur_len is just the length of all the chunks in cur_line.\n cur_line = []\n cur_len = 0\n\n # Figure out which static string will prefix this line.\n if lines:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n\n # Maximum width for this line.\n width = self.width - len(indent)\n\n # First chunk on line is whitespace -- drop it, unless this\n # is the very beginning of the text (ie. no lines started yet).\n if self.drop_whitespace and chunks[-1].strip() == '' and lines:\n del chunks[-1]\n\n while chunks:\n l = len(chunks[-1])\n\n # Can at least squeeze this chunk onto the current line.\n if cur_len + l <= width:\n cur_line.append(chunks.pop())\n cur_len += l\n\n # Nope, this line is full.\n else:\n break\n\n # The current line is full, and the next chunk is too big to\n # fit on *any* line (not just this one).\n if chunks and len(chunks[-1]) > width:\n self._handle_long_word(chunks, cur_line, cur_len, width)\n cur_len = sum(map(len, cur_line))\n\n # If the last chunk on this line is all whitespace, drop it.\n if self.drop_whitespace and cur_line and cur_line[-1].strip() == '':\n cur_len -= len(cur_line[-1])\n del cur_line[-1]\n\n if cur_line:\n if (self.max_lines is None or\n len(lines) + 1 < self.max_lines or\n (not chunks or\n self.drop_whitespace and\n len(chunks) == 1 and\n not chunks[0].strip()) and cur_len <= width):\n # Convert current line back to a string and store it in\n # list of all lines (return value).\n lines.append(indent + ''.join(cur_line))\n else:\n while cur_line:\n if (cur_line[-1].strip() and\n cur_len + len(self.placeholder) <= width):\n cur_line.append(self.placeholder)\n lines.append(indent + ''.join(cur_line))\n break\n cur_len -= len(cur_line[-1])\n del cur_line[-1]\n else:\n if lines:\n prev_line = lines[-1].rstrip()\n if (len(prev_line) + len(self.placeholder) <=\n self.width):\n lines[-1] = prev_line + self.placeholder\n break\n lines.append(indent + self.placeholder.lstrip())\n break\n\n return lines\n\n def _split_chunks(self, text):\n text = self._munge_whitespace(text)\n return self._split(text)\n\n # -- Public interface ----------------------------------------------\n\n def wrap(self, text):\n \"\"\"wrap(text : string) -> [string]\n Reformat the single paragraph in 'text' so it fits in lines of\n no more than 'self.width' columns, and return a list of wrapped\n lines. Tabs in 'text' are expanded with string.expandtabs(),\n and all other whitespace characters (including newline) are\n converted to space.\n \"\"\"\n chunks = self._split_chunks(text)\n if self.fix_sentence_endings:\n self._fix_sentence_endings(chunks)\n return self._wrap_chunks(chunks)\n\n def fill(self, text):\n \"\"\"fill(text : string) -> string\n Reformat the single paragraph in 'text' to fit in lines of no\n more than 'self.width' columns, and return a new string\n containing the entire wrapped paragraph.\n \"\"\"\n return \"\\n\".join(self.wrap(text))\n\n\n# -- Convenience interface ---------------------------------------------\n\ndef wrap(text, width=70, **kwargs):\n \"\"\"Wrap a single paragraph of text, returning a list of wrapped lines.\n Reformat the single paragraph in 'text' so it fits in lines of no\n more than 'width' columns, and return a list of wrapped lines. By\n default, tabs in 'text' are expanded with string.expandtabs(), and\n all other whitespace characters (including newline) are converted to\n space. See TextWrapper class for available keyword args to customize\n wrapping behaviour.\n \"\"\"\n w = TextWrapper(width=width, **kwargs)\n return w.wrap(text)\n\ndef fill(text, width=70, **kwargs):\n \"\"\"Fill a single paragraph of text, returning a new string.\n Reformat the single paragraph in 'text' to fit in lines of no more\n than 'width' columns, and return a new string containing the entire\n wrapped paragraph. As with wrap(), tabs are expanded and other\n whitespace characters converted to space. See TextWrapper class for\n available keyword args to customize wrapping behaviour.\n \"\"\"\n w = TextWrapper(width=width, **kwargs)\n return w.fill(text)\n\ndef shorten(text, width, **kwargs):\n \"\"\"Collapse and truncate the given text to fit in the given width.\n The text first has its whitespace collapsed. If it then fits in\n the *width*, it is returned as is. Otherwise, as many words\n as possible are joined and then the placeholder is appended::\n >>> textwrap.shorten(\"Hello world!\", width=12)\n 'Hello world!'\n >>> textwrap.shorten(\"Hello world!\", width=11)\n 'Hello [...]'\n \"\"\"\n w = TextWrapper(width=width, max_lines=1, **kwargs)\n return w.fill(' '.join(text.strip().split()))\n\n\n# -- Loosely related functionality -------------------------------------\n\n# _whitespace_only_re = re.compile('^[ \\t]+$', re.MULTILINE)\n# _leading_whitespace_re = re.compile('(^[ \\t]*)(?:[^ \\t\\n])', re.MULTILINE)\n\ndef dedent(text):\n \"\"\"Remove any common leading whitespace from every line in `text`.\n This can be used to make triple-quoted strings line up with the left\n edge of the display, while still presenting them in the source code\n in indented form.\n Note that tabs and spaces are both treated as whitespace, but they\n are not equal: the lines \" hello\" and \"\\\\thello\" are\n considered to have no common leading whitespace.\n Entirely blank lines are normalized to a newline character.\n \"\"\"\n # Look for the longest leading string of spaces and tabs common to\n # all lines.\n margin = None\n\n indents = re.findall(r'(^[ \\t]*)(?:[^ \\t\\n])',text, re.MULTILINE)\n for indent in indents:\n if margin is None:\n margin = indent\n\n # Current line more deeply indented than previous winner:\n # no change (previous winner is still on top).\n elif indent.startswith(margin):\n pass\n\n # Current line consistent with and no deeper than previous winner:\n # it's the new winner.\n elif margin.startswith(indent):\n margin = indent\n\n # Find the largest common whitespace between current line and previous\n # winner.\n else:\n for i, (x, y) in enumerate(zip(margin, indent)):\n if x != y:\n margin = margin[:i]\n break\n # sanity check (testing/debugging only)\n if 0 and margin:\n for line in text.split(\"\\n\"):\n assert not line or line.startswith(margin), \\\n \"line = %r, margin = %r\" % (line, margin)\n\n if margin:\n lines = [line[len(margin):] \n if line.strip()\n else line.strip() \n for line in text.split(\"\\n\")]\n text = \"\\n\".join(lines)\n return text\n\n\ndef indent(text, prefix, predicate=None):\n \"\"\"Adds 'prefix' to the beginning of selected lines in 'text'.\n If 'predicate' is provided, 'prefix' will only be added to the lines\n where 'predicate(line)' is True. If 'predicate' is not provided,\n it will default to adding 'prefix' to all non-empty lines that do not\n consist solely of whitespace characters.\n \"\"\"\n if predicate is None:\n def predicate(line):\n return line.strip()\n\n def prefixed_lines():\n for line in text.splitlines(True):\n yield (prefix + line if predicate(line) else line)\n return ''.join(prefixed_lines())\n\n\nif __name__ == \"__main__\":\n #print dedent(\"\\tfoo\\n\\tbar\")\n #print dedent(\" \\thello there\\n \\t how are you?\")\n print(dedent(\"Hello there.\\n This is indented.\"))","src/lib/this.py":'import _sk_fail; _sk_fail._("this")\n',"src/lib/threading.py":'import _sk_fail; _sk_fail._("threading")\n',"src/lib/timeit.py":'import _sk_fail; _sk_fail._("timeit")\n',"src/lib/toaiff.py":'import _sk_fail; _sk_fail._("toaiff")\n',"src/lib/trace.py":'import _sk_fail; _sk_fail._("trace")\n',"src/lib/traceback.py":'import _sk_fail; _sk_fail._("traceback")\n',"src/lib/tty.py":'import _sk_fail; _sk_fail._("tty")\n',"src/lib/types.py":'"""\nThis file was modified from CPython.\nCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved\n"""\n"""Define names for all type symbols known in the standard interpreter.\nTypes that are part of optional modules (e.g. array) are not listed.\n"""\nimport sys\n\n# Iterators in Python aren\'t a matter of type but of protocol. A large\n# and changing number of builtin types implement *some* flavor of\n# iterator. Don\'t check the type! Use hasattr to check for both\n# "__iter__" and "next" attributes instead.\nMappingProxyType = type(type.__dict__)\nWrapperDescriptorType = type(object.__init__)\nMethodWrapperType = type(object().__str__)\nMethodDescriptorType = type(str.join)\nClassMethodDescriptorType = type(dict.__dict__[\'fromkeys\'])\n\nNoneType = type(None)\nTypeType = type\nObjectType = object\nIntType = int\ntry:\n LongType = long\nexcept: pass\nFloatType = float\nBooleanType = bool\ntry:\n ComplexType = complex\nexcept NameError:\n pass\nStringType = str\n\n# StringTypes is already outdated. Instead of writing "type(x) in\n# types.StringTypes", you should use "isinstance(x, basestring)". But\n# we keep around for compatibility with Python 2.2.\ntry:\n UnicodeType = unicode\n StringTypes = (StringType, UnicodeType)\nexcept NameError:\n StringTypes = (StringType,)\n\nBufferType = buffer\n\nTupleType = tuple\nListType = list\nDictType = DictionaryType = dict\n\ndef _f(): pass\nFunctionType = type(_f)\nLambdaType = type(lambda: None) # Same as FunctionType\n#CodeType = type(_f.func_code)\n\ndef _g():\n yield 1\nGeneratorType = type(_g())\n\nclass _C:\n def _m(self): pass\nClassType = type(_C)\nUnboundMethodType = type(_C._m) # Same as MethodType\n_x = _C()\nInstanceType = type(_x)\nMethodType = type(_x._m)\nBuiltinFunctionType = type(len)\nBuiltinMethodType = type([].append) # Same as BuiltinFunctionType\n\nModuleType = type(sys)\nFileType = file\ntry:\n XRangeType = xrange\nexcept NameError:\n pass\n\n# try:\n# raise TypeError\n# except TypeError:\n# tb = sys.exc_info()[2]\n# TracebackType = type(tb)\n# FrameType = type(tb.tb_frame)\n# del tb\n\nSliceType = slice\nEllipsisType = type(Ellipsis)\n\n# DictProxyType = type(TypeType.__dict__)\nNotImplementedType = type(NotImplemented)\n\n# For Jython, the following two types are identical\n# GetSetDescriptorType = type(FunctionType.func_code)\n# MemberDescriptorType = type(FunctionType.func_globals)\n\ndel sys, _f, _g, _C, _x # Not for export\n__all__ = list(n for n in globals() if n[:1] != \'_\')\n\nGenericAlias = type(type[int])',"src/lib/unittest/gui.py":"import document\nfrom unittest import TestCase\n\nclass TestCaseGui(TestCase):\n def __init__(self):\n TestCase.__init__(self)\n self.divid = document.currentDiv()\n self.mydiv = document.getElementById(self.divid)\n res = document.getElementById(self.divid+'_unit_results')\n if res:\n self.resdiv = res\n res.innerHTML = ''\n else:\n self.resdiv = document.createElement('div')\n self.resdiv.setAttribute('id',self.divid+'_unit_results')\n self.resdiv.setAttribute('class','unittest-results')\n self.mydiv.appendChild(self.resdiv)\n\n\n def main(self):\n t = document.createElement('table')\n self.resTable = t\n self.resdiv.appendChild(self.resTable)\n\n headers = ['Result','Actual Value','Expected Value','Notes']\n row = document.createElement('tr')\n for item in headers:\n head = document.createElement('th')\n head.setAttribute('class','ac-feedback')\n head.innerHTML = item\n head.setCSS('text-align','center')\n row.appendChild(head)\n self.resTable.appendChild(row)\n\n for func in self.tlist:\n try:\n self.setUp()\n func()\n self.tearDown()\n except Exception as e:\n self.appendResult('Error', None, None, e)\n self.numFailed += 1\n self.showSummary()\n\n def appendResult(self,res,actual,expected,param):\n trimActual = False\n if len(str(actual)) > 15:\n trimActual = True\n actualType = type(actual)\n trimExpected = False\n if len(str(expected)) > 15:\n trimExpected = True\n expectedType = type(expected)\n row = document.createElement('tr')\n err = False\n if res == 'Error':\n err = True\n msg = 'Error: %s' % param\n errorData = document.createElement('td')\n errorData.setAttribute('class','ac-feedback')\n errorData.innerHTML = 'ERROR'\n errorData.setCSS('background-color','#de8e96')\n errorData.setCSS('text-align','center')\n row.appendChild(errorData)\n elif res:\n passed = document.createElement('td')\n passed.setAttribute('class','ac-feedback')\n passed.innerHTML = 'Pass'\n passed.setCSS('background-color','#83d382')\n passed.setCSS('text-align','center')\n row.appendChild(passed)\n self.numPassed += 1\n else:\n fail = document.createElement('td')\n fail.setAttribute('class','ac-feedback')\n fail.innerHTML = 'Fail'\n fail.setCSS('background-color','#de8e96')\n fail.setCSS('text-align','center')\n row.appendChild(fail)\n self.numFailed += 1\n\n\n act = document.createElement('td')\n act.setAttribute('class','ac-feedback')\n if trimActual:\n actHTML = str(actual)[:5] + \"...\" + str(actual)[-5:]\n if actualType == str:\n actHTML = repr(actHTML)\n act.innerHTML = actHTML\n else:\n act.innerHTML = repr(actual)\n act.setCSS('text-align','center')\n row.appendChild(act)\n\n expect = document.createElement('td')\n expect.setAttribute('class','ac-feedback')\n\n if trimExpected:\n expectedHTML = str(expected)[:5] + \"...\" + str(expected)[-5:]\n if expectedType == str:\n expectedHTML = repr(expectedHTML)\n expect.innerHTML = expectedHTML\n else:\n expect.innerHTML = repr(expected)\n expect.setCSS('text-align','center')\n row.appendChild(expect)\n inp = document.createElement('td')\n inp.setAttribute('class','ac-feedback')\n\n if err:\n inp.innerHTML = msg\n else:\n inp.innerHTML = param\n inp.setCSS('text-align','center')\n row.appendChild(inp)\n self.resTable.appendChild(row)\n\n\n def showSummary(self):\n pct = self.numPassed / (self.numPassed+self.numFailed) * 100\n pTag = document.createElement('p')\n pTag.innerHTML = \"You passed: \" + str(pct) + \"% of the tests\"\n self.resdiv.appendChild(pTag)\n","src/lib/unittest/__init__.py":'__author__ = \'bmiller\'\n\'\'\'\nThis is the start of something that behaves like\nthe unittest module from cpython.\n\n\'\'\'\nimport re\n\nclass _AssertRaisesContext(object):\n """A context manager used to implement TestCase.assertRaises* methods."""\n def __init__(self, expected, test_case):\n self.test_case = test_case\n self.expected = expected\n self.exception = None\n\n def _is_subtype(self, expected, basetype):\n if isinstance(expected, tuple):\n return all(self._is_subtype(e, basetype) for e in expected)\n return isinstance(expected, type) and issubclass(expected, basetype)\n\n def handle(self, args, kwargs):\n """\n If args is empty, assertRaises is being used as a\n context manager, so return self.\n If args is not empty, call a callable passing positional and keyword\n arguments.\n """\n try:\n if not self._is_subtype(self.expected, BaseException):\n raise TypeError(\'assertRaises() arg 1 must be an exception type or tuple of exception types\')\n if not args:\n return self\n\n callable_obj = args[0]\n args = args[1:]\n with self:\n callable_obj(*args, **kwargs) \n\n finally:\n # bpo-23890: manually break a reference cycle\n self = None\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, tb):\n res = True\n feedback = ""\n self.exception = exc_value\n try:\n act_exc = exc_type.__name__\n except AttributeError:\n act_exc = str(exc_type)\n try:\n exp_exc = self.expected.__name__\n except AttributeError:\n exp_exc = str(self.expected)\n\n if exc_type is None:\n res = False\n feedback = "{} not raised".format(exp_exc)\n elif not issubclass(exc_type, self.expected):\n res = False\n feedback = "Expected {} but got {}".format(exp_exc, act_exc)\n\n self.test_case.appendResult(res, act_exc, exp_exc, feedback)\n return True\n\n\nclass TestCase(object):\n def __init__(self):\n self.numPassed = 0\n self.numFailed = 0\n self.assertPassed = 0\n self.assertFailed = 0\n self.verbosity = 1\n self.tlist = []\n testNames = {}\n for name in dir(self):\n if name[:4] == \'test\' and name not in testNames:\n self.tlist.append(getattr(self,name))\n testNames[name]=True\n\n def setUp(self):\n pass\n\n def tearDown(self):\n pass\n \n def cleanName(self,funcName):\n return funcName.__func__.__name__\n\n def main(self):\n\n for func in self.tlist:\n if self.verbosity > 1:\n print(\'Running %s\' % self.cleanName(func))\n try:\n self.setUp()\n self.assertPassed = 0\n self.assertFailed = 0\n func()\n self.tearDown()\n if self.assertFailed == 0:\n self.numPassed += 1\n else:\n self.numFailed += 1\n print(\'Tests failed in %s \' % self.cleanName(func))\n except Exception as e:\n self.assertFailed += 1\n self.numFailed += 1\n print(\'Test threw exception in %s (%s)\' % (self.cleanName(func), e))\n self.showSummary()\n\n def assertEqual(self, actual, expected, feedback=""):\n res = actual==expected\n if not res and feedback == "":\n feedback = "Expected %s to equal %s" % (str(actual),str(expected))\n self.appendResult(res, actual ,expected, feedback)\n\n def assertNotEqual(self, actual, expected, feedback=""):\n res = actual != expected\n if not res and feedback == "":\n feedback = "Expected %s to not equal %s" % (str(actual),str(expected))\n self.appendResult(res, actual, expected, feedback)\n\n def assertTrue(self,x, feedback=""):\n res = bool(x) is True\n if not res and feedback == "":\n feedback = "Expected %s to be True" % (str(x))\n self.appendResult(res, x, True, feedback)\n\n def assertFalse(self,x, feedback=""):\n res = not bool(x)\n if not res and feedback == "":\n feedback = "Expected %s to be False" % (str(x))\n self.appendResult(res, x, False, feedback)\n\n def assertIs(self,a,b, feedback=""):\n res = a is b\n if not res and feedback == "":\n feedback = "Expected %s to be the same object as %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsNot(self,a,b, feedback=""):\n res = a is not b\n if not res and feedback == "":\n feedback = "Expected %s to not be the same object as %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsNone(self,x, feedback=""):\n res = x is None\n if not res and feedback == "":\n feedback = "Expected %s to be None" % (str(x))\n self.appendResult(res, x, None, feedback)\n\n def assertIsNotNone(self,x, feedback=""):\n res = x is not None\n if not res and feedback == "":\n feedback = "Expected %s to not be None" % (str(x))\n self.appendResult(res, x, None, feedback)\n\n def assertIn(self, a, b, feedback=""):\n res = a in b\n if not res and feedback == "":\n feedback = "Expected %s to be in %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotIn(self, a, b, feedback=""):\n res = a not in b\n if not res and feedback == "":\n feedback = "Expected %s to not be in %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsInstance(self,a,b, feedback=""):\n res = isinstance(a,b)\n if not res and feedback == "":\n feedback = "Expected %s to be an instance of %s" % (str(a), str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotIsInstance(self,a,b, feedback=""):\n res = not isinstance(a,b)\n if not res and feedback == "":\n feedback = "Expected %s to not be an instance of %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertRegex(self, text, expected_regex, feedback=""):\n """Fail the test unless the text matches the regular expression."""\n if isinstance(expected_regex, (str, )): #bytes\n assert expected_regex, "expected_regex must not be empty."\n expected_regex = re.compile(expected_regex)\n if not expected_regex.search(text):\n res = False\n if feedback == "":\n feedback = "Regex didn\'t match: %r not found in %r" % (\n repr(expected_regex), text)\n else:\n res = True\n self.appendResult(res, text, expected_regex, feedback)\n\n def assertNotRegex(self, text, unexpected_regex, feedback=""):\n """Fail the test if the text matches the regular expression."""\n if isinstance(unexpected_regex, (str, )): # bytes\n unexpected_regex = re.compile(unexpected_regex)\n match = unexpected_regex.search(text)\n if match:\n feedback = \'Regex matched: %r matches %r in %r\' % (\n text[match.start() : match.end()],\n repr(unexpected_regex),\n text)\n # _formatMessage ensures the longMessage option is respected\n self.appendResult(not bool(match), text, unexpected_regex, feedback)\n\n def assertAlmostEqual(self, a, b, places=7, feedback="", delta=None):\n\n if delta is not None:\n res = abs(a-b) <= delta\n else:\n if places is None:\n places = 7\n res = round(a-b, places) == 0\n \n if not res and feedback == "":\n feedback = "Expected %s to equal %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotAlmostEqual(self, a, b, places=7, feedback="", delta=None):\n\n if delta is not None:\n res = not (a == b) and abs(a - b) > delta\n else:\n if places is None:\n places = 7\n\n res = round(a-b, places) != 0\n\n if not res and feedback == "":\n feedback = "Expected %s to not equal %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertGreater(self,a,b, feedback=""):\n res = a > b\n if not res and feedback == "":\n feedback = "Expected %s to be greater than %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertGreaterEqual(self,a,b, feedback=""):\n res = a >= b\n if not res and feedback == "":\n feedback = "Expected %s to be >= %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertLess(self, a, b, feedback=""):\n res = a < b\n if not res and feedback == "":\n feedback = "Expected %s to be less than %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertLessEqual(self,a,b, feedback=""):\n res = a <= b\n if not res and feedback == "":\n feedback = "Expected %s to be <= %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def appendResult(self,res,actual,expected,feedback):\n if res:\n msg = \'Pass\'\n self.assertPassed += 1\n else:\n msg = \'Fail: \' + feedback\n print(msg)\n self.assertFailed += 1\n\n def assertRaises(self, expected_exception, *args, **kwargs):\n context = _AssertRaisesContext(expected_exception, self)\n try:\n return context.handle(args, kwargs)\n finally:\n # bpo-23890: manually break a reference cycle\n context = None\n\n def fail(self, msg=None):\n if msg is None:\n msg = \'Fail\'\n else:\n msg = \'Fail: \' + msg\n print(msg)\n self.assertFailed += 1\n\n def showSummary(self):\n # don\'t divde by zero\n # pct = self.numPassed / (self.numPassed+self.numFailed) * 100\n print("Ran %d tests, passed: %d failed: %d\\n" % (self.numPassed+self.numFailed,\n self.numPassed, self.numFailed))\n\n\n\ndef main(verbosity=1):\n glob = globals() # globals() still needs work\n for name in glob:\n if type(glob[name]) == type and issubclass(glob[name], TestCase):\n try:\n tc = glob[name]()\n tc.verbosity = verbosity\n tc.main()\n except:\n print("Uncaught Error in: ", name)\n',"src/lib/urllib2.py":'import _sk_fail; _sk_fail._("urllib2")\n',"src/lib/urlparse.py":'import _sk_fail; _sk_fail._("urlparse")\n',"src/lib/user.py":'import _sk_fail; _sk_fail._("user")\n',"src/lib/UserDict.py":'import _sk_fail; _sk_fail._("UserDict")\n',"src/lib/UserList.py":'import _sk_fail; _sk_fail._("UserList")\n',"src/lib/UserString.py":'import _sk_fail; _sk_fail._("UserString")\n',"src/lib/uu.py":'import _sk_fail; _sk_fail._("uu")\n',"src/lib/warnings.py":'import _sk_fail; _sk_fail._("warnings")\n',"src/lib/wave.py":'import _sk_fail; _sk_fail._("wave")\n',"src/lib/weakref.py":'import _sk_fail; _sk_fail._("weakref")\n',"src/lib/whichdb.py":'import _sk_fail; _sk_fail._("whichdb")\n',"src/lib/wsgiref/__init__.py":'import _sk_fail; _sk_fail._("wsgiref")\n',"src/lib/xdrlib.py":'import _sk_fail; _sk_fail._("xdrlib")\n',"src/lib/xml/dom/__init__.py":'import _sk_fail; _sk_fail._("dom")\n',"src/lib/xml/etree/__init__.py":'import _sk_fail; _sk_fail._("etree")\n',"src/lib/xml/parsers/__init__.py":'import _sk_fail; _sk_fail._("parsers")\n',"src/lib/xml/sax/__init__.py":'import _sk_fail; _sk_fail._("sax")\n',"src/lib/xml/__init__.py":'import _sk_fail; _sk_fail._("xml")\n',"src/lib/xmllib.py":'import _sk_fail; _sk_fail._("xmllib")\n',"src/lib/xmlrpclib.py":'import _sk_fail; _sk_fail._("xmlrpclib")\n',"src/lib/zipfile.py":'import _sk_fail; _sk_fail._("zipfile")\n',"src/lib/_abcoll.py":'import _sk_fail; _sk_fail._("_abcoll")\n',"src/lib/_LWPCookieJar.py":'import _sk_fail; _sk_fail._("_LWPCookieJar")\n',"src/lib/_MozillaCookieJar.py":'import _sk_fail; _sk_fail._("_MozillaCookieJar")\n',"src/lib/_sk_fail.py":'class NotImplementedImportError(ImportError, NotImplementedError): pass\n\ndef _(name):\n msg = "{} is not yet implemented in Skulpt".format(name)\n raise NotImplementedImportError(msg, name=name)\n',"src/lib/_threading_local.py":'import _sk_fail; _sk_fail._("_threading_local")\n',"src/lib/__future__.py":'import _sk_fail;_sk_fail._("__future__")\n',"src/lib/__phello__.foo.py":'import _sk_fail; _sk_fail._("__phello__.foo")\n',"src/builtin/sys.js":'var $builtinmodule=function(i){var t,n={},e=[],u=Sk.getSysArgv();for(t=0;tnew Sk.builtin.str("utf-8"))),n.getExecutionLimit=new Sk.builtin.func((function(){return null===Sk.execLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.execLimit)})),n.setExecutionLimit=new Sk.builtin.func((function(i){if(null===Sk.execLimit)throw new Sk.builtin.NotImplementedError("Execution limiting is not enabled");void 0!==i&&(Sk.execLimit=Sk.builtin.asnum$(i))})),n.resetTimeout=new Sk.builtin.func((function(){Sk.execStart=new Date})),n.getYieldLimit=new Sk.builtin.func((function(){return null===Sk.yieldLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.yieldLimit)})),n.setYieldLimit=new Sk.builtin.func((function(i){if(null===Sk.yieldLimit)throw new Sk.builtin.NotImplementedError("Yielding is not enabled");void 0!==i&&(Sk.yieldLimit=Sk.builtin.asnum$(i))})),n.debug=new Sk.builtin.func((function(){return Sk.builtin.none.none$}));const o=Sk.builtin.make_structseq("sys","float_info",{max:"DBL_MAX -- maximum representable finite float",max_exp:"DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable",max_10_exp:"DBL_MAX_10_EXP -- maximum int e such that 10**e is representable",min:"DBL_MIN -- Minimum positive normalized float",min_exp:"DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a normalized float",min_10_exp:"DBL_MIN_10_EXP -- minimum int e such that 10**e is a normalized",dig:"DBL_DIG -- digits",mant_dig:"DBL_MANT_DIG -- mantissa digits",epsilon:"DBL_EPSILON -- Difference between 1 and the next representable float",radix:"FLT_RADIX -- radix of exponent",rounds:"FLT_ROUNDS -- rounding mode"});n.float_info=new o([Number.MAX_VALUE,Math.floor(Math.log2(Number.MAX_VALUE)),Math.floor(Math.log10(Number.MAX_VALUE)),Number.MIN_VALUE,Math.ceil(Math.log2(Number.MIN_VALUE)),Math.ceil(Math.log10(Number.MIN_VALUE)),15,Math.log2(Number.MAX_SAFE_INTEGER),Number.EPSILON,2,1].map((i=>Sk.ffi.remapToPy(i))));const s=Sk.builtin.make_structseq("sys","int_info",{bits_per_digit:"size of a digit in bits",sizeof_digit:"size in bytes of the C type used to represent a digit"});n.int_info=new s([30,4].map((i=>Sk.ffi.remapToPy(i))));const l=Sk.builtin.make_structseq("sys","hash_info",{width:"width of the type used for hashing, in bits",modulus:"prime number giving the modulus on which the hash function is based",inf:"value to be used for hash of a positive infinity",nan:"value to be used for hash of a nan",imag:"multiplier used for the imaginary part of a complex number",algorithm:"name of the algorithm for hashing of str, bytes and memoryviews",hash_bits:"internal output size of hash algorithm",seed_bits:"seed size of hash algorithm",cutoff:"small string optimization cutoff"});return n.hash_info=new l([32,536870911,314159,0,1000003,"siphash24",32,128,0].map((i=>Sk.ffi.remapToPy(i)))),n.__stdout__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdout"),new Sk.builtin.str("w")),n.__stdin__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdin"),new Sk.builtin.str("r")),n.stdout=n.__stdout__,n.stdin=n.__stdin__,n};',"src/lib/array.js":'function $builtinmodule(e){var n={},t=["c","b","B","u","h","H","i","I","l","L","f","d"];return n.__name__=new Sk.builtin.str("array"),n.array=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e,n,i){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,3),-1==t.indexOf(Sk.ffi.remapToJs(n)))throw new Sk.builtin.ValueError("bad typecode (must be c, b, B, u, h, H, i, I, l, L, f or d)");if(i&&!Sk.builtin.checkIterable(i))throw new Sk.builtin.TypeError("iteration over non-sequence");if(e.$d.mp$ass_subscript(new Sk.builtin.str("typecode"),n),e.$d.mp$ass_subscript(new Sk.builtin.str("__module__"),new Sk.builtin.str("array")),e.typecode=n,void 0===i)e.internalIterable=new Sk.builtin.list;else if(i instanceof Sk.builtin.list)e.internalIterable=i;else{e.internalIterable=new Sk.builtin.list;for(let n=Sk.abstr.iter(i),t=n.tp$iternext();void 0!==t;t=n.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,t])}})),n.__repr__=new Sk.builtin.func((function(e){var n=Sk.ffi.remapToJs(e.typecode),t="";return Sk.ffi.remapToJs(e.internalIterable).length&&(t="c"==Sk.ffi.remapToJs(e.typecode)?", \'"+Sk.ffi.remapToJs(e.internalIterable).join("")+"\'":", "+Sk.ffi.remapToJs(Sk.misceval.callsimArray(e.internalIterable.__repr__,[e.internalIterable]))),new Sk.builtin.str("array(\'"+n+"\'"+t+")")})),n.__str__=n.__repr__,n.__getattribute__=new Sk.builtin.func((function(e,n){return e.tp$getattr(n)})),n.append=new Sk.builtin.func((function(e,n){return Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,n]),Sk.builtin.none.none$})),n.extend=new Sk.builtin.func((function(e,n){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2),!Sk.builtin.checkIterable(n))throw new Sk.builtin.TypeError("iteration over non-sequence");for(let t=Sk.abstr.iter(n),i=t.tp$iternext();void 0!==i;i=t.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,i])}))}),"array",[]),n}',"src/lib/calendar.js":'function $builtinmodule(e){const t={},{misceval:{chain:n},importModule:r}=Sk,importOrSuspend=e=>r(e,!1,!0);return n(importOrSuspend("datetime"),(e=>(t.datetime=e,importOrSuspend("itertools"))),(e=>(t.iterRepeat=e.$d.repeat,t.iterChain=e.$d.chain,calendarModule(t))))}function calendarModule(e){const{abstr:{setUpModuleMethods:t,numberBinOp:n,iter:r,objectGetItem:o},builtin:{bool:s,bool:{true$:m,false$:d},func:l,int_:i,list:c,none:{none$:f},str:h,slice:w,tuple:y,range:u,max:_,min:g,property:k,print:p,enumerate:$,ValueError:b},ffi:{remapToPy:M},misceval:{isTrue:T,iterator:C,arrayFromIterable:O,buildClass:L,richCompareBool:x,asIndexOrThrow:F,objectRepr:I,callsimArray:A},global:v,global:{strftime:E}}=Sk,S=new i(0),H=new i(1),D=new i(2),N=new i(3),R=new i(6),j=new i(7),J=new i(9),P=new i(12),Y=new i(13),U=new i(24),z=new i(60),le=(e,t)=>x(e,t,"LtE"),eq=(e,t)=>x(e,t,"Eq"),mod=(e,t)=>n(e,t,"Mod"),add=(e,t)=>n(e,t,"Add"),sub=(e,t)=>n(e,t,"Sub"),mul=(e,t)=>n(e,t,"Mult"),inc=e=>add(e,H),dec=e=>sub(e,H),mod7=e=>mod(e,j),getA=(e,t)=>e.tp$getattr(new h(t)),callA=(e,t,...n)=>A(e.tp$getattr(new h(t)),n);function*iterJs(e){const t=r(e);let n;for(;n=t.tp$iternext();)yield n}function iterFn(e,t){return e=r(e),new C((()=>{const n=e.tp$iternext();return n&&t(n)}),!0)}function makePyMethod(e,t,{args:n,name:r,doc:o,defaults:s}){t.co_varnames=["self",...n||[]],t.co_docstring=o?new h(o):f,s&&(t.$defaults=s),t.co_name=new h(r),t.co_qualname=new h(e+"."+r);const m=new l(t);return m.$module=Q.__name__,m}const{datetime:B,iterRepeat:W,iterChain:q}=e;let{MINYEAR:G,MAXYEAR:X,date:V}=B.$d;const K=getA(h,"center"),pyCenter=(e,t)=>A(K,[e,t]),pyRStrip=e=>new h(e.toString().trimRight());G=G.valueOf(),X=X.valueOf();const Q={__name__:new h("calendar"),__all__:M(["IllegalMonthError","IllegalWeekdayError","setfirstweekday","firstweekday","isleap","leapdays","weekday","monthrange","monthcalendar","prmonth","month","prcal","calendar","timegm","month_name","month_abbr","day_name","day_abbr","Calendar","TextCalendar","HTMLCalendar","LocaleTextCalendar","LocaleHTMLCalendar","weekheader"])};function makeErr(e,t){return L(Q,((e,n)=>{n.__init__=new l((function __init__(e,t){e.$attr=t})),n.__str__=new l((function __str__(e){return new h(t.replace("$",I(e.$attr)))}))}),e,[b])}const Z=makeErr("IllegalMonthError","bad month $; must be 1-12"),ee=makeErr("IllegalWeekdayError","bad weekday number $; must be 0 (Monday) to 6 (Sunday)"),te=1,ae=2,ne=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mkLocalizedCls(e,t){t.__init__=new l((function __init__(e,t){e.format=t})),t.__getitem__=new l((function __getitem__(t,n){const r=o(e,n);if(n instanceof w){const e=[];for(const n of r.valueOf())e.push(A(n,[t.format]));return new c(e)}return A(r,[t.format])}));const n=new i(e.valueOf().length);t.__len__=new l((function __len__(e){return n}))}const re=new h("strftime"),oe=L(Q,((e,t)=>{let n=[new l((e=>h.$empty))];for(let r=0;r<12;r++){const e=new V(2001,r+1,1);n.push(e.tp$getattr(re))}n=new c(n),t._months=n,mkLocalizedCls(n,t)}),"_localized_month"),se=L(Q,((e,t)=>{let n=[];for(let r=0;r<7;r++){const e=new V(2001,1,r+1);n.push(e.tp$getattr(re))}n=new c(n),t._days=n,mkLocalizedCls(n,t)}),"_localized_day"),me=A(se,[new h("%A")]),de=A(se,[new h("%a")]),ie=A(oe,[new h("%B")]),ce=A(oe,[new h("%b")]),[fe,he,we,ye,ue,_e,ge]=[0,1,2,3,4,5,6];function isleap(e){return(e=F(e))%4==0&&(e%100!=0||e%400==0)}function weekday(e,t,n){e=F(e),G<=e&&e<=X||(e=2e3+e%400);const r=A(V,[new i(e),t,n]);return callA(V,"weekday",r)}function monthrange(e,t){if(!le(H,t)||!le(t,P))throw A(Z,[t]);const n=weekday(e,t,H);t=F(t);const r=ne[t]+Number(t===ae&&isleap(e));return[n,new i(r)]}function iterweekdays(e){return iterFn(A(u,[e.fwd,add(e.fwd,j)]),mod7)}function itermonthdates(e,t,n){return iterFn(itermonthdays3(e,t,n),(e=>A(V,e.valueOf())))}function itermonthdays(e,t,n){const[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=A(W,[S,s]),d=A(u,[H,inc(o)]),l=mod7(sub(e.fwd,add(r,o))),i=A(W,[S,l]);return A(q,[m,d,i])}function itermonthdays2(e,t,n){return iterFn(A($,[itermonthdays(e,t,n),e.fwd]),(e=>{const[t,n]=e.valueOf();return new y([n,mod7(t)])}))}function itermonthdays3(e,t,n){const ymdIter=(e,t,n)=>iterFn(n,(n=>new y([e,t,n]))),[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=mod7(sub(e.fwd,add(r,o))),[d,l]=function _prevmonth(e,t){return eq(t,H)?[dec(e),P]:[e,dec(t)]}(t,n),c=inc(function _monthlen(e,t){return t=F(t),new i(ne[t]+Number(t===ae&&isleap(e)))}(d,l)),f=A(u,[sub(c,s),c]),h=A(u,[H,inc(o)]),[w,_]=function _nextmonth(e,t){return eq(t,P)?[inc(e),H]:[e,inc(t)]}(t,n),g=A(u,[H,inc(m)]);return A(q,[ymdIter(d,l,f),ymdIter(t,n,h),ymdIter(w,_,g)])}function itermonthdays4(e,t,n){const r=itermonthdays3(e,t,n);let o=0;return iterFn(r,(t=>new y([...t.valueOf(),mod7(add(e.fwd,new i(o++)))])))}function _monthIter(e,t,n,r){const o=O(e(t,n,r)),s=[];for(let m=0;m{const n=makePyMethod.bind(null,"Calendar"),r=["firstweekday"],o=["year","month"],s=["year","width"],m={__init__:n((function __init__(e,t){return Object.defineProperty(e,"fwd",{get(){return mod7(this._fwd)},set(e){return this._fwd=e,!0}}),e.fwd=t,f}),{name:"__init__",args:r,defaults:[S]}),getfirstweekday:n((function getfirstweekday(e){return e.fwd}),{name:"getfirstweekday"}),setfirstweekday:n((function setfirstweekday(e,t){return e.fwd=t,f}),{name:"setfirstweekday",args:r}),iterweekdays:n(iterweekdays,{name:"iterweekdays"}),itermonthdates:n(itermonthdates,{name:"itermonthdates",args:o}),itermonthdays:n(itermonthdays,{name:"itermonthdays",args:o}),itermonthdays2:n(itermonthdays2,{name:"itermonthdays2",args:o}),itermonthdays3:n(itermonthdays3,{name:"itermonthdays3",args:o}),itermonthdays4:n(itermonthdays4,{name:"itermonthdays4",args:o}),monthdatescalendar:n(monthdatescalendar,{name:"monthdatescalendar",args:o}),monthdays2calendar:n(monthdays2calendar,{name:"monthdays2calendar",args:o}),monthdayscalendar:n(monthdayscalendar,{name:"monthdayscalendar",args:o}),yeardatescalendar:n(yeardatescalendar,{name:"yeardatescalendar",args:s,defaults:[N]}),yeardays2calendar:n(yeardays2calendar,{name:"yeardays2calendar",args:s,defaults:[N]}),yeardayscalendar:n(yeardayscalendar,{name:"yeardayscalendar",args:s,defaults:[N]})};m.firstweekday=new k(m.getfirstweekday,m.setfirstweekday),Object.assign(t,m)}),"Calendar");function doTextFormatweekday(e,t,n){let r;return r=x(n,J,"GtE")?me:de,pyCenter(o(o(r,t),new w(f,n)),n)}function doTextFormatmonthname(e,t,n,r,s=!0){let m=o(ie,n);return T(s)&&(m=mod(new h("%s %r"),new y([m,t]))),pyCenter(m,r)}const pe=L(Q,((e,t)=>{const txtPrint=e=>p([e],["end",h.$empty]);const n=doTextFormatweekday;function formatweekheader(e,t){const n=[];for(const r of iterJs(iterweekdays(e)))n.push(callA(e,"formatweekday",r,t).toString());return new h(n.join(" "))}const r=doTextFormatmonthname;const o=makePyMethod.bind(null,"TextCalendar"),s={prweek:o((function prweek(e,t,n){txtPrint(callA(e,"formatweek",t,n))}),{name:"prweek",args:["theweek","width"]}),formatday:o((function formatday(e,t,n,r){let o;return o=eq(t,S)?h.$empty:mod(new h("%2i"),t),pyCenter(o,r)}),{name:"formatday",args:["day","weekday","width"]}),formatweek:o((function formatweek(e,t,n){const r=[];for(const o of iterJs(t)){const[t,s]=o.valueOf();r.push(callA(e,"formatday",t,s,n).toString())}return new h(r.join(" "))}),{name:"formatweek",args:["theweek","width"]}),formatweekday:o(n,{name:"formatweekday",args:["day","width"]}),formatweekheader:o(formatweekheader,{name:"formatweekheader",args:["width"]}),formatmonthname:o(r,{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]}),prmonth:o((function prmonth(e,t,n,r,o){txtPrint(callA(e,"formatmonth",t,n,r,o))}),{name:"prmonth",args:["theyear","themonth","w","l"],defaults:[S,S]}),formatmonth:o((function formatmonth(e,t,n,r,o){const addNewLines=e=>new h(e+"\\n".repeat(o.valueOf()));r=_([D,r]),o=_([H,o]);let s=callA(e,"formatmonthname",t,n,dec(mul(j,inc(r))),!0);s=pyRStrip(s),s=addNewLines(s),s=add(s,pyRStrip(callA(e,"formatweekheader",r))),s=addNewLines(s);for(const m of iterJs(monthdays2calendar(e,t,n)))s=add(s,pyRStrip(callA(e,"formatweek",m,r))),s=addNewLines(s);return s}),{name:"formatmonth",args:["thyear","themonth","w","l"],defaults:[S,S]}),formatyear:o((function formatyear(e,t,n,r,o,s){n=_([D,n]),r=_([H,r]),o=_([D,o]);const m=dec(mul(inc(n),j));let d="";const a=e=>d+=e;a(pyRStrip(pyCenter(t.$r(),add(mul(m,s),mul(o,dec(s)))))),a("\\n".repeat(r));const l=formatweekheader(e,n);let f=0;for(const w of iterJs(yeardays2calendar(e,t,s))){const d=new i(f),y=inc(mul(s,d)),_=g([inc(mul(s,inc(d))),Y]),k=A(u,[y,_]);a("\\n".repeat(r));const p=iterFn(k,(n=>callA(e,"formatmonthname",t,n,m,!1)));a(pyRStrip(formatstring(p,m,o))),a("\\n".repeat(r));const $=iterFn(k,(e=>l));a(pyRStrip(formatstring($,m,o))),a("\\n".repeat(r));const b=Math.max(...w.valueOf().map((e=>e.valueOf().length)));for(let t=0;t=r.length?s.push(h.$empty):s.push(callA(e,"formatweek",r[t],n));a(pyRStrip(formatstring(new c(s),m,o))),a("\\n".repeat(r))}f++}return new h(d)}),{name:"formatyear",args:["theyear","w","l","c","m"],defaults:[D,H,R,N]}),pryear:o((function pryear(e,t,n,r,o,s){txtPrint(callA(e,"formatyear",t,n,r,o,s))}),{name:"pryear",args:["theyear","w","l","c","m"],defaults:[S,S,R,N]})};Object.assign(t,s)}),"TextCalendar",[ke]);function doHtmlFormatweekday(e,t){return new h(`${o(de,t)}`)}function doHtmlFormatmonthname(e,t,n,r=!0){let s=""+o(ie,n);return T(r)&&(s+=" "+t),new h(`${s}`)}const $e=L(Q,((e,t)=>{const n=M(["mon","tue","wed","thu","fri","sat","sun"]),r=n,s=new h("noday"),d=new h("month"),l=d,c=new h("year"),w=c,u=new h(\' \'),g=new h(\'%d\');const k=doHtmlFormatweekday;function formatweekheader(e){let t="";for(const n of iterJs(iterweekdays(e)))t+=callA(e,"formatweekday",n);return new h(`${t}`)}const p=doHtmlFormatmonthname;const $=makePyMethod.bind(null,"HTMLCalendar"),b={formatday:$((function formatday(e,t,n){return eq(t,S)?mod(u,getA(e,"cssclass_noday")):mod(g,new y([o(getA(e,"cssclasses"),n),t]))}),{name:"formatday",args:["day","weekday"]}),formatweek:$((function formatweek(e,t){let n="";for(const r of iterJs(t)){const[t,o]=r.valueOf();n+=callA(e,"formatday",t,o)}return new h(`${n}`)}),{name:"formatweek",args:["theweek"]}),formatweekday:$(k,{name:"formatweekday",args:["day"]}),formatweekheader:$(formatweekheader,{name:"formatweekheader"}),formatmonthname:$(p,{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]}),formatmonth:$((function formatmonth(e,t,n,r=!0){let o="";const a=e=>o+=e+"\\n";a(``),a(callA(e,"formatmonthname",t,n,r)),a(formatweekheader(e));for(const s of iterJs(monthdays2calendar(e,t,n)))a(callA(e,"formatweek",s));return a("
"),new h(o)}),{name:"formatmonth",args:["thyear","themonth","withyear"],defaults:[m]}),formatyear:$((function formatyear(e,t,n){let r="";const a=e=>r+=e;n=_([n,H]).valueOf(),a(``),a("\\n"),a(``);for(let o=te;o");const r=Math.min(o+n,13);for(let n=o;n"),a(callA(e,"formatmonth",t,new i(n),!1)),a("");a("")}return a("
${t}
"),new h(r)}),{name:"formatyear",args:["theyear","width"],defaults:[N]}),formatyearpage:$((function formatyearpage(e,t,n=3,r="calendar.css",o=null){null!==o&&o!==f||(o=new h("utf-8"));let s="";const a=e=>s+=e;return a(`\\n`),a(\'\\n\'),a("\\n"),a("\\n"),a(`\\n`),r!==f&&a(`\\n`),a(`Calendar for ${t}\\n`),a("\\n"),a("\\n"),a(callA(e,"formatyear",t,n)),a("\\n"),a("\\n"),callA(h,"encode",new h(s),o,new h("ignore"))}),{name:"formatyearpage",args:["theyear","width","css","encoding"],defaults:[N,new h("calendar.css"),new h("utf-8")]}),cssclasses:n,cssclasses_weekday_head:r,cssclass_noday:s,cssclass_month_head:d,cssclass_month:l,cssclass_year_head:c,cssclass_year:w};Object.assign(t,b)}),"HTMLCalendar",[ke]);function withLocale(e,t){const n=E.localizeByIdentifier(e.toString());v.strftime=n;try{return t()}finally{v.strftime=E}}function localInit(e,t){T(t)||(t=new h("en_US")),e.locale=t}const be=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleTextCalendar"),r={__init__:n((function __init__(e,t,n){return callA(pe,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t,n){return withLocale(e.locale,(()=>doTextFormatweekday(0,t,n)))}),{name:"formatweekday",args:["day","width"]}),formatmonthname:n((function formatmonthname(e,t,n,r,o){return withLocale(e.locale,(()=>doTextFormatmonthname(0,t,n,r,o)))}),{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleTextCalendar",[pe]),Me=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleHTMLCalendar"),r={__init__:n((function __init__(e,t,n){return callA($e,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t){return withLocale(e.locale,(()=>doHtmlFormatweekday(e,t)))}),{name:"formatweekday",args:["day"]}),formatmonthname:n((function formatmonthname(e,t,n,r){return withLocale(e.locale,(()=>doHtmlFormatmonthname(e,t,n,r)))}),{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleHTMLCalendar",[$e]),Te=A(pe,[]);Object.assign(Q,{IllegalMonthError:Z,IllegalWeekdayError:ee,day_name:me,month_name:ie,day_abbr:de,month_abbr:ce,January:new i(te),February:new i(ae),mdays:M(ne),MONDAY:new i(fe),TUESDAY:new i(he),WEDNESDAY:new i(we),THURSDAY:new i(ye),FRIDAY:new i(ue),SATURDAY:new i(_e),SUNDAY:new i(ge),Calendar:ke,TextCalendar:pe,HTMLCalendar:$e,LocaleTextCalendar:be,LocaleHTMLCalendar:Me,c:Te,firstweekday:getA(Te,"getfirstweekday"),monthcalendar:getA(Te,"monthdayscalendar"),prweek:getA(Te,"prweek"),week:getA(Te,"formatweek"),weekheader:getA(Te,"formatweekheader"),prmonth:getA(Te,"prmonth"),month:getA(Te,"formatmonth"),calendar:getA(Te,"formatyear"),prcal:getA(Te,"pryear")});const Ce=new i(20),Oe=R;function formatstring(e,t,n){t||(t=Ce),n||(n=Oe),n=mul(n,new h(" "));const r=[];for(const o of iterJs(e))r.push(pyCenter(o,t).toString());return new h(r.join(n.toString()))}const Le=getA(V,"toordinal"),xe=A(Le,[new V(1970,1,1)]);return t("calendar",Q,{isleap:{$meth:e=>s(isleap(e)),$flags:{NamedArgs:["year"]},$doc:"Return True for leap years, False for non-leap years"},leapdays:{$meth(e,t){e=F(e)-1,t=F(t)-1;const n=Math.floor;return new i(n(t/4)-n(e/4)-(n(t/100)-n(e/100))+(n(t/400)-n(e/400)))},$flags:{MinArgs:2,MaxArgs:2}},weekday:{$meth:weekday,$flags:{NamedArgs:["year","month","day"]},$doc:"Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31)."},monthrange:{$meth:(e,t)=>new y(monthrange(e,t)),$flags:{NamedArgs:["year","month"]},$doc:"Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month."},setfirstweekday:{$meth(e){const t=F(e);if(!(fe<=t&&t<=ge))throw A(ee,[e]);Te.fwd=e},$flags:{NamedArgs:["firstweekday"]}},format:{$meth:function format(e,t,n){return p([formatstring(e,t,n)]),f},$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Ce,Oe]}},formatstring:{$meth:formatstring,$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Ce,Oe]}},timegm:{$meth(e){const[t,n,r,o,s,m]=e.valueOf(),d=A(V,[t,n,H]),l=A(Le,[d]),i=add(sub(l,xe),dec(r)),c=add(mul(i,U),o),f=add(mul(c,z),s);return add(mul(f,z),m)},$flags:{OneArg:!0}}}),Q}',"src/lib/collections.js":'function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("keyword",!1,!0),(t=>(e._iskeyword=t.$d.iskeyword,Sk.importModule("itertools",!1,!0))),(t=>(e._chain=t.$d.chain,e._starmap=t.$d.starmap,e._repeat=t.$d.repeat,Sk.importModule("operator",!1,!0))),(t=>{e._itemgetter=t.$d.itemgetter}),(()=>collections_mod(e)))}function collections_mod(t){function counterNumberSlot(e){return function(i){if(void 0!==i&&!(i instanceof t.Counter))return Sk.builtin.NotImplemented.NotImplemented$;const s=new t.Counter;return e.call(this,s,i),s}}function counterInplaceSlot(t,e){return function(i){if(!(i instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("Counter "+t+"= "+Sk.abstr.typeName(i)+" is not supported");return e.call(this,i),this.keep$positive()}}t.__all__=new Sk.builtin.list(["deque","defaultdict","namedtuple","Counter","OrderedDict"].map((t=>new Sk.builtin.str(t)))),t.defaultdict=Sk.abstr.buildNativeClass("collections.defaultdict",{constructor:function defaultdict(t,e){this.default_factory=t,Sk.builtin.dict.call(this,e)},base:Sk.builtin.dict,methods:{copy:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__copy__:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__missing__:{$meth(t){if(Sk.builtin.checkNone(this.default_factory))throw new Sk.builtin.KeyError(Sk.misceval.objectRepr(t));{const e=Sk.misceval.callsimArray(this.default_factory,[]);return this.mp$ass_subscript(t,e),e}},$flags:{OneArg:!0}}},getsets:{default_factory:{$get(){return this.default_factory},$set(t){t=t||Sk.builtin.none.none$,this.default_factory=t}}},slots:{tp$doc:"defaultdict(default_factory[, ...]) --\\x3e dict with default factory\\n\\nThe default factory is called without arguments to produce\\na new value when a key is not present, in __getitem__ only.\\nA defaultdict compares equal to a dict with the same items.\\nAll remaining arguments are treated the same as if they were\\npassed to the dict constructor, including keyword arguments.\\n",tp$init(t,e){const i=t.shift();if(void 0===i)this.default_factory=Sk.builtin.none.none$;else{if(!Sk.builtin.checkCallable(i)&&!Sk.builtin.checkNone(i))throw new Sk.builtin.TypeError("first argument must be callable");this.default_factory=i}return Sk.builtin.dict.prototype.tp$init.call(this,t,e)},$r(){const t=Sk.misceval.objectRepr(this.default_factory),e=Sk.builtin.dict.prototype.$r.call(this).v;return new Sk.builtin.str("defaultdict("+t+", "+e+")")}},proto:{$copy(){const e=[];return Sk.misceval.iterFor(Sk.abstr.iter(this),(t=>{e.push(t),e.push(this.mp$subscript(t))})),new t.defaultdict(this.default_factory,e)}}}),t.Counter=Sk.abstr.buildNativeClass("Counter",{constructor:function Counter(){this.$d=new Sk.builtin.dict,Sk.builtin.dict.apply(this)},base:Sk.builtin.dict,methods:{elements:{$flags:{NoArgs:!0},$meth(){const e=t._chain.tp$getattr(new Sk.builtin.str("from_iterable")),i=t._starmap,s=t._repeat,n=Sk.misceval.callsimArray;return n(e,[n(i,[s,n(this.tp$getattr(this.str$items))])])}},most_common:{$flags:{NamedArgs:["n"],Defaults:[Sk.builtin.none.none$]},$meth(t){const e=this.sq$length();t=Sk.builtin.checkNone(t)||(t=Sk.misceval.asIndexOrThrow(t))>e?e:t<0?0:t;const i=this.$items().sort(((t,e)=>Sk.misceval.richCompareBool(t[1],e[1],"Lt")?1:Sk.misceval.richCompareBool(t[1],e[1],"Gt")?-1:0));return new Sk.builtin.list(i.slice(0,t).map((t=>new Sk.builtin.tuple(t))))}},update:{$flags:{FastCall:!0},$meth(t,e){return Sk.abstr.checkArgsLen("update",t,0,1),this.counter$update(t,e)}},subtract:{$flags:{FastCall:!0},$meth(t,e){Sk.abstr.checkArgsLen("subtract",t,0,1);const i=t[0];if(void 0!==i)if(i instanceof Sk.builtin.dict)for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Sub"))}else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Sub"))}e=e||[];for(let s=0;s>> c = Counter(\'abcdeabcdabcaba\') # count elements from a string\\n\\n >>> c.most_common(3) # three most common elements\\n [(\'a\', 5), (\'b\', 4), (\'c\', 3)]\\n >>> sorted(c) # list all unique elements\\n [\'a\', \'b\', \'c\', \'d\', \'e\']\\n >>> \'\'.join(sorted(c.elements())) # list elements with repetitions\\n \'aaaaabbbbcccdde\'\\n >>> sum(c.values()) # total of all counts\\n 15\\n\\n >>> c[\'a\'] # count of letter \'a\'\\n 5\\n >>> for elem in \'shazam\': # update counts from an iterable\\n ... c[elem] += 1 # by adding 1 to each element\'s count\\n >>> c[\'a\'] # now there are seven \'a\'\\n 7\\n >>> del c[\'b\'] # remove all \'b\'\\n >>> c[\'b\'] # now there are zero \'b\'\\n 0\\n\\n >>> d = Counter(\'simsalabim\') # make another counter\\n >>> c.update(d) # add in the second counter\\n >>> c[\'a\'] # now there are nine \'a\'\\n 9\\n\\n >>> c.clear() # empty the counter\\n >>> c\\n Counter()\\n\\n Note: If a count is set to zero or reduced to zero, it will remain\\n in the counter until the entry is deleted or the counter is cleared:\\n\\n >>> c = Counter(\'aaabbc\')\\n >>> c[\'b\'] -= 2 # reduce the count of \'b\' by two\\n >>> c.most_common() # \'b\' is still in, but its count is zero\\n [(\'a\', 3), (\'c\', 1), (\'b\', 0)]\\n\\n",tp$init(t,e){return Sk.abstr.checkArgsLen(this.tpjs_name,t,0,1),this.counter$update(t,e)},$r(){const t=this.size>0?Sk.builtin.dict.prototype.$r.call(this).v:"";return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$as_sequence_or_mapping:!0,mp$ass_subscript(t,e){return void 0===e?this.mp$lookup(t)&&Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e):Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e)},tp$as_number:!0,nb$positive:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$negative:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$subtract:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Sub");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$add:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Add");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$inplace_add:counterInplaceSlot("+",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Add");this.mp$ass_subscript(t,i)}))})),nb$inplace_subtract:counterInplaceSlot("-",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Sub");this.mp$ass_subscript(t,i)}))})),nb$or:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?n:s;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$and:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?s:n;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)}))})),nb$inplace_and:counterInplaceSlot("&",(function(t){this.$items().forEach((([e,i])=>{const s=t.mp$subscript(e);Sk.misceval.richCompareBool(s,i,"Lt")&&this.mp$ass_subscript(e,s)}))})),nb$inplace_or:counterInplaceSlot("|",(function(t){t.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.mp$subscript(t),"Gt")&&this.mp$ass_subscript(t,e)}))})),nb$reflected_and:null,nb$reflected_or:null,nb$reflected_add:null,nb$reflected_subtract:null},proto:{keep$positive(){return this.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.$zero,"LtE")&&this.mp$ass_subscript(t)})),this},$zero:new Sk.builtin.int_(0),$one:new Sk.builtin.int_(1),str$items:new Sk.builtin.str("items"),counter$update(t,e){const i=t[0];if(void 0!==i)if(Sk.builtin.checkMapping(i))if(this.sq$length())for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Add"))}else this.update$common(t,void 0,"update");else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Add"))}if(e&&e.length)if(this.sq$length())for(let s=0;s`(${Sk.misceval.objectRepr(t)}, ${Sk.misceval.objectRepr(e)})`));return t=0===t.length?"":"["+t.join(", ")+"]",this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$richcompare(e,i){if("Eq"!==i&&"Ne"!==i)return Sk.builtin.NotImplemented.NotImplemented$;if(!(e instanceof t.OrderedDict))return Sk.builtin.dict.prototype.tp$richcompare.call(this,e,i);const s="Eq"==i,n=this.size;if(n!==e.size)return!s;const r=e.$items(),a=this.$items();for(let t=0;t=r||l>=a)switch(i){case"Lt":return ra;case"GtE":return r>=a}return"Eq"!==i&&("NotEq"===i||Sk.misceval.richCompareBool(n[this.head+l&this.mask],e[s.head+l&s.mask],i))},tp$iter(){return new e(this)},$r(){const t=[],e=this.tail-this.head&this.mask;if(this.$entered_repr)return new Sk.builtin.str("[...]");this.$entered_repr=!0;for(let s=0;s=e||t<-e)throw new Sk.builtin.IndexError("deque index out of range");const i=(t>=0?this.head:this.tail)+t&this.mask;return this.v[i]},mp$ass_subscript(t,e){t=Sk.misceval.asIndexOrThrow(t);const i=this.tail-this.head&this.mask;if(t>=i||t<-i)throw new Sk.builtin.IndexError("deque index out of range");void 0===e?this.del$item(t):this.set$item(t,e)},nb$inplace_add(t){this.maxlen=void 0;for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i);return this},nb$inplace_multiply(t){(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"can\'t multiply sequence by non-int of type \'{tp$name}\'"))<=0&&this.$clear();const e=this.$copy(),i=this.tail-this.head&this.mask;for(let s=1;s integer -- return number of occurrences of value"},extend:{$meth(t){return this.$extend(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the right side of the deque with elements from the iterable"},extendleft:{$meth(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$pushLeft(i);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the left side of the deque with elements from the iterable"},index:{$meth(t,e,i){const s=this.$index(t,e,i);if(void 0!==s)return new Sk.builtin.int_(s);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque")},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"D.index(value, [start, [stop]]) -> integer -- return first index of value.\\nRaises ValueError if the value is not present."},insert:{$meth(t,e){t=Sk.misceval.asIndexOrThrow(t,"integer argument expected, got {tp$name}");const i=this.tail-this.head&this.mask;if(void 0!==this.maxlen&&i>=this.maxlen)throw new Sk.builtin.IndexError("deque already at its maximum size");t>i&&(t=i),t<=-i&&(t=0);const s=(t>=0?this.head:this.tail)+t&this.mask;let n=this.tail;for(this.tail=this.tail+1&this.mask;n!==s;){const t=n-1&this.mask;this.v[n]=this.v[t],n=t}return this.v[s]=e,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1),Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"D.insert(index, object) -- insert object before index"},pop:{$meth(){return this.$pop()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the rightmost element."},popleft:{$meth(){return this.$popLeft()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the leftmost element."},remove:{$meth(t){const e=this.$index(t);if(void 0===e)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque");let i=this.head+e&this.mask;for(;i!==this.tail;){const t=i+1&this.mask;this.v[i]=this.v[t],i=t}this.tail=this.tail-1&this.mask;var s=this.tail-this.head&this.mask;s>>1&&this.$resize(s,this.v.length>>>1)},$flags:{OneArg:!0},$textsig:null,$doc:"D.remove(value) -- remove first occurrence of value."},__reversed__:{$meth(){return new i(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.__reversed__() -- return a reverse iterator over the deque"},reverse:{$meth(){const t=this.head,e=this.tail,i=this.mask,s=this.tail-this.head&this.mask;for(let n=0;n<~~(s/2);n++){const s=e-n-1&i,r=t+n&i,a=this.v[s];this.v[s]=this.v[r],this.v[r]=a}return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.reverse() -- reverse *IN PLACE*"},rotate:{$meth(t){t=void 0===t?1:Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const e=this.head,i=this.tail;if(0===t||e===i)return this;if(this.head=e-t&this.mask,this.tail=i-t&this.mask,t>0)for(let s=1;s<=t;s++){const t=e-s&this.mask,n=i-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}else for(let s=0;s>t;s--){const t=i-s&this.mask,n=e-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}return Sk.builtin.none.none$},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rotate the deque n steps to the right (default n=1). If n is negative, rotates left."}},classmethods:Sk.generic.classGetItem,getsets:{maxlen:{$get(){return void 0===this.maxlen?Sk.builtin.none.none$:new Sk.builtin.int_(this.maxlen)},$doc:"maximum size of a deque or None if unbounded"}},proto:{$clear(){this.head=0,this.tail=0,this.mask=1,this.v=new Array(2)},$copy(){return new t.deque(this.v.slice(0),this.maxlen,this.head,this.tail,this.mask)},$extend(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i)},set$item(t,e){const i=(t>=0?this.head:this.tail)+t&this.mask;this.v[i]=e},del$item(t){let e=(t>=0?this.head:this.tail)+t&this.mask;for(;e!==this.tail;){const t=e+1&this.mask;this.v[e]=this.v[t],e=t}const i=this.tail-this.head&this.mask;this.tail=this.tail-1&this.mask,i>>1&&this.$resize(i,this.v.length>>>1)},$push(t){this.v[this.tail]=t,this.tail=this.tail+1&this.mask,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$popLeft(),this},$pushLeft(t){this.head=this.head-1&this.mask,this.v[this.head]=t,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$pop(),this},$pop(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");this.tail=this.tail-1&this.mask;const t=this.v[this.tail];this.v[this.tail]=void 0;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$popLeft(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");const t=this.v[this.head];this.v[this.head]=void 0,this.head=this.head+1&this.mask;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$resize(t,e){const i=this.head,s=this.mask;if(this.head=0,this.tail=t,this.mask=e-1,0===i)return void(this.v.length=e);const n=new Array(e);for(let r=0;r=0?i:i<-s?0:s+i;for(let o=e>=0?e:e<-s?0:s+e;o=this.$length)return;const t=(this.$index>=0?this.$head:this.$tail)+this.$index&this.$mask;return this.$index++,this.dq[t]},methods:{__length_hint__:{$meth:function __length_hint__(){return new Sk.builtin.int_(this.$length-this.$index)},$flags:{NoArgs:!0}}}}),i=Sk.abstr.buildIteratorClass("_collections._deque_reverse_iterator",{constructor:function _deque_reverse_iterator(t){this.$index=(t.tail-t.head&t.mask)-1,this.dq=t.v,this.$head=t.head,this.$mask=t.mask},iternext(){if(this.$index<0)return;const t=this.$head+this.$index&this.$mask;return this.$index--,this.dq[t]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef}}),s=new RegExp(/^[0-9].*/),n=new RegExp(/^[0-9_].*/),r=new RegExp(/^\\w*$/),a=/,/g,o=/\\s+/;function namedtuple(e,i,l,h,c){if(e=e.tp$str(),Sk.misceval.isTrue(Sk.misceval.callsimArray(t._iskeyword,[e])))throw new Sk.builtin.ValueError("Type names and field names cannot be a keyword: \'"+Sk.misceval.objectRepr(e)+"\'");const u=e.$jsstr();if(s.test(u)||!r.test(u)||!u)throw new Sk.builtin.ValueError("Type names and field names must be valid identifiers: \'"+u+"\'");let m,d;if(Sk.builtin.checkString(i))m=i.$jsstr().replace(a," ").split(o),1==m.length&&""===m[0]&&(m=[]),d=m.map((t=>new Sk.builtin.str(t)));else{m=[],d=[];for(let t=Sk.abstr.iter(i),e=t.tp$iternext();void 0!==e;e=t.tp$iternext())e=e.tp$str(),d.push(e),m.push(e.$jsstr())}let p=new Set;if(Sk.misceval.isTrue(l))for(let s=0;sm.length)throw new Sk.builtin.TypeError("Got more default values than field names");for(let t=0,e=d.length-b.length;e"\'"+t.$jsstr()+"\'"))+"]")}return r}_make.co_varnames=["_cls","iterable"],_asdict.co_varnames=["self"],_replace.co_kwargs=1,_replace.co_varnames=["_self"];const S={};for(let s=0;sm[e]+"="+Sk.misceval.objectRepr(t)));return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t.join(", ")+")")}},flags:{sk$klass:!0},proto:Object.assign({__module__:Sk.builtin.checkNone(c)?Sk.globals.__name__:c,__slots__:new Sk.builtin.tuple,_fields:$,_field_defaults:f,_make:new Sk.builtin.classmethod(new Sk.builtin.func(_make)),_asdict:new Sk.builtin.func(_asdict),_replace:new Sk.builtin.func(_replace)},S)})}return namedtuple.co_argcount=2,namedtuple.co_kwonlyargcount=3,namedtuple.$kwdefs=[Sk.builtin.bool.false$,Sk.builtin.none.none$,Sk.builtin.none.none$],namedtuple.co_varnames=["typename","field_names","rename","defaults","module"],t.namedtuple=new Sk.builtin.func(namedtuple),t}',"src/lib/datetime.js":'function $builtinmodule(){const{isTrue:t,richCompareBool:e,asIndexOrThrow:n,asIndexSized:i,objectRepr:s,opAllowsEquality:o,callsimArray:r,callsimOrSuspendArray:a}=Sk.misceval,{numberBinOp:$,typeName:c,buildNativeClass:h,checkArgsLen:m,objectHash:u,copyKeywordsToNamedArgs:l}=Sk.abstr,{int_:f,float_:d,str:w,bytes:_,tuple:p,bool:{true$:g},none:{none$:y},NotImplemented:{NotImplemented$:b},TypeError:z,ValueError:v,OverflowError:M,ZeroDivisionError:A,NotImplementedError:x,checkNumber:N,checkFloat:S,checkString:k,checkInt:O,asnum$:I,round:E,getattr:T}=Sk.builtin,{remapToPy:D,remapToJs:R}=Sk.ffi,intRound=t=>E(t).nb$int(),q=$,C=new w("auto"),U=new w("utcoffset"),Y=new w("tzname"),j=new w("as_integer_ratio"),F=new w("dst"),H=new w("isoformat"),J=new w("replace"),B=new w("fromtimestamp"),G=new w("fromordinal"),L=new w("utcfromtimestamp"),X=new w("strftime"),P=new w("fromutc"),W=new f(0),Z=new d(0),K=new f(7),V=new f(60),Q=new f(3600),tt=new f(1e3),et=new f(1e6),nt=new d(1e6),it=new f(86400),st=new d(86400);let ot=null;function pyDivMod(t,e){return q(t,e,"DivMod").v}function $divMod(t,e){if("number"!=typeof t||"number"!=typeof e)return t=JSBI.BigInt(t),e=JSBI.BigInt(e),[JSBI.toNumber(JSBI.divide(t,e)),JSBI.toNumber(JSBI.remainder(t,e))];if(0===e)throw new A("integer division or modulo by zero");return[Math.floor(t/e),t-Math.floor(t/e)*e]}function modf(t){const e=(t=I(t))<0?-1:1;return t=Math.abs(t),[new d(e*(t-Math.floor(t))),new d(e*Math.floor(t))]}function _d(t,e="0",n=2){return t.toString().padStart(n,e)}const rt=/^[0-9]+$/;function _as_integer(t){if(!rt.test(t))throw new Error;return parseInt(t)}function _as_int_ratio(t){let e=r(t.tp$getattr(j));if(!(e instanceof p))throw new z("unexpected return type from as_integer_ratio(): expected tuple, got \'"+c(e)+"\'");if(e=e.v,2!==e.length)throw new v("as_integer_ratio() must return a 2-tuple");return e}return Sk.misceval.chain(Sk.importModule("time",!1,!0),(a=>{const $=a.$d,E={__name__:new w("datetime"),__all__:new Sk.builtin.list(["date","datetime","time","timedelta","timezone","tzinfo","MINYEAR","MAXYEAR"].map((t=>new w(t))))};function _cmp(t,e){for(let n=0;ne[n]?1:-1;return 0}function _do_compare(t,e,n){const i=t.$cmp(e,n);switch(n){case"Lt":return i<0;case"LtE":return i<=0;case"Eq":return 0===i;case"NotEq":return 0!==i;case"Gt":return i>0;case"GtE":return i>=0}}const j=9999;E.MINYEAR=new f(1),E.MAXYEAR=new f(j);const rt=3652059,at=[-1,31,28,31,30,31,30,31,31,30,31,30,31],$t=[-1];let ct=0;function _is_leap(t){return t%4==0&&(t%100!=0||t%400==0)}function _days_before_year(t){const e=t-1;return 365*e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)}function _days_before_month(t,e){return $t[e]+(e>2&&_is_leap(t))}function _ymd2ord(t,e,n){return _days_before_year(t)+_days_before_month(t,e)+n}at.slice(1).forEach((t=>{$t.push(ct),ct+=t}));const ht=_days_before_year(401),mt=_days_before_year(101),ut=_days_before_year(5);function _ord2ymd(t){if((t=n(t))>Number.MAX_SAFE_INTEGER)throw new M("Python int too large to convert to js number");if(t<1)throw new v("ordinal must be >= 1");let e,i,s,o;t-=1,[e,t]=$divMod(t,ht);let r=400*e+1;if([i,t]=$divMod(t,mt),[s,t]=$divMod(t,ut),[o,t]=$divMod(t,365),r+=100*i+4*s+o,4===o||4===i)return[r-1,12,31].map((t=>new f(t)));const a=3===o&&(24!==s||3===i);let $=t+50>>5,c=$t[$]+($>2&&a);return c>t&&($-=1,c-=at[$]+(2===$&&a)),[r,$,(t-=c)+1].map((t=>new f(t)))}const lt=[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=[null,"Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _build_struct_time(t,e,n,i,s,o,r){const a=(_ymd2ord(t,e,n)+6)%7,c=_days_before_month(t,e)+n;return $.struct_time.tp$call([new p([t,e,n,i,s,o,a,c,r].map((t=>new f(t))))])}const dt={hours:t=>_d(t),minutes:(t,e)=>_d(t)+":"+_d(e),seconds:(t,e,n)=>_d(t)+":"+_d(e)+":"+_d(n),milliseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",3),microseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",6)};function _format_time(t,e,n,i,s="auto"){if("string"!=typeof s&&!k(s))throw new z("must be str, not "+c(s));"auto"===(s=s.toString())?s=i?"microseconds":"seconds":"milliseconds"===s&&(i=Math.floor(i/1e3));let o=dt[s];if(void 0===o)throw new v("Unknown timespec value");return o(t,e,n,i)}function _format_offset(t){let e,n="";if(t!==y){let i,s,o;return t.$days<0?(e="-",t=new wt(-t.$days,-t.$secs,-t.$micro)):e="+",[i,s]=pyDivMod(t,pt),[s,o]=pyDivMod(s,gt),n+=e+`${_d(i)}:${_d(s)}`,(o.$secs||o.$micro)&&(n+=":"+_d(o.$secs,"0",2),o.$micro&&(n+="."+_d(o.$micro,"0",6))),n}}function _wrap_strftime(t,e,n){let i=null,s=null,o=null,a=[],c=0;const h=e.length;for(;cnew f(t)))}function _parse_hh_mm_ss_ff(t){const e=t.length,n=[0,0,0,0];let i=0;for(let s=0;s<3;s++){if(e-i<2)throw new v("Incomplete time component");n[s]=_as_integer(t.slice(i,i+2)),i+=2;const o=t.substr(i,1);if(!o||s>=2)break;if(":"!==o)throw new v("Invalid time separator: "+o);i+=1}if(i0?t.slice(0,e-1):t),s=y;if(e>0){if(n=t.slice(e),![5,8,15].includes(n.length))throw new v("Malformed time zone string");const i=_parse_hh_mm_ss_ff(n);if(i.every((t=>0===t)))s=St.prototype.utc;else{const n="-"===t[e-1]?-1:1,o=new wt(0,n*(3600*i[0]+60*i[1]+i[2]),n*i[3]);s=new St(o)}}return i=i.map((t=>new f(t))),i.push(s),i}function _check_tzname(t){if(t!==y&&!k(t))throw new z("tzinfo.tzname() must return None or string, not \'"+c(t)+"\'")}function _check_utc_offset(t,n){if(n!==y){if(!(n instanceof wt))throw new z(`tzinfo.${t}() must return None or timedelta, not \'${c(n)}\'`);if(!e(zt,n,"Lt")||!e(n,_t,"Lt"))throw new v(`${t}()=${n.toString()}, must be strictly between -timedelta(hours=24) and timedelta(hours=24)`)}}function _check_date_fields(t,e=null,i=null){if(null===e||null===i){throw new z(`function missing required argument \'${null===i?"day":"month"}\' (pos ${null===i?"3":"2"})`)}if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v("year must be in 1.."+j,new f(t));if(!(1<=e&&e<=12))throw new v("month must be in 1..12",new f(e));const s=function _days_in_month(t,e){return 2===e&&_is_leap(t)?29:at[e]}(t,e);if(!(1<=i&&i<=s))throw new v("day must be in 1.."+s,new f(i));return[t,e,i]}function _check_time_fields(t,e,i,s,o){if(t=n(t),e=n(e),i=n(i),s=n(s),o=n(o),!(0<=t&&t<=23))throw new v("hour must be in 0..23",new f(t));if(!(0<=e&&e<=59))throw new v("minute must be in 0..59",new f(e));if(!(0<=i&&i<=59))throw new v("second must be in 0..59",new f(i));if(!(0<=s&&s<=999999))throw new v("microsecond must be in 0..999999",new f(s));if(0!==o&&1!==o)throw new v("fold must be either 0 or 1",new f(o));return[t,e,i,s,o]}function _check_tzinfo_arg(t){if(t!==y&&!(t instanceof Mt))throw new z("tzinfo argument must be None or of a tzinfo subclass")}function _divide_and_round(t,e){let[n,i]=$divMod(t,e);return i*=2,((e>0?i>e:i999999999)throw new M(`days=${t}; must have magnitude <= 999999999`)},slots:{tp$new(t,e){let i,s,o,r,a,$,c,[h,m,u,d,w,_,p]=l("timedelta",["days","seconds","microseconds","milliseconds","minutes","hours","weeks"],t,e,new Array(7).fill(W));i=s=o=W,h=q(h,q(p,K,"Mult"),"Add"),m=q(m,q(q(w,V,"Mult"),q(_,Q,"Mult"),"Add"),"Add"),u=q(u,q(d,tt,"Mult"),"Add"),S(h)?([r,h]=modf(h),[a,$]=modf(q(r,st,"Mult")),s=new f($),i=new f(h)):(a=Z,i=h),S(m)?([c,m]=modf(m),m=new f(m),c=q(c,a,"Add")):c=a,[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,new f(m),"Add");const g=q(c,nt,"Mult");if(S(u)?(u=intRound(q(u,g,"Add")),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add")):(u=new f(u),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add"),u=intRound(q(u,g,"Add"))),[m,o]=pyDivMod(u,et),s=q(s,m,"Add"),[h,s]=pyDivMod(s,it),i=q(i,h,"Add"),i=n(i),s=n(s),o=n(o),Math.abs(i)>999999999)throw new M("timedelta # of days is too large: "+h.toString());if(this===wt.prototype)return new wt(i,s,o);{const t=new this.constructor;return wt.call(t,i,s,o),t}},$r(){const t=[];return this.$days&&t.push(`days=${this.$days}`),this.$secs&&t.push(`seconds=${this.$secs}`),this.$micro&&t.push(`microseconds=${this.$micro}`),t.length||t.push("0"),new w(`${this.tp$name}(${t.join(", ")})`)},tp$str(){const t=this.$secs%60;let e=Math.floor(this.$secs/60);const n=Math.floor(e/60);e%=60;let i=`${n}:${_d(e)}:${_d(t)}`;if(this.$days){i=`${this.$days} day${function plural(t){return 1!==Math.abs(t)?"s":""}(this.$days)}, `+i}return this.$micro&&(i+=`.${_d(this.$micro,"0",6)}`),new w(i)},tp$as_number:!0,nb$add(t){return t instanceof wt?new wt(this.$days+t.$days,this.$secs+t.$secs,this.$micro+t.$micro):b},nb$subtract(t){return t instanceof wt?new wt(this.$days-t.$days,this.$secs-t.$secs,this.$micro-t.$micro):b},nb$positive(){return this},nb$negative(){return new wt(-this.$days,-this.$secs,-this.$micro)},nb$abs(){return this.$days<0?this.nb$negative():this},nb$multiply(t){if(O(t))return t=i(t,M),new wt(this.$days*t,this.$secs*t,this.$micro*t);if(S(t)){const e=this.$toMicrosecs();let[s,o]=_as_int_ratio(t);return s=i(s,M),o=n(o),new wt(0,0,_divide_and_round(e*s,o))}return b},nb$floor_divide(t){const e=this.$toMicrosecs();if(t instanceof wt){const n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");return new f(Math.floor(e/n))}if(O(t)){if(0===(t=i(t,M)))throw new A("integer division or modulo by zero");return new wt(0,0,Math.floor(e/t))}return b},nb$divide(t){const e=this.$toMicrosecs();if(t instanceof wt){if(0===t.$toMicrosecs())throw new A("integer division or modulo by zero");return new d(e/t.$toMicrosecs())}if(O(t))return t=n(t),new wt(0,0,_divide_and_round(e,t));if(S(t)){let[s,o]=_as_int_ratio(t);return s=n(s),o=i(o,M),new wt(0,0,_divide_and_round(o*e,s))}return b},nb$remainder(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");const i=e-Math.floor(e/n)*n;return new wt(0,0,i)},nb$divmod(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs(),[i,s]=$divMod(e,n);return new p([new f(i),new wt(0,0,s)])},tp$richcompare(t,e){return t instanceof wt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(new p(this.$getState().map((t=>new f(t)))))),this.$hashcode},nb$bool(){return 0!==this.$days||0!==this.$secs||0!==this.$micro}},methods:{total_seconds:{$meth(){return new d(((86400*this.$days+this.$secs)*10**6+this.$micro)/10**6)},$flags:{NoArgs:!0},$doc:"Total seconds in the duration."},__reduce__:{$meth(){return new p([this.ob$type,new p(this.$getState().map((t=>D(t))))])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{days:{$get(){return new f(this.$days)},$doc:"Number of days."},seconds:{$get(){return new f(this.$secs)},$doc:"Number of seconds (>= 0 and less than 1 day)."},microseconds:{$get(){return new f(this.$micro)},$doc:"Number of microseconds (>= 0 and less than 1 second)."}},proto:{$toMicrosecs(){return 1e6*(86400*this.$days+this.$secs)+this.$micro},$cmp(t){return _cmp(this.$getState(),t.$getState())},$getState(){return[this.$days,this.$secs,this.$micro]}}});wt.prototype.min=new wt(-999999999),wt.prototype.max=new wt(999999999,86399,999999),wt.prototype.resolution=new wt(0,0,1);const _t=new wt(1),pt=new wt(0,3600),gt=new wt(0,60),yt=new wt(0,1),bt=new wt(0),zt=new wt(-1),vt=E.date=h("datetime.date",{constructor:function date(t,e,n){this.$year=t,this.$month=e,this.$day=n,this.$hashcode=-1},slots:{tp$new(t,e){let n,[i,s,o]=l("date",["year","month","day"],t,e,[null,null]);if(null===s&&i instanceof _&&4===(n=i.valueOf()).length&&1<=n[2]&&n[2]<=12){const t=new this.constructor;return t.$setState(n),t}if([i,s,o]=_check_date_fields(i,s,o),this===vt.prototype)return new vt(i,s,o);{const t=new this.constructor;return vt.call(t,i,s,o),t}},$r(){return new w(`${this.tp$name}(${this.$year}, ${this.$month}, ${this.$day})`)},tp$str(){return this.tp$getattr(H).tp$call([])},tp$richcompare(t,e){return t instanceof vt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(this.$getState())),this.$hashcode},tp$as_number:!0,nb$add(t){if(t instanceof wt){const e=this.$toOrdinal()+t.$days;if(0 local date from a POSIX timestamp (like time.time())."},fromordinal:{$meth:function fromordinal(t){return this.tp$call(_ord2ymd(t))},$flags:{OneArg:!0},$textsig:null,$doc:"int -> date corresponding to a proleptic Gregorian ordinal."},fromisocalendar:{$meth:function fromisocalendar(t,e,i){if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v(`Year is out of range: ${t}`);let s,o;if(!(0 date corresponding to a proleptic Gregorian ordinal."},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{if(10!==t.length)throw new Error;return this.tp$call(_parse_isoformat_date(t))}catch(e){throw new v("Invalid isoformat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"str -> Construct a date from the output of date.isoformat()"},today:{$meth:function today(){const t=$.time.tp$call([]);return this.tp$getattr(B).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Current date or datetime: same as self.__class__.fromtimestamp(time.time())."}},methods:{ctime:{$meth:function ctime(){const t=this.$toOrdinal()%7||7,e=ft[t],n=lt[this.$month];return new w(`${e} ${n} ${_d(this.$day," ",2)} 00:00:00 ${_d(this.$year,"0",4)}`)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return ctime() style string."},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),this.$timetuple())},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},timetuple:{$meth:function timetuple(){return this.$timetuple()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return time tuple, compatible with time.localtime()."},isocalendar:{$meth:function isocalendar(){let t=this.$year,e=_isoweek1monday(t);const n=_ymd2ord(this.$year,this.$month,this.$day);let[i,s]=$divMod(n-e,7);return i<0?(t-=1,e=_isoweek1monday(t),[i,s]=$divMod(n-e,7)):i>=52&&n>=_isoweek1monday(t+1)&&(t+=1,i=0),new At(new f(t),new f(i+1),new f(s+1))},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a 3-tuple containing ISO year, week number, and weekday."},isoformat:{$meth:function isoformat(){return this.$isoformat()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return string in ISO 8601 format, YYYY-MM-DD."},isoweekday:{$meth:function isoweekday(){return new f(this.$toOrdinal()%7||7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 1 ... Sunday == 7"},toordinal:{$meth:function toordinal(){return new f(this.$toOrdinal())},$flags:{NoArgs:!0},$textsig:null,$doc:"Return proleptic Gregorian ordinal. January 1 of year 1 is day 1."},weekday:{$meth:function weekday(){return new f((this.$toOrdinal()+6)%7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 0 ... Sunday == 6"},replace:{$meth:function replace(t,e,n){return t===y&&(t=new f(this.$year)),e===y&&(e=new f(this.$month)),n===y&&(n=new f(this.$day)),this.ob$type.tp$call([t,e,n])},$flags:{NamedArgs:["year","month","day"],Defaults:[y,y,y]},$textsig:null,$doc:"Return date with new specified fields."},__reduce__:{$meth(){return new p([this.ob$type,new p([this.$getState()])])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{year:{$get(){return new f(this.$year)},$doc:"year (1-9999)"},month:{$get(){return new f(this.$month)},$doc:"month (1-12)"},day:{$get(){return new f(this.$day)},$doc:"day (1-31)"}},proto:{$cmp(t){return _cmp([this.$year,this.$month,this.$day],[t.$year,t.$month,t.$day])},$getState(){const[t,e]=$divMod(this.$year,256);return new _([t,e,this.$month,this.$day])},$setState(t){const[e,n,i,s]=t,o=256*e+n;this.$year=o,this.$month=i,this.$day=s},$toOrdinal(){return _ymd2ord(this.$year,this.$month,this.$day)},$isoformat(){return new w(`${_d(this.$year,"0",4)}-${_d(this.$month,"0",2)}-${_d(this.$day,"0",2)}`)},$timetuple(){return _build_struct_time(this.$year,this.$month,this.$day,this.$hour||0,this.$min||0,this.$sec||0,-1)},$strftime(t=""){return _wrap_strftime(this,t.toString(),this.$timetuple())}}});vt.prototype.min=new vt(1,1,1),vt.prototype.max=new vt(9999,12,31),vt.prototype.resolution=new wt(1);const Mt=E.tzinfo=h("datetime.tzinfo",{constructor:function tzinfo(){},methods:{tzname:{$meth:function tzname(t){throw new x("tzinfo subclass must override tzname()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> string name of time zone."},utcoffset:{$meth:function utcoffset(t){throw new x("tzinfo subclass must override utcoffset()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> timedelta showing offset from UTC, negative values indicating West of UTC"},dst:{$meth:function dst(t){throw new x("tzinfo subclass must override dst()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> DST offset as timedelta positive east of UTC."},fromutc:{$meth:function fromutc(e){if(!(e instanceof Nt))throw new z("fromutc() requires a datetime argument");if(e.$tzinfo!==this)throw new v("dt.tzinfo is not self");const n=r(e.tp$getattr(U));if(n===y)throw new v("fromutc() requires a non-None utcoffset() result");let i=r(e.tp$getattr(F));if(i===y)throw new v("fromutc() requires a non-None dst() result");const s=q(n,i,"Sub");if(t(s)&&(e=q(e,s,"Add"),i=r(e.tp$getattr(F)),i===y))throw new v("fromutc(): dt.dst gave inconsistent results; cannot convert");return q(e,i,"Add")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__reduce__:{$meth(){let e,n;const i=T(this,new w("__getinitargs__"),y);e=i!==y?r(i,[]):new p;const s=T(this,new w("__getstate__"),y);return s!==y?n=r(s,[]):(n=T(this,new w("__dict__"),y),n=t(n)?n:y),new p(n===y?[this.ob$type,e]:[this.ob$type,e,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"-> (cls, state)"}}}),At=h("datetime.IsoCalendarDate",{base:p,constructor:function IsoCalendarDate(t,e,n){this.y=t,this.w=e,this.wd=n,p.call(this,[t,e,n])},slots:{tp$new(t,e){const[n,i,s]=l("IsoCalendarDate",["year","week","weekday"],t,e);return new this.constructor(n,i,s)},$r(){return new w(`${this.tp$name}(year=${this.y}, week=${this.w}, weekday=${this.wd})`)}},getsets:{year:{$get(){return this.y}},week:{$get(){return this.w}},weekday:{$get(){return this.wd}}}}),xt=E.time=h("datetime.time",{constructor:function time(t=0,e=0,n=0,i=0,s=null,o=0){this.$hour=t,this.$min=e,this.$sec=n,this.$micro=i,this.$tzinfo=s||y,this.$fold=o,this.$hashcode=-1},slots:{tp$new(t,e){m("time",t,0,5);let n,[i,s,o,r,a,$]=l("time",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[W,W,W,W,y,W]);if(i instanceof _&&6===(n=i.valueOf()).length&&(127&n[0])<24){const t=new this.constructor;return t.$setState(n,s===W?y:s),t}if([i,s,o,r,$]=_check_time_fields(i,s,o,r,$),_check_tzinfo_arg(a),this===xt.prototype)return new xt(i,s,o,r,a,$);{const t=new this.constructor;return xt.call(t,i,s,o,r,a,$),t}},tp$richcompare(t,e){return t instanceof xt?_do_compare(this,t,e):b},tp$hash(){if(-1===this.$hashcode){const e=this.$fold?r(this.tp$getattr(J),[],["fold",W]):this,n=r(e.tp$getattr(U));if(t(n)){let[t,e]=pyDivMod(new wt(0,3600*this.$hour+60*this.$min).nb$subtract(n),pt);e=e.nb$floor_divide(gt),0<=t&&t<=24?(t=I(t),e=I(e),this.$hashcode=u(new xt(t,e,this.$sec,this.$micro))):this.$hashcode=u(new p([t,e,new f(this.$sec),new f(this.$micro)]))}else this.$hashcode=u(e.$getState()[0])}return this.$hashcode},$r(){let t;return t=0!==this.$micro?`, ${this.$sec}, ${this.$micro}`:0!==this.$sec?`, ${this.$sec}`:"",t=`${this.tp$name}(${this.$hour}, ${this.$min}${t})`,this.$tzinfo!==y&&(t=t.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(t=t.slice(0,-1)+", fold=1)"),new w(t)},tp$str(){return this.tp$getattr(H).tp$call([])}},methods:{isoformat:{$meth:function isoformat(t){let e=_format_time(this.$hour,this.$min,this.$sec,this.$micro,t);const n=this.$tzstr();return n&&(e+=n),new w(e)},$flags:{NamedArgs:["timespec"],Defaults:[C]},$textsig:null,$doc:"Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\n\\ntimespec specifies what components of the time to include.\\n"},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),new p([1900,1,1,this.$hour,this.$min,this.$sec,0,1,-1].map((t=>new f(t)))))},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[y]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[y]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[y]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,5);let[n,i,s,o,r,a]=l("replace",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,g,y]);return n===y&&(n=new f(this.$hour)),i===y&&(i=new f(this.$min)),s===y&&(s=new f(this.$sec)),o===y&&(o=new f(this.$micro)),r===g&&(r=this.$tzinfo),a===y&&(a=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r],["fold",a])},$flags:{FastCall:!0},$textsig:null,$doc:"Return time with new specified fields."},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{return this.tp$call(_parse_isoformat_time(t))}catch{throw new v("Invalid isofrmat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"string -> time from time.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(t,n){const s=this.$tzinfo,o=t.$tzinfo;let a,$,c;if(a=$=y,s===o?c=!0:(a=r(this.tp$getattr(U)),$=r(t.tp$getattr(U)),c=e(a,$,"Eq")),c)return _cmp([this.$hour,this.$min,this.$sec,this.$micro],[t.$hour,t.$min,t.$sec,t.$micro]);if(a===y||$===y){if("Eq"===n||"NotEq"===n)return 2;throw new z("cannot compare naive and aware times")}const h=60*this.$hour+this.$min-i(a.nb$floor_divide(gt)),m=60*t.$hour+t.$min-i($.nb$floor_divide(gt));return _cmp([h,this.$sec,this.$micro],[m,t.$sec,t.$micro])},$tzstr(){return _format_offset(r(this.tp$getattr(U)))},$getState(t=3){let[e,n]=$divMod(this.$micro,256),[i,s]=$divMod(e,256),o=this.$hour;this.$fold&&t>3&&(o+=128);const r=new _([o,this.$min,this.$sec,i,s,n]);return this.$tzinfo===y?[r]:[r,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a]=t;n>127?(this.$fold=1,this.$hour=n-128):(this.$fold=0,this.$hour=n),this.$min=i,this.$sec=s,this.$micro=(o<<8|r)<<8|a,this.$tzinfo=e}}});xt.prototype.min=new xt(0,0,0),xt.prototype.max=new xt(23,59,59,999999),xt.prototype.resolution=new wt;const Nt=E.datetime=h("datetime.datetime",{base:vt,constructor:function datetime(t,e,n,i=0,s=0,o=0,r=0,a=null,$=0){this.$year=t,this.$month=e,this.$day=n,this.$hour=i,this.$min=s,this.$sec=o,this.$micro=r,this.$tzinfo=a||y,this.$fold=$,this.$hashcode=-1},slots:{tp$new(t,e){m("datetime",t,0,9);let n,[i,s,o,r,a,$,c,h,u]=l("time",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[null,null,W,W,W,W,y,W]);if(i instanceof _&&10===(n=i.valueOf()).length&&(127&n[2])<=12){const t=new this.constructor;return t.$setState(n,null===s?y:s),t}if([i,s,o]=_check_date_fields(i,s,o),[r,a,$,c,u]=_check_time_fields(r,a,$,c,u),_check_tzinfo_arg(h),this===Nt.prototype)return new Nt(i,s,o,r,a,$,c,h,u);{const t=new this.constructor;return Nt.call(t,i,s,o,r,a,$,c,h,u),t}},$r(){const t=[this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro];0===t[t.length-1]&&t.pop(),0===t[t.length-1]&&t.pop();let e=`${this.tp$name}(${t.join(", ")})`;return this.$tzinfo!==y&&(e=e.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(e=e.slice(0,-1)+", fold=1)"),new w(e)},tp$str(){return this.tp$getattr(H).tp$call([],["sep",new w(" ")])},tp$richcompare(t,e){if(t instanceof Nt)return _do_compare(this,t,e);if(!(t instanceof vt))return b;if("Eq"===e||"NotEq"===e)return"NotEq"===e;throw new z(`can\'t compare \'${c(this)}\' to \'${c(t)}\'`)},tp$as_number:!0,nb$add(t){if(!(t instanceof wt))return b;let e=new wt(this.$toOrdinal(),3600*this.$hour+60*this.$min+this.$sec,this.$micro);e=q(e,t,"Add");let[n,i]=$divMod(e.$secs,3600),[s,o]=$divMod(i,60);if(0 string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\nsep is used to separate the year from the time, and defaults to \'T\'.\\ntimespec specifies what components of the time to include (allowed values are \'auto\', \'hours\', \'minutes\', \'seconds\', \'milliseconds\', and \'microseconds\').\\n"},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[this]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[this]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[this]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,8);let[n,i,s,o,r,a,$,c,h]=l("replace",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,y,y,y,g,y]);return n===y&&(n=new f(this.$year)),i===y&&(i=new f(this.$month)),s===y&&(s=new f(this.$day)),o===y&&(o=new f(this.$hour)),r===y&&(r=new f(this.$min)),a===y&&(a=new f(this.$sec)),$===y&&($=new f(this.$micro)),c===g&&(c=this.$tzinfo),h===y&&(h=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r,a,$,c],["fold",h])},$flags:{FastCall:!0},$textsig:null,$doc:"Return datetime with new specified fields."},astimezone:{$meth:function astimezone(t){if(t===y)t=this.$localTimezone();else if(!(t instanceof Mt))throw new z("tz argument must be an instance of tzinfo");let e,n=this.$tzinfo;if(n===y?(n=this.$localTimezone(),e=r(n.tp$getattr(U),[this])):(e=r(n.tp$getattr(U),[this]),e===y&&(n=r(this.tp$getattr(J),[],["tzinfo",y]).$localTimezone(),e=r(n.tp$getattr(U),[this]))),t===n)return this;const i=r(this.nb$subtract(e).tp$getattr(J),[],["tzinfo",t]);return t.tp$getattr(P).tp$call([i])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:null,$doc:"tz -> convert to local time in new timezone tz\\n"},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{now:{$meth:function now(t){const e=$.time.tp$call([]);return this.tp$getattr(B).tp$call([e,t])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:"($type, /, tz=None)",$doc:"Returns new datetime object representing current time local to tz.\\n\\n tz\\n Timezone object.\\n\\nIf no tz is specified, uses local timezone."},utcnow:{$meth:function utcnow(){const t=$.time.tp$call([]);return this.tp$getattr(L).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a new datetime representing UTC day and time."},fromtimestamp:{$meth:function fromtimestamp(t,e){return _check_tzinfo_arg(e),this.prototype.$fromtimestamp.call(this,t,e!==y,e)},$flags:{NamedArgs:["timestamp","tz"],Defaults:[y]},$textsig:null,$doc:"timestamp[, tz] -> tz\'s local time from POSIX timestamp."},utcfromtimestamp:{$meth:function utcfromtimestamp(t){return this.prototype.$fromtimestamp.call(this,t,!0,y)},$flags:{OneArg:!0},$textsig:null,$doc:"Construct a naive UTC datetime from a POSIX timestamp."},strptime:{$meth:function strptime(t,e){return null===ot?Sk.misceval.chain(Sk.importModule("_strptime",!1,!0),(n=>(ot=n.tp$getattr(new w("_strptime_datetime")),ot.tp$call([this,t,e])))):ot.tp$call([this,t,e])},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"string, format -> new datetime parsed from a string (like time.strptime())."},combine:{$meth:function combine(t,e,n){if(!(t instanceof vt))throw new z("date argument must be a date instance");if(!(e instanceof xt))throw new z("time argument must be a time instance");n===g&&(n=e.$tzinfo);const i=[t.$year,t.$month,t.$day,e.$hour,e.$min,e.$sec,e.$micro].map((t=>new f(t)));return i.push(n),this.tp$call(i,["fold",new f(e.$fold)])},$flags:{NamedArgs:["date","time","tzinfo"],Defaults:[g]},$textsig:null,$doc:"date, time -> datetime with same date and time fields"},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");const e=(t=t.toString()).slice(0,10),n=t.slice(11);let i,s;try{i=_parse_isoformat_date(e)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}if(n)try{s=_parse_isoformat_time(n)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}else s=[W,W,W,W,y];return this.tp$call(i.concat(s))},$flags:{OneArg:!0},$textsig:null,$doc:"string -> datetime from datetime.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(n,i){const s=this.$tzinfo,o=n.$tzinfo;let a,$,c;if(a=$=y,s===o)c=!0;else{if(a=r(this.tp$getattr(U)),$=r(n.tp$getattr(U)),"Eq"===i||"NotEq"===i){const t=r(this.tp$getattr(J),[],["fold",new f(Number(!this.$fold))]);if(e(a,r(t.tp$getattr(U)),"NotEq"))return 2;const i=r(n.tp$getattr(J),[],["fold",new f(Number(!n.$fold))]);if(e($,r(i.tp$getattr(U)),"NotEq"))return 2}c=e(a,$,"Eq")}if(c)return _cmp([this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro],[n.$year,n.$month,n.$day,n.$hour,n.$min,n.$sec,n.$micro]);if(a===y||$===y){if("Eq"===i||"NotEq"===i)return 2;throw new z("cannot compare naive and aware datetimes")}const h=this.nb$subtract(n);return h.$days<0?-1:t(h)?1:0},$mkTime(){const t=new Nt(1970,1,1),e=this.nb$subtract(t).nb$floor_divide(yt);function local(e){const[n,i,s,o,r,a]=$.localtime.tp$call([e]).v;return Nt.tp$call([n,i,s,o,r,a]).nb$subtract(t).nb$floor_divide(yt)}let n,i,s=local(e).nb$subtract(e),o=e.nb$subtract(s),r=local(o);if(r.ob$eq(e)){if(n=o.nb$add([new f(-86400),new f(86400)][this.$fold]),i=local(n).nb$subtract(n),s.ob$eq(i))return o}else i=r.nb$subtract(o);n=e.nb$subtract(i);if(local(n).ob$eq(e))return n;if(r.ob$eq(e))return o;const a=o.ob$ge(n)?o:n;return[a,o===a?n:o][this.$fold]},$fromtimestamp(t,n,s){let o;if(!N(t))throw new z("a number is required, (got \'"+c(t)+"\'");[o,t]=modf(t);let a=intRound(q(o,nt,"Mult"));a=a.v,t=t.v,a>=1e6?(t+=1,a-=1e6):a<0&&(t-=1,a+=1e6),t=new f(t),Number.isInteger(a)||(a=Math.trunc(a)),a=new f(a);const h=n?$.gmtime:$.localtime;function converter(t){return h.tp$call([t]).v}let[m,u,l,d,_,p]=converter(t);p=new f(Math.min(i(p),59));let g=r(this,[m,u,l,d,_,p,a,s]);if(s===y){const n=86400;[m,u,l,d,_,p]=converter(q(t,new f(n),"Sub"));const i=r(this,[m,u,l,d,_,p,a,s]),o=q(q(g,i,"Sub"),new wt(0,n),"Sub");if(o.$days<0){[m,u,l,d,_,p]=converter(q(t,q(o,yt,"FloorDiv"),"Add"));const n=r(this,[m,u,l,d,_,p,a,s]);e(n,g,"Eq")&&(g.$fold=1)}}else g=r(s.tp$getattr(new w("fromutc")),[g]);return g},$localTimezone(){let t;t=this.$tzinfo===y?this.$mkTime():this.nb$subtract(kt).nb$floor_divide(yt);const e=$.localtime.tp$call([t]),n=(Nt.tp$call(e.v.slice(0,6)),e.tp$getattr(new w("tm_gmtoff"))),i=e.tp$getattr(new w("tm_zone"));return new St(wt.tp$call([W,n]),i)},$getState(t=3){let[e,n]=$divMod(this.$year,256),[i,s]=$divMod(this.$micro,256),[o,r]=$divMod(i,256),a=this.$month;this.$fold&&t>3&&(a+=128);const $=new _([e,n,a,this.$day,this.$hour,this.$min,this.$sec,o,r,s]);return this.$tzinfo===y?[$]:[$,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a,$,c,h,m]=t;s>127?(this.$fold=1,this.$month=s-128):(this.$fold=0,this.$month=s),this.$year=256*n+i,this.$day=o,this.$hour=r,this.$min=a,this.$sec=$,this.$micro=(c<<8|h)<<8|m,this.$tzinfo=e}}});function _isoweek1monday(t){const e=_ymd2ord(t,1,1),n=(e+6)%7;let i=e-n;return n>3&&(i+=7),i}Nt.prototype.min=new Nt(1,1,1),Nt.prototype.max=new Nt(9999,12,31,23,59,59,999999),Nt.prototype.resolution=new wt(0,0,1);const St=E.timezone=h("datetime.timezone",{base:Mt,constructor:function timezone(t,n){if(this.$offset=t,this.$name=n||y,!e(this.$minoffset,t,"LtE")||!e(this.$maxoffset,t,"GtE"))throw new v("offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24).")},slots:{tp$new(e,n){let[i,s]=l("timezone",["offset","name"],e,n,[null]);if(!(i instanceof wt))throw new z("offset must be a timedelta");if(null===s){if(!t(i))return this.utc;s=y}else if(!k(s))throw new z("name must be a string");if(this===St.prototype)return new St(i,s);{const t=new this.constructor;return St.call(t,i,s),t}},tp$richcompare(t,n){if(!(t instanceof St))return b;const i=e(this.$offset,t.$offset,"Eq");return"NotEq"===n?!i:"Eq"===n||i&&o(n)?i:b},$r(){return this===this.utc?new w("datetime.timezone.utc"):this.$name===y?new w(`${this.tp$name}(${s(this.$offset)})`):new w(`${this.tp$name}(${s(this.$offset)}, ${s(this.$name)})`)},tp$str(){return this.tp$getattr(Y).tp$call([y])},tp$hash(){return u(this.$offset)}},methods:{tzname:{$meth:function tzname(t){if(t instanceof Nt||t===y)return this.$name===y?this.$nameFromOff(this.$offset):this.$name;throw new z("tzname() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"If name is specified when timezone is created, returns the name. Otherwise returns offset as \'UTC(+|-)HH:MM\'."},utcoffset:{$meth:function utcoffset(t){if(t instanceof Nt||t===y)return this.$offset;throw new z("utcoffset() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return fixed offset."},dst:{$meth:function dst(t){if(t instanceof Nt||t===y)return y;throw new z("dst() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return None."},fromutc:{$meth:function fromutc(t){if(t instanceof Nt){if(t.$tzinfo!==this)throw new v("fromutc: dt.tzinfo is not self");return q(t,this.$offset,"Add")}throw new z("fromutc() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__getinitargs__:{$meth(){return this.$name===y?new p([this.$offset]):new p([this.$offset,this.$name])},$flags:{NoArgs:!0}}},proto:{$maxoffset:new wt(0,86399,999999),$minoffset:new wt(-1,0,1),$nameFromOff(n){if(!t(n))return new w("UTC");let i,s,o,r,a,$;return e(n,bt,"Lt")?(i="-",n=n.nb$negative()):i="+",[s,o]=pyDivMod(n,pt),[r,o]=pyDivMod(o,gt),a=o.$secs,$=o.$micro,new w($?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}.${_d($,"0",6)}`:a?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}`:`UTC${i}${_d(s)}:${_d(r)}`)}}});St.prototype.utc=new St(new wt(0)),St.prototype.min=new St(new wt(0,-86340,0)),St.prototype.max=new St(new wt(0,86340,0));const kt=new Nt(1970,1,1,0,0,0,0,St.prototype.utc);return E}))}',"src/lib/document.js":'function $builtinmodule(){const{builtin:{str:t},misceval:{callsimArray:e},ffi:{toPy:r},abstr:{gattr:a}}=Sk,n={__name__:new t("document")},_=r(Sk.global.document);return Sk.abstr.setUpModuleMethods("document",n,{__getattr__:{$meth:t=>a(_,t,!0),$flags:{OneArg:!0}},__dir__:{$meth:()=>e(_.tp$getattr(t.$dir)),$flags:{NoArgs:!0}}}),n}',"src/lib/fractions.js":'function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("math",!1,!0),(t=>(e.math=t,Sk.importModule("sys",!1,!0))),(t=>(e.sys=t,fractionsMod(e))))}function fractionsMod({math:t,sys:e}){const{builtin:{int_:n,bool:{true$:i,false$:r},none:{none$:s},NotImplemented:{NotImplemented$:o},tuple:a,float_:$,complex:u,str:h,isinstance:l,TypeError:m,ZeroDivisionError:d,ValueError:f,NotImplementedError:c,abs:_,round:b,pow:p},ffi:{remapToPy:g},abstr:{buildNativeClass:w,copyKeywordsToNamedArgs:v,numberBinOp:y,typeName:k,lookupSpecial:E,checkArgsLen:N},misceval:{isTrue:F,richCompareBool:A,callsimArray:S,objectRepr:M}}=Sk,O={__name__:new h("fractions"),__all__:g(["Fraction"])},D=/^\\s*(?[-+]?)(?=\\d|\\.\\d)(?\\d*)(?:(?:\\/(?\\d+))?|(?:\\.(?\\d*))?(?:E(?[-+]?\\d+))?)\\s*$/i,q=new n(0),x=new n(1),z=new n(2),I=new n(10),T=new h("numerator"),R=new h("denominator"),B=new h("as_integer_ratio"),C=new h("from_float"),getNumer=t=>t.tp$getattr(T),getDenom=t=>t.tp$getattr(R),mul=(t,e)=>y(t,e,"Mult"),div=(t,e)=>y(t,e,"Div"),pow=(t,e)=>y(t,e,"Pow"),add=(t,e)=>y(t,e,"Add"),sub=(t,e)=>y(t,e,"Sub"),floorDiv=(t,e)=>y(t,e,"FloorDiv"),divmod=(t,e)=>y(t,e,"DivMod"),mod=(t,e)=>y(t,e,"Mod"),K=t.tp$getattr(new h("gcd")),eq=(t,e)=>A(t,e,"Eq"),lt=(t,e)=>A(t,e,"Lt"),ge=(t,e)=>A(t,e,"GtE"),L={NoArgs:!0},P={OneArg:!0},j=e.tp$getattr(new h("hash_info")),G=j.tp$getattr(new h("modulus")),V=j.tp$getattr(new h("inf"));function _operator_fallbacks(t,e){return[function(n){return isRational(n)?t(this,n):n instanceof $?e(this.nb$float(),n):n instanceof u?e(S(u,[this]),n):o},function(n){return isRational(n)?t(n,this):n instanceof $?e(n,this.nb$float()):n instanceof u?e(n,S(u,[this])):o}]}const[Z,H]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[add(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),add),[J,Q]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[sub(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),sub),[U,W]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getNumer(e)),mul(getDenom(t),getDenom(e))])),mul),[X,Y]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e))])),div),[tt,et]=_operator_fallbacks(((t,e)=>floorDiv(mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e)))),floorDiv),[nt,it]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),[r,s]=divmod(mul(getNumer(t),i),mul(n,getNumer(e))).valueOf();return new a([r,S(ot,[s,mul(n,i)])])}),divmod),[rt,st]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),r=mod(mul(getNumer(t),i),mul(getNumer(e),n));return S(ot,[r,mul(n,i)])}),mod),ot=O.Fraction=w("fractions.Fraction",{constructor:function(t,e){this.$num=t||q,this.$den=e||x},slots:{tp$new(t,e){N("Fraction",t,0,2);let[r,o,a]=v("Fraction",["numerator","denominator","_normalize"],t,e,[q,s,i]);const u=new this.constructor;if(o===s){if(r.ob$type===n)return u.$num=r,u.$den=x,u;if(isRational(r))return u.$num=getNumer(r),u.$den=getDenom(r),u;if(r instanceof $)return[u.$num,u.$den]=S(r.tp$getattr(B)).valueOf(),u;if(!(r instanceof h))throw new m("argument should be a string or a Rational instance");{const t=r.toString().match(D);if(null===t)throw new f("Invalid literal for Fraction: "+M(r));r=new n(t.groups.num||"0");const e=t.groups.denom;if(e)o=new n(e);else{o=x;const e=t.groups.decimal;if(e){const t=new n(""+10**e.length);r=add(mul(r,t),new n(e)),o=mul(o,t)}let i=t.groups.exp;i&&(i=new n(i),lt(i,q)?o=mul(o,pow(I,i.nb$negative())):r=mul(r,pow(I,i)))}"-"==t.groups.sign&&(r=r.nb$negative())}}else if(r.ob$type===n&&o.ob$type===n);else{if(!isRational(r)||!isRational(o))throw new m("both arguments should be Rational instances");[r,o]=[mul(getNumer(r),getDenom(o)),mul(getNumer(o),getDenom(r))]}if(eq(o,q))throw new d(`Fraction(${r}, 0)`);if(F(a)){let t=S(K,[r,o]);lt(o,q)&&(t=t.nb$negative()),r=floorDiv(r,t),o=floorDiv(o,t)}return u.$num=r,u.$den=o,u},$r(){const t=E(this.ob$type,h.$name);return new h(`${t}(${this.$num}, ${this.$den})`)},tp$str(){return eq(this.$den,x)?new h(this.$num):new h(`${this.$num}/${this.$den}`)},tp$hash(){const t=p(this.$den,sub(G,z),G);let e;e=F(t)?mod(mul(_(this.$num),t),G):V;let n=ge(this,q)?e:e.nb$negative();return n=n.tp$hash(),-1===n?-2:n},tp$richcompare(t,e){const op=(t,n)=>A(t,n,e);if("Eq"===e||"NotEq"==e){if(t.ob$type===n){const n=eq(this.$num,t)&&eq(this.$den,x);return"Eq"===e?n:!n}if(t instanceof ot||t instanceof n){const n=eq(this.$num,getNumer(t))&&eq(this.$den,getDenom(t));return"Eq"===e?n:!n}t instanceof u&&eq(t.tp$getattr(new h("imag")),q)&&(t=t.tp$getattr(new h("real")))}return isRational(t)?op(mul(getNumer(this),getDenom(t)),mul(getDenom(this),getNumer(t))):t instanceof $?Number.isFinite(t.valueOf())?op(this,S(this.tp$getattr(C),[t])):op(new $(0),t):o},tp$as_number:!0,nb$add:Z,nb$reflected_add:H,nb$subtract:J,nb$reflected_subtract:Q,nb$multiply:U,nb$reflected_multiply:W,nb$divide:X,nb$reflected_divide:Y,nb$floor_divide:tt,nb$reflected_floor_divide:et,nb$divmod:nt,nb$reflected_divmod:it,nb$remainder:rt,nb$reflected_remainder:st,nb$power(t){if(isRational(t)){if(eq(getDenom(t),x)){let e=getNumer(t);return ge(e,q)?S(ot,[pow(this.$num,e),pow(this.$den,e)],["_normalize",r]):ge(this.$num,q)?(e=e.nb$negative(),S(ot,[pow(this.$den,e),pow(this.$num,e)],["_normalize",r])):(e=e.nb$negative(),S(ot,[pow(this.$den.nb$negative(),e),pow(this.$num.nb$negative(),e)],["_normalize",r]))}return pow(this.nb$float(),S($,[t]))}return pow(this.nb$float(),t)},nb$reflected_power(t){return eq(this.$den,x)&&ge(this.$num,q)?pow(t,this.$num):isRational(t)?pow(new ot(getNumer(t),getDenom(t)),this):eq(this.$den,x)?pow(t,this.$num):pow(t,this.nb$float())},nb$positive(){return new ot(this.$num,this.$den)},nb$negative(){return new ot(this.$num.nb$negative(),this.$den)},nb$abs(){return new ot(this.$num.nb$abs(),this.$den)},nb$bool(){return this.$num.nb$bool()},nb$float(){return div(this.$num,this.$den)}},methods:{as_integer_ratio:{$meth(){return new a([this.$num,this.$den])},$flags:L},limit_denominator:{$meth(t){if(lt(t,x))throw new f("max_denominator should be at least 1");if(ge(t,this.$den))return S(ot,[this]);let[e,n,i,r]=[q,x,x,q],s=this.$num,o=this.$den;for(;;){const a=floorDiv(s,o),$=add(n,mul(a,r));if(lt(t,$))break;[e,n,i,r]=[i,r,add(e,mul(a,i)),$],[s,o]=[o,sub(s,mul(a,o))]}const a=floorDiv(sub(t,n),r),$=S(ot,[add(e,mul(a,i)),add(n,mul(a,r))]),u=S(ot,[i,r]);return ge(_(sub($,this)),_(sub(u,this)))?u:$},$flags:{NamedArgs:["max_denominator"],Defaults:[new n(1e6)]}},__trunc__:{$meth(){return lt(this.$num,q)?floorDiv(this.$num.nb$negative(),this.$den).nb$negative():floorDiv(this.$num,this.$den)},$flags:L},__floor__:{$meth(){return floorDiv(this.$num,this.$den)},$flags:L},__ceil__:{$meth(){return floorDiv(this.$num.nb$negative(),this.$den).nb$negative()},$flags:L},__round__:{$meth(t){if(t===s){const[t,e]=divmod(this.$num,this.$den).valueOf(),n=mul(e,z);return lt(n,this.$den)?t:lt(this.$den,n)?add(t,x):eq(mod(t,z),q)?t:add(t,x)}const e=pow(I,_(t));return lt(q,t)?S(ot,[b(mul(this,e)),e]):S(ot,[mul(b(div(this,e)),e)])},$flags:{NamedArgs:["ndigits"],Defaults:[s]}},__reduce__:{$meth(){return new a([this.ob$type,new a([new h(this)])])},$flags:L},__copy__:{$meth(){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:L},__deepcopy__:{$meth(t){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:P}},classmethods:{from_float:{$meth(t){if(t instanceof n)return S(this,[t]);if(t instanceof $){const[e,n]=S(t.tp$getattr(B)).valueOf();return S(this,[e,n])}throw new m(`${k(this)}.from_float() only takes floats, not ${M(t)}, (${k(t)})`)},$flags:P},from_decimal:{$meth(){throw c("from_decimal not yet implemented in SKulpt")},$flags:P}},getsets:{numerator:{$get(){return this.$num}},denominator:{$get(){return this.$den}},_numerator:{$get(){return this.$num},$set(t){this.$num=t}},_denominator:{$get(){return this.$den},$set(t){this.$den=t}}}}),at=new a([n,ot]),isRational=t=>F(l(t,at));return O}',"src/lib/functools.js":'function $builtinmodule(){const t={};return Sk.misceval.chain(Sk.importModule("collections",!1,!0),(e=>(t._namedtuple=e.$d.namedtuple,functools_mod(t))))}function functools_mod(t){const{object:e,int_:n,str:r,list:s,tuple:a,dict:i,none:{none$:o},bool:{false$:c},NotImplemented:{NotImplemented$:_},bool:l,func:p,method:u,TypeError:h,RuntimeError:d,ValueError:f,NotImplementedError:m,AttributeErrror:w,OverflowError:g,checkNone:$,checkBool:y,checkCallable:k,checkClass:b}=Sk.builtin,{callsimArray:x,callsimOrSuspendArray:A,iterFor:S,chain:E,isIndex:v,asIndexSized:N,isTrue:P,richCompareBool:j,objectRepr:R}=Sk.misceval,{remapToPy:z}=Sk.ffi,{buildNativeClass:q,setUpModuleMethods:T,keywordArrayFromPyDict:I,keywordArrayToPyDict:D,objectHash:C,lookupSpecial:M,copyKeywordsToNamedArgs:W,typeName:F,iter:U,gattr:O}=Sk.abstr,{getSetDict:G,getAttr:B,setAttr:K}=Sk.generic;function proxyFail(t){return new p((()=>{throw new m(t+" is not yet implemented in skulpt")}))}Object.assign(t,{__name__:new r("functools"),__doc__:new r("Tools for working with functions and callable objects"),__all__:new s(["update_wrapper","wraps","WRAPPER_ASSIGNMENTS","WRAPPER_UPDATES","total_ordering","cmp_to_key","cache","lru_cache","reduce","partial","partialmethod","singledispatch","singledispatchmethod","cached_property"].map((t=>new r(t)))),WRAPPER_ASSIGNMENTS:new a(["__module__","__name__","__qualname__","__doc__","__annotations__"].map((t=>new r(t)))),WRAPPER_UPDATES:new a([new r("__dict__")]),singledispatch:proxyFail("singledispatch"),singledispatchmethod:proxyFail("singledispatchmethod"),cached_property:proxyFail("cached_property")});const L=new r("cache_parameters");function _lru_cache(e,n){if(n||(n=c),v(e))(e=N(e,g))<0&&(e=0);else{if(k(e)&&y(n)){const r=e,s=new V(r,e=128,n);return s.tp$setattr(L,new p((()=>z({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}if(!$(e))throw new h("Expected first argument to be an integer, a callable, or None")}return new p((r=>{const s=new V(r,e,n);return s.tp$setattr(L,new p((()=>z({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}))}const H=t._CacheInfo=x(t._namedtuple,["CacheInfo",["hits","misses","maxsize","currsize"]].map((t=>z(t))),["module",new r("functools")]),V=q("functools._lru_cache_wrapper",{constructor:function _lru_cache_wrapper(t,e,n,r){if(!k(t))throw new h("the first argument must be callable");let s;if($(e))s=infinite_lru_cache_wrapper,e=-1;else{if(!v(e))throw new h("maxsize should be integer or None");(e=N(e,g))<0&&(e=0),s=0===e?uncached_lru_cache_wrapper:bounded_lru_cache_wrapper}this.root={},this.root.prev=this.root.next=this.root,this.wrapper=s,this.maxsize=e,this.typed=n,this.cache=new i([]),this.func=t,this.misses=this.hits=0,this.$d=new i([])},slots:{tp$new(t,e){const[n,r,s,a]=W("_lru_cache_wrapper",["user_function","maxsize","typed","cache_info_type"],t,e);return new V(n,r,s,a)},tp$call(t,e){return this.wrapper(t,e)},tp$descr_get(t,e){return null===t?this:new u(this,t)},tp$doc:"Create a cached callable that wraps another function.\\n\\nuser_function: the function being cached\\n\\nmaxsize: 0 for no caching\\n None for unlimited cache size\\n n for a bounded cache\\n\\ntyped: False cache f(3) and f(3.0) as identical calls\\n True cache f(3) and f(3.0) as distinct calls\\n\\ncache_info_type: namedtuple class with the fields:\\n hits misses currsize maxsize\\n"},methods:{cache_info:{$meth(){return A(H,[this.hits,this.misses,-1===this.maxsize?o:this.maxsize,this.cache.get$size()].map((t=>z(t))))},$flags:{NoArgs:!0},$doc:"Report cache statistics"},cache_clear:{$meth(){return this.hits=this.misses=0,this.root={},this.root.next=this.root.prev=this.root,A(this.cache.tp$getattr(new r("clear"),!0))},$flags:{NoArgs:!0},$doc:"Clear the cache and cache statistics"},__deepcopy__:{$meth(t){return this},$flags:{OneArg:!0}},__copy__:{$meth(){return this},$flags:{NoArgs:!0}}},getsets:{__dict__:G}});function infinite_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);return void 0!==r?(this.hits++,r):(this.misses++,E(A(this.func,t,e),(t=>(this.cache.mp$ass_subscript(n,t),t))))}function uncached_lru_cache_wrapper(t,e){return this.misses++,A(this.func,t,e)}function bounded_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);if(void 0!==r){const{result:t}=r;return lru_cache_extract_link(r),lru_cache_append_link(this,r),this.hits++,t}return this.misses++,E(A(this.func,t,e),(t=>{if(void 0!==this.cache.mp$lookup(n))return t;if(this.cache.get$size()t.ob$type)),...i.map((t=>t.ob$type)));else if(1===s.length&&X.has(s[0].ob$type))return s[0];return new J(s)}function partial_adjust_args_kwargs(t,e){if(t=this.arg_arr.concat(t),e){e=D(e);const t=this.kwdict.dict$copy();t.dict$merge(e),e=I(t)}else e=I(this.kwdict);return{args:t,kwargs:e}}function partial_new(t,e){if(t.length<1)throw new h("type \'partial\' takes at least 1 argument");let n,r,s=t.shift();if(s instanceof this.sk$builtinBase){const t=s;s=t.fn,n=t.arg_arr,r=t.kwdict}this.check$func(s),n&&(t=n.concat(t));let a=D(e=e||[]);if(r){const t=r.dict$copy();t.dict$merge(a),a=t}if(this.sk$builtinBase===this.constructor)return new this.constructor(s,t,a);{const e=new this.constructor;return this.sk$builtinBase.call(e,s,t,a),e}}function partial_repr(){if(this.in$repr)return new r("...");this.in$repr=!0;const t=[R(this.fn)];return this.arg_arr.forEach((e=>{t.push(R(e))})),this.kwdict.$items().forEach((([e,n])=>{t.push(e.toString()+"="+R(n))})),this.in$repr=!1,new r(this.tp$name+"("+t.join(", ")+")")}t.partial=q("functools.partial",{constructor:function partial(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n,this.in$repr=!1,this.$d=new i([])},slots:{tp$new:partial_new,tp$call(t,e){return({args:t,kwargs:e}=this.adj$args_kws(t,e)),this.fn.tp$call(t,e)},tp$doc:"partial(func, *args, **keywords) - new function with partial application\\n of the given arguments and keywords.\\n",$r:partial_repr,tp$getattr:B,tp$setattr:K},getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:G},methods:{},classmethods:Sk.generic.classGetItem,proto:{adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t))throw new h("the first argument must be callable")}}}),t.partialmethod=q("functools.partialmethod",{constructor:function partialmethod(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n},slots:{tp$new:partial_new,tp$doc:"Method descriptor with partial application of the given arguments\\n and keywords.\\n\\n Supports wrapping existing descriptors and handles non-descriptor\\n callables as instance methods.\\n ",$r:partial_repr,tp$descr_get(e,n){let r;if(this.fn.tp$descr_get){const s=this.fn.tp$descr_get(e,n);if(s!==this.fn){if(!k(s))throw new h("type \'partial\' requires a callable");r=new t.partial(s,this.arg_arr.slice(0),this.kwdict.dict$copy());const e=M(s,this.str$self);void 0!==e&&r.tp$setattr(this.str$self,e)}}return void 0===r&&(r=this.make$unbound().tp$descr_get(e,n)),r}},methods:{_make_unbound_method:{$meth(){return this.make$unbound()},$flags:{NoArgs:!0}}},classmethods:Sk.generic.classGetItem,getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:G},proto:{str$self:new r("__self__"),make$unbound(){const t=this;function _method(e,n){const r=e.shift();return({args:e,kwargs:n}=t.adj$args_kws(e,n)),e.unshift(r),A(t.fn,e,n)}return _method.co_fastcall=!0,new p(_method)},adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t)&&void 0===t.tp$descr_get)throw new h(R(t)+" is not callable or a descriptor")}}});const Y={__lt__:r.$lt,__le__:r.$le,__gt__:r.$gt,__ge__:r.$ge};function from_slot(t,e){const n=Y[t];function compare_slot(t,r){let s=x(t.tp$getattr(n),[r]);return s===_?s:(s=P(s),new l(e(s,t,r)))}return compare_slot.co_name=n,compare_slot}const Z=from_slot("__lt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),tt=from_slot("__lt__",((t,e,n)=>t||j(e,n,"Eq"))),et=from_slot("__lt__",(t=>!t)),nt=from_slot("__le__",((t,e,n)=>!t||j(e,n,"Eq"))),rt=from_slot("__le__",((t,e,n)=>t&&j(e,n,"NotEq"))),st=from_slot("__le__",(t=>!t)),at=from_slot("__gt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),it=from_slot("__gt__",((t,e,n)=>t||j(e,n,"Eq"))),ot=from_slot("__gt__",(t=>!t)),ct=from_slot("__ge__",((t,e,n)=>!t||j(e,n,"Eq"))),_t=from_slot("__ge__",((t,e,n)=>t&&j(e,n,"NotEq"))),lt=from_slot("__ge__",(t=>!t)),pt={__lt__:{__gt__:new p(Z),__le__:new p(tt),__ge__:new p(et)},__le__:{__ge__:new p(nt),__lt__:new p(rt),__gt__:new p(st)},__gt__:{__lt__:new p(at),__ge__:new p(it),__le__:new p(ot)},__ge__:{__le__:new p(ct),__gt__:new p(_t),__lt__:new p(lt)}},ut={__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge"};const ht=new n(0),dt=q("functools.KeyWrapper",{constructor:function(t,e){this.cmp=t,this.obj=e},slots:{tp$call(t,e){const[n]=W("K",["obj"],t,e,[]);return new dt(this.cmp,n)},tp$richcompare(t,e){if(!(t instanceof dt))throw new h("other argument must be K instance");const n=this.obj,r=t.obj;if(!n||!r)throw new w("object");const s=A(this.cmp,[n,r]);return E(s,(t=>j(t,ht,e)))},tp$getattr:B,tp$hash:o},getsets:{obj:{$get(){return this.obj||o},$set(t){this.obj=t},$doc:"Value wrapped by a key function."}}}),ft=new r("update"),mt=new r("__wrapped__");return T("functools",t,{cache:{$meth:function cache(t){return A(_lru_cache(o),[t])},$flags:{OneArg:!0},$doc:\'Simple lightweight unbounded cache. Sometimes called "memoize".\',$textsig:"($module, user_function, /)"},lru_cache:{$meth:_lru_cache,$flags:{NamedArgs:["maxsize","typed"],Defaults:[new n(128),c]},$doc:"Least-recently-used cache decorator.\\n\\nIf *maxsize* is set to None, the LRU features are disabled and the cache\\ncan grow without bound.\\n\\nIf *typed* is True, arguments of different types will be cached separately.\\nFor example, f(3.0) and f(3) will be treated as distinct calls with\\ndistinct results.\\n\\nArguments to the cached function must be hashable.\\n\\nView the cache statistics named tuple (hits, misses, maxsize, currsize)\\nwith f.cache_info(). Clear the cache and statistics with f.cache_clear().\\nAccess the underlying function with f.__wrapped__.\\n\\nSee: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)"},cmp_to_key:{$meth:function cmp_to_key(t){return new dt(t)},$flags:{NamedArgs:["mycmp"],Defaults:[]},$doc:"Convert a cmp= function into a key= function.",$textsig:"($module, cmp, /)"},reduce:{$meth:function reduce(t,e,n){const r=U(e);let s;return n=n||r.tp$iternext(!0),E(n,(e=>{if(void 0===e)throw new h("reduce() of empty sequence with no initial value");return s=e,S(r,(e=>E(A(t,[s,e]),(t=>{s=t}))))}),(()=>s))},$flags:{MinArgs:2,MaxArgs:3},$doc:"reduce(function, sequence[, initial]) -> value\\n\\nApply a function of two arguments cumulatively to the items of a sequence,\\nfrom left to right, so as to reduce the sequence to a single value.\\nFor example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates\\n((((1+2)+3)+4)+5). If initial is present, it is placed before the items\\nof the sequence in the calculation, and serves as a default when the\\nsequence is empty.",$textsig:"($module, function, sequence[, initial], /)"},total_ordering:{$meth:function total_ordering(t){const n=[];if(!b(t))throw new h("total ordering only supported for type objects not \'"+F(t)+"\'");if(Object.keys(pt).forEach((r=>{const s=ut[r];t.prototype[s]!==e.prototype[s]&&n.push(r)})),!n.length)throw new f("must define atleast one ordering operation: <, >, <=, >=");const r=n[0];return Object.entries(pt[r]).forEach((([e,r])=>{n.includes(e)||t.tp$setattr(Y[e],r)})),t},$flags:{OneArg:!0},$doc:"Class decorator that fills in missing ordering methods"},update_wrapper:{$meth:function update_wrapper(t,e,n,r){let s,a=U(n);for(let i=a.tp$iternext();void 0!==i;i=a.tp$iternext())void 0!==(s=e.tp$getattr(i))&&t.tp$setattr(i,s);a=U(r);for(let o=a.tp$iternext();void 0!==o;o=a.tp$iternext()){s=e.tp$getattr(o)||new i([]);const n=O(t,o),r=O(n,ft);x(r,[s])}return t.tp$setattr(mt,e),t},$flags:{NamedArgs:["wrapper","wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Update a wrapper function to look like the wrapped function\\n\\n wrapper is the function to be updated\\n wrapped is the original function\\n assigned is a tuple naming the attributes assigned directly\\n from the wrapped function to the wrapper function (defaults to\\n functools.WRAPPER_ASSIGNMENTS)\\n updated is a tuple naming the attributes of the wrapper that\\n are updated with the corresponding attribute from the wrapped\\n function (defaults to functools.WRAPPER_UPDATES)\\n ",$textsig:"($module, /, wrapper, wrapped, assigned=(\'__module__\', \'__name__\', \'__qualname__\', \'__doc__\', \'__annotations__\'), updated=(\'__dict__\',))"},wraps:{$meth:function wraps(e,n,r){const s=["wrapped",e,"assigned",n,"updated",r];return A(t.partial,[t.update_wrapper],s)},$flags:{NamedArgs:["wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Decorator factory to apply update_wrapper() to a wrapper function\\n\\n Returns a decorator that invokes update_wrapper() with the decorated\\n function as the wrapper argument and the arguments to wraps() as the\\n remaining arguments. Default arguments are as for update_wrapper().\\n This is a convenience function to simplify applying partial() to\\n update_wrapper().\\n ",$textsig:"($module, /, wrapped, assigned=(\'__module__\', \'__name__\', \'__qualname__\', \'__doc__\', \'__annotations__\'), updated=(\'__dict__\',))"}}),t}',"src/lib/image.js":'var ImageMod,$builtinmodule;ImageMod||((ImageMod={}).canvasLib=[]),$builtinmodule=function(e){var n,t,i,a,u,l,r,s={__name__:new Sk.builtin.str("image")};return s.Image=Sk.misceval.buildClass(s,(function(e,n){u=function(e){e.width=e.image.width,e.height=e.image.height,e.delay=0,e.updateCount=0,e.updateInterval=1,e.lastx=0,e.lasty=0,e.canvas=document.createElement("canvas"),e.canvas.height=e.height,e.canvas.width=e.width,e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,0,0),e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)},n.__init__=new Sk.builtin.func((function(e,n){var t;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2);try{e.image=document.getElementById(Sk.ffi.remapToJs(n)),u(e)}catch(i){e.image=null}if(null==e.image)return(t=new Sk.misceval.Suspension).resume=function(){if(t.data.error)throw new Sk.builtin.IOError(t.data.error.message)},t.data={type:"Sk.promise",promise:new Promise((function(t,i){var a=new Image;a.crossOrigin="",a.onerror=function(){i(Error("Failed to load URL: "+a.src))},a.onload=function(){e.image=this,u(e),t()},a.src=r(n)}))},t})),r=function(e){var n,t,i="function"==typeof Sk.imageProxy?Sk.imageProxy:function(e){return(n=document.createElement("a")).href=t,window.location.host!==n.host?Sk.imageProxy+"/"+e:e};return t=i(t=Sk.ffi.remapToJs(e))},l=function(e,n,t){if(n<0||t<0||n>=e.width||t>=e.height)throw new Sk.builtin.ValueError("Pixel index out of range.")};var setdelay=function(e,n,t){var i;Sk.builtin.pyCheckArgsLen("setdelay",arguments.length,2,3),e.delay=Sk.ffi.remapToJs(n),i=Sk.builtin.asnum$(t),e.updateInterval=i||1};n.set_delay=new Sk.builtin.func(setdelay),n.setDelay=new Sk.builtin.func(setdelay);var getpixels=function(e){var n,t=[];for(Sk.builtin.pyCheckArgsLen("getpixels",arguments.length,1,1),n=0;n=e.width?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,0,e.lasty,e.width,2):e.lasty+e.updateInterval>=e.height?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,e.lastx,0,2,e.height):e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,Math.min(n,e.lastx),Math.min(t,e.lasty),Math.max(Math.abs(n-e.lastx),1),Math.max(Math.abs(t-e.lasty),1)),e.lastx=n,e.lasty=t,e.delay>0?window.setTimeout(i,e.delay):i()):i()}))},i};var setpixel=function(e,n,t,i){var u;return Sk.builtin.pyCheckArgsLen("setpixel",arguments.length,4,4),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),l(e,n,t),u=4*t*e.width+4*n,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getRed,[i])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getGreen,[i])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getBlue,[i])),e.imagedata.data[u+3]=255,a(e,n,t)};n.set_pixel=new Sk.builtin.func(setpixel),n.setPixel=new Sk.builtin.func(setpixel);var setpixelat=function(e,n,t){var i,u,r;return Sk.builtin.pyCheckArgsLen("setpixelat",arguments.length,3,3),i=(n=Sk.builtin.asnum$(n))%e.image.width,u=Math.floor(n/e.image.width),l(e,i,u),r=4*u*e.width+4*i,e.imagedata.data[r]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getRed,[t])),e.imagedata.data[r+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getGreen,[t])),e.imagedata.data[r+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getBlue,[t])),e.imagedata.data[r+3]=255,a(e,i,u)};n.set_pixel_at=new Sk.builtin.func(setpixelat),n.setPixelAt=new Sk.builtin.func(setpixelat);var updatepixel=function(e,n){var t,i,u;return Sk.builtin.pyCheckArgsLen("updatepixel",arguments.length,2,2),t=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getX,[n])),i=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getY,[n])),l(e,t,i),u=4*i*e.width+4*t,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getRed,[n])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getGreen,[n])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getBlue,[n])),e.imagedata.data[u+3]=255,a(e,t,i)};n.update_pixel=new Sk.builtin.func(updatepixel),n.updatePixel=new Sk.builtin.func(updatepixel);var getheight=function(e){return Sk.builtin.pyCheckArgsLen("getheight",arguments.length,1,1),new Sk.builtin.int_(e.height)};n.get_height=new Sk.builtin.func(getheight),n.getHeight=new Sk.builtin.func(getheight);var getwidth=function(e,n){return Sk.builtin.pyCheckArgsLen("getwidth",arguments.length,1,1),new Sk.builtin.int_(e.width)};n.get_width=new Sk.builtin.func(getwidth),n.getWidth=new Sk.builtin.func(getwidth),n.__getattr__=new Sk.builtin.func((function(e,n){return"height"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.height):"width"===n?Sk.builtin.assk$(e.width):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){throw"height"===(n=Sk.ffi.remapToJs(n))||"width"===n?new Sk.builtin.Exception("Cannot change height or width they can only be set on creation"):new Sk.builtin.Exception("Unknown attribute: "+n)})),n.draw=new Sk.builtin.func((function(e,n,t,i){var a;return Sk.builtin.pyCheckArgsLen("draw",arguments.length,2,4),(a=new Sk.misceval.Suspension).resume=function(){return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:new Promise((function(a,u){var l;n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),l=Sk.misceval.callsimArray(n.getWin,[n]).getContext("2d"),void 0===t&&(t=0,i=0),e.lastUlx=t,e.lastUly=i,e.lastCtx=l,l.putImageData(e.imagedata,t,i),e.delay>0?window.setTimeout(a,e.delay):window.setTimeout(a,200)}))},a}))}),"Image",[]),i=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,3,3),e.width=Sk.builtin.asnum$(n),e.height=Sk.builtin.asnum$(t),e.canvas=document.createElement("canvas"),e.ctx=e.canvas.getContext("2d"),e.canvas.height=e.height,e.canvas.width=e.width,e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)}))},s.EmptyImage=Sk.misceval.buildClass(s,i,"EmptyImage",[s.Image]),t=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t,i,a,u){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,4,6),e.red=Sk.builtin.asnum$(n),e.green=Sk.builtin.asnum$(t),e.blue=Sk.builtin.asnum$(i),e.x=Sk.builtin.asnum$(a),e.y=Sk.builtin.asnum$(u)}));var getred=function(e){return Sk.builtin.pyCheckArgsLen("getred",arguments.length,1,1),Sk.builtin.assk$(e.red)};n.get_red=new Sk.builtin.func(getred),n.getRed=new Sk.builtin.func(getred);var getgreen=function(e){return Sk.builtin.pyCheckArgsLen("getgreen",arguments.length,1,1),Sk.builtin.assk$(e.green)};n.get_green=new Sk.builtin.func(getgreen),n.getGreen=new Sk.builtin.func(getgreen);var getblue=function(e){return Sk.builtin.pyCheckArgsLen("getblue",arguments.length,1,1),Sk.builtin.assk$(e.blue)};n.get_blue=new Sk.builtin.func(getblue),n.getBlue=new Sk.builtin.func(getblue);var getx=function(e){return Sk.builtin.pyCheckArgsLen("getx",arguments.length,1,1),Sk.builtin.assk$(e.x)};n.get_x=new Sk.builtin.func(getx),n.getX=new Sk.builtin.func(getx);var gety=function(e){return Sk.builtin.pyCheckArgsLen("gety",arguments.length,1,1),Sk.builtin.assk$(e.y)};n.get_y=new Sk.builtin.func(gety),n.getY=new Sk.builtin.func(gety);var setred=function(e,n){Sk.builtin.pyCheckArgsLen("setred",arguments.length,2,2),e.red=Sk.builtin.asnum$(n)};n.set_red=new Sk.builtin.func(setred),n.setRed=new Sk.builtin.func(setred);var setgreen=function(e,n){Sk.builtin.pyCheckArgsLen("setgreen",arguments.length,2,2),e.green=Sk.builtin.asnum$(n)};n.set_green=new Sk.builtin.func(setgreen),n.setGreen=new Sk.builtin.func(setgreen);var setblue=function(e,n){Sk.builtin.pyCheckArgsLen("setblue",arguments.length,2,2),e.blue=Sk.builtin.asnum$(n)};n.set_blue=new Sk.builtin.func(setblue),n.setBlue=new Sk.builtin.func(setblue),n.__getattr__=new Sk.builtin.func((function(e,n){return"red"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.red):"green"===n?Sk.builtin.assk$(e.green):"blue"===n?Sk.builtin.assk$(e.blue):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){"red"!==(n=Sk.ffi.remapToJs(n))&&"green"!==n&&"blue"!==n||(e[n]=Sk.builtin.asnum$(t))}));var setx=function(e,n){Sk.builtin.pyCheckArgsLen("setx",arguments.length,2,2),e.x=Sk.builtin.asnum$(n)};n.set_x=new Sk.builtin.func(setx),n.setX=new Sk.builtin.func(setx);var sety=function(e,n){Sk.builtin.pyCheckArgsLen("sety",arguments.length,2,2),e.y=Sk.builtin.asnum$(n)};n.set_y=new Sk.builtin.func(sety),n.setY=new Sk.builtin.func(sety),n.__getitem__=new Sk.builtin.func((function(e,n){return 0===(n=Sk.builtin.asnum$(n))?e.red:1==n?e.green:2==n?e.blue:void 0})),n.__str__=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy("["+e.red+","+e.green+","+e.blue+"]")})),n.getColorTuple=new Sk.builtin.func((function(e,n,t){})),n.setRange=new Sk.builtin.func((function(e,n){e.max=Sk.builtin.asnum$(n)}))},s.Pixel=Sk.misceval.buildClass(s,t,"Pixel",[]),n=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){var i,a,u;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,1,3),void 0===(i=ImageMod.canvasLib[Sk.canvas])?(a=document.createElement("canvas"),u=document.getElementById(Sk.canvas),e.theScreen=a,u.appendChild(a),ImageMod.canvasLib[Sk.canvas]=a,ImageMod.canvasLib[Sk.canvas]=e.theScreen):(e.theScreen=i,e.theScreen.height=e.theScreen.height),void 0!==n?(e.theScreen.height=t.v,e.theScreen.width=n.v):(Sk.availableHeight&&(e.theScreen.height=Sk.availableHeight),Sk.availableWidth&&(e.theScreen.width=Sk.availableWidth)),e.theScreen.style.display="block"})),n.getWin=new Sk.builtin.func((function(e){return e.theScreen})),n.exitonclick=new Sk.builtin.func((function(e){var n=e.theScreen.id;e.theScreen.onclick=function(){document.getElementById(n).style.display="none",document.getElementById(n).onclick=null,delete ImageMod.canvasLib[n]}}))},s.ImageWin=Sk.misceval.buildClass(s,n,"ImageWin",[]),s};',"src/lib/itertools.js":'var $builtinmodule=function(t){var e={};function combinationsNew(t,e,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs(t.tp$name,["iterable","r"],e,i,[]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===t)return new t.constructor(n,s);{const e=new this.constructor;return t.constructor.call(e,n,s),e}}return e.accumulate=Sk.abstr.buildIteratorClass("itertools.accumulate",{constructor:function accumulate(t,e,i){this.iter=t,this.func=e,this.total=i,this.tp$iternext=()=>(this.total=Sk.builtin.checkNone(this.total)?this.iter.tp$iternext():this.total,this.tp$iternext=this.constructor.prototype.tp$iternext,this.total)},iternext(t){let e=this.iter.tp$iternext();if(void 0!==e)return this.total=Sk.misceval.callsimArray(this.func,[this.total,e]),this.total},slots:{tp$doc:"accumulate(iterable[, func, initial]) --\\x3e accumulate object\\n\\nReturn series of accumulated sums (or other binary function results).",tp$new(t,i){Sk.abstr.checkArgsLen("accumulate",t,0,2);let[r,s,n]=Sk.abstr.copyKeywordsToNamedArgs("accumulate",["iterable","func","initial"],t,i,[Sk.builtin.none.none$,Sk.builtin.none.none$]);if(r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func(((t,e)=>Sk.abstr.numberBinOp(t,e,"Add"))):s,this===e.accumulate.prototype)return new e.accumulate(r,s,n);{const t=new this.constructor;return e.accumulate.call(t,r,s,n),t}}}}),e.chain=Sk.abstr.buildIteratorClass("itertools.chain",{constructor:function chain(t){this.iterables=t,this.current_it=null,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,this.current_it=this.iterables.tp$iternext(),void 0!==this.current_it)return this.current_it=Sk.abstr.iter(this.current_it),this.tp$iternext();this.tp$iternext=()=>{}}},iternext(t){let e;for(;void 0===e;){if(e=this.current_it.tp$iternext(),void 0!==e)return e;if(this.current_it=this.iterables.tp$iternext(),void 0===this.current_it)return void(this.tp$iternext=()=>{});this.current_it=Sk.abstr.iter(this.current_it)}},slots:{tp$doc:"chain(*iterables) --\\x3e chain object\\n\\nReturn a chain object whose .__next__() method returns elements from the\\nfirst iterable until it is exhausted, then elements from the next\\niterable, until all of the iterables are exhausted.",tp$new(t,i){if(Sk.abstr.checkNoKwargs("chain",i),t=new Sk.builtin.tuple(t.slice(0)).tp$iter(),this===e.chain.prototype)return new e.chain(t);{const i=new this.constructor;return e.chain.call(i,t),i}}},classmethods:Object.assign({from_iterable:{$meth(t){const i=Sk.abstr.iter(t);return new e.chain(i)},$flags:{OneArg:!0},$doc:"chain.from_iterable(iterable) --\\x3e chain object\\n\\nAlternate chain() constructor taking a single iterable argument\\nthat evaluates lazily.",$textsig:null}},Sk.generic.classGetItem)}),e.combinations=Sk.abstr.buildIteratorClass("itertools.combinations",{constructor:function combinations(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill().map(((t,e)=>e)),this.n=t.length,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=e+this.n-this.r){i=!0;break}if(!i)return void(this.r=0);this.indices[e]++;for(let s=e+1;sthis.pool[t]));return new Sk.builtin.tuple(r)},slots:{tp$doc:"combinations(iterable, r) --\\x3e combinations object\\n\\nReturn successive r-length combinations of elements in the iterable.\\n\\ncombinations(range(4), 3) --\\x3e (0,1,2), (0,1,3), (0,2,3), (1,2,3)",tp$new(t,i){return combinationsNew.call(this,e.combinations.prototype,t,i)}}}),e.combinations_with_replacement=Sk.abstr.buildIteratorClass("itertools.combinations_with_replacement",{constructor:function combinations_with_replacement(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill(0),this.n=t.length,this.tp$iternext=()=>{if(this.r&&!this.n)return;this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map((t=>this.pool[t]));return new Sk.builtin.tuple(t)}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=this.n-1){i=!0;break}if(!i)return void(this.r=0);const r=this.indices[e]+1;for(let n=e;nthis.pool[t]));return new Sk.builtin.tuple(s)},slots:{tp$doc:"combinations_with_replacement(iterable, r) --\\x3e combinations_with_replacement object\\n\\nReturn successive r-length combinations of elements in the iterable\\nallowing individual elements to have successive repeats.\\ncombinations_with_replacement(\'ABC\', 2) --\\x3e AA AB AC BB BC CC",tp$new(t,i){return combinationsNew.call(this,e.combinations_with_replacement.prototype,t,i)}}}),e.compress=Sk.abstr.buildIteratorClass("itertools.compress",{constructor:function compress(t,e){this.data=t,this.selectors=e},iternext(){let t=this.data.tp$iternext(),e=this.selectors.tp$iternext();for(;void 0!==t&&void 0!==e;){if(Sk.misceval.isTrue(e))return t;t=this.data.tp$iternext(),e=this.selectors.tp$iternext()}},slots:{tp$doc:"compress(data, selectors) --\\x3e iterator over selected data\\n\\nReturn data elements corresponding to true selector elements.\\nForms a shorter iterator from selected data elements using the\\nselectors to choose the data elements.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("compress",["data","selectors"],t,i,[]),r=Sk.abstr.iter(r),s=Sk.abstr.iter(s),this===e.count.prototype)return new e.compress(r,s);{const t=new this.constructor;return e.compress.call(t,r,s),t}}}}),e.count=Sk.abstr.buildIteratorClass("itertools.count",{constructor:function count(t,e){this.start=t,this.step=e},iternext(){const t=this.start;return this.start=Sk.abstr.numberBinOp(this.start,this.step,"Add"),t},slots:{tp$doc:"count(start=0, step=1) --\\x3e count object\\n\\nReturn a count object whose .__next__() method returns consecutive values.\\nEquivalent to:\\n\\n def count(firstval=0, step=1):\\n x = firstval\\n while 1:\\n yield x\\n x += step\\n",tp$new(t,i){const[r,s]=Sk.abstr.copyKeywordsToNamedArgs("count",["start","step"],t,i,[new Sk.builtin.int_(0),new Sk.builtin.int_(1)]);if(!Sk.builtin.checkNumber(r)&&!Sk.builtin.checkComplex(r))throw new Sk.builtin.TypeError("a number is required");if(!Sk.builtin.checkNumber(s)&&!Sk.builtin.checkComplex(s))throw new Sk.builtin.TypeError("a number is required");if(this===e.count.prototype)return new e.count(r,s);{const t=new this.constructor;return e.count.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.start);let e=Sk.misceval.objectRepr(this.step);return e="1"===e?"":", "+e,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}}}),e.cycle=Sk.abstr.buildIteratorClass("itertools.cycle",{constructor:function cycle(t){this.iter=t,this.saved=[],this.consumed=!1,this.i=0,this.length},iternext(){let t;if(!this.consumed){if(t=this.iter.tp$iternext(),void 0!==t)return this.saved.push(t),t;if(this.consumed=!0,this.length=this.saved.length,!this.length)return}return t=this.saved[this.i],this.i=(this.i+1)%this.length,t},slots:{tp$doc:"cycle(iterable) --\\x3e cycle object\\n\\nReturn elements from the iterable until it is exhausted.\\nThen repeat the sequence indefinitely.",tp$new(t,i){Sk.abstr.checkOneArg("cycle",t,i);const r=Sk.abstr.iter(t[0]);if(this===e.cycle.prototype)return new e.cycle(r);{const t=new this.constructor;return e.cycle.call(t,r),t}}}}),e.dropwhile=Sk.abstr.buildIteratorClass("itertools.dropwhile",{constructor:function dropwhile(t,e){this.predicate=t,this.iter=e,this.passed},iternext(){let t=this.iter.tp$iternext();for(;void 0===this.passed&&void 0!==t;){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(!Sk.misceval.isTrue(e))return this.passed=!0,t;t=this.iter.tp$iternext()}return t},slots:{tp$doc:"dropwhile(predicate, iterable) --\\x3e dropwhile object\\n\\nDrop items from the iterable while predicate(item) is true.\\nAfterwards, return every element until the iterable is exhausted.",tp$new(t,i){Sk.abstr.checkNoKwargs("dropwhile",i),Sk.abstr.checkArgsLen("dropwhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.dropwhile.prototype)return new e.dropwhile(r,s);{const t=new this.constructor;return e.dropwhile.call(t,r,s),t}}}}),e.filterfalse=Sk.abstr.buildIteratorClass("itertools.filterfalse",{constructor:function filterfalse(t,e){this.predicate=t,this.iter=e},iternext(t){let e=this.iter.tp$iternext();if(void 0===e)return;let i=Sk.misceval.callsimArray(this.predicate,[e]);for(;Sk.misceval.isTrue(i);){if(e=this.iter.tp$iternext(),void 0===e)return;i=Sk.misceval.callsimArray(this.predicate,[e])}return e},slots:{tp$doc:"filterfalse(function or None, sequence) --\\x3e filterfalse object\\n\\nReturn those items of sequence for which function(item) is false.\\nIf function is None, return the items that are false.",tp$new(t,i){Sk.abstr.checkNoKwargs("filterfalse",i),Sk.abstr.checkArgsLen("filterfalse",t,2,2);const r=Sk.builtin.checkNone(t[0])?Sk.builtin.bool:t[0],s=Sk.abstr.iter(t[1]);if(this===e.filterfalse.prototype)return new e.filterfalse(r,s);{const t=new this.constructor;return e.filterfalse.call(t,r,s),t}}}}),e._grouper=Sk.abstr.buildIteratorClass("itertools._grouper",{constructor:function _grouper(t,e){this.groupby=t,this.tgtkey=t.tgtkey,this.id=t.id},iternext(t){const e=Sk.misceval.richCompareBool(this.groupby.currkey,this.tgtkey,"Eq");if(this.groupby.id===this.id&&e){let t=this.groupby.currval;return this.groupby.currval=this.groupby.iter.tp$iternext(),void 0!==this.groupby.currval&&(this.groupby.currkey=Sk.misceval.callsimArray(this.groupby.keyf,[this.groupby.currval])),t}}}),e.groupby=Sk.abstr.buildIteratorClass("itertools.groupby",{constructor:function groupby(t,e){this.iter=t,this.keyf=e,this.currval,this.currkey=this.tgtkey=new Sk.builtin.object,this.id},iternext(t){this.id=new Object;let i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq");for(;i;){if(this.currval=this.iter.tp$iternext(),void 0===this.currval)return;this.currkey=Sk.misceval.callsimArray(this.keyf,[this.currval]),i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq")}this.tgtkey=this.currkey;const r=new e._grouper(this);return new Sk.builtin.tuple([this.currkey,r])},slots:{tp$doc:"groupby(iterable, key=None) -> make an iterator that returns consecutive\\nkeys and groups from the iterable. If the key function is not specified or\\nis None, the element itself is used for grouping.\\n",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("groupby",["iterable","key"],t,i,[Sk.builtin.none.none$]),r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func((t=>t)):s,this===e.groupby.prototype)return new e.groupby(r,s);{const t=new this.constructor;return e.groupby.call(t,r,s),t}}}}),e.islice=Sk.abstr.buildIteratorClass("itertools.islice",{constructor:function islice(t,e,i,r){this.iter=t,this.previt=e,this.stop=i,this.step=r,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,!(this.previt>=this.stop)){for(let t=0;t=this.stop)){for(let t=this.previt+1;tNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Stop for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(s)&&!Sk.misceval.isIndex(s))throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(s=Sk.builtin.checkNone(s)?0:Sk.misceval.asIndexSized(s),s<0||s>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(o)&&!Sk.misceval.isIndex(o))throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None");if(o=Sk.builtin.checkNone(o)?1:Sk.misceval.asIndexSized(o),o<=0||o>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None.");if(this===e.islice.prototype)return new e.islice(r,s,n,o);{const t=new this.constructor;return e.islice.call(t,r,s,n,o),t}}}}),e.permutations=Sk.abstr.buildIteratorClass("itertools.permutations",{constructor:function permutations(t,e){this.pool=t,this.r=e;const i=t.length;this.indices=new Array(i).fill().map(((t,e)=>e)),this.cycles=new Array(e).fill().map(((t,e)=>i-e)),this.n=i,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){for(let e=this.r-1;e>=0;e--){if(this.cycles[e]--,0!=this.cycles[e]){const t=this.cycles[e];[this.indices[e],this.indices[this.n-t]]=[this.indices[this.n-t],this.indices[e]];const i=this.indices.map((t=>this.pool[t])).slice(0,this.r);return new Sk.builtin.tuple(i)}this.indices.push(this.indices.splice(e,1)[0]),this.cycles[e]=this.n-e}this.r=0},slots:{tp$doc:"permutations(iterable[, r]) --\\x3e permutations object\\n\\nReturn successive r-length permutations of elements in the iterable.\\n\\npermutations(range(3), 2) --\\x3e (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)",tp$new(t,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs("permutations",["iterable","r"],t,i,[Sk.builtin.none.none$]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.builtin.checkNone(s)?n.length:Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===e.permutations.prototype)return new e.permutations(n,s);{const t=new this.constructor;return e.permutations.call(t,n,s),t}}}}),e.product=Sk.abstr.buildIteratorClass("itertools.product",{constructor:function product(t){this.pools=t,this.n=t.length,this.indices=Array(t.length).fill(0),this.pool_sizes=t.map((t=>t.length)),this.tp$iternext=()=>{this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));if(!t.some((t=>void 0===t)))return new Sk.builtin.tuple(t);this.n=0}},iternext(t){let e=this.n-1;for(;e>=0&&e=this.pool_sizes[e]?(this.indices[e]=-1,e--):e++;if(this.n&&!this.indices.every((t=>-1===t))){const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));return new Sk.builtin.tuple(t)}this.n=0},slots:{tp$doc:"product(*iterables, repeat=1) --\\x3e product object\\n\\nCartesian product of input iterables. Equivalent to nested for-loops.\\n\\nFor example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\\nThe leftmost iterators are in the outermost for-loop, so the output tuples\\ncycle in a manner similar to an odometer (with the rightmost element changing\\non every iteration).\\n\\nTo compute the product of an iterable with itself, specify the number\\nof repetitions with the optional repeat keyword argument. For example,\\nproduct(A, repeat=4) means the same as product(A, A, A, A).\\n\\nproduct(\'ab\', range(3)) --\\x3e (\'a\',0) (\'a\',1) (\'a\',2) (\'b\',0) (\'b\',1) (\'b\',2)\\nproduct((0,1), (0,1), (0,1)) --\\x3e (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...",tp$new(t,i){let[r]=Sk.abstr.copyKeywordsToNamedArgs("product",["repeat"],[],i,[new Sk.builtin.int_(1)]);if(r=Sk.misceval.asIndexSized(r,Sk.builtin.OverFlowError),r<0)throw new Sk.builtin.ValueError("repeat argument cannot be negative");const s=[];for(let e=0;ethis.object)},iternext(t){return this.times-- >0?this.object:void 0},slots:{tp$doc:"repeat(object [,times]) -> create an iterator which returns the object\\nfor the specified number of times. If not specified, returns the object\\nendlessly.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("repeat",["object","times"],t,i,[null]),s=null!==s?Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError):void 0,this===e.repeat.prototype)return new e.repeat(r,s);{const t=new this.constructor;return e.repeat.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.object),e=void 0===this.times?"":", "+(this.times>=0?this.times:0);return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}},methods:{__lenght_hint__:{$meth(){if(void 0===this.times)throw new Sk.builtin.TypeError("len() of unsized object");return new Sk.builtin.int_(this.times)},$flags:{NoArgs:!0},$textsig:null}}}),e.starmap=Sk.abstr.buildIteratorClass("itertools.starmap",{constructor:function starmap(t,e){this.func=t,this.iter=e},iternext(t){const e=this.iter.tp$iternext();if(void 0===e)return;const i=Sk.misceval.arrayFromIterable(e);return Sk.misceval.callsimArray(this.func,i)},slots:{tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("starmap",["func","iterable"],t,i,[]),s=Sk.abstr.iter(s),r=Sk.builtin.checkNone(r)?Sk.builtin.bool:r,this===e.starmap.prototype)return new e.starmap(r,s);{const t=new this.constructor;return e.starmap.call(t,r,s),t}}}}),e.takewhile=Sk.abstr.buildIteratorClass("itertools.takewhile",{constructor:function takewhile(t,e){this.predicate=t,this.iter=e},iternext(){const t=this.iter.tp$iternext();if(void 0!==t){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(Sk.misceval.isTrue(e))return t;this.tp$iternext=()=>{}}},slots:{tp$doc:"takewhile(predicate, iterable) --\\x3e takewhile object\\n\\nReturn successive entries from an iterable as long as the \\npredicate evaluates to true for each entry.",tp$new(t,i){Sk.abstr.checkNoKwargs("takewhile",i),Sk.abstr.checkArgsLen("takewhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.takewhile.prototype)return new e.takewhile(r,s);{const t=new this.constructor;return e.takewhile.call(t,r,s),t}}}}),e.tee=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("tee is not yet implemented in Skulpt")})),e.zip_longest=Sk.abstr.buildIteratorClass("itertools.zip_longest",{constructor:function zip_longest(t,e){this.iters=t,this.fillvalue=e,this.active=this.iters.length},iternext(t){if(!this.active)return;let i;const r=[];for(let s=0;s{throw new a(e+" is not yet implemented in skulpt")}))}const j=E.JSONDecodeError=N("json.JSONDecodeError",{base:l,constructor:function JSONDecodeError(e,t,n){const r=t.slice(0,n),o=r.split("\\n").length,s=n-r.lastIndexOf("\\n"),i=`${e}: line ${o} column ${s} (char ${n})`;l.call(this,i),this.$msg=e,this.$doc=t,this.$pos=n,this.$lineno=o,this.$colno=s},getsets:Object.fromEntries(["msg","doc","pos","lineno","colno"].map((e=>[e,{$get(){return g(this["$"+e])}}])))});class JSONEncoder{constructor(e,t,n,r,o,s,i,l){this.skipkeys=e,this.ensure_ascii=t,this.check_circular=n,this.allow_nan=r,this.indent=o,this.separators=s,this.sort_keys=l,this.item_separator=", ",this.key_separator=": ",null!==this.separators?[this.item_separator,this.key_separator]=this.separators:null!==this.indent&&(this.item_separator=","),null!==i&&(this.default=i),this.encoder=this.make_encoder()}default(e){throw new i(`Object of type ${y(e)} is not JSON serializable`)}encode(t){return new e(this.encoder(t))}make_encoder(){let e,t;e=this.check_circular?new Set:null,t=(this.ensure_ascii,JSON.stringify);return function _make_iterencode(e,t,n,r,s,a,u,h,d){null!==r&&"string"!=typeof r&&(r=" ".repeat(r));let f,p,g,w;null!==e?(f=t=>{if(e.has(t))throw new l("Circular reference detected");e.add(t)},p=t=>e.delete(t)):(f=e=>{},p=e=>{});null!==r?(g=(e,t)=>{t+=1;const n="\\n"+r.repeat(t);return[e+=n,t,u+n]},w=(e,t,n)=>(n-=1,e+="\\n"+r.repeat(n)+t)):(g=(e,t)=>[e,t,u],w=(e,t,n)=>e+t);const _unhandled=(e,n)=>{f(e);const r=_iterencode(t(e),n);return p(e),r},_iterencode_list=(e,t)=>{if(!e.length)return"[]";let n,r;f(e),[n,t,r]=g("[",t);let o=!0;for(let s of e)o?o=!1:n+=r,n+=_iterencode(s,t);return p(e),w(n,"]",t)},_iterencode_dict=(e,t)=>{if(!e.sq$length())return"{}";let r,l;f(e),[r,t,l]=g("{",t);let u=!0;if(h){const t=$(e.tp$getattr(v)),n=c(t);e=$(o,[n])}for(let[o,c]of e.$items()){const e=o.valueOf(),h=typeof e;if("string"===h)o=e;else if("number"===h)o=s(o);else if("boolean"===h||null===e)o=String(e);else{if(!JSBI.__isBigInt(e)){if(d)continue;throw new i("keys must be str, int, float, bool or None, not "+y(o))}o=e.toString()}u?u=!1:r+=l,r+=n(o),r+=a,r+=_iterencode(c,t)}return p(e),w(r,"}",t)},_iterencode=(e,t=0)=>String(m(e,{stringHook:e=>n(e),numberHook:(e,t)=>s(t),bigintHook:e=>e.toString(),dictHook:e=>_iterencode_dict(e,t),arrayHook:e=>_iterencode_list(e,t),setHook:e=>_unhandled(e,t),funcHook:(e,n)=>_unhandled(n,t),objecthook:(e,n)=>_unhandled(n,t),unhandledHook:e=>_unhandled(e,t)}));return _iterencode}(e,this.default,t,this.indent,((e,t=this.allow_nan)=>{const n=e.valueOf();let r;if(Number.isFinite(n))return J(e);if(r=n.toString(),!t)throw new l("Out of range float values are not JSON compliant: "+J(e));return r}),this.key_separator,this.item_separator,this.sort_keys,this.skipkeys)}}const v=new e("items");const x=[!1,!0,!0,!0,null,null,null,!1],D=new JSONEncoder(...x),F=/(-?(?:0|[1-9]\\d*))(\\.\\d+)?([eE][-+]?\\d+)?/;const I=/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"/m;function scanstring(t,n){const r=t.substring(n-1).match(I);if(null===r)throw new j("Unterminated string starting at",t,n-1);try{return[new e(JSON.parse(r[0])),n+r[0].length-1]}catch(o){let e=o.message.match(/(?:column|position) (\\d+)/);e=e&&Number(e[1]);n=n+(e||0)-(void 0===o.columnNumber?1:2);const r=o.message.replace("JSON.parse: ","").replace(/ at line \\d+ column \\d+ of the JSON data/,"").replace(/ in JSON at position \\d+$/,"");throw new j(r,t,n)}}const A=/[ \\t\\n\\r]*/;function JSONArray(e,t,r){const o=[];let s=e[t];const adjust_white_space=()=>{if(" "===s||"\\t"===s||"\\n"===s||"\\r"===s){const n=e.substring(t).match(A);t+=n[0].length,s=e[t]}};if(adjust_white_space(),"]"===s)return[new n([]),t+1];for(;;){let n;if([n,t]=r(e,t),void 0===n)throw new j("Expecting value",e,t);if(o.push(n),s=e[t],adjust_white_space(),t++,"]"===s)break;if(","!==s)throw new j("Expecting \',\' delimiter",e,t-1);s=e[t],adjust_white_space()}return[new n(o),t]}function JSONObject(e,t,s,i,l){let a=[],c=e[t];const adjust_white_space=()=>{if(" "===c||"\\t"===c||"\\n"===c||"\\r"===c){const n=e.substring(t).match(A);t+=n[0].length,c=e[t]}};if(\'"\'!==c){if(adjust_white_space(),"}"===c){if(null!==l){return[l(new n([])),t+1]}return a=new o([]),null!==i&&(a=i(a)),[a,t+1]}if(\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t)}let u,h;for(t+=1;;){if([u,t]=scanstring(e,t),":"!==(c=e[t])&&(adjust_white_space(),":"!==e[t]))throw new j("Expecting \':\' delimiter",e,t);if(c=e[++t],adjust_white_space(),[h,t]=s(e,t),void 0===h)throw new j("Expecting value",e,t);if(c=e[t],a.push([u,h]),adjust_white_space(),t++,"}"===c)break;if(","!==c)throw new j("Expecting \',\' delimiter",e,t-1);if(c=e[t],adjust_white_space(),t++,\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t-1)}if(null!==l){return[l(new n(a.map((e=>new r(e))))),t]}return a=new o(a.flat()),null!==i&&(a=i(a)),[a,t]}const H={NaN:new t(NaN),Infinity:new t(1/0),"-Infinity":new t(-1/0)};class JSONDecoder{constructor(e,t,n,r,o){this.object_hook=e,this.parse_float=t||w,this.parse_int=n||_,this.parse_constant=r||(e=>H[e]),this.object_pairs_hook=o,this.parse_object=JSONObject,this.parse_array=JSONArray,this.parse_string=scanstring,this.scan_once=function make_scanner(e){const{parse_object:t,parse_array:n,parse_string:r,parse_float:o,parse_int:s,parse_constant:i,object_hook:l,object_pairs_hook:a}=e,scan_once=(e,c)=>{const f=e[c];if(void 0===f)return[f,c];if(\'"\'===f)return r(e,c+1);if("{"===f)return t(e,c+1,scan_once,l,a);if("["===f)return n(e,c+1,scan_once);if("n"===f&&"null"===e.substring(c,c+4))return[u,c+4];if("t"===f&&"true"===e.substring(c,c+4))return[h,c+4];if("f"===f&&"false"===e.substring(c,c+5))return[d,c+5];const p=e.substring(c).match(F);if(null!==p){let e;const[t,n,r,i]=p;return e=r||i?o(n+(r||"")+(i||"")):s(n),[e,c+t.length]}return"N"===f&&"NaN"===e.substring(c,c+3)?[i("NaN"),c+3]:"I"==f&&"Infinity"===e.substring(c,c+8)?[i("Infinity"),c+8]:"-"==f&&"-Infinity"===e.substring(c,c+9)?[i("-Infinity"),c+9]:[void 0,c]};return scan_once}(this)}white(e,t){const n=(0===t?e:e.substring(t)).match(A);return null!==n&&(t+=n[0].length),t}decode(e){e=e.toString();let[t,n]=this.scan_once(e,this.white(e,0));if(void 0===t)throw new j("Expecting value",e,n);if(n=this.white(e,n),n!==e.length)throw new j("Extra data",e,n);return t}}const T=Array(5).fill(null),C=new JSONDecoder(...T);function convertToNullOrFunc(e){return null===e||e===u?null:t=>$(e,[g(t)])}return k("json",E,{loads:{$meth(e,t){O("dumps",e);let n=e[0];if(f(n));else{if(!p(n))throw new i(`the JSON object must be str or bytes, not ${y(n)}`);n=(new TextDecoder).decode(n.valueOf())}const r=S("dumps",["object_hook","parse_float","parse_int","parse_constant","object_pairs_hook"],[],t,T).map(convertToNullOrFunc);return r.every((e=>null===e))?C.decode(n):new JSONDecoder(...r).decode(n)},$doc:"Deserialize ``s`` (a ``str`` or ``bytes`` instance containing a JSON document) to a Python object.",$flags:{FastCall:!0}},dumps:{$meth(e,t){O("dumps",e);const n=e[0];let[r,o,s,l,a,c,u,h]=S("loads",["skipkeys","ensure_ascii","check_circular","allow_nan","indent","separators","default","sort_keys"],[],t,x);if(r=b(r),o=b(o),s=b(s),l=b(l),a=m(a),c=m(c),u=convertToNullOrFunc(u),h=b(h),!r&&o&&s&&l&&null===a&&null===c&&null===u&&!h)return D.encode(n);if(null===c);else if(!Array.isArray(c)||2!==c.length||"string"!=typeof c[0]||"string"!=typeof c[1])throw new i("separators shuld be a list or tuple of strings of length 2");return new JSONEncoder(r,o,s,l,a,c,u,h).encode(n)},$doc:"Serialize ``obj`` to a JSON formatted ``str``",$flags:{FastCall:!0}}}),E}',"src/lib/keyword.js":'function $builtinmodule(){const{ffi:{remapToPy:t},builtin:{frozenset:e,str:s}}=Sk,i=new s("keyword"),n=t(["iskeyword","issoftkeyword","kwlist","softkwlist"]),o=t(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]),a=t(["_","case","match"]);return{__name__:i,__all__:n,kwlist:o,softkwlist:a,iskeyword:new e(o).tp$getattr(s.$contains),issoftkeyword:new e(a).tp$getattr(s.$contains)}}',"src/lib/math.js":'const $builtinmodule=function(e){const{builtin:{str:t,int_:n,float_:i,TypeError:r,pyCheckType:u,checkNumber:l},abstr:{lookupSpecial:o},misceval:{callsimOrSuspendArray:a}}=Sk,s={pi:new Sk.builtin.float_(Math.PI),e:new Sk.builtin.float_(Math.E),tau:new Sk.builtin.float_(2*Math.PI),nan:new Sk.builtin.float_(NaN),inf:new Sk.builtin.float_(1/0)},b=new t("__ceil__");const get_sign=function(e){return e=e?e<0?-1:1:1/e<0?-1:1};const c=18;function factorial(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=Sk.builtin.asnum$(e);if((e=Math.floor(t))!=t)throw new Sk.builtin.ValueError("factorial() only accepts integral values");if(e<0)throw new Sk.builtin.ValueError("factorial() not defined for negative numbers");let n=1;for(let i=2;i<=e&&i<=c;i++)n*=i;if(e<=c)return new Sk.builtin.int_(n);n=JSBI.BigInt(n);for(let i=c+1;i<=e;i++)n=JSBI.multiply(n,JSBI.BigInt(i));return new Sk.builtin.int_(n)}const m=new t("__floor__");function _gcd_internal(e,t){let n;return"number"==typeof e&&"number"==typeof t?(n=function _gcd(e,t){return 0==t?e:_gcd(t,e%t)}(e=Math.abs(e),t=Math.abs(t)),n=n<0?-n:n):(n=function _biggcd(e,t){return JSBI.equal(t,JSBI.__ZERO)?e:_biggcd(t,JSBI.remainder(e,t))}(e=JSBI.BigInt(e),t=JSBI.BigInt(t)),JSBI.lessThan(n,JSBI.__ZERO)&&(n=JSBI.multiply(n,JSBI.BigInt(-1)))),n}return Sk.abstr.setUpModuleMethods("math",s,{acos:{$meth:function acos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.acos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc cosine (measured in radians) of x."},acosh:{$meth:function acosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e-1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic cosine of x."},asin:{$meth:function asin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.asin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc sine (measured in radians) of x."},asinh:{$meth:function asinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e+1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic sine of x."},atan:{$meth:function atan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.atan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc tangent (measured in radians) of x."},atan2:{$meth:function atan2(e,t){return Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(t)),new Sk.builtin.float_(Math.atan2(Sk.builtin.asnum$(e),Sk.builtin.asnum$(t)))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, y, x, /)",$doc:"Return the arc tangent (measured in radians) of y/x.\\n\\nUnlike atan(y/x), the signs of both x and y are considered."},atanh:{$meth:function atanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(1+(e=Sk.builtin.asnum$(e)))/(1-e);return new Sk.builtin.float_(Math.log(t)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic tangent of x."},ceil:{$meth:function ceil(e){let t;if(e.ob$type!==i){const n=o(e,b);if(void 0!==n)return a(n);u("","real number",l(e)),t=Sk.builtin.asnum$(e)}else t=e.v;return new n(Math.ceil(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the ceiling of x as an Integral.\\n\\nThis is the smallest integer >= x."},comb:{$meth:function comb(e,t){let n=Sk.misceval.asIndexOrThrow(e),i=Sk.misceval.asIndexOrThrow(t);if(n<0)throw new Sk.builtin.ValueError("n must be an non-negative integer");if(i<0)throw new Sk.builtin.ValueError("k must be a non-negative integer");if(i>e)return new Sk.builtin.int_(0);e=new Sk.builtin.int_(n),t=new Sk.builtin.int_(i);let r=Sk.ffi.remapToJs(e.nb$subtract(t));if(rNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("min(n - k, k) must not exceed "+Number.MAX_SAFE_INTEGER);const u=new Sk.builtin.int_(1);let l=e;for(let o=1;o n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative."},copysign:{$meth:function copysign(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));const n=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(e),r=get_sign(i)*get_sign(n);return new Sk.builtin.float_(i*r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return a float with the magnitude (absolute value) of x but the sign of y.\\n\\nOn platforms that support signed zeros, copysign(1.0, -0.0)\\nreturns -1.0.\\n"},cos:{$meth:function cos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.cos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the cosine of x (measured in radians)."},cosh:{$meth:function cosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n+1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic cosine of x."},degrees:{$meth:function degrees(e){Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e));const t=180/Math.PI*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from radians to degrees."},erf:{$meth:function erf(e){throw new Sk.builtin.NotImplementedError("math.erf() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Error function at x."},erfc:{$meth:function erfc(e){throw new Sk.builtin.NotImplementedError("math.erfc() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Complementary error function at x."},exp:{$meth:function exp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;if("number"!=typeof t&&(t=e.nb$float().v),t==1/0||t==-1/0||isNaN(t))return new Sk.builtin.float_(Math.exp(t));const n=Math.exp(t);if(!isFinite(n))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return e raised to the power of x."},expm1:{$meth:function expm1(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(Math.abs(t)<.7){const e=Math.exp(t);if(1==e)return new Sk.builtin.float_(t);{const n=(e-1)*t/Math.log(e);return new Sk.builtin.float_(n)}}{const e=Math.exp(t)-1;return new Sk.builtin.float_(e)}},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return exp(x)-1.\\n\\nThis function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x."},fabs:{$meth:function fabs(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;return JSBI.__isBigInt(t)&&(t=e.nb$float().v),t=Math.abs(t),new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the float x."},factorial:{$meth:factorial,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Find x!.\\n\\nRaise a ValueError if x is negative or non-integral."},floor:{$meth:function floor(e){let t;if(e.ob$type===i)t=e.v;else{const n=o(e,m);if(void 0!==n)return a(n);u("x","number",l(e)),t=Sk.builtin.asnum$(e)}return new n(Math.floor(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the floor of x as an Integral.\\n\\nThis is the largest integer <= x."},fmod:{$meth:function fmod(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),(i==1/0||i==-1/0)&&isFinite(n))return new Sk.builtin.float_(n);const r=n%i;if(isNaN(r)&&!isNaN(n)&&!isNaN(i))throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return fmod(x, y), according to platform C.\\n\\nx % y may differ."},frexp:{$meth:function frexp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e),n=[t,0];if(0!==t&&Number.isFinite(t)){const e=Math.abs(t);let i=Math.max(-1023,Math.floor(Math.log2(e))+1),r=e*Math.pow(2,-i);for(;r<.5;)r*=2,i--;for(;r>=1;)r*=.5,i++;t<0&&(r=-r),n[0]=r,n[1]=i}return n[0]=new Sk.builtin.float_(n[0]),n[1]=new Sk.builtin.int_(n[1]),new Sk.builtin.tuple(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the mantissa and exponent of x, as pair (m, e).\\n\\nm is a float and e is an int, such that x = m * 2.**e.\\nIf x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."},fsum:{$meth:function fsum(e){if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("\'"+Sk.abstr.typeName(e)+"\' object is not iterable");let t,n,i,r=[];for(let l=(e=Sk.abstr.iter(e)).tp$iternext();void 0!==l;l=e.tp$iternext()){Sk.builtin.pyCheckType("","real number",Sk.builtin.checkNumber(l)),t=0;let e=l.v;"number"!=typeof e&&(e=l.nb$float().v),l=e;for(let u=0,o=r.length;u0;){n--;let t=a;a=JSBI.signedRightShift(u,JSBI.BigInt(n));const r=JSBI.subtract(JSBI.subtract(a,t),i),s=JSBI.leftShift(o,r),b=JSBI.add(JSBI.subtract(JSBI.subtract(l,t),a),i),c=JSBI.signedRightShift(e,b);o=JSBI.add(s,JSBI.divide(c,o))}let s=o;return JSBI.greaterThan(JSBI.multiply(s,s),e)&&(s=JSBI.subtract(s,i)),JSBI.lessThanOrEqual(s,JSBI.BigInt(Number.MAX_SAFE_INTEGER))&&(s=Number(s)),new Sk.builtin.int_(s)}(t)},$flags:{OneArg:!0},$textsig:"($module, n, /)",$doc:"Return the integer part of the square root of the input."},lcm:{$meth:function lcm(...e){function abs(e){return"number"==typeof e?new Sk.builtin.int_(Math.abs(e)):JSBI.lessThan(e,JSBI.__ZERO)?new Sk.builtin.int_(JSBI.unaryMinus(e)):new Sk.builtin.int_(e)}const t=e.length;if(0===t)return new Sk.builtin.int_(1);let n;for(n=0;nNumber.MAX_SAFE_INTEGER?JSBI.BigInt(r):e}else r=JSBI.BigInt(r);"number"!=typeof r&&(i=JSBI.BigInt(i),r=JSBI.multiply(JSBI.divide(r,_gcd_internal(r,i)),i))}return abs(r)},$flags:{MinArgs:0},$textsig:"($module, *integers, /)",$doc:"Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is 0. lcm() without arguments returns 1."},ldexp:{$meth:function ldexp(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("i","integer",Sk.builtin.checkInt(t));let n=e.v;"number"!=typeof n&&(n=e.nb$float().v);const i=Sk.builtin.asnum$(t);if(n==1/0||n==-1/0||0==n||isNaN(n))return new Sk.builtin.float_(n);const r=n*Math.pow(2,i);if(!isFinite(r))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, i, /)",$doc:"Return x * (2**i).\\n\\nThis is essentially the inverse of frexp()."},lgamma:{$meth:function lgamma(e){throw new Sk.builtin.NotImplementedError("math.lgamma() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Natural logarithm of absolute value of Gamma function at x."},log:{$meth:function log(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let n,i,r=Sk.builtin.asnum$(e);if(r<=0)throw new Sk.builtin.ValueError("math domain error");if(void 0===t?n=Math.E:(Sk.builtin.pyCheckType("base","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(t)),n<=0)throw new Sk.builtin.ValueError("math domain error");if(Sk.builtin.checkFloat(e)||re)return new Sk.builtin.int_(0);if(0===t)return new Sk.builtin.int_(1);if(t>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("k must not exceed "+Number.MAX_SAFE_INTEGER);const n=new Sk.builtin.int_(1);let i=e=new Sk.builtin.int_(e);for(let r=1;r n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative.\'"},prod:{$meth:function prod(e,t){Sk.abstr.checkArgsLen("prod",e,1,1),e=Sk.abstr.copyKeywordsToNamedArgs("prod",[null,"start"],e,t,[new Sk.builtin.int_(1)]);const n=Sk.abstr.iter(e[0]);let i,r=e[1];return i=r.constructor===Sk.builtin.int_?function fastProdInt(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.int_)return e.constructor===Sk.builtin.float_?(r=r.nb$float().nb$multiply(e),new Sk.misceval.Break("float")):(r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow"));r=r.nb$multiply(e)}))}():r.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(i,(e=>"float"===e?function fastProdFloat(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.float_&&e.constructor!==Sk.builtin.int_)return r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow");r=r.nb$multiply(e)}))}():e),(e=>{if("slow"===e)return function slowProd(){return Sk.misceval.iterFor(n,(e=>{r=Sk.abstr.numberBinOp(r,e,"Mult")}))}()}),(()=>r))},$flags:{FastCall:!0},$textsig:"($module, iterable, /, *, start=1)",$doc:"Calculate the product of all the elements in the input iterable. The default start value for the product is 1.\\n\\nWhen the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types."},pow:{$meth:function pow(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),0==n&&i<0)throw new Sk.builtin.ValueError("math domain error");if(1==n)return new Sk.builtin.float_(1);if(Number.isFinite(n)&&Number.isFinite(i)&&n<0&&!Number.isInteger(i))throw new Sk.builtin.ValueError("math domain error");if(-1==n&&(i==-1/0||i==1/0))return new Sk.builtin.float_(1);const r=Math.pow(n,i);if(!Number.isFinite(n)||!Number.isFinite(i))return new Sk.builtin.float_(r);if(r==1/0||r==-1/0)throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return x**y (x to the power of y)."},radians:{$meth:function radians(e){Sk.builtin.pyCheckType("deg","number",Sk.builtin.checkNumber(e));const t=Math.PI/180*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from degrees to radians."},remainder:{$meth:function remainder(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),isFinite(n)&&isFinite(i)){let e,t,r,u,l;if(0==i)throw new Sk.builtin.ValueError("math domain error");if(e=Math.abs(n),t=Math.abs(i),u=e%t,r=t-u,ur)l=-r;else{if(u!=r)throw new Sk.builtin.AssertionError;l=u-.5*(e-u)%t*2}return new Sk.builtin.float_(get_sign(n)*l)}if(isNaN(n))return e;if(isNaN(i))return t;if(n==1/0||n==-1/0)throw new Sk.builtin.ValueError("math domain error");if(i!=1/0&&i!=-1/0)throw new Sk.builtin.AssertionError;return new Sk.builtin.float_(n)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Difference between x and the closest integer multiple of y.\\n\\nReturn x - n*y where n*y is the closest integer multiple of y.\\nIn the case where x is exactly halfway between two multiples of\\ny, the nearest even value of n is used. The result is always exact."},sin:{$meth:function sin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.sin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the sine of x (measured in radians)."},sinh:{$meth:function sinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n-1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic sine of x."},sqrt:{$meth:function sqrt(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(t<0)throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(Math.sqrt(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the square root of x."},tan:{$meth:function tan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.tan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the tangent of x (measured in radians)."},tanh:{$meth:function tanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(0===t)return new Sk.builtin.float_(t);const n=Math.E,i=Math.pow(n,t),r=1/i,u=(i-r)/2/((i+r)/2);return new Sk.builtin.float_(u)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic tangent of x."},trunc:{$meth:function trunc(e){if(e.ob$type===i)return e.nb$int();const n=o(e,t.$trunc);if(void 0===n)throw new r(`type ${e.tp$name} doesn\'t define __trunc__ method`);return a(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Truncates the Real x to the nearest Integral toward 0.\\n\\nUses the __trunc__ magic method."}}),s};',"src/lib/mixiot/__init__.js":'var $builtinmodule=function(i){var n={__name__:new Sk.builtin.str("mixiot")};n.MixIO=Sk.misceval.buildClass(n,(function(i,n){n.__init__=new Sk.builtin.func((function(i,n,e,o,t,c,f){n=Sk.ffi.remapToJs(n),e=Sk.ffi.remapToJs(e),o=Sk.ffi.remapToJs(o),t=Sk.ffi.remapToJs(t),c=Sk.ffi.remapToJs(c),f=Sk.ffi.remapToJs(f),mixio_client=new MixIO(n,e,o,t,c,f)})),n.publish=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n),t=Sk.ffi.remapToJs(e);mixio_client.publish(o,t)})),n.subscribe=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n);if(!(e instanceof Sk.builtin.func))throw new Sk.builtin.TypeError("Callback given is not a function");var t=function pythonToJavascriptFunction(i,n){return function(){var e=Array.prototype.slice.call(arguments).map((function(i){return Sk.ffi.remapToPy(i)}));return"undefined"!=typeof n&&e.unshift(n),Sk.misceval.applyAsync(void 0,i,void 0,void 0,void 0,e).catch(Sk.uncaughtException)}}(e);mixio_client.subscribeAndSetCallback(o,t)})),n.unsubscribe=new Sk.builtin.func((function(i,n){var e=Sk.ffi.remapToJs(n);mixio_client.unsubscribe(e)})),n.disconnect=new Sk.builtin.func((function(i){mixio_client.disconnect()}))}),"MixIO",[]);n.MixIO_init_by_mixly_key=Sk.misceval.buildClass(n,(function(i,n){n.__init__=new Sk.builtin.func((function(i,n,e,o,t){n=Sk.ffi.remapToJs(n),e=Sk.ffi.remapToJs(e),mixiomixlyKey=Sk.ffi.remapToJs(o),t=Sk.ffi.remapToJs(t),mixio_client=MixIO.fromMixlyKey(n,e,o,t)})),n.publish=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n),t=Sk.ffi.remapToJs(e);mixio_client.publish(o,t)})),n.subscribe=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n);if(!(e instanceof Sk.builtin.func))throw new Sk.builtin.TypeError("Callback given is not a function");var t=function pythonToJavascriptFunction(i,n){return function(){var e=Array.prototype.slice.call(arguments).map((function(i){return Sk.ffi.remapToPy(i)}));return"undefined"!=typeof n&&e.unshift(n),Sk.misceval.applyAsync(void 0,i,void 0,void 0,void 0,e).catch(Sk.uncaughtException)}}(e);mixio_client.subscribeAndSetCallback(o,t)})),n.unsubscribe=new Sk.builtin.func((function(i,n){var e=Sk.ffi.remapToJs(n);mixio_client.unsubscribe(e)})),n.disconnect=new Sk.builtin.func((function(i){mixio_client.disconnect()}))}),"MixIO_init_by_mixly_key",[]);return n.MixIO_init_by_share_key=Sk.misceval.buildClass(n,(function(i,n){n.__init__=new Sk.builtin.func((function(i,n,e,o,t){n=Sk.ffi.remapToJs(n),e=Sk.ffi.remapToJs(e),mixiomixlyKey=Sk.ffi.remapToJs(o),t=Sk.ffi.remapToJs(t),mixio_client=MixIO.fromShareKey(n,e,o,t).then((i=>{console.log(i),mixio_client_sharekey=i})).catch((i=>{console.error("Failed to create MixIO from share key: ",i),sleep(1)}))})),n.publish=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n),t=Sk.ffi.remapToJs(e);mixio_client_sharekey.publish(o,t)})),n.subscribe=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n);if(!(e instanceof Sk.builtin.func))throw new Sk.builtin.TypeError("Callback given is not a function");var t=function pythonToJavascriptFunction(i,n){return function(){var e=Array.prototype.slice.call(arguments).map((function(i){return Sk.ffi.remapToPy(i)}));return"undefined"!=typeof n&&e.unshift(n),Sk.misceval.applyAsync(void 0,i,void 0,void 0,void 0,e).catch(Sk.uncaughtException)}}(e);mixio_client_sharekey.subscribeAndSetCallback(o,t)})),n.unsubscribe=new Sk.builtin.func((function(i,n){var e=Sk.ffi.remapToJs(n);mixio_client_sharekey.unsubscribe(e)})),n.disconnect=new Sk.builtin.func((function(i){mixio_client_sharekey.disconnect()}))}),"MixIO_init_by_share_key",[]),n};',"src/lib/operator.js":'function $builtinmodule(e){const{builtin:{str:t,tuple:a,list:r,int_:o,bool:n,TypeError:s,ValueError:i,none:{none$:m},NotImplemented:{NotImplemented$:d},abs:l,len:h,checkString:u,checkInt:c},abstr:{buildNativeClass:M,checkNoKwargs:b,checkArgsLen:g,checkOneArg:f,numberUnaryOp:p,numberBinOp:A,numberInplaceBinOp:k,objectGetItem:$,objectDelItem:_,objectSetItem:w,sequenceConcat:v,sequenceContains:x,sequenceGetCountOf:j,sequenceGetIndexOf:O,sequenceInPlaceConcat:I,typeName:S,lookupSpecial:y,gattr:q,setUpModuleMethods:R},misceval:{richCompareBool:B,asIndexOrThrow:N,chain:E,callsimArray:T,callsimOrSuspendArray:C,objectRepr:D},generic:{getAttr:G}}=Sk,L=["abs","add","and_","concat","contains","delitem","eq","floordiv","ge","getitem","gt","iadd","iand","iconcat","ifloordiv","ilshift","imatmul","imod","imul","index","inv","invert","ior","ipow","irshift","isub","itruediv","ixor","le","lshift","lt","matmul","mod","mul","ne","neg","not_","or_","pos","pow","rshift","setitem","sub","truediv","xor"],F=["attrgetter","countOf","indexOf","is_","is_not","itemgetter","length_hint","methodcaller","truth",...L].sort(),P={__name__:new t("operator"),__doc__:new t("Operator interface.\\n\\nThis module exports a set of functions implemented in javascript corresponding\\nto the intrinsic operators of Python. For example, operator.add(x, y)\\nis equivalent to the expression x+y. The function names are those\\nused for special methods; variants without leading and trailing\\n\'__\' are also provided for convenience."),__all__:new r(F.map((e=>new t(e))))};P.itemgetter=M("operator.itemgetter",{constructor:function itemgetter(e){this.items=e,this.oneitem=1===e.length,this.item=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new:(e,t)=>(b("itemgetter",t),g("itemgetter",e,1),new P.itemgetter(e)),tp$call(e,t){f("itemgetter",e,t);const r=e[0];return this.oneitem?$(r,this.item,!0):new a(this.items.map((e=>$(r,e))))},tp$doc:"Return a callable object that fetches the given item(s) from its operand.\\n After f = itemgetter(2), the call f(r) returns r[2].\\n After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.attrgetter=M("operator.attrgetter",{constructor:function attrgetter(e){this.attrs=e,this.oneattr=1===e.length,this.attr=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,a){b("attrgetter",a),g("attrgetter",e,1);const r=[];for(let o=0;onew t(e)))):r.push([a])}return new P.attrgetter(r)},tp$call(e,t){f("attrgetter",e,t);const r=e[0];if(this.oneattr)return this.attr.reduce(((e,t)=>q(e,t)),r);const o=this.attrs.map((e=>e.reduce(((e,t)=>q(e,t)),r)));return new a(o)},tp$doc:"attrgetter(attr, ...) --\\x3e attrgetter object\\n\\nReturn a callable object that fetches the given attribute(s) from its operand.\\nAfter f = attrgetter(\'name\'), the call f(r) returns r.name.\\nAfter g = attrgetter(\'name\', \'date\'), the call g(r) returns (r.name, r.date).\\nAfter h = attrgetter(\'name.first\', \'name.last\'), the call h(r) returns\\n(r.name.first, r.name.last).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.methodcaller=M("operator.methodcaller",{constructor:function methodcaller(e,t,a){this.$name=e,this.args=t,this.kwargs=a||[],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,t){g("methodcaller",e,1);const a=e[0];if(!u(a))throw new s("method name must be a string");return new P.methodcaller(a,e.slice(1),t)},tp$call(e,t){f("methodcaller",e,t);const a=e[0];return E(q(a,this.$name,!0),(e=>C(e,this.args,this.kwargs)))},tp$doc:"methodcaller(name, ...) --\\x3e methodcaller object\\n\\nReturn a callable object that calls the given method on its operand.\\nAfter f = methodcaller(\'name\'), the call f(r) returns r.name().\\nAfter g = methodcaller(\'name\', \'date\', foo=1), the call g(r) returns\\nr.name(\'date\', foo=1).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;let e=[D(this.$name)];e.push(...this.args.map((e=>D(e))));for(let t=0;tn(B(e,t,"Lt"))),sameAs("a < b")),le:makeModuleMethod(((e,t)=>n(B(e,t,"LtE"))),sameAs("a <= b")),eq:makeModuleMethod(((e,t)=>n(B(e,t,"Eq"))),sameAs("a == b")),ne:makeModuleMethod(((e,t)=>n(B(e,t,"NotEq"))),sameAs("a != b")),ge:makeModuleMethod(((e,t)=>n(B(e,t,"GtE"))),sameAs("a >= b")),gt:makeModuleMethod(((e,t)=>n(B(e,t,"Gt"))),sameAs("a > b")),not_:makeModuleMethod((e=>p(e,"Not")),sameAs("not a")),truth:makeModuleMethod((e=>n(e)),"Return True if a is true, False otherwise."),is_:makeModuleMethod(((e,t)=>n(B(e,t,"Is"))),sameAs("a is b")),is_not:makeModuleMethod(((e,t)=>n(B(e,t,"IsNot"))),sameAs("a is not b")),abs:makeModuleMethod((e=>l(e)),sameAs("abs(a)")),add:makeModuleMethod(((e,t)=>A(e,t,"Add")),sameAs("a + b")),and_:makeModuleMethod(((e,t)=>A(e,t,"BitAnd")),sameAs("a & b")),floordiv:makeModuleMethod(((e,t)=>A(e,t,"FloorDiv")),sameAs("a // b")),index:makeModuleMethod((e=>new o(N(e))),sameAs("a.__index__()")),inv:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),invert:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),lshift:makeModuleMethod(((e,t)=>A(e,t,"LShift")),sameAs("a << b")),mod:makeModuleMethod(((e,t)=>A(e,t,"Mod")),sameAs("a % b")),mul:makeModuleMethod(((e,t)=>A(e,t,"Mult")),sameAs("a * b")),matmul:makeModuleMethod(((e,t)=>A(e,t,"MatMult")),sameAs("a @ b")),neg:makeModuleMethod((e=>p(e,"USub")),sameAs("-a")),or_:makeModuleMethod(((e,t)=>A(e,t,"BitOr")),sameAs("a | b")),pos:makeModuleMethod((e=>p(e,"UAdd")),sameAs("+a")),pow:makeModuleMethod(((e,t)=>A(e,t,"Pow")),sameAs("a ** b")),rshift:makeModuleMethod(((e,t)=>A(e,t,"RShift")),sameAs("a >> b")),sub:makeModuleMethod(((e,t)=>A(e,t,"Sub")),sameAs("a - b")),truediv:makeModuleMethod(((e,t)=>A(e,t,"Div")),sameAs("a / b")),xor:makeModuleMethod(((e,t)=>A(e,t,"BitXor")),sameAs("a ^ b")),concat:makeModuleMethod(((e,t)=>v(e,t)),sameAs("a + b, for a and b sequences")),contains:makeModuleMethod(((e,t)=>E(x(e,t),n)),sameAs("b in a (note reversed operands)")),countOf:makeModuleMethod(((e,t)=>j(e,t)),"Return thenumber of times b occurs in a."),delitem:makeModuleMethod(((e,t)=>E(_(e,t,!0),(()=>m))),sameAs("del a[b]")),getitem:makeModuleMethod(((e,t)=>$(e,t,!0)),sameAs("a[b]")),indexOf:makeModuleMethod(((e,t)=>O(e,t)),"Return the first index of b in a"),setitem:makeModuleMethod(((e,t,a)=>E(w(e,t,a,!0),(()=>m))),sameAs("a[b] = c")),length_hint:{$meth:function length_hint(e,a){if(void 0===a)a=new o(0);else if(!c(a))throw new s("\'"+S(a)+"\' object cannot be interpreted as an integer");try{return h(e)}catch(m){if(!(m instanceof s))throw m}const r=y(e,t.$length_hint);if(void 0===r)return a;let n;try{n=T(r,[])}catch(m){if(!(m instanceof s))throw m;return a}if(n===d)return a;if(!c(n))throw new s("__length_hint__ must be an integer, not "+S(n));if(n.nb$isnegative())throw new i("__length_hint__() should return >= 0");return n},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, obj, default=0, /)",$doc:"Return an estimate of the number of items in obj.\\n\\nThis is useful for presizing containers when building from an iterable.\\n\\nIf the object supports len(), the result will be exact.\\nOtherwise, it may over- or under-estimate by an arbitrary amount.\\nThe result will be an integer >= 0."},iadd:makeModuleMethod(((e,t)=>k(e,t,"Add")),sameAs("a += b")),iand:makeModuleMethod(((e,t)=>k(e,t,"BitAnd")),sameAs("a &= b")),iconcat:makeModuleMethod(((e,t)=>I(e,t)),sameAs("a += b, for a and b sequences")),ifloordiv:makeModuleMethod(((e,t)=>k(e,t,"FloorDiv")),sameAs("a //= b")),ilshift:makeModuleMethod(((e,t)=>k(e,t,"LShift")),sameAs("a <<= b")),imod:makeModuleMethod(((e,t)=>k(e,t,"Mod")),sameAs("a %= b")),imul:makeModuleMethod(((e,t)=>k(e,t,"Mult")),sameAs("a *= b")),imatmul:makeModuleMethod(((e,t)=>k(e,t,"MatMult")),sameAs("a @= b")),ior:makeModuleMethod(((e,t)=>k(e,t,"BitOr")),sameAs("a |= b")),ipow:makeModuleMethod(((e,t)=>k(e,t,"Pow")),sameAs("a **= b")),irshift:makeModuleMethod(((e,t)=>k(e,t,"RShift")),sameAs("a >>= b")),isub:makeModuleMethod(((e,t)=>k(e,t,"Sub")),sameAs("a -= b")),itruediv:makeModuleMethod(((e,t)=>k(e,t,"Div")),sameAs("a /= b")),ixor:makeModuleMethod(((e,t)=>k(e,t,"BitXor")),sameAs("a ^= b"))}),L.forEach((e=>{P[`__${e.replace("_","")}__`]=P[e]})),P.div=P.truediv,P.__div__=P.div,P}',"src/lib/platform.js":'var $builtinmodule=function(n){var e={},i="undefined"!=typeof window&&"undefined"!=typeof window.navigator;return e.python_implementation=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("python_implementation",arguments.length,0,0),new Sk.builtin.str("Skulpt")})),e.node=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("node",arguments.length,0,0),new Sk.builtin.str("")})),e.version=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("version",arguments.length,0,0),new Sk.builtin.str("")})),e.python_version=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("python_version",arguments.length,0,0),n=Sk.__future__.python_version?"3.2.0":"2.7.0",new Sk.builtin.str(n)})),e.system=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("system",arguments.length,0,0),n=i?window.navigator.appCodeName:"",new Sk.builtin.str(n)})),e.machine=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("machine",arguments.length,0,0),n=i?window.navigator.platform:"",new Sk.builtin.str(n)})),e.release=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("release",arguments.length,0,0),n=i?window.navigator.appVersion:"",new Sk.builtin.str(n)})),e.architecture=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("architecture",arguments.length,0,0),new Sk.builtin.tuple([new Sk.builtin.str("64bit"),new Sk.builtin.str("")])})),e.processor=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("processor",arguments.length,0,0),new Sk.builtin.str("")})),e};',"src/lib/processing.js":'var $builtinmodule=function(n){var i,e,t,u,o,s,l,c={__name__:new Sk.builtin.str("processing")},r=[],v=!0,f=null;c.processing=null,c.p=null,c.X=new Sk.builtin.int_(0),c.Y=new Sk.builtin.int_(1),c.Z=new Sk.builtin.int_(2),c.R=new Sk.builtin.int_(3),c.G=new Sk.builtin.int_(4),c.B=new Sk.builtin.int_(5),c.A=new Sk.builtin.int_(6),c.U=new Sk.builtin.int_(7),c.V=new Sk.builtin.int_(8),c.NX=new Sk.builtin.int_(9),c.NY=new Sk.builtin.int_(10),c.NZ=new Sk.builtin.int_(11),c.EDGE=new Sk.builtin.int_(12),c.SR=new Sk.builtin.int_(13),c.SG=new Sk.builtin.int_(14),c.SB=new Sk.builtin.int_(15),c.SA=new Sk.builtin.int_(16),c.SW=new Sk.builtin.int_(17),c.TX=new Sk.builtin.int_(18),c.TY=new Sk.builtin.int_(19),c.TZ=new Sk.builtin.int_(20),c.VX=new Sk.builtin.int_(21),c.VY=new Sk.builtin.int_(22),c.VZ=new Sk.builtin.int_(23),c.VW=new Sk.builtin.int_(24),c.AR=new Sk.builtin.int_(25),c.AG=new Sk.builtin.int_(26),c.AB=new Sk.builtin.int_(27),c.DR=new Sk.builtin.int_(3),c.DG=new Sk.builtin.int_(4),c.DB=new Sk.builtin.int_(5),c.DA=new Sk.builtin.int_(6),c.SPR=new Sk.builtin.int_(28),c.SPG=new Sk.builtin.int_(29),c.SPB=new Sk.builtin.int_(30),c.SHINE=new Sk.builtin.int_(31),c.ER=new Sk.builtin.int_(32),c.EG=new Sk.builtin.int_(33),c.EB=new Sk.builtin.int_(34),c.BEEN_LIT=new Sk.builtin.int_(35),c.VERTEX_FIELD_COUNT=new Sk.builtin.int_(36),c.CENTER=new Sk.builtin.int_(3),c.RADIUS=new Sk.builtin.int_(2),c.CORNERS=new Sk.builtin.int_(1),c.CORNER=new Sk.builtin.int_(0),c.DIAMETER=new Sk.builtin.int_(3),c.BASELINE=new Sk.builtin.int_(0),c.TOP=new Sk.builtin.int_(101),c.BOTTOM=new Sk.builtin.int_(102),c.NORMAL=new Sk.builtin.int_(1),c.NORMALIZED=new Sk.builtin.int_(1),c.IMAGE=new Sk.builtin.int_(2),c.MODEL=new Sk.builtin.int_(4),c.SHAPE=new Sk.builtin.int_(5),c.AMBIENT=new Sk.builtin.int_(0),c.DIRECTIONAL=new Sk.builtin.int_(1),c.SPOT=new Sk.builtin.int_(3),c.RGB=new Sk.builtin.int_(1),c.ARGB=new Sk.builtin.int_(2),c.HSB=new Sk.builtin.int_(3),c.ALPHA=new Sk.builtin.int_(4),c.CMYK=new Sk.builtin.int_(5),c.TIFF=new Sk.builtin.int_(0),c.TARGA=new Sk.builtin.int_(1),c.JPEG=new Sk.builtin.int_(2),c.GIF=new Sk.builtin.int_(3),c.MITER=new Sk.builtin.str("miter"),c.BEVEL=new Sk.builtin.str("bevel"),c.ROUND=new Sk.builtin.str("round"),c.SQUARE=new Sk.builtin.str("butt"),c.PROJECT=new Sk.builtin.str("square"),c.P2D=new Sk.builtin.int_(1),c.JAVA2D=new Sk.builtin.int_(1),c.WEBGL=new Sk.builtin.int_(2),c.P3D=new Sk.builtin.int_(2),c.OPENGL=new Sk.builtin.int_(2),c.PDF=new Sk.builtin.int_(0),c.DXF=new Sk.builtin.int_(0),c.OTHER=new Sk.builtin.int_(0),c.WINDOWS=new Sk.builtin.int_(1),c.MAXOSX=new Sk.builtin.int_(2),c.LINUX=new Sk.builtin.int_(3),c.EPSILON=new Sk.builtin.float_(1e-4),c.MAX_FLOAT=new Sk.builtin.float_(34028235e31),c.MIN_FLOAT=new Sk.builtin.float_(-34028235e31),c.MAX_INT=new Sk.builtin.int_(2147483647),c.MIN_INT=new Sk.builtin.int_(-2147483648),c.HALF_PI=new Sk.builtin.float_(Math.PI/2),c.THIRD_PI=new Sk.builtin.float_(Math.PI/3),c.PI=new Sk.builtin.float_(Math.PI),c.TWO_PI=new Sk.builtin.float_(2*Math.PI),c.TAU=new Sk.builtin.float_(2*Math.PI),c.QUARTER_PI=new Sk.builtin.float_(Math.PI/4),c.DEG_TO_RAD=new Sk.builtin.float_(Math.PI/180),c.RAD_TO_DEG=new Sk.builtin.float_(180/Math.PI),c.WHITESPACE=new Sk.builtin.str(" \\t\\n\\r\\f "),c.POINT=new Sk.builtin.int_(2),c.POINTS=new Sk.builtin.int_(2),c.LINE=new Sk.builtin.int_(4),c.LINES=new Sk.builtin.int_(4),c.TRIANGLE=new Sk.builtin.int_(8),c.TRIANGLES=new Sk.builtin.int_(9),c.TRIANGLE_FAN=new Sk.builtin.int_(11),c.TRIANGLE_STRIP=new Sk.builtin.int_(10),c.QUAD=new Sk.builtin.int_(16),c.QUADS=new Sk.builtin.int_(16),c.QUAD_STRIP=new Sk.builtin.int_(17),c.POLYGON=new Sk.builtin.int_(20),c.PATH=new Sk.builtin.int_(21),c.RECT=new Sk.builtin.int_(30),c.ELLIPSE=new Sk.builtin.int_(31),c.ARC=new Sk.builtin.int_(32),c.SPHERE=new Sk.builtin.int_(40),c.BOX=new Sk.builtin.int_(41),c.GROUP=new Sk.builtin.int_(0),c.PRIMITIVE=new Sk.builtin.int_(1),c.GEOMETRY=new Sk.builtin.int_(3),c.VERTEX=new Sk.builtin.int_(0),c.BEZIER_VERTEX=new Sk.builtin.int_(1),c.CURVE_VERTEX=new Sk.builtin.int_(2),c.BREAK=new Sk.builtin.int_(3),c.CLOSESHAPE=new Sk.builtin.int_(4),c.REPLACE=new Sk.builtin.int_(0),c.BLEND=new Sk.builtin.int_(1),c.ADD=new Sk.builtin.int_(2),c.SUBTRACT=new Sk.builtin.int_(4),c.LIGHTEST=new Sk.builtin.int_(8),c.DARKEST=new Sk.builtin.int_(16),c.DIFFERENCE=new Sk.builtin.int_(32),c.EXCLUSION=new Sk.builtin.int_(64),c.MULTIPLY=new Sk.builtin.int_(128),c.SCREEN=new Sk.builtin.int_(256),c.OVERLAY=new Sk.builtin.int_(512),c.HARD_LIGHT=new Sk.builtin.int_(1024),c.SOFT_LIGHT=new Sk.builtin.int_(2048),c.DODGE=new Sk.builtin.int_(4096),c.BURN=new Sk.builtin.int_(8192),c.ALPHA_MASK=new Sk.builtin.int_(4278190080),c.RED_MASK=new Sk.builtin.int_(16711680),c.GREEN_MASK=new Sk.builtin.int_(65280),c.BLUE_MASK=new Sk.builtin.int_(255),c.CUSTOM=new Sk.builtin.int_(0),c.ORTHOGRAPHIC=new Sk.builtin.int_(2),c.PERSPECTIVE=new Sk.builtin.int_(3),c.ARROW=new Sk.builtin.str("default"),c.CROSS=new Sk.builtin.str("crosshair"),c.HAND=new Sk.builtin.str("pointer"),c.MOVE=new Sk.builtin.str("move"),c.TEXT=new Sk.builtin.str("text"),c.WAIT=new Sk.builtin.str("wait"),c.NOCURSOR=Sk.builtin.assk$("url(\'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\'), auto"),c.DISABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(1),c.ENABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(-1),c.ENABLE_OPENGL_4X_SMOOTH=new Sk.builtin.int_(2),c.ENABLE_NATIVE_FONTS=new Sk.builtin.int_(3),c.DISABLE_DEPTH_TEST=new Sk.builtin.int_(4),c.ENABLE_DEPTH_TEST=new Sk.builtin.int_(-4),c.ENABLE_DEPTH_SORT=new Sk.builtin.int_(5),c.DISABLE_DEPTH_SORT=new Sk.builtin.int_(-5),c.DISABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(6),c.ENABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(-6),c.ENABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(7),c.DISABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(-7),c.HINT_COUNT=new Sk.builtin.int_(10),c.OPEN=new Sk.builtin.int_(1),c.CLOSE=new Sk.builtin.int_(2),c.BLUR=new Sk.builtin.int_(11),c.GRAY=new Sk.builtin.int_(12),c.INVERT=new Sk.builtin.int_(13),c.OPAQUE=new Sk.builtin.int_(14),c.POSTERIZE=new Sk.builtin.int_(15),c.THRESHOLD=new Sk.builtin.int_(16),c.ERODE=new Sk.builtin.int_(17),c.DILATE=new Sk.builtin.int_(18),c.BACKSPACE=new Sk.builtin.int_(8),c.TAB=new Sk.builtin.int_(9),c.ENTER=new Sk.builtin.int_(10),c.RETURN=new Sk.builtin.int_(13),c.ESC=new Sk.builtin.int_(27),c.DELETE=new Sk.builtin.int_(127),c.CODED=new Sk.builtin.int_(65535),c.SHIFT=new Sk.builtin.int_(16),c.CONTROL=new Sk.builtin.int_(17),c.ALT=new Sk.builtin.int_(18),c.CAPSLK=new Sk.builtin.int_(20),c.PGUP=new Sk.builtin.int_(33),c.PGDN=new Sk.builtin.int_(34),c.END=new Sk.builtin.int_(35),c.HOME=new Sk.builtin.int_(36),c.LEFT=new Sk.builtin.int_(37),c.UP=new Sk.builtin.int_(38),c.RIGHT=new Sk.builtin.int_(39),c.DOWN=new Sk.builtin.int_(40),c.F1=new Sk.builtin.int_(112),c.F2=new Sk.builtin.int_(113),c.F3=new Sk.builtin.int_(114),c.F4=new Sk.builtin.int_(115),c.F5=new Sk.builtin.int_(116),c.F6=new Sk.builtin.int_(117),c.F7=new Sk.builtin.int_(118),c.F8=new Sk.builtin.int_(119),c.F9=new Sk.builtin.int_(120),c.F10=new Sk.builtin.int_(121),c.F11=new Sk.builtin.int_(122),c.F12=new Sk.builtin.int_(123),c.NUMLK=new Sk.builtin.int_(144),c.META=new Sk.builtin.int_(157),c.INSERT=new Sk.builtin.int_(155),c.SINCOS_LENGTH=new Sk.builtin.int_(720),c.PRECISIONB=new Sk.builtin.int_(15),c.PRECISIONF=new Sk.builtin.int_(32768),c.PREC_MAXVAL=new Sk.builtin.int_(32767),c.PREC_ALPHA_SHIFT=new Sk.builtin.int_(9),c.PREC_RED_SHIFT=new Sk.builtin.int_(1),c.NORMAL_MODE_AUTO=new Sk.builtin.int_(0),c.NORMAL_MODE_SHAPE=new Sk.builtin.int_(1),c.NORMAL_MODE_VERTEX=new Sk.builtin.int_(2),c.MAX_LIGHTS=new Sk.builtin.int_(8),c.line=new Sk.builtin.func((function(n,i,e,t){c.processing.line(n.v,i.v,e.v,t.v)})),c.ellipse=new Sk.builtin.func((function(n,i,e,t){c.processing.ellipse(n.v,i.v,e.v,t.v)})),c.circle=new Sk.builtin.func((function(n,i,e){c.processing.ellipse(n.v,i.v,e.v,e.v)})),c.text=new Sk.builtin.func((function(n,i,e){c.processing.text(n.v,i.v,e.v)})),c.point=new Sk.builtin.func((function(n,i){c.processing.point(n.v,i.v)})),c.arc=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.arc(n.v,i.v,e.v,t.v,u.v,o.v)})),c.quad=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.quad(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.rect=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof u?c.processing.rect(n.v,i.v,e.v,t.v):c.processing.rect(n.v,i.v,e.v,t.v,u.v)})),c.triangle=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.triangle(n.v,i.v,e.v,t.v,u.v,o.v)})),c.bezier=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.alpha=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.alpha(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.alpha(n.v,i.v)):new Sk.builtin.float_(c.processing.alpha(n.v,i.v,e.v))})),c.ambient=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.ambient(n.v):"undefined"==typeof e?c.processing.ambient(n.v,i.v):c.processing.ambient(n.v,i.v,e.v)})),c.ambientLight=new Sk.builtin.func((function(n,i,e,t,u,o){"undefined"==typeof t?c.processing.ambientLight(n.v,i.v,e.v):"undefined"==typeof u?c.processing.ambientLight(n.v,i.v,e.v,t.v):"undefined"==typeof o?c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v):c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.beginCamera=new Sk.builtin.func((function(){c.processing.beginCamera()})),c.beginShape=new Sk.builtin.func((function(n){"undefined"==typeof n&&(n=c.POLYGON),c.processing.beginShape(n.v)})),c.bezierDetail=new Sk.builtin.func((function(n){n="undefined"!=typeof n?n.v:20,c.processing.bezierDetail(n)})),c.bezierPoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierPoint(n.v,i.v,e.v,t.v,u.v)})),c.bezierTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierTangent(n.v,i.v,e.v,t.v,u.v)})),c.bezierVertex=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof s?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v):"undefined"==typeof l?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v):"undefined"==typeof r?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.blend=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v)})),c.blendColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.blendColor(n.v,i.v,e.v),t})),c.brightness=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.brightness(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.brightness(n.v,i.v)):new Sk.builtin.float_(c.processing.brightness(n.v,i.v,e.v))})),c.camera=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof n?c.processing.camera():c.processing.camera(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.constrain=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.constrain(n.v,i.v,e.v))})),c.copy=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.createFont=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PFont);return u.v="undefined"==typeof e?c.processing.createFont(n.v,i.v):"undefined"==typeof t?c.processing.createFont(n.v,i.v,e.v):c.processing.createFont(n.v,i.v,e.v,t.v),u})),c.createGraphics=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PGraphics);return u.v="undefined"==typeof t?c.processing.createGraphics(n.v,i.v,e.v):c.processing.createGraphics(n.v,i.v,e.v,t.v),u})),c.createImage=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.PImage);return t.v=c.processing.createImage(n.v,i.v,e.v),t})),c.cursor=new Sk.builtin.func((function(n,i,e){"undefined"==typeof n?c.processing.cursor():"undefined"==typeof i?c.processing.cursor(n.v):"undefined"==typeof e?c.processing.cursor(n.v,i.v):c.processing.cursor(n.v,i.v,e.v)})),c.curve=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):"undefined"==typeof v?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):"undefined"==typeof f?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v):"undefined"==typeof S?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v):c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.curveDetail=new Sk.builtin.func((function(n){c.processing.curveDetail(n.v)})),c.curvePoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curvePoint(n.v,i.v,e.v,t.v,u.v)})),c.curveTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curveTangent(n.v,i.v,e.v,t.v,u.v)})),c.curveTightness=new Sk.builtin.func((function(n){c.processing.curveTightness(n.v)})),c.curveVertex=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e?c.processing.curveVertex(n.v,i.v):c.processing.curveVertex(n.v,i.v,e.v)})),c.day=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.day())})),c.degrees=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.degrees(n.v))})),c.directionalLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.directionalLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.dist=new Sk.builtin.func((function(n,i,e,t,u,o){return"undefined"==typeof u?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v)):"undefined"==typeof o?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v)):new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v,o.v))})),c.emissive=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.emissive(n.v):"undefined"==typeof e?c.processing.emissive(n.v,i.v):c.processing.emissive(n.v,i.v,e.v)})),c.endCamera=new Sk.builtin.func((function(){c.processing.endCamera()})),c.endShape=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.endShape():c.processing.endShape(n.v)})),c.filter=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.filter(n.v):c.processing.filter(n.v,i.v)})),c.frustum=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.frustum(n,i,e,t,u,o)})),c.hint=new Sk.builtin.func((function(n){c.processing.hint(n)})),c.hour=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.hour())})),c.hue=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.hue(n.v))})),c.imageMode=new Sk.builtin.func((function(n){c.processing.imageMode(n.v)})),c.lerp=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.lerp(n.v,i.v,e.v))})),c.lerpColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.lerpColor(n.v,i.v,e.v),t})),c.lightFalloff=new Sk.builtin.func((function(n,i,e){c.processing.lightFalloff(n.v,i.v,e.v)})),c.lights=new Sk.builtin.func((function(){c.processing.lights()})),c.lightSpecular=new Sk.builtin.func((function(n,i,e){c.processing.lightSpecular(n.v,i.v,e.v)})),c.loadBytes=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadBytes(n.v))})),c.loadFont=new Sk.builtin.func((function(n){var i=Sk.misceval.callsimArray(c.PFont);return i.v=c.processing.loadFont(n.v),i})),c.loadShape=new Sk.builtin.func((function(n){return Sk.misceval.callsimArray(c.PShapeSVG,[new Sk.builtin.str("string"),n])})),c.loadStrings=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadStrings(n.v))})),c.mag=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof e?new Sk.builtin.float_(c.processing.mag(n.v,i.v)):new Sk.builtin.float_(c.processing.mag(n.v,i.v,e.v))})),c.map=new Sk.builtin.func((function(n,i,e,t,u){return new Sk.builtin.float_(c.processing.map(n.v,i.v,e.v,t.v,u.v))})),c.millis=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.millis())})),c.minute=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.minute())})),c.modelX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelX(n.v,i.v,e.v))})),c.modelY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelY(n.v,i.v,e.v))})),c.modelZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelZ(n.v,i.v,e.v))})),c.month=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.month())})),c.noCursor=new Sk.builtin.func((function(){c.processing.noCursor()})),c.noise=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.noise(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.noise(n.v,i.v)):new Sk.builtin.float_(c.processing.noise(n.v,i.v,e.v))})),c.noiseDetail=new Sk.builtin.func((function(n,i){c.processing.noiseDetail(n.v,i.v)})),c.noiseSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.noiseSeed(n.v))})),c.noLights=new Sk.builtin.func((function(){c.processing.noLights()})),c.norm=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.norm(n.v,i.v,e.v))})),c.normal=new Sk.builtin.func((function(n,i,e){c.processing.normal(n.v,i.v,e.v)})),c.noTint=new Sk.builtin.func((function(){c.processing.noTint()})),c.ortho=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.ortho(n.v,i.v,e.v,t.v,u.v,o.v)})),c.perspective=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof n?c.processing.perspective():"undefined"==typeof i?c.processing.perspective(n.v):"undefined"==typeof e?c.processing.perspective(n.v,i.v):"undefined"==typeof t?c.processing.perspective(n.v,i.v,e.v):c.processing.perspective(n.v,i.v,e.v,t.v)})),c.pointLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.pointLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.printCamera=new Sk.builtin.func((function(){c.processing.printCamera()})),c.println=new Sk.builtin.func((function(n){c.processing.println(n.v)})),c.printProjection=new Sk.builtin.func((function(){c.processing.printProjection()})),c.radians=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.radians(n.v))})),c.randomSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.randomSeed(n.v))})),c.random=new Sk.builtin.func((function(n,i){return"undefined"==typeof n?new Sk.builtin.float_(c.processing.random()):"undefined"==typeof i?new Sk.builtin.float_(c.processing.random(n.v)):new Sk.builtin.float_(c.processing.random(n.v,i.v))})),c.requestImage=new Sk.builtin.func((function(n,i){var e=Sk.misceval.callsimArray(c.PImage);return e.v="undefined"==typeof i?c.processing.requestImage(n.v):c.processing.requestImage(n.v,i.v),e})),c.saturation=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.saturation(n.v))})),c.save=new Sk.builtin.func((function(n){c.processing.save(n.v)})),c.saveFrame=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.saveFrame():c.processing.saveFrame(n.v)})),c.saveStrings=new Sk.builtin.func((function(n,i){c.processing.saveStrings(n.v,i.v)})),c.screenX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenX(n.v,i.v,e.v))})),c.screenY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenY(n.v,i.v,e.v))})),c.screenZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenZ(n.v,i.v,e.v))})),c.second=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.second())})),c.shape=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof i?c.processing.shape(n.v):"undefined"==typeof e?c.processing.shape(n.v,i.v):"undefined"==typeof t?c.processing.shape(n.v,i.v,e.v):"undefined"==typeof u?c.processing.shape(n.v,i.v,e.v,t.v):c.processing.shape(n.v,i.v,e.v,t.v,u.v)})),c.shapeMode=new Sk.builtin.func((function(n){c.processing.shapeMode(n.v)})),c.shininess=new Sk.builtin.func((function(n){c.processing.shininess(n.v)})),c.specular=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.specular(n.v):"undefined"==typeof e?c.processing.specular(n.v,i.v):c.processing.specular(n.v,i.v,e.v)})),c.spotLight=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.spotLight(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.sq=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.sq(n))})),c.status=new Sk.builtin.func((function(n){c.processing.status(n.v)})),c.textAlign=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textAlign(n.v):c.processing.textAlign(n.v,i.v)})),c.textAscent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textAscent())})),c.textDescent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textDescent())})),c.textFont=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textFont(n.v):c.processing.textFont(n.v,i.v)})),c.textLeading=new Sk.builtin.func((function(n){c.processing.textLeading(n.v)})),c.textMode=new Sk.builtin.func((function(n){c.processing.textMode(n.v)})),c.textSize=new Sk.builtin.func((function(n){c.processing.textSize(n.v)})),c.texture=new Sk.builtin.func((function(n){c.processing.texture(n.v)})),c.textureMode=new Sk.builtin.func((function(n){c.processing.textureMode(n.v)})),c.textWidth=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.textWidth(n.v))})),c.tint=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof i?c.processing.tint(n.v):"undefined"==typeof e?c.processing.tint(n.v,i.v):"undefined"==typeof t?c.processing.tint(n.v,i.v,e.v):c.processing.tint(n.v,i.v,e.v,t.v)})),c.updatePixels=new Sk.builtin.func((function(){c.processing.updatePixels()})),c.vertex=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof e?c.processing.vertex(n.v,i.v):"undefined"==typeof t?c.processing.vertex(n.v,i.v,e.v):"undefined"==typeof u?c.processing.vertex(n.v,i.v,e.v,t.v):c.processing.vertex(n.v,i.v,e.v,t.v,u.v)})),c.year=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.year())})),c.box=new Sk.builtin.func((function(n){c.processing.box(n.v)})),c.sphere=new Sk.builtin.func((function(n){c.processing.sphere(n.v)})),c.sphereDetail=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.sphereDetail(n.v):c.processing.sphereDetail(n.v,i.v)})),c.background=new Sk.builtin.func((function(n,i,e){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),c.processing.background(n.v,i,e)})),c.fill=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.fill(n.v,i,e,t)})),c.stroke=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.stroke(n.v,i,e,t)})),c.noStroke=new Sk.builtin.func((function(){c.processing.noStroke()})),c.colorMode=new Sk.builtin.func((function(n,i,e,t,u){i="undefined"==typeof i?255:i.v,"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),"undefined"!=typeof u&&(u=u.v),c.processing.colorMode(n.v,i,e,t,u)})),c.noFill=new Sk.builtin.func((function(){c.processing.noFill()})),c.loop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("loop() should be called after run()");v=!0,c.processing.loop()})),c.noLoop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("noLoop() should be called after run()");v=!1,c.processing.noLoop()})),c.frameRate=new Sk.builtin.func((function(n){c.processing.frameRate(n.v)})),c.width=new Sk.builtin.int_(0),c.height=new Sk.builtin.int_(0),c.renderMode=c.P2D,c.size=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e&&(e=c.P2D),c.processing.size(n.v,i.v,e.v),c.width=new Sk.builtin.int_(c.processing.width),c.height=new Sk.builtin.int_(c.processing.height),c.renderMode=e})),c.exitp=new Sk.builtin.func((function(){c.processing.exit()})),c.mouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseX)})),c.mouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseY)})),c.pmouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseX)})),c.pmouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseY)})),c.rectMode=new Sk.builtin.func((function(n){c.processing.rectMode(n.v)})),c.strokeWeight=new Sk.builtin.func((function(n){c.processing.strokeWeight(n.v)})),c.smooth=new Sk.builtin.func((function(){c.processing.smooth()})),c.noSmooth=new Sk.builtin.func((function(){c.processing.noSmooth()})),c.ellipseMode=new Sk.builtin.func((function(n){c.processing.ellipseMode(n.v)})),c.strokeCap=new Sk.builtin.func((function(n){c.processing.strokeCap(n.v)})),c.strokeJoin=new Sk.builtin.func((function(n){c.processing.strokeJoin(n.v)})),c.rotate=new Sk.builtin.func((function(n){c.processing.rotate(n.v)})),c.rotateX=new Sk.builtin.func((function(n){c.processing.rotateX(n.v)})),c.rotateY=new Sk.builtin.func((function(n){c.processing.rotateY(n.v)})),c.rotateZ=new Sk.builtin.func((function(n){c.processing.rotateZ(n.v)})),c.scale=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.scale(n.v,i,e)})),c.translate=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.translate(n.v,i,e)})),c.popMatrix=new Sk.builtin.func((function(){c.processing.popMatrix()})),c.pushMatrix=new Sk.builtin.func((function(){c.processing.pushMatrix()})),c.applyMatrix=new Sk.builtin.func((function(){var n,i=Array.prototype.slice.call(arguments,0,16);for(n=0;n>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&n)>>>16)<<16)+1812433253*(65535&n)+this.mti,this.mt[this.mti]>>>=0},MersenneTwister.prototype.init_by_array=function(n,t){var i,e,r;for(this.init_genrand(19650218),i=1,e=0,r=this.N>t?this.N:t;r;r--){var u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1664525*((4294901760&u)>>>16)<<16)+1664525*(65535&u))+n[e]+e,this.mt[i]>>>=0,e++,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),e>=t&&(e=0)}for(r=this.N-1;r;r--){u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1566083941*((4294901760&u)>>>16)<<16)+1566083941*(65535&u))-i,this.mt[i]>>>=0,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},MersenneTwister.prototype.genrand_int32=function(){var n,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&n];for(;i>>1^t[1&n];n=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^n>>>1^t[1&n],this.mti=0}return n=this.mt[this.mti++],n^=n>>>11,n^=n<<7&2636928640,n^=n<<15&4022730752,(n^=n>>>18)>>>0},MersenneTwister.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},MersenneTwister.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},MersenneTwister.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},MersenneTwister.prototype.genrand_res53=function(){return(67108864*(this.genrand_int32()>>>5)+(this.genrand_int32()>>>6))*(1/9007199254740992)};var $builtinmodule=function(n){var t={},i=new MersenneTwister,e=void 0;t.seed=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("seed",arguments.length,0,1),n=Sk.builtin.asnum$(n),i=arguments.length>0?new MersenneTwister(n):new MersenneTwister,Sk.builtin.none.none$})),t.random=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("random",arguments.length,0,0),new Sk.builtin.float_(i.genrand_res53())}));var toInt=function(n){return 0|n},randrange=function(n,t,e){var r,u,s;if(!Sk.builtin.checkInt(n))throw new Sk.builtin.ValueError("non-integer first argument for randrange()");if(void 0===t)return s=toInt(i.genrand_res53()*n),new Sk.builtin.int_(s);if(!Sk.builtin.checkInt(t))throw new Sk.builtin.ValueError("non-integer stop for randrange()");if(void 0===e&&(e=1),r=t-n,1==e&&r>0)return s=n+toInt(i.genrand_res53()*r),new Sk.builtin.int_(s);if(1==e)throw new Sk.builtin.ValueError("empty range for randrange() ("+n+", "+t+", "+r+")");if(!Sk.builtin.checkInt(e))throw new Sk.builtin.ValueError("non-integer step for randrange()");if(e>0)u=toInt((r+e-1)/e);else{if(!(e<0))throw new Sk.builtin.ValueError("zero step for randrange()");u=toInt((r+e+1)/e)}if(u<=0)throw new Sk.builtin.ValueError("empty range for randrange()");return s=n+e*toInt(i.genrand_res53()*u),new Sk.builtin.int_(s)};t.randint=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("randint",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),randrange(n,t+1)})),t.randrange=new Sk.builtin.func((function(n,t,i){return Sk.builtin.pyCheckArgsLen("randrange",arguments.length,1,3),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),randrange(n,t,i)})),t.uniform=new Sk.builtin.func((function(n,t){Sk.builtin.pyCheckArgsLen("uniform",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t);const e=n+i.genrand_res53()*(t-n);return new Sk.builtin.float_(e)})),t.triangular=new Sk.builtin.func((function(n,t,e){var r,u,s;return Sk.builtin.pyCheckArgsLen("triangular",arguments.length,2,3),Sk.builtin.pyCheckType("low","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("high","number",Sk.builtin.checkNumber(t)),(n=Sk.builtin.asnum$(n))>(t=Sk.builtin.asnum$(t))&&(s=n,n=t,t=s),void 0===e||e===Sk.builtin.none.none$?e=(t-n)/2:(Sk.builtin.pyCheckType("mode","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e)),u=(r=i.genrand_res53())<(e-n)/(t-n)?n+Math.sqrt(r*(t-n)*(e-n)):t-Math.sqrt((1-r)*(t-n)*(t-e)),new Sk.builtin.float_(u)}));var normalSample=function(n,t){var r,u,s,h,l;return void 0!==e?(l=e,e=void 0):(r=i.genrand_res53(),u=i.genrand_res53(),s=Math.sqrt(-2*Math.log(r)),h=2*Math.PI*u,l=s*Math.cos(h),e=s*Math.sin(h)),n+t*l};return t.gauss=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("gauss",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(normalSample(n,t))})),t.normalvariate=t.gauss,t.lognormvariate=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("lognormvariate",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(Math.exp(normalSample(n,t)))})),t.expovariate=new Sk.builtin.func((function(n){Sk.builtin.pyCheckArgsLen("expovariate",arguments.length,1,1),Sk.builtin.pyCheckType("lambd","number",Sk.builtin.checkNumber(n)),n=Sk.builtin.asnum$(n);var t=i.genrand_res53();return new Sk.builtin.float_(-Math.log(t)/n)})),t.choice=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("choice",arguments.length,1,1),Sk.builtin.pyCheckType("seq","sequence",Sk.builtin.checkSequence(n)),void 0!==n.sq$length){var t=new Sk.builtin.int_(toInt(i.genrand_res53()*n.sq$length()));return n.mp$subscript(t)}throw new Sk.builtin.TypeError("object has no length")})),t.shuffle=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("shuffle",arguments.length,1,1),Sk.builtin.pyCheckType("x","sequence",Sk.builtin.checkSequence(n)),n.constructor===Sk.builtin.list){const u=n.v;for(var t=u.length-1;t>0;t-=1){var e=u[r=toInt(i.genrand_res53()*(t+1))];u[r]=u[t],u[t]=e}}else{if(void 0===n.sq$length)throw new Sk.builtin.TypeError("object has no length");if(void 0===n.mp$ass_subscript)throw new Sk.builtin.TypeError("object is immutable");for(t=n.sq$length()-1;t>0;t-=1){var r=new Sk.builtin.int_(toInt(i.genrand_res53()*(t+1)));t=new Sk.builtin.int_(t);e=n.mp$subscript(r);n.mp$ass_subscript(r,n.mp$subscript(t)),n.mp$ass_subscript(t,e)}}return Sk.builtin.none.none$})),t.sample=new Sk.builtin.func((function(n,t){var e,r,u,s,h;for(Sk.builtin.pyCheckArgsLen("sample",arguments.length,2,2),Sk.builtin.pyCheckType("population","iterable",Sk.builtin.checkIterable(n)),Sk.builtin.pyCheckType("k","integer",Sk.builtin.checkInt(t)),t=Sk.builtin.asnum$(t),h=[],e=0,s=(u=Sk.abstr.iter(n)).tp$iternext();void 0!==s;e++,s=u.tp$iternext())r=Math.floor(i.genrand_res53()*(e+1)),enew pyStr(e))))},_value2member={},RegexFlagMeta=buildNativeClass("RegexFlagMeta",{constructor:function RegexFlagMeta(){},base:pyType,slots:{tp$iter(){const e=Object.values(_members)[Symbol.iterator]();return new pyIterator((()=>e.next().value))},sq$contains(e){if(!(e instanceof this))throw new TypeError("unsupported operand type(s) for \'in\': \'"+typeName(e)+"\' and \'"+typeName(this)+"\'");return Object.values(_members).includes(e)}}});re.RegexFlag=buildNativeClass("RegexFlag",{meta:RegexFlagMeta,base:pyInt,constructor:function RegexFlag(e){const t=_value2member[e];if(t)return t;this.v=e,_value2member[e]=this},slots:{tp$new(e,t){checkOneArg("RegexFlag",e,t);const r=e[0].valueOf();if(!checkInt(r))throw new ValueError(objectRepr(r)+" is not a valid RegexFlag");return new re.RegexFlag(r)},$r(){let e=this.valueOf();const t=e<0;e=t?~e:e;const r=[];Object.entries(_members).forEach((([t,n])=>{const s=n.valueOf();e&s&&(e&=~s,r.push("re."+t))})),e&&r.push(hex(e).toString());let n=r.join("|");return t&&(n=r.length>1?"~("+n+")":"~"+n),new pyStr(n)},sq$contains(e){if(!(e instanceof re.RegexFlag))throw new TypeError("\'in\' requires a RegexFlag not "+typeName(e));return this.nb$and(e)===e},nb$and:flagBitSlot(((e,t)=>e&t),JSBI.bitwiseAnd),nb$or:flagBitSlot(((e,t)=>e|t),JSBI.bitwiseOr),nb$xor:flagBitSlot(((e,t)=>e^t),JSBI.bitwiseXor),nb$invert:function(){const e=this.v;return"number"==typeof e?new re.RegexFlag(~e):new re.RegexFlag(JSBI.bitwiseNot(e))}},proto:{valueOf(){return this.v}},flags:{sk$acceptable_as_base_class:!1}}),re.TEMPLATE=re.T=new re.RegexFlag(1),re.IGNORECASE=re.I=new re.RegexFlag(2),re.LOCALE=re.L=new re.RegexFlag(4),re.MULTILINE=re.M=new re.RegexFlag(8),re.DOTALL=re.S=new re.RegexFlag(16),re.UNICODE=re.U=new re.RegexFlag(32),re.VERBOSE=re.X=new re.RegexFlag(64),re.DEBUG=new re.RegexFlag(128),re.ASCII=re.A=new re.RegexFlag(256);const _members={ASCII:re.A,IGNORECASE:re.I,LOCALE:re.L,UNICODE:re.U,MULTILINE:re.M,DOTALL:re.S,VERBOSE:re.X,TEMPLATE:re.T,DEBUG:re.DEBUG};function flagBitSlot(e,t){return function(r){if(r instanceof re.RegexFlag||r instanceof pyInt){let n=this.v,s=r.v;if("number"==typeof n&&"number"==typeof s){let t=e(n,s);return t<0&&(t+=4294967296),new re.RegexFlag(t)}return n=JSBI.BigUp(n),s=JSBI.BigUp(s),new re.RegexFlag(JSBI.numberIfSafe(t(n,s)))}return pyNotImplemented}}const jsFlags={i:re.I,m:re.M,s:re.S,u:re.U},jsInlineFlags={i:re.I,a:re.A,s:re.S,L:re.L,m:re.M,u:re.U,x:re.X};RegExp.prototype.hasOwnProperty("sticky")||delete jsFlags.s,RegExp.prototype.hasOwnProperty("unicode")||delete jsFlags.u;const flagFails=Object.entries({"cannot use LOCALE flag with a str pattern":re.L,"ASCII and UNICODE flags are incompatible":new re.RegexFlag(re.A.valueOf()|re.U.valueOf())}),inline_regex=/\\(\\?([isamux]+)\\)/g;function adjustFlags(e,t){let r=e.toString(),n="g",s=0;return r=r.replace(inline_regex,((e,t)=>{for(let r of t){const e=jsInlineFlags[r];s|=e.valueOf()}return""})),flagFails.forEach((([e,t])=>{if((t.valueOf()&s)===t.valueOf())throw new re.error("bad bad inline flags: "+e)})),t=numberBinOp(new re.RegexFlag(s),t,"BitOr"),flagFails.forEach((([e,r])=>{if(numberBinOp(r,t,"BitAnd")===r)throw new ValueError(e)})),numberBinOp(re.A,t,"BitAnd")!==re.A&&(t=numberBinOp(re.U,t,"BitOr")),Object.entries(jsFlags).forEach((([e,r])=>{numberBinOp(r,t,"BitAnd")===r&&(n+=e)})),t=new re.RegexFlag(t.valueOf()),[r,n,t]}let neg_lookbehind_A="(?)(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,py_to_js_unicode_escape=/\\\\[\\t\\r\\n \\v\\f#&~"\'!:,;`<>]|\\\\-(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,quantifierErrors=/Incomplete quantifier|Lone quantifier/g,_compiled_patterns=Object.create(null);function compile_pattern(e,t){let r,n;[r,n,t]=adjustFlags(e,t);const s=_compiled_patterns[e.toString()];if(s&&s.$flags===t)return s;const i={};let o,a;r="_"+r,r=r.replace(initialUnescapedBracket,"$1$2\\\\]$3"),r=r.replace(py_to_js_regex,((t,r,n,s,o,a)=>{switch(n){case"\\\\A":return r+neg_lookbehind_A+"^";case"\\\\Z":return r+"$(?!\\\\n)";case"{,":return r+"{0,";case"$":return r+"(?:(?=\\\\n$)|$)";default:if(n.endsWith(">"))return i[o]=!0,r+"(?<"+o+">";if(!i[s])throw new re.error("unknown group name "+s+" at position "+a+1,e,new pyInt(a+1));return r+"\\\\k<"+s+">"}})),r=r.slice(1);let l=r;n.includes("u")&&(l=r.replace(py_to_js_unicode_escape,(e=>{switch(e){case"\\\\ ":return" ";case"\\\\\\t":return"\\\\t";case"\\\\\\n":return"\\\\n";case"\\\\\\v":return"\\\\v";case"\\\\\\f":return"\\\\f";case"\\\\r":return"\\\\r";default:return e.slice(1)}})));try{o=new RegExp(l,n)}catch(g){if(!quantifierErrors.test(g.message))throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e);try{o=new RegExp(r,n.replace("u",""))}catch(g){throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e)}}const p=new re.Pattern(o,e,t);return _compiled_patterns[e.toString()]=p,p}function _compile(e,t){if(e instanceof re.Pattern){if(t!==zero||t.valueOf())throw new ValueError("cannot process flags argument with compiled pattern");return e}if(!checkString(e))throw new TypeError("first argument must be string or compiled pattern");return compile_pattern(e,t)}re.error=buildNativeClass("re.error",{base:Exception,constructor:function error(e,t,r){this.$pattern=t,this.$msg=e,this.$pos=r||pyNone,Exception.call(this,e)},slots:{tp$doc:"Exception raised for invalid regular expressions.\\n\\n Attributes:\\n\\n msg: The unformatted error message\\n pattern: The regular expression pattern\\n",tp$init(e,t){const[r,n,s]=copyKeywordToNamedArgs("re.error",["msg","pattern","pos"],e,t,[pyNone,pyNone]);this.$pattern=n,this.$pos=s,this.$msg=r}},getsets:{msg:{$get(){return this.$msg}},pattern:{$get(){return this.$pattern}},pos:{$get(){return this.$pos}}}});const zero=new pyInt(0),maxsize=Number.MAX_SAFE_INTEGER;re.Pattern=buildNativeClass("re.Pattern",{constructor:function(e,t,r){this.v=e,this.str=t,this.$flags=r,this.$groups=null,this.$groupindex=null},slots:{$r(){const e=objectRepr(this.str).slice(0,200),t=objectRepr(this.$flags.nb$and(re.U.nb$invert()));return new pyStr("re.compile("+e+(t?", "+t:"")+")")},tp$richcompare(e,t){if("Eq"!==t&&"NotEq"!==t||!(e instanceof re.Pattern))return pyNotImplemented;const r=this.str===e.str&&this.$flags===e.$flags;return"Eq"===t?r:!r},tp$hash(){},tp$doc:"Compiled regular expression object."},methods:{match:{$meth:function match(e,t,r){return this.$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches zero or more characters at the beginning of the string."},fullmatch:{$meth:function fullmatch(e,t,r){return this.full$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches against all of the string."},search:{$meth:function search(e,t,r){return this.$search(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Scan through string looking for a match, and return a corresponding match object instance.\\n\\nReturn None if no position in the string matches."},sub:{$meth:function sub(e,t,r){return this.$sub(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."},subn:{$meth:function(e,t,r){return this.$subn(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."},findall:{$meth:function findall(e,t,r){return this.find$all(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return a list of all non-overlapping matches of pattern in string."},split:{$meth:function split(e,t){return this.$split(e,t)},$flags:{NamedArgs:["string","maxsplit"],Defaults:[zero]},$textsig:"($self, /, string, maxsplit=0)",$doc:"Split string by the occurrences of pattern."},finditer:{$meth:function finditer(e,t,r){return this.find$iter(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return an iterator over all non-overlapping matches for the RE pattern in string.\\n\\nFor each match, the iterator returns a match object."},scanner:{$meth:function scanner(e,t,r){return this.$scanner(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:null},__copy__:{$meth:function copy(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{pattern:{$get(){return this.str},$doc:"The pattern string from which the RE object was compiled."},flags:{$get(){return this.$flags},$doc:"The regex matching flags."},groups:{$get(){if(null===this.$groups){const e=(this.str.v.match(this.group$regex)||[]).length;this.$groups=new pyInt(e)}return this.$groups},$doc:"The number of capturing groups in the pattern."},groupindex:{$get(){if(null===this.$groupindex){const e=this.str.v.matchAll(this.group$regex),t=[];let r=1;for(const n of e)n[1]&&(t.push(new pyStr(n[1])),t.push(new pyInt(r))),r++;this.$groupindex=new pyMappingProxy(new pyDict(t))}return this.$groupindex},$doc:"A dictionary mapping group names to group numbers."}},proto:{group$regex:/\\((?!\\?(?!P<).*)(?:\\?P<([^\\d\\W]\\w*)>)?(?![^\\[]*\\])/g,get$count:e=>(e=asIndexSized(e,OverflowError))||Number.POSITIVE_INFINITY,get$jsstr(e,t,r){if(!checkString(e))throw new TypeError("expected string or bytes-like object");if(t===zero&&r===maxsize||void 0===t&&void 0===r)return{jsstr:e.toString(),pos:zero.valueOf(),endpos:e.sq$length()};const{start:n,end:s}=pySlice.startEnd$wrt(e,t,r);return{jsstr:e.toString().slice(n,s),pos:n,endpos:s}},find$all(e,t,r){let{jsstr:n}=this.get$jsstr(e,t,r);const s=this.v,i=n.matchAll(s),o=[];for(let a of i)o.push(1===a.length?new pyStr(a[0]):2===a.length?new pyStr(a[1]):new pyTuple(a.slice(1).map((e=>new pyStr(e)))));return new pyList(o)},$split(e,t){t=(t=asIndexSized(t))||Number.POSITIVE_INFINITY;let{jsstr:r}=this.get$jsstr(e);const n=this.v,s=[];let i,o=0,a=0;for(;null!==(i=n.exec(r))&&o1&&s.push(...i.slice(1).map((e=>void 0===e?pyNone:new pyStr(e)))),o++,a=n.lastIndex,i.index===n.lastIndex){if(!r)break;r=r.slice(i.index),a=0,n.lastIndex=1}return n.lastIndex=0,s.push(new pyStr(r.slice(a))),new pyList(s)},match$from_repl(e,t,r,n){let s;const i=e[e.length-1];return"object"==typeof i?(s=e.slice(0,e.length-3),Object.assign(s,{groups:i}),s.index=e[e.length-3]):(s=e.slice(0,e.length-2),s.groups=void 0,s.index=e[e.length-2]),new re.Match(s,this.str,t,r,n)},do$sub(e,t,r){const{jsstr:n,pos:s,endpos:i}=this.get$jsstr(t);let o;checkCallable(e)?o=t=>{const r=pyCall(e,[t]);if(!checkString(r))throw new TypeError("expected str instance, "+typeName(r)+" found");return r.toString()}:(e=this.get$jsstr(e).jsstr,o=t=>t.template$repl(e)),r=this.get$count(r);let a=0;const l=n.replace(this.v,((...e)=>{if(a>=r)return e[0];a++;const n=this.match$from_repl(e,t,s,i);return o(n)}));return[new pyStr(l),new pyInt(a)]},$sub(e,t,r){const[n]=this.do$sub(e,t,r);return n},$subn(e,t,r){return new pyTuple(this.do$sub(e,t,r))},do$match(e,t,r,n){let s;({jsstr:s,pos:r,endpos:n}=this.get$jsstr(t,r,n));const i=s.match(e);return null===i?pyNone:new re.Match(i,this,t,r,n)},$search(e,t,r){var n=new RegExp(this.v.source,this.v.flags.replace("g",""));return this.do$match(n,e,t,r)},$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^"+n;var i=new RegExp(n,s);return this.do$match(i,e,t,r)},full$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^(?:"+n+")$";var i=new RegExp(n,s);return this.do$match(i,e,t,r)},find$iter(e,t,r){let n;({jsstr:n,pos:t,endpos:r}=this.get$jsstr(e,t,r));const s=n.matchAll(this.v);return new pyIterator((()=>{const n=s.next().value;if(void 0!==n)return new re.Match(n,this,e,t,r)}))}},flags:{sk$acceptable_as_base_class:!1}}),re.Match=buildNativeClass("re.Match",{constructor:function(e,t,r,n,s){this.v=e,this.$match=new pyStr(this.v[0]),this.str=r,this.$re=t,this.$pos=n,this.$endpos=s,this.$groupdict=null,this.$groups=null,this.$lastindex=null,this.$lastgroup=null,this.$regs=null},slots:{tp$doc:"The result of re.match() and re.search().\\nMatch objects always have a boolean value of True.",$r(){let e="",new pyStr(e)},tp$as_squence_or_mapping:!0,mp$subscript(e){const t=this.get$group(e);return void 0===t?pyNone:new pyStr(t)}},methods:{group:{$meth:function group(...e){let t;return e.length<=1?(t=this.get$group(e[0]),void 0===t?pyNone:new pyStr(t)):(t=[],e.forEach((e=>{e=this.get$group(e),t.push(void 0===e?pyNone:new pyStr(e))})),new pyTuple(t))},$flags:{MinArgs:0},$textsig:null,$doc:"group([group1, ...]) -> str or tuple.\\n Return subgroup(s) of the match by indices or names.\\n For 0 returns the entire match."},start:{$meth:function start(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos))},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the start of the substring matched by group."},end:{$meth:function end(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos)+[...t].length)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the end of the substring matched by group."},span:{$meth:function span(e){return this.$span(e)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"For match object m, return the 2-tuple (m.start(group), m.end(group))."},groups:{$meth:function groups(e){return null!==this.$groups||(this.$groups=Array.from(this.v.slice(1),(t=>void 0===t?e:new pyStr(t))),this.$groups=new pyTuple(this.$groups)),this.$groups},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a tuple containing all the subgroups of the match, from 1.\\n\\n default\\n Is used for groups that did not participate in the match."},groupdict:{$meth:function groupdict(e){if(null!==this.$groupdict)return this.$groupdict;if(void 0===this.v.groups)this.$groupdict=new pyDict;else{const t=[];Object.entries(this.v.groups).forEach((([r,n])=>{t.push(new pyStr(r)),t.push(void 0===n?e:new pyStr(n))})),this.$groupdict=new pyDict(t)}return this.$groupdict},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.\\n\\n default\\n Is used for groups that did not participate in the match."},expand:{$meth:function expand(e){if(!checkString(e))throw new TypeError("expected str instance got "+typeName(e));return e=e.toString(),e=this.template$repl(e),new pyStr(e)},$flags:{OneArg:!0},$textsig:"($self, /, template)",$doc:"Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."},__copy__:{$meth:function __copy__(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function __deepcopy__(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{lastindex:{$get(){if(null!==this.$lastindex)return this.$lastindex;let e,t=0;return this.v.forEach(((r,n)=>{n&&void 0!==r&&e!==r&&(t=n,e=r)})),this.$lastindex=t?new pyInt(t):pyNone,this.$lastindex},$doc:"The integer index of the last matched capturing group."},lastgroup:{$get(){if(null!==this.$lastgroup)return this.$lastgroup;if(void 0===this.v.groups)this.$lastgroup=pyNone;else{let e;Object.entries(this.v.groups).forEach((([t,r])=>{void 0!==r&&(e=t)})),this.$lastgroup=void 0===e?pyNone:new pyStr(e)}return this.$lastgroup},$doc:"The name of the last matched capturing group."},regs:{$get(){if(null!==this.$regs)return this.$regs;const e=[];return this.v.forEach(((t,r)=>{e.push(this.$span(r))})),this.$regs=new pyTuple(e),this.$regs}},string:{$get(){return this.str},$doc:"The string passed to match() or search()."},re:{$get(){return this.$re},$doc:"The regular expression object."},pos:{$get(){return new pyInt(this.$pos)},$doc:"The index into the string at which the RE engine started looking for a match."},endpos:{$get(){return new pyInt(this.$endpos)},$doc:"The index into the string beyond which the RE engine will not go."}},proto:{get$group(e){if(void 0===e)return this.v[0];if(checkString(e)){if(e=e.toString(),this.v.groups&&Object.prototype.hasOwnProperty.call(this.v.groups,e))return this.v.groups[e]}else if(isIndex(e)&&(e=asIndexSized(e))>=0&&e|\\\\g<([^\\d\\W]\\w*)>|\\\\g?/g,template$repl(e){return e.replace(this.template$regex,((e,t,r,n,s,i)=>{let o;if(void 0!==(t=t||r)?o=t{delete _compiled_patterns[e]})),pyNone},$flags:{NoArgs:!0},$textsig:"($module, / )",$doc:"Clear the regular expression caches"},template:{$meth:function template(e,t){return _compile(e,numberBinOp(re.T,t,"BitOr"))},$flags:{NamedArgs:["pattern","flags"],Defaults:[zero]},$textsig:"($module, / , pattern, flags=0)",$doc:"Compile a template pattern, returning a Pattern object"},escape:{$meth:function(e){if(!checkString(e))throw new TypeError("expected a str instances, got "+typeName(e));return e=(e=e.toString()).replace(escape_chrs,"\\\\$&"),new pyStr(e)},$flags:{NamedArgs:["pattern"],Defaults:[]},$textsig:"($module, / , pattern)",$doc:"\\n Escape special characters in a string.\\n "}});const escape_chrs=/[\\&\\~\\#.*+\\-?^${}()|[\\]\\\\\\t\\r\\v\\f\\n ]/g;return re}',"src/lib/requests/__init__.js":'var $builtinmodule=function(e){var n={__name__:new Sk.builtin.str("requests")};n.Response=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e,n){e.data$=n,e.lineList=e.data$.split("\\n"),e.lineList=e.lineList.slice(0,-1);for(var t=0;t")})),n.__repr__=n.__str__,n.__iter__=new Sk.builtin.func((function(e){var n=e.lineList;return Sk.builtin.makeGenerator((function(){if(!(this.$index>=this.$lines.length))return new Sk.builtin.str(this.$lines[this.$index++])}),{$obj:e,$index:0,$lines:n})})),n.read=new Sk.builtin.func((function(e,n){if(e.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var t=e.data$.length;void 0===n&&(n=t);var i=new Sk.builtin.str(e.data$.substr(e.pos$,n));return e.pos$+=n,e.pos$>=t&&(e.pos$=t),i})),n.readline=new Sk.builtin.func((function(e,n){var t="";return e.currentLine{var t="";if(e instanceof String||e instanceof Number||e instanceof Boolean)try{var i=n.toString().replaceAll("=","@");i=i.replaceAll("&","$");var r=e.toString().replaceAll("=","@");r=r.replaceAll("&","$"),t+="&"+i+"="+encodeURIComponent(r)}catch(s){t+="&"+n+"="+encodeURIComponent(e)}else $.each(e,(function(i){t+="&"+jsonToUrl(this,null==n?i:n+(e instanceof Array?"["+i+"]":"."+i))}));return t.substr(1)},requestFunc=function(e,t){e=Sk.ffi.remapToJs(e),t=Sk.ffi.remapToJs(t);const i=["method","url","params","data","headers","cookies","files","auth","timeout","allow_redirects","proxies","hooks","stream","verify","cert","json"];let r={method:"GET",url:"",params:null,data:"",headers:{"Content-type":"application/x-www-form-urlencoded"},cookies:null,files:null,auth:null,timeout:1e3,allow_redirects:null,proxies:null,hooks:null,stream:null,verify:null,cert:null,json:null};for(let n in e)r[i[n]]=e[n];for(let n=0;n=n){r=t.decoder.decode(new Uint8Array(e));break}}else{switch(224&o){case 252:n=6;break;case 248:n=5;break;case 240:n=4;break;case 224:n=3;break;default:n=2}e.push(o)}}return r},t.startReadLine=function(){t.readLineTimer=window.setTimeout((()=>{if(!t.keepReading)return void window.clearTimeout(t.readLineTimer);let e=!1;do{const n=t.readLine();e=n.endWithLF;const{text:r}=n;if(r&&t.output.push((t.output.length?t.output.pop():"")+r),e){t.output.length&&console.log(t.output),t.output.push("")}}while(e);for(;t.output.length>500;)t.output.shift();t.keepReading&&t.startReadLine()}),100)},t.addReadEvent=async function(){for(t.output=[],t.inputBuffer=[],t.outputBuffer=[],t.refreshInputBuffer=!1,t.refreshOutputBuffer=!0,t.startReadLine();t.obj.readable&&t.keepReading;){t.reader=t.obj.readable.getReader();try{for(;;){const{value:e,done:n}=await t.reader.read();if(t.refreshOutputBuffer&&e&&(t.outputBuffer=[...t.outputBuffer,...e]),t.refreshInputBuffer&&e&&(t.inputBuffer=[...t.inputBuffer,...e]),n)break}}catch(e){console.log(e)}finally{t.reader.releaseLock()}}},t.writeString=async function(e){const n=t.encoder.encode(e);await t.writeByteArr(n)},t.writeByteArr=async function(e){const n=t.obj.writable.getWriter();await n.write(new Int8Array(e).buffer),n.releaseLock(),await t.sleep(200)},t.setBaudRate=async function(e){t.keepReading=!1;const n=t.obj;await t.close(),await n.open({baudRate:e-0}),t.obj=n,t.keepReading=!0,t.addReadEvent()},t.setDTR=async function(e){t.dtr=e,await t.obj.setSignals({dataTerminalReady:e})},t.setRTS=async function(e){t.rts=e,await t.obj.setSignals({requestToSend:e})},t.setSignals=async function(e,n){t.dtr=e,t.rts=n,await t.obj.setSignals({dataTerminalReady:e,requestToSend:n})};let n={__name__:new Sk.builtin.str("serial")},r={baudrate:115200,bytesize:8,parity:"N",stopbits:1,timeout:1e3,xonxoff:!1,rtscts:!1,dsrdtr:!1};const serialInitFunc=function(e,n){e=Sk.ffi.remapToJs(e),n=Sk.ffi.remapToJs(n);const o=["baudrate","bytesize","parity","stopbits","timeout","xonxoff","rtscts","dsrdtr"];for(let t in e)e[t]&&(r[o[t]]=e[t]);const i=new Promise(((e,n)=>{t.isConnected()?e(t.obj):navigator.serial.requestPort().then((function(t){e(t)})).catch((function(e){t.obj=null,n(e)}))}));let u,a=new Sk.misceval.Suspension;return a.resume=function(){if(a.data.error)throw a.data.error;return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:i.then((function(e){return t.obj=e,Sk.builtin.none.none$}),(function(e){return console.log("err3",e),u="",Promise.reject(e)}))},a};serialInitFunc.co_fastcall=1;const serialOpenFunc=function(e,n){const o=new Promise(((e,n)=>{t.isConnected()?t.isOpend()?e():t.obj.open({baudRate:r.baudrate}).then((async function(){t.keepReading=!0,t.addReadEvent(),e()})).catch((function(e){t.obj=null,n(e)})):n("No serial found")}));let i=new Sk.misceval.Suspension;return i.resume=function(){if(i.data.error)throw i.data.error;return Sk.builtin.none.none$},i.data={type:"Sk.promise",promise:o.then((function(e){return Sk.builtin.none.none$}),(function(e){return console.log("err3",e),Promise.reject(e)}))},i},serialReadlineFunc=function(e,n){if(!t.isConnected())return new Sk.builtin.str("");if(console.log("length:",t.output.length),!t.isOpend()||t.output.length<2)return new Sk.builtin.str("");let r=t.output.shift();return console.log(r),new Sk.builtin.str(r)};return n.Serial=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func(serialInitFunc),t.__str__=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy("")})),t.open=new Sk.builtin.func(serialOpenFunc),t.readline=new Sk.builtin.func(serialReadlineFunc)}),"Serial",[]),n};',"src/lib/signal.js":'var $builtinmodule=function(n){var i={};return i.SIG_DFL=new Sk.builtin.int_(0),i.SIG_IGN=new Sk.builtin.int_(1),i.CTRL_C_EVENT=new Sk.builtin.int_(0),i.CTRL_BREAK_EVENT=new Sk.builtin.int_(0),i.NSIG=new Sk.builtin.int_(23),i.SIGHUP=new Sk.builtin.int_(1),i.SIGNINT=new Sk.builtin.int_(2),i.SIGILL=new Sk.builtin.int_(4),i.SIGFPE=new Sk.builtin.int_(8),i.SIGKILL=new Sk.builtin.int_(9),i.SIGSEGV=new Sk.builtin.int_(11),i.SIGTERM=new Sk.builtin.int_(15),i.SIGBREAK=new Sk.builtin.int_(21),i.SIGABRT=new Sk.builtin.int_(22),i.pause=new Sk.builtin.func((function(){Sk.builtin.pyCheckArgsLen("pause",arguments.length,0,0);var n=new Sk.misceval.Suspension;return n.resume=function(){return Sk.builtin.none.none$},n.data={type:"Sk.promise",promise:new Promise((function(n,i){if(null!=Sk.signals&&Sk.signals.addEventListener){Sk.signals.addEventListener((function handleSignal(i){Sk.signals.removeEventListener(handleSignal),n()}))}else console.warn("signal.pause() not supported"),Sk.misceval.print_("signal.pause() not supported"),n()}))},n})),i.signal=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("signal.signal is not supported.")})),i};',"src/lib/string.js":'var $builtinmodule=function(i){var t={};return t.ascii_lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.ascii_uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.ascii_letters=new Sk.builtin.str(t.ascii_lowercase.v+t.ascii_uppercase.v),t.lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.letters=new Sk.builtin.str(t.lowercase.v+t.uppercase.v),t.digits=new Sk.builtin.str("0123456789"),t.hexdigits=new Sk.builtin.str("0123456789abcdefABCDEF"),t.octdigits=new Sk.builtin.str("01234567"),t.punctuation=new Sk.builtin.str("!\\"#$%&\'()*+,-./:;<=>?@[\\\\]^_`{|}~"),t.whitespace=new Sk.builtin.str("\\t\\n\\v\\f\\r "),t.printable=new Sk.builtin.str(t.digits.v+t.letters.v+t.punctuation.v+" \\t\\n\\r\\v\\f"),t.split=new Sk.builtin.func((function(...i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.split,i)})),t.capitalize=new Sk.builtin.func((function(i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.capitalize,[i])})),t.join=new Sk.builtin.func((function(i,t){return void 0===t&&(t=new Sk.builtin.str(" ")),Sk.misceval.callsimArray(Sk.builtin.str.prototype.join,[t,i])})),t.capwords=new Sk.builtin.func((function(i,n){if(Sk.builtin.pyCheckArgsLen("capwords",arguments.length,1,2),!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("s must be a string");if(void 0===n&&(n=new Sk.builtin.str(" ")),!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError("sep must be a string");for(var e=Sk.misceval.callsimArray(t.split,[i,n]).v,r=[],l=0;l1&&function isLeapYear(t){return 0==(3&t)&&(t%100!=0||t%400==0)}(e?t.getUTCFullYear():t.getFullYear())&&u++,u}function stdTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.max(t.getTimezoneOffset(),e.getTimezoneOffset())}function dst(t){return t.getTimezoneOffset()1)return n[1];if(void 0===e)return null;try{return(n=t.toLocaleString(e,{timeZoneName:"short"}).split(" "))[n.length-1]}catch(i){return null}}function from_seconds(t,e){var i=new Date;if(t){Sk.builtin.pyCheckType("secs","number",Sk.builtin.checkNumber(t));var u=Sk.builtin.asnum$(t);i.setTime(1e3*u)}return function date_to_struct_time(t,e){let i;if(e=e||!1)i=[new Sk.builtin.str("UTC"),new Sk.builtin.int_(0)];else{var u=-t.getTimezoneOffset()/60,r=(u<0?"-":"+")+(""+Math.abs(u)).padStart(2,"0");i=[new Sk.builtin.str(r),new Sk.builtin.int_(3600*u)]}return new n([Sk.builtin.assk$(e?t.getUTCFullYear():t.getFullYear()),Sk.builtin.assk$((e?t.getUTCMonth():t.getMonth())+1),Sk.builtin.assk$(e?t.getUTCDate():t.getDate()),Sk.builtin.assk$(e?t.getUTCHours():t.getHours()),Sk.builtin.assk$(e?t.getUTCMinutes():t.getMinutes()),Sk.builtin.assk$(e?t.getUTCSeconds():t.getSeconds()),Sk.builtin.assk$(((e?t.getUTCDay():t.getDay())+6)%7),Sk.builtin.assk$(getDayOfYear(t,e)),Sk.builtin.assk$(e?0:dst(t)?1:0)],i)}(i,e)}e.struct_time=n,e.time=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("time",arguments.length,0,0),new Sk.builtin.float_(Date.now()/1e3)})),e.sleep=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("sleep",arguments.length,1,1),Sk.builtin.pyCheckType("delay","float",Sk.builtin.checkNumber(t)),new Sk.misceval.promiseToSuspension(new Promise((function(e){Sk.setTimeout((function(){e(Sk.builtin.none.none$)}),1e3*Sk.ffi.remapToJs(t))})))})),e.localtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("localtime",arguments.length,0,1),from_seconds(t,!1)})),e.gmtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("gmtime",arguments.length,0,1),from_seconds(t,!0)}));var i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function asctime_f(t){if(Sk.builtin.pyCheckArgsLen("asctime",arguments.length,0,1),!t||Sk.builtin.checkNone(t)?t=from_seconds():t instanceof n||(t=new n(t)),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=[];return e.push(u[Sk.builtin.asnum$(t.v[6])]),e.push(i[Sk.builtin.asnum$(t.v[1])-1]),e.push(padLeft(Sk.builtin.asnum$(t.v[2]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[3]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[4]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[5]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[0]).toString(),4,"0")),new Sk.builtin.str(e.join(" "))}}function mktime_f(t){if(Sk.builtin.pyCheckArgsLen("mktime",arguments.length,1,1),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=new Date(Sk.builtin.asnum$(t.v[0]),Sk.builtin.asnum$(t.v[1])-1,Sk.builtin.asnum$(t.v[2]),Sk.builtin.asnum$(t.v[3]),Sk.builtin.asnum$(t.v[4]),Sk.builtin.asnum$(t.v[5]));return Sk.builtin.assk$(e.getTime()/1e3,void 0)}throw new Sk.builtin.TypeError("mktime() requires a struct_time or 9-tuple")}e.asctime=new Sk.builtin.func(asctime_f),e.ctime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("ctime",arguments.length,0,1),asctime_f(from_seconds(t))})),e.mktime=new Sk.builtin.func(mktime_f),e.timezone=new Sk.builtin.int_(60*stdTimezoneOffset()),e.altzone=new Sk.builtin.int_(60*function altTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.min(t.getTimezoneOffset(),e.getTimezoneOffset())}()),e.daylight=new Sk.builtin.int_(function daylight_check(){const t=new Date(2002,0,1),e=new Date(2002,6,1);return t.getTimezoneOffset()!=e.getTimezoneOffset()}()?1:0),e.tzname=new Sk.builtin.tuple(function timeZoneNames(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return dst(t)?[new Sk.builtin.str(timeZoneName(e)),new Sk.builtin.str(timeZoneName(t))]:[new Sk.builtin.str(timeZoneName(t)),new Sk.builtin.str(timeZoneName(e))]}()),e.accept2dyear=Sk.builtin.assk$(1),e.clock=new Sk.builtin.func((function(){var t=0;return t=Sk.global.performance&&Sk.global.performance.now?performance.now()/1e3:(new Date).getTime()/1e3,new Sk.builtin.float_(t)})),e.strftime=new Sk.builtin.func((function strftime_f(t,e){var i;if(Sk.builtin.pyCheckArgsLen("strftime",arguments.length,1,2),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("format must be a string");return e?e instanceof n||(e=new n(e)):e=from_seconds(),function check_struct_time(t){if(!(t instanceof n))throw new Sk.builtin.TypeError("Required argument \'struct_time\' must be of type: \'struct_time\'");var e,i=t.v.length,u=t.v;for(e=0;e(r=e.tp$getattr(new Sk.builtin.str("_strptime_time")),r.tp$call(t)))):r.tp$call(t)})),e};',"src/lib/token.js":'var $builtinmodule=function(n){var e={};e.__file__=new Sk.builtin.str("/src/lib/token.py");const t=[];for(let i in Sk.token.tok_name){const n=Sk.token.tok_name[i].slice(2),k=parseInt(i,10);t.push(Sk.ffi.remapToPy(k)),t.push(Sk.ffi.remapToPy(n)),e[n]=Sk.ffi.remapToPy(k)}return e.tok_name=new Sk.builtin.dict(t),e.ISTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISTERMINAL",arguments.length,1,1),Sk.token.ISTERMINAL(Sk.ffi.remapToJs(n))})),e.ISNONTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISNONTERMINAL",arguments.length,1,1),Sk.token.ISNONTERMINAL(Sk.ffi.remapToJs(n))})),e.ISEOF=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISEOF",arguments.length,1,1),Sk.token.ISEOF(Sk.ffi.remapToJs(n))})),e};',"src/lib/tokenize.js":'var $builtinmodule=function(e){var i={};return i.tokenize=new Sk.builtin.func((function(e){Sk.builtin.pyCheckArgsLen("tokenize",1,1),Sk.builtin.checkFunction(e);const i=[];return Sk._tokenize("",(function jsReadline(){const i=Sk.misceval.callsimArray(e);return Sk.ffi.remapToJs(i)}),"UTF-8",(function receiveToken(e){i.push(new Sk.builtin.tuple([Sk.ffi.remapToPy(e.type),Sk.ffi.remapToPy(e.string),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.start[0]),Sk.ffi.remapToPy(e.start[1])]),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.end[0]),Sk.ffi.remapToPy(e.end[1])]),Sk.ffi.remapToPy(e.line)]))})),new Sk.builtin.list(i)})),i};',"src/lib/turtle.js":'var $builtinmodule=function(e){"use strict";var t=function getConfiguredTarget(){var e,t;for(t="string"==typeof(e=Sk.TurtleGraphics&&Sk.TurtleGraphics.target||"turtle")?document.getElementById(e):e;t.firstChild;)t.removeChild(t.firstChild);return t}();return t.turtleInstance?t.turtleInstance.reset():t.turtleInstance=function generateTurtleModule(e){var t,n,r,i,s,a,o,l,u={__name__:new Sk.builtin.str("turtle")},c=!0,h=1e3/30,d={},f={},_={target:"turtle",width:400,height:400,worldWidth:0,worldHeight:0,animate:!0,bufferSize:0,allowUndo:!0,assets:{}};function getAsset(e){var t=i.assets,n="function"==typeof t?t(e):t[e];return"string"==typeof n?new Promise((function(t,r){var s=new Image;s.onload=function(){i.assets[e]=this,t(s)},s.onerror=function(){r(new Error("Missing asset: "+n))},s.src=n})):new InstantPromise(void 0,n)}function InstantPromise(e,t){this.lastResult=t,this.lastError=e}function FrameManager(){this.reset()}function getFrameManager(){return o||(o=new FrameManager),o}function MouseHandler(){var e=this;for(var t in this._target=getTarget(),this._managers={},this._handlers={mousedown:function(t){e.onEvent("mousedown",t)},mouseup:function(t){e.onEvent("mouseup",t)},mousemove:function(t){e.onEvent("mousemove",t)}},this._handlers)this._target.addEventListener(t,this._handlers[t])}function EventManager(e,t){this._type=e,this._target=t,this._handlers=void 0,function getMouseHandler(){return a||(a=new MouseHandler),a}().addManager(e,this)}function Turtle(e){if(getFrameManager().addTurtle(this),this._screen=getScreen(),this._managers={},this._shape=e.v,!d.hasOwnProperty(this._shape))throw new Sk.builtin.ValueError("Shape:\'"+this._shape+"\' not in default shape, please check shape again!");this.reset()}function Screen(){var e,t;this._frames=1,this._delay=void 0,this._bgcolor="none",this._mode="standard",this._managers={},this._keyLogger={},e=(i.worldWidth||i.width||getWidth())/2,t=(i.worldHeight||i.height||getHeight())/2,this.setUpWorld(-e,-t,e,t)}function ensureAnonymous(){return s||(s=Sk.misceval.callsimArray(u.Turtle)),s.instance}function getTarget(){return e}function getScreen(){return r||(r=new Screen),r}function getWidth(){return 0|(r&&r._width||i.width||getTarget().clientWidth||_.width)}function getHeight(){return 0|(r&&r._height||i.height||getTarget().clientHeight||_.height)}function createLayer(e,t){var n,r=document.createElement("canvas"),i=getWidth(),s=getHeight(),a=getTarget().firstChild?-s+"px":"0";return r.width=i,r.height=s,r.style.position="relative",r.style.display="block",r.style.setProperty("margin-top",a),r.style.setProperty("z-index",e),t&&(r.style.display="none"),getTarget().appendChild(r),(n=r.getContext("2d")).lineCap="round",n.lineJoin="round",applyWorld(getScreen(),n),n}function cancelAnimationFrame(){t&&((window.cancelAnimationFrame||window.mozCancelAnimationFrame)(t),t=void 0),n&&(window.clearTimeout(n),n=void 0)}function applyWorld(e,t){var n=e.llx,r=(e.lly,e.urx,e.ury),i=e.xScale,s=e.yScale;t&&(clearLayer(t),t.restore(),t.save(),t.scale(1/i,1/s),t.translate(-n,-r))}function pushUndo(e){var t,n,r;if(i.allowUndo&&e._bufferSize){for(e._undoBuffer||(e._undoBuffer=[]);e._undoBuffer.length>e._bufferSize;)e._undoBuffer.shift();for(n={},t="x y angle radians color fill down filling shown shape size".split(" "),r=0;r=0;)this._turtles[e].reset();this._turtles=[],this._frames=[],this._frameCount=0,this._buffer=1,this._rate=0,this._animationFrame=animationFrame()},e.addFrame=function(e,t){return t&&(this._frameCount+=1),this.frames().push(e),!i.animate||this._buffer&&this._frameCount===this.frameBuffer()?this.update():new InstantPromise},e.frames=function(){return this._frames},e.frameBuffer=function(e){return"number"==typeof e&&(this._buffer=0|e,e&&e<=this._frameCount)?this.update():this._buffer},e.refreshInterval=function(e){return"number"==typeof e&&(this._rate=0|e,this._animationFrame=animationFrame(e)),this._rate},e.update=function(){return this._frames&&this._frames.length?this.requestAnimationFrame():new InstantPromise},e.requestAnimationFrame=function(){var e,t,n=this._frames,r=this._animationFrame,i=this._turtles,s=getScreen().spriteLayer();return this._frames=[],this._frameCount=0,new Promise((function(a){r((function paint(){for(t=0;t=0;)l[a].test(n,r,i,s)&&l[a].canMove("mousedown"===e);if(o&&o.length)for(computeCoordinates(),a=o.length;--a>=0;)("mousemove"===e&&o[a].canMove()&&o[a].test(n,r,i,s)||"mousedown"===e&&o[a].test(n,r,i,s))&&o[a].trigger([i,s])},l.reset=function(){this._managers={}},l.addManager=function(e,t){this._managers[e]||(this._managers[e]=[]),this._managers[e].push(t)},function(e){e.reset=function(){this._handlers=void 0},e.canMove=function(e){return!(!this._target||!this._target.hitTest)&&(void 0!==e&&(this._target.hitTest.hit=e),this._target.hitTest.hit)},e.test=function(e,t,n,r){return this._target&&this._target.hitTest?this._target.hitTest(e,t,n,r):!!this._target},e.trigger=function(e){var t,n=this._handlers;if(n&&n.length)for(t=0;t.5&&e<10.5?Sk.builtin.asnum$(Sk.builtin.round(Sk.builtin.assk$(e))):0,this._speed=e,this._computed_speed=2*e,this.addUpdate(void 0,!1,{speed:this._computed_speed})},e.$speed.minArgs=0,e.$speed.co_varnames=["speed"],e.$pencolor=function(e,t,n,r){return void 0!==e?(this._color=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{color:this._color})):hexToRGB(this._color)},e.$pencolor.co_varnames=["r","g","b","a"],e.$pencolor.minArgs=0,e.$pencolor.returnType=f.COLOR,e.$fillcolor=function(e,t,n,r){return void 0!==e?(this._fill=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{fill:this._fill})):hexToRGB(this._fill)},e.$fillcolor.co_varnames=["r","g","b","a"],e.$fillcolor.minArgs=0,e.$fillcolor.returnType=f.COLOR,e.$color=function(e,t,n,r){return void 0!==e?(void 0===t||void 0!==n?(this._color=createColor(this._colorMode,e,t,n,r),this._fill=this._color):(this._color=createColor(this._colorMode,e),this._fill=createColor(this._colorMode,t)),this.addUpdate(void 0,this._shown,{color:this._color,fill:this._fill})):[this.$pencolor(),this.$fillcolor()]},e.$color.minArgs=0,e.$color.co_varnames=["color","fill","b","a"],e.$color.returnType=function(e){return new Sk.builtin.tuple([f.COLOR(e[0]),f.COLOR(e[1])])},e.$fill=function(e){if(void 0!==e){if((e=!!e)===this._filling)return;return this._filling=e,e?(pushUndo(this),this.addUpdate(void 0,!1,{filling:!0,fillBuffer:[{x:this._x,y:this._y}]})):(pushUndo(this),this.addUpdate((function(){this.fillBuffer.push(this),drawFill.call(this)}),!0,{filling:!1,fillBuffer:void 0}))}return this._filling},e.$fill.co_varnames=["flag"],e.$fill.minArgs=0,e.$begin_fill=function(){return this.$fill(!0)},e.$end_fill=function(){return this.$fill(!1)},e.$stamp=function(){return pushUndo(this),this.addUpdate((function(){drawTurtle(this,this.context())}),!0)},e.$dot=function(e,t,n,r,i){return pushUndo(this),e="number"==typeof(e=Sk.builtin.asnum$(e))?Math.max(1,0|Math.abs(e)):Math.max(this._size+4,2*this._size),t=void 0!==t?createColor(this._colorMode,t,n,r,i):this._color,this.addUpdate(drawDot,!0,void 0,e,t)},e.$dot.co_varnames=["size","color","g","b","a"],e.$write=function(e,t,n,r){var i,s,a,o,l,u=this;return pushUndo(this),e=String(e),r&&r.constructor===Array&&(s="string"==typeof r[0]?r[0]:"Arial",a=String(r[1]||"12pt"),o="string"==typeof r[2]?r[2]:"normal",/^\\d+$/.test(a)&&(a+="pt"),r=[o,a,s].join(" ")),n||(n="left"),i=this.addUpdate(drawText,!0,void 0,e,n,r),!t||"left"!==n&&"center"!==n||(l=function measureText(e,t){return t&&(p.font=t),p.measureText(e).width}(e,r),"center"===n&&(l/=2),i=i.then((function(){var e=u.getState();return u.translate(e.x,e.y,l,0,!0)}))),i},e.$write.co_varnames=["message","move","align","font"],e.$write.minArgs=1,e.$pensize=e.$width=function(e){return void 0!==e?(this._size=e,this.addUpdate(void 0,this._shown,{size:e})):this._size},e.$pensize.minArgs=e.$width.minArgs=0,e.$pensize.co_varnames=e.$width.co_varnames=["width"],e.$showturtle=e.$st=function(){return this._shown=!0,this.addUpdate(void 0,!0,{shown:!0})},e.$hideturtle=e.$ht=function(){return this._shown=!1,this.addUpdate(void 0,!0,{shown:!1})},e.$isvisible=function(){return this._shown},e.$shape=function(e){return e&&d[e]?(this._shape=e,this.addUpdate(void 0,this._shown,{shape:e})):this._shape},e.$shape.minArgs=0,e.$shape.co_varnames=["name"],e.$window_width=function(){return this._screen.$window_width()},e.$window_height=function(){return this._screen.$window_height()},e.$tracer=function(e,t){return this._screen.$tracer(e,t)},e.$tracer.minArgs=0,e.$tracer.co_varnames=["n","delay"],e.$update=function(){return this._screen.$update()},e.$delay=function(e){return this._screen.$delay(e)},e.$delay.minArgs=0,e.$delay.co_varnames=["delay"],e.$reset=function(){return this.reset(),this.$clear()},e.$mainloop=e.$done=function(){return this._screen.$mainloop()},e.$clear=function(){return this.addUpdate((function(){clearLayer(this.context())}),!0)},e.$dot.minArgs=0,e.$onclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onclick.minArgs=1,e.$onclick.co_varnames=["method","btn","add"],e.$onrelease=function(e,t,n){this.getManager("mouseup").addHandler(e,n)},e.$onrelease.minArgs=1,e.$onrelease.co_varnames=["method","btn","add"],e.$ondrag=function(e,t,n){this.getManager("mousemove").addHandler(e,n)},e.$ondrag.minArgs=1,e.$ondrag.co_varnames=["method","btn","add"],e.$getscreen=function(){return Sk.misceval.callsimArray(u.Screen)},e.$getscreen.isSk=!0,e.$clone=function(){var e=Sk.misceval.callsimOrSuspendArray(u.Turtle);return e.instance._x=this._x,e.instance._y=this._y,e.instance._angle=this._angle,e.instance._radians=this._radians,e.instance._shape=this._shape,e.instance._color=this._color,e.instance._fill=this._fill,e.instance._filling=this._filling,e.instance._size=this._size,e.instance._computed_speed=this._computed_speed,e.instance._down=this._down,e.instance._shown=this._shown,e.instance._colorMode=this._colorMode,e.instance._isRadians=this._isRadians,e.instance._fullCircle=this._fullCircle,e.instance._bufferSize=this._bufferSize,e.instance._undoBuffer=this._undoBuffer,e._clonedFrom=this,e},e.$clone.returnType=function(e){return e},e.$getturtle=e.$getpen=function(){return this.skInstance},e.$getturtle.isSk=!0}(Turtle.prototype),function(e){e.spriteLayer=function(){return this._sprites||(this._sprites=createLayer(3))},e.bgLayer=function(){return this._background||(this._background=createLayer(1))},e.hitTestLayer=function(){return this._hitTest||(this._hitTest=createLayer(0,!0))},e.getManager=function(e){return this._managers[e]||(this._managers[e]=new EventManager(e,this)),this._managers[e]},e.reset=function(){var e;for(e in this._keyListeners=void 0,this._keyLogger)window.clearInterval(this._keyLogger[e]),window.clearTimeout(this._keyLogger[e]),delete this._keyLogger[e];for(e in this._keyDownListener&&(getTarget().removeEventListener("keydown",this._keyDownListener),this._keyDownListener=void 0),this._keyUpListener&&(getTarget().removeEventListener("keyup",this._keyUpListener),this._keyUpListener=void 0),this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),this._managers)this._managers[e].reset();this._mode="standard",removeLayer(this._sprites),this._sprites=void 0,removeLayer(this._background),this._background=void 0},e.setUpWorld=function(e,t,n,r){var i=this;i.llx=e,i.lly=t,i.urx=n,i.ury=r,i.xScale=(n-e)/getWidth(),i.yScale=-1*(r-t)/getHeight(),i.lineScale=Math.min(Math.abs(i.xScale),Math.abs(i.yScale))},e.$setup=function(e,t,n,r){return isNaN(parseFloat(e))&&(e=getWidth()),isNaN(parseFloat(t))&&(t=getHeight()),e<=1&&(e=getWidth()*e),t<=1&&(t=getHeight()*t),this._width=e,this._height=t,this._xOffset=void 0===n||isNaN(parseInt(n))?0:parseInt(n),this._yOffset=void 0===r||isNaN(parseInt(r))?0:parseInt(r),"world"===this._mode?this._setworldcoordinates(this.llx,this.lly,this.urx,this.ury):this._setworldcoordinates(-e/2,-t/2,e/2,t/2)},e.$setup.minArgs=0,e.$setup.co_varnames=["width","height","startx","starty"],e.$register_shape=e.$addshape=function(e,t){if(!t)return getAsset(e).then((function(t){d[e]=t}));d[e]=t},e.$register_shape.minArgs=1,e.$register_shape.co_varnames=["name","shape"],e.$getshapes=function(){return Object.keys(d)},e.$tracer=function(e,t){return void 0!==e||void 0!==t?("number"==typeof t&&(this._delay=t,getFrameManager().refreshInterval(t)),"number"==typeof e?(this._frames=e,getFrameManager().frameBuffer(e)):void 0):this._frames},e.$tracer.co_varnames=["frames","delay"],e.$tracer.minArgs=0,e.$delay=function(e){return void 0!==e?this.$tracer(void 0,e):void 0===this._delay?h:this._delay},e.$delay.co_varnames=["delay"],e._setworldcoordinates=function(e,t,n,r){return getFrameManager().turtles(),this.setUpWorld(e,t,n,r),this._sprites&&applyWorld(this,this._sprites),this._background&&applyWorld(this,this._background),this.$clear()},e.$setworldcoordinates=function(e,t,n,r){return this._mode="world",this._setworldcoordinates(e,t,n,r)},e.$setworldcoordinates.co_varnames=["llx","lly","urx","ury"],e.minArgs=4,e.$clear=e.$clearscreen=function(){return this.reset(),this.$reset()},e.$update=function(){return getFrameManager().update()},e.$reset=e.$resetscreen=function(){var e=this,t=getFrameManager().turtles();return getFrameManager().addFrame((function(){applyWorld(e,e._sprites),applyWorld(e,e._background);for(var n=0;n1&&t[s]&&t[s].test(r),r===a||i){e._keyListeners[r](),e._createKeyRepeater(r,s),n.preventDefault();break}}},getTarget().addEventListener("keydown",this._keyDownListener))},e._createKeyUpListener=function(){var e=this;this._keyUpListener||(this._keyUpListener=function(t){var n=e._keyLogger[t.charCode||t.keyCode];void 0!==n&&(t.preventDefault(),window.clearInterval(n),window.clearTimeout(n),delete e._keyLogger[t.charCode||t.keyCode])},getTarget().addEventListener("keyup",this._keyUpListener))},e.$title=function(e){document.title=e},e.$title.minArgs=1,e.$title.co_varnames=["title"],e.$listen=function(){this._createKeyUpListener(),this._createKeyDownListener()},e.$onkey=function(e,t){if("function"==typeof t){var n=e;e=t,t=n}t=String(t).toLowerCase(),e&&"function"==typeof e?(this._keyListeners||(this._keyListeners={}),this._keyListeners[t]=e):delete this._keyListeners[t]},e.$onkey.minArgs=2,e.$onkey.co_varnames=["method","keyValue"],e.$onscreenclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onscreenclick.minArgs=1,e.$onscreenclick.co_varnames=["method","btn","add"],e.$ontimer=function(e,t){this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),e&&"number"==typeof t&&(this._timer=window.setTimeout(e,Math.max(0,0|t)))},e.$ontimer.minArgs=0,e.$ontimer.co_varnames=["method","interval"]}(Screen.prototype);var g=new Image;function removeLayer(e){e&&e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas)}function clearLayer(e,t,n){e&&(e.save(),e.setTransform(1,0,0,1,0,0),t?(e.fillStyle=t,e.fillRect(0,0,e.canvas.width,e.canvas.height)):e.clearRect(0,0,e.canvas.width,e.canvas.height),n&&e.drawImage(n,0,0),e.restore())}function drawTurtle(e,t){var n,r,i,s=d[e.shape],a=getScreen(),o=(getWidth(),getHeight(),a.xScale),l=a.yScale;if(t){if(n=Math.cos(e.radians)/o,r=Math.sin(e.radians)/l,i=Math.atan2(r,n)-Math.PI/2,t.save(),t.translate(e.x,e.y),t.scale(o,l),s.nodeName){var u=s.naturalWidth,c=s.naturalHeight;t.drawImage(s,0,0,u,c,-u/2,-c/2,u,c)}else{t.rotate(i),t.beginPath(),t.lineWidth=1,t.strokeStyle=e.color,t.fillStyle=e.fill,t.moveTo(-s[0][0],s[0][1]);for(var h=1;ho)throw u=l===o?"exactly "+o:"between "+l+" and "+o,new Sk.builtin.TypeError(a+"() takes "+u+" positional argument(s) ("+d.length+" given)");for(e=d.length;--e>=0;)void 0!==d[e]&&(d[e]instanceof Sk.builtin.func?d[e]=pythonToJavascriptFunction(d[e]):d[e]instanceof Sk.builtin.method?d[e]=pythonToJavascriptFunction(d[e].im_func,d[e].im_self):d[e]&&d[e].$d instanceof Sk.builtin.dict&&d[e].instance?d[e]=d[e].instance:d[e]=Sk.ffi.remapToJs(d[e]));var _=d.slice(0);for(d=[],e=_.length;e>=0;--e)null!==_[e]&&(d[e]=_[e]);try{t=f[n].apply(f,d)}catch(g){throw window&&window.console&&(window.console.log("wrapped method failed"),window.console.log(g.stack)),g}return t instanceof InstantPromise&&(t=t.lastResult),t instanceof Promise?(t=t.catch((function(e){throw window&&window.console&&(window.console.log("promise failed"),window.console.log(e.stack)),e})),(i=new Sk.misceval.Suspension).resume=function(){return void 0===s?Sk.builtin.none.none$:Sk.ffi.remapToPy(s)},i.data={type:"Sk.promise",promise:t.then((function(e){return s=e,e}))},i):void 0===t?Sk.builtin.none.none$:h?t:"function"==typeof c?c(t):Sk.ffi.remapToPy(t)},i.co_name=new Sk.builtin.str(a),i.co_varnames=u.slice(),i.$defaults=[];for(var d=l;d")})),e.__iter__=new Sk.builtin.func((function(n){var e=n.lineList;return Sk.builtin.makeGenerator((function(){if(!(this.$index>=this.$lines.length))return new Sk.builtin.str(this.$lines[this.$index++])}),{$obj:n,$index:0,$lines:e})})),e.read=new Sk.builtin.func((function(n,e){if(n.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var i=n.data$.length;void 0===e&&(e=i);var t=new Sk.builtin.str(n.data$.substr(n.pos$,e));return n.pos$+=e,n.pos$>=i&&(n.pos$=i),t})),e.readline=new Sk.builtin.func((function(n,e){var i="";return n.currentLinee===o)).length)throw new i("one of the hex, bytes, bytes_le, fields, or int arguments must be given");if(u!==o){u=u.toString().replace("urn:","").replace("uuid:","");let e=0,i=u.length-1;for(;"{}".indexOf(u[e])>=0;)e++;for(;"{}".indexOf(u[i])>=0;)i--;if(u=u.slice(e,i+1),u=u.replace(S,""),32!==u.length)throw new s("badly formed hexadecimal UUID string");f=d(n,[new t(u),U])}if(c!==o){if(!(c instanceof e))throw new i("bytes_le should be a bytes instance");if(c=c.valueOf(),16!==c.length)throw new s("bytes_le is not a 16-char string");h=switchBytesBytesLe(c),h=new e(h)}if(h!==o){if(!(h instanceof e))throw new i("bytes_le should be a bytes instance");if(16!==h.valueOf().length)throw new s("bytes is not a 16-char string");f=d(w,[h],["byteorder",v])}if(p!==o)throw new r("fields argument is not yet supported");if(f!==o&&(g(f,_,"Lt")||((e,t)=>g(e,t,"GtE"))(f,y)))throw new s("int is out of range (need a 128-bit value)");this.$int=f,this.$isSafe=I},tp$str(){const e=E.nb$remainder(this.$int).toString();return new t(`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`)},$r(){const e=u(this.ob$type,t.$name),n=c(this.tp$str());return new t(`${e}(${n})`)},tp$hash(){return this.$int.tp$hash()},tp$richcompare(e,t){return e instanceof R?this.$int.tp$richcompare(e.$int,t):l},tp$as_number:!0,nb$int(){return this.$int}},getsets:{int:{$get(){return this.$int}},is_safe:{$get(){return this.$isSafe}},bytes:{$get(){return d(b,[this.$int,U,v])}},bytes_le:{$get(){const n=this.tp$getattr(new t("bytes")).valueOf();return new e(switchBytesBytesLe(n))}},fields:{$get:()=>notImplemented()},time_low:{$get:()=>notImplemented()},time_mid:{$get:()=>notImplemented()},time_hi_version:{$get:()=>notImplemented()},clock_seq_hi_variant:{$get:()=>notImplemented()},clock_seq_low:{$get:()=>notImplemented()},time:{$get:()=>notImplemented()},clock_seq:{$get:()=>notImplemented()},node:{$get:()=>notImplemented()},hex:{$get(){return E.nb$remainder(this.$int)}},urn:{$get(){return new t(`urn:uuid:${this}`)}},variant:{$get:()=>notImplemented()},version:{$get:()=>notImplemented()}}});return h("uuid",p,{uuid1:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid2:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid3:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid4:{$meth(){const t=new e(f.getRandomValues(new Uint8Array(16)));return d(R,[],["bytes",t,"version",I])},$flags:{NoArgs:!0}},uuid5:{$meth(){notImplemented()},$flags:{FastCall:!0}}}),p}',"src/lib/webbrowser.js":'var $builtinmodule=function(n){var e={},t="undefined"!=typeof window&&"undefined"!=typeof window.navigator;function open_tab(n){return Sk.builtin.pyCheckType("url","string",Sk.builtin.checkString(n)),t?(n=n.$jsstr(),window.open(n,"_blank"),Sk.builtin.bool.true$):Sk.builtin.bool.false$}return e.__name__=new Sk.builtin.str("webbrowser"),e.open=new Sk.builtin.func((function open(n){return Sk.builtin.pyCheckArgsLen("open",arguments.length+1,1,3),open_tab(n)})),e.open_new=new Sk.builtin.func((function open_new(n){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,1,1),open_tab(n)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,1,1),open_tab(n)})),e.DefaultBrowser=Sk.misceval.buildClass(e,(function dflbrowser(n,e){e.__init__=new Sk.builtin.func((function __init__(n){return Sk.builtin.none.none$})),e.open=new Sk.builtin.func((function open(n,e){return Sk.builtin.pyCheckArgsLen("open",arguments.length,2,4),open_tab(e)})),e.open_new=new Sk.builtin.func((function open_new(n,e){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,2,2),open_tab(e)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n,e){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,2,2),open_tab(e)}))}),"DefaultBrowser",[]),e.get=new Sk.builtin.func((function get(){return Sk.builtin.pyCheckArgsLen("get",arguments.length,0,1),Sk.misceval.callsimArray(e.DefaultBrowser,[])})),e};',"src/lib/webgl/math.js":'var $builtinmodule=function(e){var n={};return n.Mat44=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func((function(e){Sk.misceval.callsimArray(t.loadIdentity,[e]),e.stack=[]})),t.push=new Sk.builtin.func((function(e){e.stack.push(e.elements.slice(0))})),t.pop=new Sk.builtin.func((function(e){e.elements=e.stack.pop()})),t.loadIdentity=new Sk.builtin.func((function(e){e.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]})),t.transform3=new Sk.builtin.func((function(e,t){var l=e.elements;return Sk.misceval.callsimArray(n.Vec3,[l[0]*t.x+l[4]*t.y+l[8]*t.z,l[1]*t.x+l[5]*t.y+l[9]*t.z,l[2]*t.x+l[6]*t.y+l[10]*t.z])})),t.scale=new Sk.builtin.func((function(e,n,t,l){return e.elements[0]*=n,e.elements[1]*=n,e.elements[2]*=n,e.elements[3]*=n,e.elements[4]*=t,e.elements[5]*=t,e.elements[6]*=t,e.elements[7]*=t,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,e.elements[11]*=l,e})),t.translate=new Sk.builtin.func((function(e,n,t,l){return e.elements[12]+=e.elements[0]*n+e.elements[4]*t+e.elements[8]*l,e.elements[13]+=e.elements[1]*n+e.elements[5]*t+e.elements[9]*l,e.elements[14]+=e.elements[2]*n+e.elements[6]*t+e.elements[10]*l,e.elements[15]+=e.elements[3]*n+e.elements[7]*t+e.elements[11]*l,e})),t.rotate=new Sk.builtin.func((function(e,t,l,s,m){var i,a,c,u,r,f,o,k,S,y,b,v=Math.sqrt(l*l+s*s+m*m),_=Math.sin(t*Math.PI/180),w=Math.cos(t*Math.PI/180);v>0&&(i=(l/=v)*l,a=(s/=v)*s,c=(m/=v)*m,u=l*s,r=s*m,f=m*l,o=l*_,k=s*_,S=m*_,y=1-w,(b=Sk.misceval.callsimArray(n.Mat44)).elements[0]=y*i+w,b.elements[1]=y*u-S,b.elements[2]=y*f+k,b.elements[3]=0,b.elements[4]=y*u+S,b.elements[5]=y*a+w,b.elements[6]=y*r-o,b.elements[7]=0,b.elements[8]=y*f-k,b.elements[9]=y*r+o,b.elements[10]=y*c+w,b.elements[11]=0,b.elements[12]=0,b.elements[13]=0,b.elements[14]=0,b.elements[15]=1,b=b.multiply(e),e.elements=b.elements);return e})),t.multiply=new Sk.builtin.func((function(e,t){for(var l=Sk.misceval.callsimArray(n.Mat44),s=0;s<4;s++)l.elements[4*s+0]=e.elements[4*s+0]*t.elements[0]+e.elements[4*s+1]*t.elements[4]+e.elements[4*s+2]*t.elements[8]+e.elements[4*s+3]*t.elements[12],l.elements[4*s+1]=e.elements[4*s+0]*t.elements[1]+e.elements[4*s+1]*t.elements[5]+e.elements[4*s+2]*t.elements[9]+e.elements[4*s+3]*t.elements[13],l.elements[4*s+2]=e.elements[4*s+0]*t.elements[2]+e.elements[4*s+1]*t.elements[6]+e.elements[4*s+2]*t.elements[10]+e.elements[4*s+3]*t.elements[14],l.elements[4*s+3]=e.elements[4*s+0]*t.elements[3]+e.elements[4*s+1]*t.elements[7]+e.elements[4*s+2]*t.elements[11]+e.elements[4*s+3]*t.elements[15];return e.elements=l.elements,e})),t.lookAt=new Sk.builtin.func((function(e,t,l,s,m,i,a,c,u,r){var f=[t-m,l-i,s-a],o=Math.sqrt(f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);o&&(f[0]/=o,f[1]/=o,f[2]/=o);var k=[c,u,r],S=[];S[0]=k[1]*f[2]-k[2]*f[1],S[1]=-k[0]*f[2]+k[2]*f[0],S[2]=k[0]*f[1]-k[1]*f[0],k[0]=f[1]*S[2]-f[2]*S[1],k[1]=-f[0]*S[2]+f[2]*S[0],k[2]=f[0]*S[1]-f[1]*S[0],(o=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]))&&(S[0]/=o,S[1]/=o,S[2]/=o),(o=Math.sqrt(k[0]*k[0]+k[1]*k[1]+k[2]*k[2]))&&(k[0]/=o,k[1]/=o,k[2]/=o);var y=Sk.misceval.callsimArray(n.Mat44);return y.elements[0]=S[0],y.elements[4]=S[1],y.elements[8]=S[2],y.elements[12]=0,y.elements[1]=k[0],y.elements[5]=k[1],y.elements[9]=k[2],y.elements[13]=0,y.elements[2]=f[0],y.elements[6]=f[1],y.elements[10]=f[2],y.elements[14]=0,y.elements[3]=0,y.elements[7]=0,y.elements[11]=0,y.elements[15]=1,y=y.multiply(e),e.elements=y.elements,e.translate(-t,-l,-s),e}))}),"Mat44",[]),n.Mat33=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e){Sk.misceval.callsimArray(n.loadIdentity,[e])})),n.loadIdentity=new Sk.builtin.func((function(e){e.elements=[1,0,0,0,1,0,0,0,1]}))}),"Mat33",[]),n.Vec3=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func((function(e,n,t,l){e.x=n,e.y=t,e.z=l})),t.__sub__=new Sk.builtin.func((function(e,t){return Sk.misceval.callsimArray(n.Vec3,[e.x-t.x,e.y-t.y,e.z-t.z])}))}),"Vec3",[]),n.cross=new Sk.builtin.func((function(e,t){return Sk.asserts.assert(e instanceof n.Vec3&&t instanceof n.Vec3),Sk.misceval.callsimArray(n.Vec3,[e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x])})),n};',"src/lib/webgl/matrix4.js":"var $builtinmodule=function(n){var r={},t=new Float32Array(3),a=new Float32Array(3),u=new Float32Array(3),e=(new Float32Array(4),new Float32Array(4),new Float32Array(4),new Float32Array(16),new Float32Array(16),new Float32Array(16),function(n,r){for(var t=0,a=r.length,u=0;u1e-5)for(u=0;u{const n=e.$d;var r={},Buffer=function(t,e){var r=e||n.ARRAY_BUFFER,i=n.createBuffer();if(this.target=r,this.buf=i,this.set(t),this.numComponents_=t.numComponents,this.numElements_=t.numElements,this.totalComponents_=this.numComponents_*this.numElements_,t.buffer instanceof Float32Array)this.type_=n.FLOAT;else if(t.buffer instanceof Uint8Array)this.type_=n.UNSIGNED_BYTE;else if(t.buffer instanceof Int8Array)this.type_=n._BYTE;else if(t.buffer instanceof Uint16Array)this.type_=n.UNSIGNED_SHORT;else{if(!(t.buffer instanceof Int16Array))throw"unhandled type:"+typeof t.buffer;this.type_=n.SHORT}};return Buffer.prototype.set=function(t){n.bindBuffer(this.target,this.buf),n.bufferData(this.target,t.buffer,n.STATIC_DRAW)},Buffer.prototype.type=function(){return this.type_},Buffer.prototype.numComponents=function(){return this.numComponents_},Buffer.prototype.numElements=function(){return this.numElements_},Buffer.prototype.totalComponents=function(){return this.totalComponents_},Buffer.prototype.buffer=function(){return this.buf},Buffer.prototype.stride=function(){return 0},Buffer.prototype.offset=function(){return 0},r.Model=Sk.misceval.buildClass(r,(function(e,r){r.__init__=new Sk.builtin.func((function(e,r,i,f){e.buffers={};var setBuffer=function(t,r){var i="indices"==t?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER;let f=e.buffers[t];f?f.set(r):f=new Buffer(r,i),e.buffers[t]=f};for(t in i)setBuffer(t,i[t]);var o={},s=0;for(var u in f)o[u]=s++;e.mode=n.TRIANGLES,e.textures=f.v,e.textureUnits=o,e.shader=r})),r.drawPrep=new Sk.builtin.func((function(t,e){var r=t.shader,i=t.buffers,f=t.textures;for(var o in e=Sk.ffi.remapToJs(e),Sk.misceval.callsimArray(r.use,[r]),i){var s=i[o];if("indices"==o)n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,s.buffer());else{var u=r.attrib[o];u&&u(s)}}for(var a in f){var m=t.textureUnits[a];r.setUniform$impl(r,f,m),f[a].bindToUnit(m)}for(var p in e)r.setUniform$impl(r,p,e[p])})),r.draw=new Sk.builtin.func((function(t,e,r){var i=t.shader;e=Sk.ffi.remapToJs(e);for(let n in e)i.setUniform$impl(i,n,e[n]);if(r)for(var f in r){var o=t.textureUnits[f];i.setUniform$impl(i,f,o),r[f].bindToUnit(o)}var s=t.buffers;n.drawElements(t.mode,s.indices.totalComponents(),n.UNSIGNED_SHORT,0)}))}),"Model",[]),r}))};',"src/lib/webgl/primitives.js":'var $builtinmodule=function(t){var n={},AttribBuffer=function(t,n,e){e=e||"Float32Array";var r=window[e];n.length?(this.buffer=new r(n),n=this.buffer.length/t,this.cursor=n):(this.buffer=new r(t*n),this.cursor=0),this.numComponents=t,this.numElements=n,this.type=e};return AttribBuffer.prototype.stride=function(){return 0},AttribBuffer.prototype.offset=function(){return 0},AttribBuffer.prototype.getElement=function(t){for(var n=t*this.numComponents,e=[],r=0;r
\'+n+"
"},e=\'This page requires a browser that supports WebGL.
Click here to upgrade your browser.\';return t.Context=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){var i=document.getElementById(t.v),r=function(n,t){var i=document.getElementById(n);if(t||(t=i.getElementsByTagName("canvas")[0]),t){var r=function(n){for(var t=["webgl","experimental-webgl","webkit-3d","moz-webgl"],e=null,i=0;i7||7==a.Chrome[0]&&a.Chrome[1]>0||7==a.Chrome[0]&&0==a.Chrome[1]&&a.Chrome[2]>=521)?i.innerHTML=makeFailHTML(\'It doesn\\\'t appear your computer can support WebGL.
Click here for more information.\'):i.innerHTML=makeFailHTML(e)}return r}i.innerHTML=makeFailHTML(e)}(t.v,i);if(!r)throw new Error("Your browser does not appear to support WebGL.");for(var u in n.gl=r,r.__proto__)if("number"==typeof r.__proto__[u])Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),r.__proto__[u]);else if("function"==typeof r.__proto__[u])switch(u){case"bufferData":case"clearColor":case"drawArrays":case"getAttribLocation":case"getUniformLocation":case"shaderSource":case"uniformMatrix4fv":case"vertexAttribPointer":case"viewport":break;default:!function(t){Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),new Sk.builtin.func((function(){return r.__proto__[t].apply(r,arguments)})))}(u)}r.clearColor(100/255,149/255,237/255,1),r.clear(r.COLOR_BUFFER_BIT)})),t.tp$getattr=Sk.generic.getAttr,t.bufferData=new Sk.builtin.func((function(n,t,e,i){n.gl.bufferData(t,e.v,i)})),t.clearColor=new Sk.builtin.func((function(n,t,e,i,r){n.gl.clearColor(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.getAttribLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getAttribLocation(t,e.v)})),t.getUniformLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getUniformLocation(t,e.v)})),t.shaderSource=new Sk.builtin.func((function(n,t,e){n.gl.shaderSource(t,e.v)})),t.drawArrays=new Sk.builtin.func((function(n,t,e,i){n.gl.drawArrays(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i))})),t.vertexAttribPointer=new Sk.builtin.func((function(n,t,e,i,r,u,a){n.gl.vertexAttribPointer(t,Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),r,Sk.builtin.asnum$(u),Sk.builtin.asnum$(a))})),t.viewport=new Sk.builtin.func((function(n,t,e,i,r){n.gl.viewport(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.uniformMatrix4fv=new Sk.builtin.func((function(n,t,e,i){n.gl.uniformMatrix4fv(Sk.builtin.asnum$(t),e,i.v)})),t.setDrawFunc=new Sk.builtin.func((function(n,t){var e=(new Date).getTime();setInterval((function(){Sk.misceval.callsimArray(t,[n,(new Date).getTime()-e])}),1e3/60)}))}),"Context",[]),t.Float32Array=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){n.v="number"==typeof t?new Float32Array(t):new Float32Array(Sk.ffi.remapToJs(t))})),t.__repr__=new Sk.builtin.func((function(n){for(var t=[],e=0;e(z=e.$d,O)),(e=>{O=e.$d}));return S(L,(()=>{function _strftime(e){return t=>e.$strftime(t).toString().toLowerCase()}function _strftime_timetuple(e,t){return O.strftime.tp$call([new i(e),t]).toString().toLowerCase()}const l=new i("fromordinal");function _struct_time(t){return O.struct_time.tp$call([new s(t.map((t=>new e(t))))])}function _localized_month(){const e=[()=>""];for(let t=0;t<12;t++){const i=new k(2001,t+1,1);e.push(_strftime(i))}return e}function _localized_day(){const e=[];for(let t=0;t<7;t++){const i=new k(2001,1,t+1);e.push(_strftime(i))}return e}const S={__name__:new i("_strptime")},k=z.date,L=z.timedelta,E=z.timezone;function _getlang(){return[t,t]}class LocaleTime{constructor(){this.lang=_getlang(),this.__calc_weekday(),this.__calc_month(),this.__calc_am_pm(),this.__calc_timezone(),this.__calc_date_time()}__calc_weekday(){this.a_weekday=_localized_day().map((e=>e("%a"))),this.f_weekday=_localized_day().map((e=>e("%A")))}__calc_month(){this.a_month=_localized_month().map((e=>e("%b"))),this.f_month=_localized_month().map((e=>e("%B")))}__calc_am_pm(){const e=[];[1,22].forEach((t=>{const i=_strftime_timetuple("%p",_struct_time([1999,3,17,t,44,55,2,76,0]));e.push(i)})),this.am_pm=e}__calc_date_time(){const e=_struct_time([1999,3,17,22,44,55,2,76,0]),i=[t,t,t];i[0]=_strftime_timetuple("%c",e),i[1]=_strftime_timetuple("%x",e),i[2]=_strftime_timetuple("%X",e);const s=[["%","%%"],[this.f_weekday[2],"%A"],[this.f_month[3],"%B"],[this.a_weekday[2],"%a"],[this.a_month[3],"%b"],[this.am_pm[1],"%p"],["1999","%Y"],["99","%y"],["22","%H"],["44","%M"],["55","%S"],["76","%j"],["17","%d"],["03","%m"],["3","%m"],["2","%w"],["10","%I"]];s.push(...this.timezone.flat().map((e=>[e,"%Z"]))),[[0,"%c"],[1,"%x"],[2,"%X"]].forEach((([e,t])=>{let n=i[e];s.forEach((([e,t])=>{e&&(n=n.replace(e,t))}));let a;a=_strftime_timetuple(t,_struct_time([1999,1,3,1,1,1,6,3,0])).includes("00")?"%W":"%U",i[e]=n.replace("11",a)})),this.LC_date_time=i[0],this.LC_date=i[1],this.LC_time=i[2]}__calc_timezone(){try{O.tzset.tp$call([])}catch{}this.tzname=O.tzname.v.map((e=>e.toString())),this.daylight=w(O.daylight);const e=[this.tzname[0].toLowerCase(),"utc","gmt"];let t;t=this.daylight?[this.tzname[1].toLowerCase()]:[],this.timezone=[e,t]}}class TimeRE{constructor(e=null){this.locale_time=e||new LocaleTime,Object.assign(this,{d:"(?3[0-1]|[1-2]\\\\d|0[1-9]|[1-9]| [1-9])",f:"(?[0-9]{1,6})",H:"(?2[0-3]|[0-1]\\\\d|\\\\d)",I:"(?1[0-2]|0[1-9]|[1-9])",G:"(?\\\\d\\\\d\\\\d\\\\d)",j:"(?36[0-6]|3[0-5]\\\\d|[1-2]\\\\d\\\\d|0[1-9]\\\\d|00[1-9]|[1-9]\\\\d|0[1-9]|[1-9])",m:"(?1[0-2]|0[1-9]|[1-9])",M:"(?[0-5]\\\\d|\\\\d)",S:"(?6[0-1]|[0-5]\\\\d|\\\\d)",U:"(?5[0-3]|[0-4]\\\\d|\\\\d)",w:"(?[0-6])",u:"(?[1-7])",V:"(?5[0-3]|0[1-9]|[1-4]\\\\d|\\\\d)",y:"(?\\\\d\\\\d)",Y:"(?\\\\d\\\\d\\\\d\\\\d)",z:"(?[+-]\\\\d\\\\d:?[0-5]\\\\d(:?[0-5]\\\\d(\\\\.\\\\d{1,6})?)?|Z)",A:this.__seqToRE(this.locale_time.f_weekday,"A"),a:this.__seqToRE(this.locale_time.a_weekday,"a"),B:this.__seqToRE(this.locale_time.f_month.slice(1),"B"),b:this.__seqToRE(this.locale_time.a_month.slice(1),"b"),p:this.__seqToRE(this.locale_time.am_pm,"p"),Z:this.__seqToRE(this.locale_time.timezone.flat(),"Z"),"%":"%"}),this.W=this.U.replace("U","W"),this.x=this.pattern(this.locale_time.LC_date),this.X=this.pattern(this.locale_time.LC_time),this.c=this.pattern(this.locale_time.LC_date_time)}__seqToRE(e,t){if((e=e.slice(0).sort(((e,t)=>t.length-e.length))).every((e=>""===e)))return"";return`(?<${t}>${e.map((e=>e)).join("|")})`}pattern(e){let t="";for(e=(e=e.replace(b,"\\\\$1")).replace(v,"\\\\s+");e.includes("%");){const i=e.indexOf("%")+1,s=this[e[i]];if(void 0===s)throw new h(e[i]);t=`${t}${e.slice(0,i-1)}${s}`,e=e.slice(i+1)}return t+e}compile(e){return new RegExp("^"+this.pattern(e),"i")}}let C=new TimeRE;const T=5;let A={};function _strptime(i,s="%a %b %d %H:%M:%S %Y"){function _checkString(e,t){if("string"!=typeof e&&!u(e))throw new m(`strptime() argument ${t} must be a str, not \'${o(e)}\'`)}_checkString(i,0),_checkString(s,1),i=i.toString(),s=s.toString();let n,_=C.locale_time;if(Object.keys(A).length>T&&(A={}),n=A[s],void 0===n)try{n=C.compile(s)}catch(V){if(V instanceof h){let e=V.args.v[0];throw"\\\\"==e&&(e="%"),new d(`\'${e}\' is a bad directive in format \'${s}\'`)}if(V instanceof f)throw new d("stray %% in format \'"+s+"\'");throw V}const c=i.match(n);if(null===c)throw new d(`time data \'${i}\' does not match format \'${s}\'`);if(i.length!==c[0].length)throw new d(`unconverted data remains: ${i.slice(c[0].length)}`);let w=t,p=t,g=1,$=1,y=0,S=0,b=0,v=0,z=-1,L=t,E=0,I=t,M=t,H=t,Y=t,j=t,U=c.groups||{};if(Object.keys(U).forEach((e=>{if(void 0!==U[e])if("y"===e)p=_as_integer(U.y),p+=p<=68?2e3:1900;else if("Y"===e)p=_as_integer(U.Y);else if("G"===e)w=_as_integer(U.G);else if("m"===e)g=_as_integer(U.m);else if("B"===e)g=_.f_month.indexOf(U.B.toLowerCase());else if("b"===e)g=_.a_month.indexOf(U.b.toLowerCase());else if("d"===e)$=_as_integer(U.d);else if("H"===e)y=_as_integer(U.H);else if("H"===e)y=_as_integer(U.H);else if("I"===e){y=_as_integer(U.I);const e=(U.p||"").toLowerCase();["",_.am_pm[0]].includes(e)?12===y&&(y=0):e===_.am_pm[1]&&12!==y&&(y+=12)}else if("M"===e)S=_as_integer(U.M);else if("S"===e)b=_as_integer(U.S);else if("f"===e){let e=U.f;e+="0".repeat(6-e.length),v=_as_integer(e)}else if("A"===e)Y=_.f_weekday.indexOf(U.A.toLowerCase());else if("a"===e)Y=_.a_weekday.indexOf(U.a.toLowerCase());else if("w"===e)Y=_as_integer(U.w),0===Y?Y=6:Y-=1;else if("u"===e)Y=_as_integer(U.u),Y-=1;else if("j"===e)j=_as_integer(U.j);else if(["U","W"].includes(e))M=_as_integer(U[e]),H="U"===e?6:0;else if("V"===e)I=_as_integer(U.V);else if("z"===e){let e=U.z;if("Z"===e)L=0;else{if(":"===e[3]&&(e=e.slice(0,3)+e.slice(4),e.length>5)){if(":"!==e[5]){const e=`Inconsistent use of : in ${U.z}`;throw new d(e)}e=e.slice(0,5)+e.slice(6)}const t=_as_integer(e.slice(1,3)),i=_as_integer(e.slice(3,5)),s=_as_integer(e.slice(5,7)||0);L=3600*t+60*i+s;const n=e.slice(8),a="0".repeat(6-n.length);E=_as_integer(n+a),e.startsWith("-")&&(L=-L,E=-E)}}else if("Z"===e){let e=U.Z.toLowerCase(),t=0;for(let i of _.timezone){if(i.includes(e)){const i=O.tzname.v;if(r(i[0],i[1],"Eq")&&a(O.daylight)&&!["utc","gmt"].includes(e))break;z=t}t++}}})),p===t&&w!==t){if(I===t||Y===t)throw new d("ISO year directive \'%G\' must be used with the ISO week directive \'%V\' and a weekday directive (\'%A\',\'%a\', \'%w\', or \'%u\').");if(j!==t)throw new d("Day of the year directive \'%j\' is not compatible with ISO year directive \'%G\'.Use \'%Y\' instead.")}else if(M===t&&I!==t)throw new d(Y===t?"ISO week directive \'%V\' must be used with the ISO year directive \'%G\' and a weekday directive (\'%A\', \'%a\', \'%w\', or \'%u\').":"ISO week directive \'%V\' is incompatible with the year directive \'%Y\'. Use the ISO year \'%G\' instead.");let x=!1;if(p===t&&2===g&&29===$?(p=1904,x=!0):p===t&&(p=1900),j===t&&Y!==t){if(M!==t){j=function _calc_julian_from_U_or_W(e,t,i,s){let n=(new k(e,1,1).$toOrdinal()+6)%7;return s||(n=(n+1)%7,i=(i+1)%7),0===t?1+i-n:(7-n)%7+7*(t-1)+1+i}(p,M,Y,0===H)}else w!==t&&I!==t&&([p,j]=function _calc_julian_from_V(e,t,i){let s=7*t+i-((new k(e,1,4).$toOrdinal()%7||7)+3);return s<1&&(s+=new k(e,1,1).$toOrdinal(),s-=new k(e-=1,1,1).$toOrdinal()),[e,s]}(w,I,Y+1));if(j!==t&&j<=0){p-=1;const e=function _is_leap(e){return e%4==0&&(e%100!=0||e%400==0)}(p)?366:365;j+=e}}if(j===t)j=new k(p,g,$).$toOrdinal()-new k(p,1,1).$toOrdinal()+1;else{const t=function _fromordinal(t){return k.tp$getattr(l).tp$call([new e(t)])}(j-1+new k(p,1,1).$toOrdinal());p=t.$year,g=t.$month,$=t.$day}Y===t&&(Y=(new k(p,g,$).$toOrdinal()+6)%7);const R=U.Z||t;return x&&(p=1900),[[p,g,$,y,S,b,Y,j,z,R,L],v,E]}return _("_strptime",S,{_strptime_time:{$meth:function _strptime_time(t,i="%a %b %d %H:%M:%S %Y"){let n=_strptime(t,i)[0].slice(0,11);return n=n.map(((t,i)=>i<9?new e(t):p(t))),O.struct_time.tp$call([new s(n)])},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime_datetime:{$meth:function _strptime_datetime(s,r,l="%a %b %d %H:%M:%S %Y"){const[o,_,c]=_strptime(r,l),[m,d]=o.slice(-2),h=o.slice(0,6);let f,u;return h.push(_),h.map((t=>new e(t))),d!==t&&(f=new L(0,d,c),u=a(m)?new E(f,new i(m)):new E(f),h.push(u)),n(s,h)},$flags:{NamedArgs:["cls","data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime:{$meth(i,n){const a=_strptime(i,n);return a[0]=new s(a[0].map((i=>i===t?i:new e(i)))),a[1]=new e(a[1]),a[2]=new e(a[2]),new s(a)},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_getlang:{$meth:()=>p(_getlang()),$flags:{NoArgs:!0}}}),S.LocaleTime=c("_strptime.LocaleTime",{constructor:function(){this.v=new LocaleTime},slots:{tp$getattr(e,t){return this.v.hasOwnProperty(e.toString())?p(this.v[e.toString()]):$.call(this,e,t)},tp$setattr(e,t){if(!this.v.hasOwnProperty(e.toString()))return y.call(this,e,t);this.v[e.toString()]=g(t)}}}),S}))}'}}},312:function(t,e,n){(function(){"use strict";var t=t||{};t.scope={},t.ASSUME_ES5=!1,t.ASSUME_NO_NATIVE_MAP=!1,t.ASSUME_NO_NATIVE_SET=!1,t.SIMPLE_FROUND_POLYFILL=!1,t.ISOLATE_POLYFILLS=!1,t.FORCE_POLYFILL_PROMISE=!1,t.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,t.defineProperty=t.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){return t==Array.prototype||t==Object.prototype||(t[e]=n.value),t},t.getGlobal=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof n.g&&n.g];for(var e=0;e(e=e||0)&&(e=Math.max(e+i,0));e{Sk.abstr.setUpSlots(t),Sk.abstr.setUpMethods(t),Sk.abstr.setUpGetSets(t),Sk.abstr.setUpClassMethods(t)})),n(19),n(20),n(21),[Sk.builtin.str,Sk.builtin.none,Sk.builtin.NotImplemented,Sk.builtin.object].forEach((t=>{(t=t.prototype).__doc__=t.hasOwnProperty("tp$doc")?new Sk.builtin.str(t.tp$doc):Sk.builtin.none.none$})),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29),n(31),n(32),n(33),n(34),n(35),n(36),n(37),n(38),n(39),n(40),n(41),n(42),n(43),n(44),n(45),n(46),n(47),n(48),n(49),n(50),n(51),n(52),n(53),n(66),n(54),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65)},function(t,e,n){(function(t){var e={build:{githash:"1d6da87991edd93117a53858367c32f27d77b396",date:"2023-09-01T06:58:47.589Z"}};e.global=void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e.exportSymbol=function(t,n){t=t.split(".");var i,s=e.global;for(i=0;i=t||0===e||4<=e)return"th";switch(e){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function o(t){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t)}var a={de_DE:{identifier:"de-DE",days:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),shortDays:"So Mo Di Mi Do Fr Sa".split(" "),months:"Januar Februar März April Mai Juni Juli August September Oktober November Dezember".split(" "),shortMonths:"Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d.%m.%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},en_CA:{identifier:"en-CA",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},en_US:{identifier:"en-US",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%m/%d/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},es_MX:{identifier:"es-MX",days:"domingo lunes martes miércoles jueves viernes sábado".split(" "),shortDays:"dom lun mar mié jue vie sáb".split(" "),months:"enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre".split(" "),shortMonths:"ene feb mar abr may jun jul ago sep oct nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},fr_FR:{identifier:"fr-FR",days:"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),shortDays:"dim. lun. mar. mer. jeu. ven. sam.".split(" "),months:"janvier février mars avril mai juin juillet août septembre octobre novembre décembre".split(" "),shortMonths:"janv. févr. mars avril mai juin juil. août sept. oct. nov. déc.".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},it_IT:{identifier:"it-IT",days:"domenica lunedì martedì mercoledì giovedì venerdì sabato".split(" "),shortDays:"dom lun mar mer gio ven sab".split(" "),months:"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),shortMonths:"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},nl_NL:{identifier:"nl-NL",days:"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),shortDays:"zo ma di wo do vr za".split(" "),months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),shortMonths:"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},pt_BR:{identifier:"pt-BR",days:"domingo segunda terça quarta quinta sexta sábado".split(" "),shortDays:"Dom Seg Ter Qua Qui Sex Sáb".split(" "),months:"janeiro fevereiro março abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),shortMonths:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},ru_RU:{identifier:"ru-RU",days:"Воскресенье Понедельник Вторник Среда Четверг Пятница Суббота".split(" "),shortDays:"Вс Пн Вт Ср Чт Пт Сб".split(" "),months:"Январь Февраль Март Апрель Май Июнь Июль Август Сентябрь Октябрь Ноябрь Декабрь".split(" "),shortMonths:"янв фев мар апр май июн июл авг сен окт ноя дек".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X",D:"%d.%m.%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},tr_TR:{identifier:"tr-TR",days:"Pazar Pazartesi Salı Çarşamba Perşembe Cuma Cumartesi".split(" "),shortDays:"Paz Pzt Sal Çrş Prş Cum Cts".split(" "),months:"Ocak Şubat Mart Nisan Mayıs Haziran Temmuz Ağustos Eylül Ekim Kasım Aralık".split(" "),shortMonths:"Oca Şub Mar Nis May Haz Tem Ağu Eyl Eki Kas Ara".split(" "),AM:"ÖÖ",PM:"ÖS",am:"ÖÖ",pm:"ÖS",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},zh_CN:{identifier:"zh-CN",days:"星期日 星期一 星期二 星期三 星期四 星期五 星期六".split(" "),shortDays:"日一二三四五六".split(""),months:"一月份 二月份 三月份 四月份 五月份 六月份 七月份 八月份 九月份 十月份 十一月份 十二月份".split(" "),shortMonths:"一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月".split(" "),AM:"上午",PM:"下午",am:"上午",pm:"下午",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}}},l=a.en_US,u=new function t(u,c,p){function h(t,a,l,u){for(var c="",p=null,_=!1,d=t.length,g=!1,b=0;ba.getHours()?l.am:l.pm;break;case 82:c+=h(l.formats.R,a,l,u);break;case 83:c+=e(a.getSeconds(),p);break;case 84:c+=h(l.formats.T,a,l,u);break;case 85:c+=e(s(a,"sunday"),p);break;case 87:c+=e(s(a,"monday"),p);break;case 88:c+=h(l.formats.X,a,l,u);break;case 89:c+=a.getFullYear();break;case 90:m&&0===f?c+="GMT":c+=(p=(p=(p=a).toString().match(/\(([\w\s]+)\)/))&&p[1])||"";break;case 97:c+=l.shortDays[a.getDay()];break;case 98:case 104:c+=l.shortMonths[a.getMonth()];break;case 99:c+=h(l.formats.c,a,l,u);break;case 100:c+=e(a.getDate(),p);break;case 101:c+=e(a.getDate(),null==p?" ":p);break;case 106:p=new Date(a.getFullYear(),0,1),c+=n(p=Math.ceil((a.getTime()-p.getTime())/864e5));break;case 107:c+=e(a.getHours(),null==p?" ":p);break;case 108:c+=e(i(a.getHours()),null==p?" ":p);break;case 109:c+=e(a.getMonth()+1,p);break;case 110:c+="\n";break;case 111:p=a.getDate(),c=l.ordinalSuffixes?c+(String(p)+(l.ordinalSuffixes[p-1]||r(p))):c+(String(p)+r(p));break;case 112:c+=12>a.getHours()?l.AM:l.PM;break;case 114:c+=h(l.formats.r,a,l,u);break;case 115:c+=Math.floor(u/1e3);break;case 116:c+="\t";break;case 117:c+=0===(p=a.getDay())?7:p;break;case 118:c+=h(l.formats.v,a,l,u);break;case 119:c+=a.getDay();break;case 120:c+=h(l.formats.x,a,l,u);break;case 121:c+=e(_=a.getFullYear()%100,p);break;case 122:m&&0===f?c+=g?"+00:00":"+0000":(p=0!==f?f/6e4:-a.getTimezoneOffset(),_=g?":":"",S=Math.abs(p%60),c+=(0>p?"-":"+")+e(Math.floor(Math.abs(p/60)))+_+e(S));break;default:_&&(c+="%"),c+=t[b]}p=null,_=!1}else 37===S?_=!0:c+=t[b]}return c}var _,d=u||l,f=c||0,m=p||!1,g=0,b=function(t,e){if(e){var n=e.getTime();if(m){var i=6e4*(e.getTimezoneOffset()||0);6e4*((e=new Date(n+i+f)).getTimezoneOffset()||0)!==i&&(e=6e4*(e.getTimezoneOffset()||0),e=new Date(n+e+f))}}else(n=Date.now())>g?(g=n,_=new Date(g),n=g,m&&(_=new Date(g+6e4*(_.getTimezoneOffset()||0)+f))):n=g,e=_;return h(t,e,d,n)};return b.localize=function(e){return new t(e||d,f,m)},b.localizeByIdentifier=function(t){var e=a[t];return e?b.localize(e):(o('[WARNING] No locale found with identifier "'+t+'".'),b)},b.timezone=function(e){var n=f,i=m,s=typeof e;return"number"!==s&&"string"!==s||(i=!0,"string"===s?n=(n="-"===e[0]?-1:1)*(60*(s=parseInt(e.slice(1,3),10))+(e=parseInt(e.slice(3,5),10)))*6e4:"number"===s&&(n=6e4*e)),new t(d,n,i)},b.utc=function(){return new t(d,f,!0)},b}(l,0,!1);if(void 0!==t)t.exports=u;else(function(){return this||(0,eval)("this")}()).strftime=u;"function"!=typeof Date.now&&(Date.now=function(){return+new Date})}()},function(t,e,n){t=n(5);const i=Sk.global.JSBI=void 0!==Sk.global.BigInt?{}:t;void 0===Sk.global.BigInt?(i.__isBigInt||(i.__isBigInt=t=>t instanceof i),i.powermod=(t,e,n)=>{const s=i.BigInt(1);let r=s;for(e=i.greaterThan(e,i.__ZERO)?e:i.unaryMinus(e);i.greaterThan(e,i.__ZERO);)i.bitwiseAnd(e,s)&&(r=i.remainder(i.multiply(r,t),n)),e=i.signedRightShift(e,s),t=i.remainder(i.multiply(t,t),n);return r}):Object.assign(i,{BigInt:Sk.global.BigInt,toNumber:t=>Number(t),toString:t=>t.toString(),__isBigInt:t=>"bigint"==typeof t,unaryMinus:t=>-t,bitwiseNot:t=>~t,bitwiseAnd:(t,e)=>t&e,bitwiseOr:(t,e)=>t|e,bitwiseXor:(t,e)=>t^e,exponentiate:(t,e)=>{const n=i.BigInt(1);let s=n;for(e=e>i.__ZERO?e:-e;e>i.__ZERO;)e&n&&(s*=t),e>>=n,t*=t;return s},powermod:(t,e,n)=>{const s=i.BigInt(1);let r=s;for(e=e>i.__ZERO?e:-e;e>i.__ZERO;)e&s&&(r=r*t%n),e>>=s,t=t*t%n;return r},multiply:(t,e)=>t*e,divide:(t,e)=>t/e,remainder:(t,e)=>t%e,add:(t,e)=>t+e,subtract:(t,e)=>t-e,leftShift:(t,e)=>t<t>>e,unsignedRightShift:(t,e)=>t>>>e,lessThan:(t,e)=>tt<=e,greaterThan:(t,e)=>t>e,greaterThanOrEqual:(t,e)=>t>=e,equal:(t,e)=>t===e,notEqual:(t,e)=>t!==e}),i.__ZERO=i.BigInt(0),i.__MAX_SAFE=i.BigInt(Number.MAX_SAFE_INTEGER),i.__MIN_SAFE=i.BigInt(-Number.MAX_SAFE_INTEGER),i.numberIfSafe=t=>i.lessThan(t,i.__MAX_SAFE)&&i.greaterThan(t,i.__MIN_SAFE)?i.toNumber(t):t,i.BigUp=t=>i.__isBigInt(t)?t:i.BigInt(t)},function(t,e,n){t.exports=function(){var t=Math.imul,e=Math.clz32,n=Math.abs,i=Math.max,s=Math.floor;class r extends Array{constructor(t,e){if(super(t),this.sign=e,t>r.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(t){var e=Number.isFinite;if("number"==typeof t){if(0===t)return r.__zero();if(r.__isOneDigitInt(t))return 0>t?r.__oneDigit(-t,!0):r.__oneDigit(t,!1);if(!e(t)||s(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return r.__fromDouble(t)}if("string"==typeof t){if(null===(e=r.__fromString(t)))throw new SyntaxError("Cannot convert "+t+" to a BigInt");return e}if("boolean"==typeof t)return!0===t?r.__oneDigit(1,!1):r.__zero();if("object"==typeof t)return t.constructor===r?t:(t=r.__toPrimitive(t),r.BigInt(t));throw new TypeError("Cannot convert "+t+" to a BigInt")}toDebugString(){const t=["BigInt["];for(const e of this)t.push((e?(e>>>0).toString(16):e)+", ");return t.push("]"),t.join("")}toString(t){if(2>(t=void 0===t?10:t)||36>>12;const l=a-12;for(e=12<=a?0:i<<20+a,a=20+a,0>>30-l,e=i<>>30-a,a-=30;return 1!==(i=r.__decideRounding(t,a,o,i))&&(0!==i||1&~e)||0!=(e=e+1>>>0)||!(0!=++s>>>20&&(s=0,1023<++n))?(t=t.sign?-2147483648:0,n=n+1023<<20,r.__kBitConversionInts[1]=t|n|s,r.__kBitConversionInts[0]=e,r.__kBitConversionDouble[0]):t.sign?-1/0:1/0}static unaryMinus(t){if(0===t.length)return t;const e=t.__copy();return e.sign=!t.sign,e}static bitwiseNot(t){return t.sign?r.__absoluteSubOne(t).__trim():r.__absoluteAddOne(t,!0)}static exponentiate(t,e){if(e.sign)throw new RangeError("Exponent must be positive");if(0===e.length)return r.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return!t.sign||1&e.__digit(0)?t:r.unaryMinus(t);if(1=r.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var n=1+(0|e/30);return(t=new r(n,t.sign&&!!(1&e))).__initializeDigits(),t.__setDigit(n-1,1<>=1;0!==e;e>>=1)i=r.multiply(i,i),1&e&&(n=null===n?i:r.multiply(n,i));return n}static multiply(t,e){if(0===t.length)return t;if(0===e.length)return e;var n=t.length+e.length;30<=t.__clzmsd()+e.__clzmsd()&&n--,(n=new r(n,t.sign!==e.sign)).__initializeDigits();for(let i=0;ir.__absoluteCompare(t,e))return r.__zero();const n=t.sign!==e.sign,i=e.__unsignedDigit(0);if(1===e.length&&32767>=i){if(1===i)return n===t.sign?t:r.unaryMinus(t);t=r.__absoluteDivSmall(t,i,null)}else t=r.__absoluteDivLarge(t,e,!0,!1);return t.sign=n,t.__trim()}static remainder(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>r.__absoluteCompare(t,e))return t;const n=e.__unsignedDigit(0);return 1===e.length&&32767>=n?1===n||0===(e=r.__absoluteModSmall(t,n))?r.__zero():r.__oneDigit(e,t.sign):((e=r.__absoluteDivLarge(t,e,!1,!0)).sign=t.sign,e.__trim())}static add(t,e){const n=t.sign;return n===e.sign?r.__absoluteAdd(t,e,n):0<=r.__absoluteCompare(t,e)?r.__absoluteSub(t,e,n):r.__absoluteSub(e,t,!n)}static subtract(t,e){const n=t.sign;return n===e.sign?0<=r.__absoluteCompare(t,e)?r.__absoluteSub(t,e,n):r.__absoluteSub(e,t,!n):r.__absoluteAdd(t,e,n)}static leftShift(t,e){return 0===e.length||0===t.length?t:e.sign?r.__rightShiftByAbsolute(t,e):r.__leftShiftByAbsolute(t,e)}static signedRightShift(t,e){return 0===e.length||0===t.length?t:e.sign?r.__leftShiftByAbsolute(t,e):r.__rightShiftByAbsolute(t,e)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(t,e){return 0>r.__compareToBigInt(t,e)}static lessThanOrEqual(t,e){return 0>=r.__compareToBigInt(t,e)}static greaterThan(t,e){return 0(t=s(t)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===t)return r.__zero();if(t>=r.__kMaxLengthBits)return e;const n=0|(t+29)/30;if(e.length(t=s(t)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===t)return r.__zero();if(e.sign){if(t>r.__kMaxLengthBits)throw new RangeError("BigInt too big");return r.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=r.__kMaxLengthBits)return e;const n=0|(t+29)/30;if(e.length>>i?r.__truncateToNBits(t,e):e}static ADD(t,e){if(t=r.__toPrimitive(t),e=r.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=r.__toNumeric(t),e=r.__toNumeric(e),r.__isBigInt(t)&&r.__isBigInt(e))return r.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(t,e){return r.__compare(t,e,0)}static LE(t,e){return r.__compare(t,e,1)}static GT(t,e){return r.__compare(t,e,2)}static GE(t,e){return r.__compare(t,e,3)}static EQ(t,e){for(;;){if(r.__isBigInt(t))return r.__isBigInt(e)?r.equal(t,e):r.EQ(e,t);if("number"==typeof t){if(r.__isBigInt(e))return r.__equalToNumber(e,t);if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else if("string"==typeof t){if(r.__isBigInt(e))return null!==(t=r.__fromString(t))&&r.equal(t,e);if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else if("boolean"==typeof t){if(r.__isBigInt(e))return r.__equalToNumber(e,+t);if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else if("symbol"==typeof t){if(r.__isBigInt(e))return!1;if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else{if("object"!=typeof t)return t==e;if("object"==typeof e&&e.constructor!==r)return t==e;t=r.__toPrimitive(t)}}}static NE(t,e){return!r.EQ(t,e)}static __zero(){return new r(0,!1)}static __oneDigit(t,e){return(e=new r(1,e)).__setDigit(0,t),e}__copy(){const t=new r(this.length,this.sign);for(let e=0;ee)e=-e-1;else{if(0===n)return-1;n--,i=t.__digit(n),e=29}if(!(i&(e=1<>>20)-1023,n=1+(0|e/30);t=new r(n,0>t);let i,s=1048575&r.__kBitConversionInts[1]|1048576,o=r.__kBitConversionInts[0];if(20>(e%=30)){var a=20-e;i=a+32,e=s>>>a,s=s<<32-a|o>>>a,o<<=32-a}else 20===e?(i=32,e=s,s=o):(i=32-(a=e-20),e=s<>>32-a,s=o<>>2,s=s<<30|o>>>2,o<<=30):e=0,t.__setDigit(n,e);return t.__trim()}static __isWhitespace(t){return!!(13>=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}static __fromString(t,e){e=void 0===e?0:e;let n=0;const i=t.length;let s=0;if(s===i)return r.__zero();let o=t.charCodeAt(s);for(;r.__isWhitespace(o);){if(++s===i)return r.__zero();o=t.charCodeAt(s)}if(43===o){if(++s===i)return null;o=t.charCodeAt(s),n=1}else if(45===o){if(++s===i)return null;o=t.charCodeAt(s),n=-1}if(0===e){if(e=10,48===o){if(++s===i)return r.__zero();if(o=t.charCodeAt(s),88===o||120===o){if(e=16,++s===i)return null;o=t.charCodeAt(s)}else if(79===o||111===o){if(e=8,++s===i)return null;o=t.charCodeAt(s)}else if(66===o||98===o){if(e=2,++s===i)return null;o=t.charCodeAt(s)}}}else if(16===e&&48===o){if(++s===i)return r.__zero();if(o=t.charCodeAt(s),88===o||120===o){if(++s===i)return null;o=t.charCodeAt(s)}}if(0!=n&&10!==e)return null;for(;48===o;){if(++s===i)return r.__zero();o=t.charCodeAt(s)}var a=i-s;let l=r.__kMaxBitsPerChar[e];var u=r.__kBitsPerCharTableMultiplier-1;if(a>1073741824/l)return null;a=new r(0|(29+(l*a+u>>>r.__kBitsPerCharTableShift))/30,!1);const c=10>e?e:10,p=10>>0>>0>>r.__kBitsPerCharTableShift)/30)}while(!h)}else{l>>=r.__kBitsPerCharTableShift,e=[];var h=[],_=!1;do{for(var d=0,f=0;;){if(o-48>>>0>>0>>l-r)}if(0!==s){if(i>=t.length)throw Error("implementation bug");t.__setDigit(i++,s)}for(;i>>1)+(85&i))>>>2)+(51&i))>>>4)+(15&i),--e;const s=t.__digit(n-1);var o=r.__clz30(s),a=0|(30*n-o+i-1)/i;if(t.sign&&a++,268435456>>(u=i-u),u=30-u;u>=i;)o[a--]=r.__kConversionChars[l&e],l>>>=i,u-=i}for(o[a--]=r.__kConversionChars[(l|s<>>i-u;0!==l;)o[a--]=r.__kConversionChars[l&e],l>>>=i;if(t.sign&&(o[a--]="-"),-1!=a)throw Error("implementation bug");return o.join("")}static __toStringGeneric(t,e,n){var i=t.length;if(0===i)return"";if(1===i)return e=t.__unsignedDigit(0).toString(e),!1===n&&t.sign&&(e="-"+e),e;var s=30*i-r.__clz30(t.__digit(i-1));i=r.__kMaxBitsPerChar[e]-1,i=1+(0|((s*=r.__kBitsPerCharTableMultiplier)+(i-1))/i)>>1;var o=(s=r.exponentiate(r.__oneDigit(e,!1),r.__oneDigit(i,!1))).__unsignedDigit(0);if(1===s.length&&32767>=o){(s=new r(t.length,!1)).__initializeDigits();var a=0;for(let e=2*t.length-1;0<=e;e--)a=a<<15|t.__halfDigit(e),s.__setHalfDigit(e,0|a/o),a=0|a%o;o=a.toString(e)}else s=(o=r.__absoluteDivLarge(t,s,!0,!0)).quotient,o=o.remainder.__trim(),o=r.__toStringGeneric(o,e,!0);for(s.__trim(),e=r.__toStringGeneric(s,e,!0);o.lengtht?r.__absoluteLess(n):0}static __compareToNumber(t,e){if(r.__isOneDigitInt(e)){const i=t.sign,s=0>e;if(i!==s)return r.__unequalSign(i);if(0===t.length){if(s)throw Error("implementation bug");return 0===e?0:-1}return 1e?r.__absoluteGreater(i):te)return r.__unequalSign(n);if(0===e)throw Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;if(r.__kBitConversionDouble[0]=e,2047==(e=2047&r.__kBitConversionInts[1]>>>20))throw Error("implementation bug: handled elsewhere");var i=e-1023;if(0>i)return r.__absoluteGreater(n);e=t.length;var s=t.__digit(e-1),o=r.__clz30(s),a=30*e-o;if(a<(i+=1))return r.__absoluteLess(n);if(a>i)return r.__absoluteGreater(n);i=1048576|1048575&r.__kBitConversionInts[1];let l=r.__kBitConversionInts[0];if((o=29-o)!=(0|(a-1)%30))throw Error("implementation bug");if(20>o){var u=20-o;o=u+32,a=i>>>u,i=i<<32-u|l>>>u,l<<=32-u}else 20===o?(o=32,a=i,i=l):(o=32-(u=o-20),a=i<>>32-u,i=l<>>=0)>(a>>>=0))return r.__absoluteGreater(n);if(s>>2,i=i<<30|l>>>2,l<<=30):a=0,(s=t.__unsignedDigit(e))>a)return r.__absoluteGreater(n);if(se&&t.__unsignedDigit(0)===n(e):0===r.__compareToDouble(t,e)}static __comparisonResultToBool(t,e){return 0===e?0>t:1===e?0>=t:2===e?0e;case 3:return t>=e}if(r.__isBigInt(t)&&"string"==typeof e)return null!==(e=r.__fromString(e))&&r.__comparisonResultToBool(r.__compareToBigInt(t,e),n);if("string"==typeof t&&r.__isBigInt(e))return null!==(t=r.__fromString(t))&&r.__comparisonResultToBool(r.__compareToBigInt(t,e),n);if(t=r.__toNumeric(t),e=r.__toNumeric(e),r.__isBigInt(t)){if(r.__isBigInt(e))return r.__comparisonResultToBool(r.__compareToBigInt(t,e),n);if("number"!=typeof e)throw Error("implementation bug");return r.__comparisonResultToBool(r.__compareToNumber(t,e),n)}if("number"!=typeof t)throw Error("implementation bug");if(r.__isBigInt(e))return r.__comparisonResultToBool(r.__compareToNumber(e,t),2^n);if("number"!=typeof e)throw Error("implementation bug");return 0===n?te:3===n?t>=e:void 0}__clzmsd(){return r.__clz30(this.__digit(this.length-1))}static __absoluteAdd(t,e,n){if(t.length>>30,n.__setDigit(s,1073741823&r)}for(;s>>30,n.__setDigit(s,1073741823&e);return s>>30,n.__setDigit(s,1073741823&r)}for(;s>>30,n.__setDigit(s,1073741823&e);return n.__trim()}static __absoluteAddOne(t,e,n){n=void 0===n?null:n;const i=t.length;null===n?n=new r(i,e):n.sign=e,e=1;for(let s=0;s>>30,n.__setDigit(s,1073741823&i)}return 0!=e&&n.__setDigitGrow(i,1),n}static __absoluteSubOne(t,e){const n=t.length,i=new r(e=e||n,!1);let s=1;for(let e=0;e>>30,i.__setDigit(e,1073741823&n)}if(0!=s)throw Error("implementation bug");for(t=n;tn?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(t,e,n,i){if(0!==e){var s=32767&e,o=e>>>15,a=e=0;for(let p,h=0;h>>15;l=r.__imul(u,s),u=r.__imul(u,o);const _=r.__imul(c,s);p+=a+l+e,e=p>>>30,p&=1073741823,p+=((32767&u)<<15)+((32767&_)<<15),e+=p>>>30,a=(c=r.__imul(c,o))+(u>>>15)+(_>>>15),n.__setDigit(i,1073741823&p)}for(;0!=e||0!==a;i++)t=n.__digit(i),t+=e+a,a=0,e=t>>>30,n.__setDigit(i,1073741823&t)}}static __internalMultiplyAdd(t,e,n,i,s){let o=0;for(let u=0;u>>15,e)))<<15)+o+n)>>>30,o=a>>>15,s.__setDigit(u,1073741823&l)}if(s.length>i)for(s.__setDigit(i++,n+o);ithis.length&&(n=this.length);const i=32767&t;t>>>=15;let s=0;for(let u=0;u>>15;o=r.__imul(a,i),a=r.__imul(a,t);const n=r.__imul(l,i);s=(o=e+o+s)>>>30,o&=1073741823,s+=(o+=((32767&a)<<15)+((32767&n)<<15))>>>30,e=(l=r.__imul(l,t))+(a>>>15)+(n>>>15),this.__setDigit(u,1073741823&o)}if(0!=s||0!==e)throw Error("implementation bug")}static __absoluteDivSmall(t,e,n){null===(n=void 0===n?null:n)&&(n=new r(t.length,!1));let i=0;for(let s,r=2*t.length-1;0<=r;r-=2){s=(i<<15|t.__halfDigit(r))>>>0;const o=0|s/e;i=0|s%e,s=(i<<15|t.__halfDigit(r-1))>>>0;const a=0|s/e;i=0|s%e,n.__setDigit(r>>>1,o<<15|a)}return n}static __absoluteModSmall(t,e){let n=0;for(let i=2*t.length-1;0<=i;i--)n=0|((n<<15|t.__halfDigit(i))>>>0)%e;return n}static __absoluteDivLarge(t,e,n,i){const s=e.__halfDigitLength(),o=e.length;var a=t.__halfDigitLength()-s;let l=null;n&&(l=new r(a+2>>>1,!1),l.__initializeDigits());const u=new r(s+2>>>1,!1);u.__initializeDigits();const c=r.__clz15(e.__halfDigit(s-1));0>>0)/p,a=0|a%p;const n=e.__halfDigit(s-2),o=t.__halfDigit(c+s-2);for(;r.__imul(i,n)>>>0>(a<<16|o)>>>0&&(i--,!(32767<(a+=p))););}r.__internalMultiplyAdd(e,i,0,o,u),0!==(a=t.__inplaceSub(u,c,s+1))&&(a=t.__inplaceAdd(e,c,s),t.__setHalfDigit(c+s,32767&t.__halfDigit(c+s)+a),i--),n&&(1&c?h=i<<15:l.__setDigit(c>>>1,h|i))}if(i)return t.__inplaceRightShift(c),n?{quotient:l,remainder:t}:t;if(n)return l;throw Error("unreachable")}static __clz15(t){return r.__clz30(t)-15}__inplaceAdd(t,e,n){let i=0;for(let s=0;s>>15,this.__setHalfDigit(e+s,32767&n)}return i}__inplaceSub(t,e,n){let i=0;if(1&e){e>>=1;for(var s=this.__digit(e),r=32767&s,o=0;o>>1;o++){var a=t.__digit(o);i=1&(s=(s>>>15)-(32767&a)-i)>>>15,this.__setDigit(e+o,(32767&s)<<15|32767&r),i=1&(r=(32767&(s=this.__digit(e+o+1)))-(a>>>15)-i)>>>15}const l=(s>>>15)-(32767&(a=t.__digit(o)))-i;if(i=1&l>>>15,this.__setDigit(e+o,(32767&l)<<15|32767&r),e+o+1>=this.length)throw new RangeError("out of bounds");!(1&n)&&(i=1&(r=(32767&(s=this.__digit(e+o+1)))-(a>>>15)-i)>>>15,this.__setDigit(e+t.length,1073709056&s|32767&r))}else{for(e>>=1,r=0;r>>15,i=1&(s=(s>>>15)-(a>>>15)-i)>>>15,this.__setDigit(e+r,(32767&s)<<15|32767&o);i=1&(s=(32767&(o=this.__digit(e+r)))-(32767&(t=t.__digit(r)))-i)>>>15,a=0,!(1&n)&&(i=1&(a=(o>>>15)-(t>>>15)-i)>>>15),this.__setDigit(e+r,(32767&a)<<15|32767&s)}return i}__inplaceRightShift(t){if(0!==t){var e=this.__digit(0)>>>t,n=this.length-1;for(let i=0;i>>t}this.__setDigit(n,e)}}static __specialLeftShift(t,e,n){const i=t.length,s=new r(i+n,!1);if(0===e){for(e=0;e>>30-e}return 0n)throw new RangeError("BigInt too big");e=0|n/30;var i=n%30;const s=t.length,o=0!==i&&0!=t.__digit(s-1)>>>30-i;var a=s+e+(o?1:0);if(n=new r(a,t.sign),0===i){for(i=0;i>>30-i}if(o)n.__setDigit(s+e,a);else if(0!==a)throw Error("implementation bug")}return n.__trim()}static __rightShiftByAbsolute(t,e){var n=t.length,i=t.sign,s=r.__toShiftAmount(e);if(0>s)return r.__rightShiftByMaximum(i);var o=s%30,a=n-(e=0|s/30);if(0>=a)return r.__rightShiftByMaximum(i);if(s=!1,i)if(t.__digit(e)&(1<>>o,n=n-e-1,l=0;l>>o}i.__setDigit(n,a)}return s&&(i=r.__absoluteAddOne(i,!0,i)),i.__trim()}static __rightShiftByMaximum(t){return t?r.__oneDigit(1,!0):r.__zero()}static __toShiftAmount(t){return 1r.__kMaxLengthBits?-1:t}static __toPrimitive(t,e){if(e=void 0===e?"default":e,"object"!=typeof t||t.constructor===r)return t;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const n=t[Symbol.toPrimitive];if(n){if("object"!=typeof(t=n(e)))return t;throw new TypeError("Cannot convert object to primitive value")}}if((e=t.valueOf)&&"object"!=typeof(e=e.call(t)))return e;if((e=t.toString)&&"object"!=typeof(t=e.call(t)))return t;throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(t){return r.__isBigInt(t)?t:+t}static __isBigInt(t){return"object"==typeof t&&null!==t&&t.constructor===r}static __truncateToNBits(t,e){var n=0|(t+29)/30;const i=new r(n,e.sign);--n;for(let t=0;t>>t),i.__setDigit(n,e),i.__trim()}static __truncateAndSubFromPowerOfTwo(t,e,n){var i=Math.min,s=0|(t+29)/30;n=new r(s,n);let o=0;var a=0;for(i=i(--s,e.length);o>>30,n.__setDigit(o,1073741823&t)}for(;o>>t,a=(t=1<<32-t)-e-a,a&=t-1),n.__setDigit(s,a),n.__trim()}__digit(t){return this[t]}__unsignedDigit(t){return this[t]>>>0}__setDigit(t,e){this[t]=0|e}__setDigitGrow(t,e){this[t]=0|e}__halfDigitLength(){const t=this.length;return 32767>=this.__unsignedDigit(t-1)?2*t-1:2*t}__halfDigit(t){return 32767&this[t>>>1]>>>15*(1&t)}__setHalfDigit(t,e){const n=t>>>1,i=this.__digit(n);this.__setDigit(n,1&t?32767&i|e<<15:1073709056&i|32767&e)}static __digitPow(t,e){let n=1;for(;0>>=1,t*=t;return n}static __isOneDigitInt(t){return(1073741823&t)===t}}return r.__kMaxLength=33554432,r.__kMaxLengthBits=r.__kMaxLength<<5,r.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],r.__kBitsPerCharTableShift=5,r.__kBitsPerCharTableMultiplier=1<>>0)/e)},r.__imul=t||function(t,e){return 0|t*e},r}()},function(t,e){[..."abc"].flat(),"a".matchAll(/a/g)},function(t,e,n){(function(t,e){!function(t,n){function i(t){delete a[t]}function s(t){if(l)setTimeout(s,0,t);else{var e=a[t];if(e){l=!0;try{var r=e.callback,o=e.args;switch(o.length){case 0:r();break;case 1:r(o[0]);break;case 2:r(o[0],o[1]);break;case 3:r(o[0],o[1],o[2]);break;default:r.apply(n,o)}}finally{i(t),l=!1}}}}if(!t.setImmediate){var r,o=1,a={},l=!1,u=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){s(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(p="setImmediate$"+Math.random()+"$",h=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(p)&&s(+e.data.slice(p.length))},t.addEventListener?t.addEventListener("message",h,!1):t.attachEvent("onmessage",h),r=function(e){t.postMessage(p+e,"*")}):t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){s(t.data)},r=function(e){t.port2.postMessage(e)}}():u&&"onreadystatechange"in u.createElement("script")?function(){var t=u.documentElement;r=function(e){var n=u.createElement("script");n.onreadystatechange=function(){s(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(s,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=Array(arguments.length-1),n=0;n the object's type\ntype(name, bases, dict) -> a new type",tp$call:function(t,e){if(this===Sk.builtin.type){if(1===t.length&&(void 0===e||!e.length))return t[0].ob$type;if(3!==t.length)throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let n=this.prototype.tp$new(t,e);if(n.$isSuspension)return Sk.misceval.chain(n,(i=>{if(n=i,n.ob$type.$isSubType(this))return n.tp$init(t,e)}),(()=>n));if(n.ob$type.$isSubType(this)){const i=n.tp$init(t,e);return void 0!==i&&i.$isSuspension?Sk.misceval.chain(i,(()=>n)):n}return n},tp$new:function(t,e){if(3!==t.length){if(1===t.length&&(void 0===e||!e.length))return t[0].ob$type;throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}const i=t[0];var s=t[1];const o=t[2];if("dict"!==o.tp$name)throw new Sk.builtin.TypeError("type() argument 3 must be dict, not "+Sk.abstr.typeName(o));if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("type() argument 1 must be str, not "+Sk.abstr.typeName(i));const a=i.$jsstr();if("tuple"!==s.tp$name)throw new Sk.builtin.TypeError("type() argument 2 must be tuple, not "+Sk.abstr.typeName(s));r(a,t=function(){this.sk$hasDict&&(this.$d=new Sk.builtin.dict),this.$s=[]},s=s.sk$asarray(),this.constructor);const u=t.prototype;Sk.globals&&(u.__module__=Sk.globals.__name__),u.__doc__=Sk.builtin.none.none$;let c,p=void 0===(s=o.quick$lookup(Sk.builtin.str.$slots)),h=void 0!==t.$typeLookup(Sk.builtin.str.$dict);if(void 0!==s&&(c=new Set,(s=Sk.builtin.checkString(s)?[s]:Sk.misceval.arrayFromIterable(s)).forEach((t=>{if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__slots__ items must be strings, not '"+Sk.abstr.typeName(t)+"'");if(!t.$isIdentifier())throw new Sk.builtin.TypeError("__slots__ must be identifiers");if(t===Sk.builtin.str.$dict){if(h)throw new Sk.builtin.TypeError("__dict__ slot disallowed: we already got one");p=!0}else c.add(Sk.mangleName(i,t))})),function(t,e){const n=e.prototype,i=n.sk$nslots||0;Object.defineProperty(n,"sk$nslots",{value:i+t.length,writable:!0}),t.length&&Object.defineProperty(e,"sk$solidSlotBase",{value:!0,writable:!0}),t.forEach(((t,s)=>{s+=i,n[t.$mangled]=new Sk.builtin.getset_descriptor(e,{$get(){const e=this.$s[s];if(void 0===e)throw new Sk.builtin.AttributeError(t);return e},$set(t){this.$s[s]=t}})}))}(s=[...c].sort(((t,e)=>t.toString().localeCompare(e.toString()))),t)),p&&!h&&(u.__dict__=new Sk.builtin.getset_descriptor(t,l),h=!0),Object.defineProperties(u,{ht$slots:{value:s||null,writable:!0},sk$hasDict:{value:h,writable:!0}}),o.$items().forEach((t=>{var[e,n]=t;if(c&&c.has(e))throw new Sk.builtin.ValueError("'"+e.toString()+"' in __slots__ conflicts with class variable");u[e.$mangled]=n})),u.hasOwnProperty("__qualname__")){if(s=u.__qualname__,!Sk.builtin.checkString(s))throw new Sk.builtin.TypeError("type __qualname__ must be a str, not '"+Sk.abstr.typeName(s)+"'");u.ht$qualname=s}return n(s=t.prototype,"__init_subclass__","classmethod"),n(s,"__new__","staticmethod"),n(s,"__class_getitem__","classmethod"),t.$allocateSlots(),function(t){const e=t.prototype;Object.keys(e).forEach((n=>{const i=Sk.abstr.lookupSpecial(e[n],Sk.builtin.str.$setname);if(void 0!==i)try{Sk.misceval.callsimArray(i,[t,new Sk.builtin.str(n)])}catch(i){throw(n=new Sk.builtin.RuntimeError("Error calling __set_name__ on '"+Sk.abstr.typeName(e[n])+"' instance '"+n+"' in '"+t.prototype.tp$name+"'")).$cause=i,n}}))}(t),function(t,e){t=new Sk.builtin.super_(t,t).tp$getattr(Sk.builtin.str.$initsubclass),Sk.misceval.callsimArray(t,[],e)}(t,e),t},tp$init:function(t,e){if(t&&1==t.length&&e&&e.length)throw new Sk.builtin.TypeError("type.__init__() takes no keyword arguments");if(3!=t.length&&1!=t.length)throw new Sk.builtin.TypeError("type.__init__() takes 1 or 3 arguments");return Sk.builtin.object.prototype.tp$init.call(this,[])},tp$getattr:function(t,e){var n=this.ob$type;const i=n.$typeLookup(t);let s;return void 0!==i&&(s=i.tp$descr_get,void 0!==s&&void 0!==i.tp$descr_set)?s.call(i,this,n,e):void 0!==(t=this.$typeLookup(t))?void 0!==(n=t.tp$descr_get)?e=n.call(t,null,this,e):t:void 0!==s?s.call(i,this,n,e):void 0!==i?i:void 0},tp$setattr:function(t,e,n){if(!this.sk$klass){if(void 0!==e)throw new Sk.builtin.TypeError("can't set attributes of built-in/extension type '"+this.prototype.tp$name+"'");throw new Sk.builtin.TypeError("can't delete attributes on type object '"+this.prototype.tp$name+"'")}const i=this.ob$type.$typeLookup(t);if(void 0!==i){const t=i.tp$descr_set;if(t)return t.call(i,this,e,n)}if(n=t.$mangled,void 0===e){if(!(e=this.prototype).hasOwnProperty(n))throw new Sk.builtin.AttributeError("type object '"+this.prototype.tp$name+"' has no attribute '"+t.$jsstr()+"'");delete e[n],void 0!==(t=Sk.dunderToSkulpt[n])&&(delete this.prototype[t],e.sk$prototypical||this.$allocateGetterSlot(n))}else this.prototype[n]=e,n in Sk.dunderToSkulpt&&this.$allocateSlot(n,e)},$r:function(){let t=this.prototype.__module__,e="",n="class";return t&&Sk.builtin.checkString(t)?e=t.v+".":t=null,t||this.sk$klass||Sk.__future__.class_repr||(n="type"),new Sk.builtin.str("<"+n+" '"+e+this.prototype.tp$name+"'>")}},writable:!0},tp$methods:{value:null,writable:!0},tp$classmethods:{value:null,writable:!0},tp$getsets:{value:null,writable:!0},sk$type:{value:!0},$isSubType:{value:function(t){return this===t||this.prototype instanceof t||!this.prototype.sk$prototypical&&this.prototype.tp$mro.includes(t)}},$allocateSlot:{value:function(t,e){const n=(t=Sk.slots[t]).$slot_name,i=this.prototype;i.hasOwnProperty(n)&&delete i[n],Object.defineProperty(i,n,{value:t.$slot_func(e),writable:!0,configurable:!0})}},$allocateSlots:{value:function(){const t=this.prototype;this.prototype.sk$prototypical?Object.keys(t).forEach((e=>{e in Sk.slots&&this.$allocateSlot(e,t[e])})):Object.keys(Sk.slots).forEach((e=>{t.hasOwnProperty(e)?this.$allocateSlot(e,t[e]):this.$allocateGetterSlot(e)})),t.hasOwnProperty("__eq__")&&!t.hasOwnProperty("__hash__")&&(t.tp$hash=t.__hash__=Sk.builtin.none.none$)}},$allocateGetterSlot:{value:function(t){const e=Sk.slots[t].$slot_name,n=this.prototype;n.hasOwnProperty(e)||Object.defineProperty(n,e,{configurable:!0,get(){const t=n.tp$mro;for(let n=1;nnew Sk.builtin.dict([]),$flags:{FastCall:!0}}};const l={$get(){const t=o(this.ob$type);return void 0!==t?t.tp$descr_get(this,this.ob$type):Sk.generic.getSetDict.$get.call(this)},$set(t){const e=o(this.ob$type);return void 0!==e?e.tp$descr_set(this,t):void 0!==t?Sk.generic.getSetDict.$set.call(this,t):void(this.$d=new Sk.builtin.dict([]))},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"}},function(t,e){Sk.generic={},Sk.generic.getAttr=function(t,e){let n;const i=this.ob$type,s=i.$typeLookup(t);if(void 0!==s&&(n=s.tp$descr_get,void 0!==n&&void 0!==s.tp$descr_set))return n.call(s,this,i,e);const r=this.$d;return void 0!==r&&void 0!==(t=r.quick$lookup(t))?t:void 0!==n?n.call(s,this,i,e):void 0!==s?s:void 0},Sk.exportSymbol("Sk.generic.getAttr",Sk.generic.getAttr),Sk.generic.setAttr=function(t,e,n){var i=this.ob$type.$typeLookup(t);if(null!=i){const t=i.tp$descr_set;if(t)return t.call(i,this,e,n)}if(void 0!==(n=this.$d))if(n.mp$ass_subscript){if(void 0!==e)return n.mp$ass_subscript(t,e);try{return n.mp$ass_subscript(t)}catch(e){if(e instanceof Sk.builtin.KeyError)throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(this)+"' object has no attribute '"+t.$jsstr()+"'");throw e}}else if("object"==typeof n){if(i=t.$mangled,void 0!==e)return void(n[i]=e);if(void 0!==n[i])return void delete n[i]}throw new Sk.builtin.AttributeError(this.sk$attrError()+" has no attribute '"+t.$jsstr()+"'")},Sk.exportSymbol("Sk.generic.setAttr",Sk.generic.setAttr),Sk.generic.new=function(t){return function(e,n){return this.constructor===t?new this.constructor:(e=new this.constructor,t.call(e),e)}},Sk.generic.newMethodDef={$meth(t,e){const n=this.prototype;if(1>t.length)throw t=n.tp$name,new Sk.builtin.TypeError(t+".__new__(): not enough arguments");var i=t.shift();if(void 0===i.sk$type)throw t=n.tp$name,new Sk.builtin.TypeError(t+"__new__(X): X is not a type object ("+Sk.abstr.typeName(i)+")");if(!i.$isSubType(this))throw t=n.tp$name,i=i.prototype.tp$name,new Sk.builtin.TypeError(t+".__new__("+i+"): "+i+" is not a subtype of "+t);const s=i.prototype.sk$staticNew.prototype;if(s.tp$new!==n.tp$new)throw t=n.tp$name,i=i.prototype.tp$name,new Sk.builtin.TypeError(t+".__new__("+i+") is not safe, use "+s.tp$name+".__new__()");return n.tp$new.call(i.prototype,t,e)},$flags:{FastCall:!0},$textsig:"($type, *args, **kwargs)",$name:"__new__"},Sk.generic.selfIter=function(){return this},Sk.generic.iterNextWithArrayCheckSize=function(){if(this.$seq.length!==this.$orig.get$size()){const t=this.tp$name.split("_")[0];throw new Sk.builtin.RuntimeError(t+" changed size during iteration")}if(!(this.$index>=this.$seq.length))return this.$seq[this.$index++]},Sk.generic.iterNextWithArray=function(){const t=this.$seq[this.$index++];return void 0===t&&(this.tp$iternext=()=>{}),t},Sk.generic.iterLengthHintWithArrayMethodDef={$meth:function(){return new Sk.builtin.int_(this.$seq.length-this.$index)},$flags:{NoArgs:!0}},Sk.generic.iterReverseLengthHintMethodDef={$meth:function(){return new Sk.builtin.int_(this.$index)},$flags:{NoArgs:!0}},Sk.generic.getSetDict={$get(){return this.$d},$set(t){if(void 0===t)throw new Sk.builtin.TypeError("cannot delete __dict__");if(!(t instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("__dict__ must be set to a dictionary, not a '"+Sk.abstr.typeName(t)+"'");this.$d=t},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"},Sk.generic.seqCompare=function(t,e){if(this===t&&Sk.misceval.opAllowsEquality(e))return!0;if(!(t instanceof this.sk$builtinBase))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.v;let i;if(t=t.v,n.length!==t.length&&("Eq"===e||"NotEq"===e))return"Eq"!==e;for(i=0;i=s||i>=r)switch(e){case"Lt":return sr;case"GtE":return s>=r;default:Sk.asserts.fail()}return"Eq"!==e&&("NotEq"===e||Sk.misceval.richCompareBool(n[i],t[i],e))},Sk.generic.classGetItem={__class_getitem__:{$meth(t){return new Sk.builtin.GenericAlias(this,t)},$flags:{OneArg:!0}}}},function(t,e){Sk.builtin.pyCheckArgs=function(t,e,n,i,s,r){if(e=e.length,void 0===i&&(i=1/0),s&&--e,r&&--e,ei)throw new Sk.builtin.TypeError((n===i?t+"() takes exactly "+n+" arguments":ei)throw new Sk.builtin.TypeError((n===i?t+"() takes exactly "+n+" arguments":e"};const r={Add:"+",Sub:"-",Mult:"*",MatMult:"@",Div:"/",FloorDiv:"//",Mod:"%",DivMod:"divmod()",Pow:"** or pow()",LShift:"<<",RShift:">>",BitAnd:"&",BitXor:"^",BitOr:"|"},o={UAdd:"+",USub:"-",Invert:"~"};Sk.abstr.numberBinOp=function(t,e,n){var s;if(!(s=i(t,e,n)))throw t=Sk.abstr.typeName(t),e=Sk.abstr.typeName(e),new Sk.builtin.TypeError("unsupported operand type(s) for "+r[n]+": '"+t+"' and '"+e+"'");return s},Sk.exportSymbol("Sk.abstr.numberBinOp",Sk.abstr.numberBinOp),Sk.abstr.numberInplaceBinOp=function(t,e,n){var i;if(!(i=s(t,e,n)))throw t=Sk.abstr.typeName(t),e=Sk.abstr.typeName(e),new Sk.builtin.TypeError("unsupported operand type(s) for "+r[n]+"=: '"+t+"' and '"+e+"'");return i},Sk.exportSymbol("Sk.abstr.numberInplaceBinOp",Sk.abstr.numberInplaceBinOp),Sk.abstr.numberUnaryOp=function(t,e){if("Not"===e)return Sk.misceval.isTrue(t)?Sk.builtin.bool.false$:Sk.builtin.bool.true$;t:{switch(e){case"USub":var n=t.nb$negative;break t;case"UAdd":n=t.nb$positive;break t;case"Invert":n=t.nb$invert;break t}n=void 0}if(!(n=void 0!==n?n.call(t):void 0))throw t=Sk.abstr.typeName(t),new Sk.builtin.TypeError("bad operand type for unary "+o[e]+": '"+t+"'");return n},Sk.exportSymbol("Sk.abstr.numberUnaryOp",Sk.abstr.numberUnaryOp),Sk.abstr.fixSeqIndex_=function(t,e){return 0>(e=Sk.builtin.asnum$(e))&&t.sq$length&&(e+=t.sq$length()),e},Sk.abstr.sequenceContains=function(t,e,n){return t.sq$contains?t.sq$contains(e,n):(t=Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){return!(t!==e&&!Sk.misceval.richCompareBool(t,e,"Eq"))&&new Sk.misceval.Break(!0)}),!1),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t))},Sk.abstr.sequenceConcat=function(t,e){if(t.sq$concat)return t.sq$concat(e);if(Sk.builtin.checkSequence(t)&&Sk.builtin.checkSequence(e)&&void 0!==(e=i(t,e,"Add")))return e;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object can't be concatenated")},Sk.abstr.sequenceInPlaceConcat=function(t,e){if(t.sq$inplace_concat)return t.sq$inplace_concat(e);if(t.sq$concat)return t.sq$concat(e);if(Sk.builtin.checkSequence(t)&&Sk.builtin.checkSequence(e)&&void 0!==(e=s(t,e,"Add")))return e;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object can't be concatenated")},Sk.abstr.sequenceGetIndexOf=function(t,e){if(t.index)return Sk.misceval.callsimArray(t.index,[t,e]);let n=0;for(let i=Sk.abstr.iter(t),s=i.tp$iternext();void 0!==s;s=i.tp$iternext()){if(Sk.misceval.richCompareBool(e,s,"Eq"))return new Sk.builtin.int_(n);n+=1}throw new Sk.builtin.ValueError("sequence.index(x): x not in sequence")},Sk.abstr.sequenceGetCountOf=function(t,e){if(t.count)return Sk.misceval.callsimArray(t.count,[t,e]);let n=0;for(let i=Sk.abstr.iter(t),s=i.tp$iternext();void 0!==s;s=i.tp$iternext())Sk.misceval.richCompareBool(e,s,"Eq")&&(n+=1);return new Sk.builtin.int_(n)},Sk.abstr.sequenceGetItem=function(t,e,n){return"number"==typeof e&&(e=new Sk.builtin.int_(e)),Sk.abstr.objectGetItem(t,e,n)},Sk.abstr.sequenceSetItem=function(t,e,n,i){return"number"==typeof e&&(e=new Sk.builtin.int_(e)),Sk.abstr.objectSetItem(t,e,n,i)},Sk.abstr.sequenceDelItem=function(t,e,n){return Sk.abstr.objectDelItem(t,e,n)},Sk.abstr.sequenceGetSlice=function(t,e,n){return Sk.abstr.objectGetItem(t,new Sk.builtin.slice(e,n))},Sk.abstr.sequenceDelSlice=function(t,e,n){return Sk.abstr.objectDelItem(t,new Sk.builtin.slice(e,n))},Sk.abstr.sequenceSetSlice=function(t,e,n,i){return Sk.abstr.objectSetItem(t,new Sk.builtin.slice(e,n))},Sk.abstr.sequenceUnpack=function(t,e,n,i){if(!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("cannot unpack non-iterable "+Sk.abstr.typeName(t)+" object");const s=Sk.abstr.iter(t),r=[];let o,a=0;return 0{if(r.push(t),++a===e)return new Sk.misceval.Break}))),Sk.misceval.chain(o,(()=>{if(r.length{if(void 0!==t)throw new Sk.builtin.ValueError("too many values to unpack (expected "+e+")");return r}));const t=[];return Sk.misceval.chain(Sk.misceval.iterFor(s,(e=>{t.push(e)})),(()=>{const i=t.length+e-n;if(0>i)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+n+", got "+(n+i)+")");return r.push(new Sk.builtin.list(t.slice(0,i))),r.push(...t.slice(i)),r}))}))},Sk.abstr.mappingUnpackIntoKeywordArray=function(t,e,n){if(!(e instanceof Sk.builtin.dict)){var i=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$keys);if(void 0===i)throw new Sk.builtin.TypeError("Object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(i),(i=>Sk.misceval.iterFor(Sk.abstr.iter(i),(i=>{if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError((n.$qualname?n.$qualname+"() ":"")+"keywords must be strings");return Sk.misceval.chain(e.mp$subscript(i,!0),(e=>{t.push(i.v),t.push(e)}))}))))}e.$items().forEach((e=>{var[i,s]=e;if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError((n.$qualname?n.$qualname+"() ":"")+"keywords must be strings");t.push(i.v),t.push(s)}))},Sk.abstr.keywordArrayFromPyDict=function(t){const e=[];return t.$items().forEach((t=>{var[n,i]=t;if(!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError("keywords must be strings");e.push(n.toString()),e.push(i)})),e},Sk.abstr.keywordArrayToPyDict=function(t){const e=new Sk.builtin.dict;for(let n=0;ne.length)throw new Sk.builtin.TypeError(t+"() expected at most "+e.length+" arguments ("+r+" given)");if(!i.length&&void 0===s)return n;if(r===e.length&&!i.length)return n;if(0===r&&e.length===(s&&s.length))return s;for(n=n.slice(0),r=0;rvoid 0===n[e]))).length)throw new Sk.builtin.TypeError(t+"() missing "+e.length+" required positional arguments: "+e.join(", "))}return n},Sk.exportSymbol("Sk.abstr.copyKeywordsToNamedArgs",Sk.abstr.copyKeywordsToNamedArgs),Sk.abstr.checkNoKwargs=function(t,e){if(e&&e.length)throw new Sk.builtin.TypeError(t+"() takes no keyword arguments")},Sk.exportSymbol("Sk.abstr.checkNoKwargs",Sk.abstr.checkNoKwargs),Sk.abstr.checkNoArgs=function(t,e,n){if(e=e.length+(n?n.length:0))throw new Sk.builtin.TypeError(t+"() takes no arguments ("+e+" given)")},Sk.exportSymbol("Sk.abstr.checkNoArgs",Sk.abstr.checkNoArgs),Sk.abstr.checkOneArg=function(t,e,n){if(Sk.abstr.checkNoKwargs(t,n),1!==e.length)throw new Sk.builtin.TypeError(t+"() takes exactly one argument ("+e.length+" given)")},Sk.exportSymbol("Sk.abstr.checkOneArg",Sk.abstr.checkOneArg),Sk.abstr.checkArgsLen=function(t,e,n,i){if(void 0===i&&(i=1/0),(e=e.length)i)throw new Sk.builtin.TypeError((n===i?t+"() takes exactly "+n+" arguments":eSk.builtin.str&&Sk.builtin.str.$fixReserved?(a=Sk.builtin.str.$fixReserved,Sk.builtin.str.$fixReserved(t)):t;Sk.abstr.setUpGetSets=function(t,e){if(void 0!==Sk.builtin.getset_descriptor){var n=t.prototype;e=e||n.tp$getsets||{},Object.entries(e).forEach((e=>{var[i,s]=e;s.$name=i,n[a(i)]=new Sk.builtin.getset_descriptor(t,s)})),Object.defineProperty(n,"tp$getsets",{value:null,writable:!0})}},Sk.abstr.setUpMethods=function(t,e){if(void 0!==Sk.builtin.method_descriptor){var n=t.prototype;e=e||n.tp$methods||{},Object.entries(e).forEach((e=>{var[i,s]=e;s.$name=i,n[a(i)]=new Sk.builtin.method_descriptor(t,s)})),Object.defineProperty(n,"tp$methods",{value:null,writable:!0})}},Sk.abstr.setUpClassMethods=function(t,e){if(void 0!==Sk.builtin.classmethod_descriptor){var n=t.prototype;e=e||n.tp$classmethods||{},Object.entries(e).forEach((e=>{var[i,s]=e;s.$name=i,n[a(i)]=new Sk.builtin.classmethod_descriptor(t,s)})),Object.defineProperty(n,"tp$classmethods",{value:null,writable:!0})}};const l={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},u=Object.entries(l);Sk.abstr.setUpSlots=function(t,e){function n(e,n){s[e]=new Sk.builtin.wrapper_descriptor(t,Sk.slots[e],n)}function i(t,e){"string"==typeof t?n(t,e):t.forEach((t=>{n(t,e)}))}if(void 0!==Sk.builtin.wrapper_descriptor){var s=t.prototype;(e=e||s.tp$slots||{}).tp$new===Sk.generic.new&&(e.tp$new=Sk.generic.new(t)),e.tp$richcompare?function(t){u.forEach((e=>{var[n,i]=e;t[i]=function(t){return this.tp$richcompare(t,n)}}))}(e):e.ob$eq&&(e.tp$richcompare=function(t,e){return this[l[e]].call(this,t)}),e.tp$as_number&&function(t){const e=Sk.reflectedNumberSlots;Object.keys(e).forEach((n=>{if(void 0!==t[n]){const i=e[n],s=i.reflected,r=t[s];void 0!==r?null===r&&delete t[s]:t[s]=i.slot||t[n]}}))}(e),e.tp$as_sequence_or_mapping&&function(t){const e=Sk.sequenceAndMappingSlots;Object.keys(e).forEach((n=>{void 0!==t[n]&&e[n].forEach((e=>{t[e]=t[n]}))}))}(e),Object.entries(e).forEach((t=>{var[e,n]=t;Object.defineProperty(s,e,{value:n,writable:!0})})),e.tp$new&&(s.__new__=new Sk.builtin.sk_method(Sk.generic.newMethodDef,t),Object.defineProperty(s,"sk$staticNew",{value:t,writable:!0})),Sk.subSlots.main_slots.forEach((t=>{var[n,s]=t;void 0!==(t=e[n])&&i(s,t)}));var r=e.tp$hash;void 0!==r&&("function"==typeof r?n("__hash__",r):r===Sk.builtin.none.none$?s.__hash__=r:Sk.asserts.fail("invalid tp$hash")),e.tp$as_number&&Sk.subSlots.number_slots.forEach((t=>{var[n,s]=t;void 0!==(t=e[n])&&i(s,t)})),e.tp$as_sequence_or_mapping&&Sk.subSlots.sequence_and_mapping_slots.forEach((t=>{var[n,s]=t;void 0!==(t=e[n])&&i(s,t)})),Object.defineProperty(s,"tp$slots",{value:null,writable:!0})}},Sk.abstr.buildNativeClass=function(t,e){e=e||{},Sk.asserts.assert(e.hasOwnProperty("constructor"),"A constructor is required to build a native class");let n=e.constructor;Sk.abstr.setUpInheritance(t,n,e.base,e.meta),Sk.abstr.setUpBuiltinMro(n);const i=n.prototype;return Object.defineProperties(i,{tp$slots:{value:e.slots,writable:!0},tp$getsets:{value:e.getsets,writable:!0},tp$methods:{value:e.methods,writable:!0},tp$classmethods:{value:e.classmethods,writable:!0}}),Sk.abstr.setUpSlots(n,e.slots||{}),Sk.abstr.setUpMethods(n,e.methods),Sk.abstr.setUpGetSets(n,e.getsets),Sk.abstr.setUpClassMethods(n,e.classmethods),Object.entries(e.proto||{}).forEach((t=>{var[e,n]=t;Object.defineProperty(i,e,{value:n,writable:!0,enumerable:!(e.includes("$")||e in Object.prototype)})})),Object.entries(e.flags||{}).forEach((t=>{var[e,i]=t;Object.defineProperty(n,e,{value:i,writable:!0})})),i.hasOwnProperty("tp$iter")&&(i[Symbol.iterator]=function(){return this.tp$iter()[Symbol.iterator]()}),void 0!==Sk.builtin.str&&i.hasOwnProperty("tp$doc")&&!i.hasOwnProperty("__doc__")&&(t=i.tp$doc||null,i.__doc__="string"==typeof t?new Sk.builtin.str(t):Sk.builtin.none.none$),n},Sk.abstr.buildIteratorClass=function(t,e){return Sk.asserts.assert(e.hasOwnProperty("constructor"),"must provide a constructor"),e.slots=e.slots||{},e.slots.tp$iter=Sk.generic.selfIter,e.slots.tp$iternext=e.slots.tp$iternext||e.iternext,e.slots.tp$getattr=e.slots.tp$getattr||Sk.generic.getAttr,t=Sk.abstr.buildNativeClass(t,e),Sk.abstr.built$iterators.push(t),t.prototype[Symbol.iterator]=function(){return{next:()=>{const t=this.tp$iternext();return{value:t,done:void 0===t}}}},t},Sk.abstr.built$iterators=[],Sk.abstr.setUpModuleMethods=function(t,e,n){return Object.entries(n).forEach((n=>{var[i,s]=n;s.$name=s.$name||i,e[i]=new Sk.builtin.sk_method(s,null,t)})),e},Sk.abstr.superConstructor=function(t,e,n){var i=Array.prototype.slice.call(arguments,2);t.prototype.tp$base.apply(e,i)}},function(t,e){function n(t){const e=t.prototype,n=e.tp$base;if(null==n)return!1;const i=n.prototype;return!(n.sk$solidSlotBase||t.sk$solidSlotBase||i.sk$hasDict!==e.sk$hasDict||n.sk$solidBase&&n!==Sk.builtin.module)}const i=new WeakMap;Sk.builtin.object=Sk.abstr.buildNativeClass("object",{constructor:function(){Sk.asserts.assert(this instanceof Sk.builtin.object,"bad call to object, use 'new'")},base:null,slots:{tp$new(t,e){if(t.length||e&&e.length){if(this.tp$new!==Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError("object.__new__() takes exactly one argument (the type to instantiate)");if(this.tp$init===Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+"() takes no arguments")}return new this.constructor},tp$init(t,e){if(t.length||e&&e.length){if(this.tp$init!==Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError("object.__init__() takes exactly one argument (the instance to initialize)");if(this.tp$new===Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+".__init__() takes exactly one argument (the instance to initialize)")}},tp$getattr:Sk.generic.getAttr,tp$setattr:Sk.generic.setAttr,$r(){const t=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$module);let e="";return t&&Sk.builtin.checkString(t)&&(e=t.v+"."),new Sk.builtin.str("<"+e+Sk.abstr.typeName(this)+" object>")},tp$str(){return this.$r()},tp$hash(){let t=i.get(this);return void 0!==t||(t=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2),i.set(this,t)),t},tp$richcompare(t,e){switch(e){case"Eq":t=this===t||Sk.builtin.NotImplemented.NotImplemented$;break;case"NotEq":(t=this.ob$eq(t,"Eq"))!==Sk.builtin.NotImplemented.NotImplemented$&&(t=!Sk.misceval.isTrue(t));break;default:t=Sk.builtin.NotImplemented.NotImplemented$}return t},tp$doc:"The most base type"},getsets:{__class__:{$get(){return this.ob$type},$set(t){if(void 0===t)throw new Sk.builtin.TypeError("can't delete __class__ attribute");if(!Sk.builtin.checkClass(t))throw new Sk.builtin.TypeError("__class__ must be set to a class, not '"+Sk.abstr.typeName(t)+"' object");const e=this.ob$type;if(!(e.$isSubType(Sk.builtin.module)&&t.$isSubType(Sk.builtin.module)||void 0!==e.prototype.ht$type&&void 0!==t.prototype.ht$type))throw new Sk.builtin.TypeError(" __class__ assignment only supported for heap types or ModuleType subclasses");{let i=e,s=t;for(;n(i);)i=i.prototype.tp$base;for(;n(s);)s=s.prototype.tp$base;if(i!==s&&(i.prototype.tp$base!==s.prototype.tp$base||!function(t,e){t=t.prototype,e=e.prototype;const n=t.ht$slots,i=e.ht$slots;return t.sk$hasDict===e.sk$hasDict&&(n===i||(n&&i?n.length===i.length&&n.every(((t,e)=>t===i[e])):(n&&(n.length||null))===(i&&(i.length||null))))}(i,s)))throw new Sk.builtin.TypeError("__class__ assignment: '"+t.prototype.tp$name+"' object layout differs from '"+e.prototype.tp$name+"'")}Object.setPrototypeOf(this,t.prototype)},$doc:"the object's class"}},methods:{__dir__:{$meth:function(){let t=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);t=void 0===t?new Sk.builtin.dict([]):t instanceof Sk.builtin.dict?t.dict$copy():new Sk.builtin.dict([]);const e=Sk.abstr.lookupAttr(this,Sk.builtin.str.$class);return void 0!==e&&e.$mergeClassDict(t),new Sk.builtin.list(t.sk$asarray())},$flags:{NoArgs:!0},$doc:"Default dir() implementation."},__format__:{$meth(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__format__() argument must be str, not "+Sk.abstr.typeName(t));if(t!==Sk.builtin.str.$empty)throw new Sk.builtin.TypeError(`unsupported format string passed to ${Sk.abstr.typeName(this)}.__format__`);return this.tp$str()},$flags:{OneArg:!0},$doc:"Default object formatter."}},classmethods:{__init_subclass__:{$meth:t=>Sk.builtin.none.none$,$flags:{FastCall:!0,NoKwargs:!0}}},proto:{valueOf:Object.prototype.valueOf,toString(){return this.tp$str().v},hasOwnProperty:Object.prototype.hasOwnProperty,ht$type:void 0,sk$attrError(){return"'"+this.tp$name+"' object"},$mergeClassDict(t){var e=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);if(void 0!==e&&t.dict$merge(e),void 0!==(e=Sk.abstr.lookupAttr(this,Sk.builtin.str.$bases))){var n=Sk.builtin.len(e).valueOf();for(let i=0;ivoid 0===t?Sk.builtin.none.none$:t))}function r(t,e,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,1,2),void 0===(t=this.call(t,...e))?Sk.builtin.none.none$:t}function o(t,e,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,2,2),Sk.misceval.chain(this.call(t,e[0],e[1],!0),(()=>Sk.builtin.none.none$))}function a(t,e,n){return Sk.abstr.checkOneArg(this.$name,e,n),t=this.call(t,e[0],void 0,!0),Sk.misceval.chain(t,(t=>void 0===t?Sk.builtin.none.none$:t))}function l(t,e,n){return(t=i.call(this,t,e,n))===Sk.builtin.NotImplemented.NotImplemented$?t:new Sk.builtin.bool(t)}function u(t,e,n){return function(i,s,r){return i=t.call(this,i,s,r),n?Sk.misceval.chain(i,e):e(Sk.misceval.retryOptionalSuspensionOrThrow(i))}}function c(t){return function(){const e=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return Sk.misceval.callsimArray(e,[])}}function p(t,e,n,i){return function(s){return function(){var r=s.tp$descr_get?s.tp$descr_get(this,this.ob$type):s;if(r=Sk.misceval.callsimArray(r,[]),!e(r))throw new Sk.builtin.TypeError(t+" should return "+n+" (returned "+Sk.abstr.typeName(r)+")");return void 0!==i?i(r):r}}}function h(t){return function(e){const n=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return Sk.misceval.callsimArray(n,[e])}}function _(t,e){let n=this.ob$type.$typeLookup(Sk.builtin.str.$getattribute);if(n instanceof Sk.builtin.wrapper_descriptor)return n.d$wrapped.call(this,t,e);n.tp$descr_get&&(n=n.tp$descr_get(this,this.ob$type));const i=Sk.misceval.tryCatch((()=>Sk.misceval.callsimOrSuspendArray(n,[t])),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t}));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}function d(t,e,n){return function(i){return function(i,s,r){let o;void 0===s?(o=e,n=null):o=t;let a=this.ob$type.$typeLookup(new Sk.builtin.str(o));if(a instanceof Sk.builtin.wrapper_descriptor)return a.d$wrapped.call(this,i,s);if(a.tp$descr_get&&(a=a.tp$descr_get(this,this.ob$type,r)),void 0===a){if(n)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this)+"' object "+n);throw new Sk.builtin.AttributeError(o)}return i=Sk.misceval.callsimOrSuspendArray(a,void 0===s?[i]:[i,s]),r?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}}}function f(t,e){let n=t.ob$type;for(;n&&void 0!==n.sk$klass;)n=n.prototype.tp$base;if(n&&n.prototype.tp$setattr!==e)throw new Sk.builtin.TypeError("can't apply this "+e.$name+" to "+Sk.abstr.typeName(t)+" object")}Sk.slots=Object.create(null),t=Sk.slots,Sk.slots.__init__={$name:"__init__",$slot_name:"tp$init",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(i,e,n),Sk.misceval.chain(e,(t=>{if(!Sk.builtin.checkNone(t)&&void 0!==t)throw new Sk.builtin.TypeError("__init__() should return None, not "+Sk.abstr.typeName(t))}))}},$wrapper:function(t,e,n){return this.call(t,e,n),Sk.builtin.none.none$},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Initialize self. See help(type(self)) for accurate signature."},t.__new__={$name:"__new__",$slot_name:"tp$new",$slot_func:function(t){const e=function(e,n){let i=t;return t.tp$descr_get&&(i=t.tp$descr_get(null,this.constructor)),Sk.misceval.callsimOrSuspendArray(i,[this.constructor,...e],n)};return e.sk$static_new=!1,e},$wrapper:null,$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Create and return a new object."},t.__call__={$name:"__call__",$slot_name:"tp$call",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return Sk.misceval.callsimOrSuspendArray(i,e,n)}},$wrapper:function(t,e,n){return void 0===(t=t.tp$call(e,n))?Sk.builtin.none.none$:t},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Call self as a function."},t.__repr__={$name:"__repr__",$slot_name:"$r",$slot_func:p("__repr__",Sk.builtin.checkString,"str"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return repr(self)."},t.__str__={$name:"__str__",$slot_name:"tp$str",$slot_func:p("__str__",Sk.builtin.checkString,"str"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return str(self)."};var m=p("__hash__",Sk.builtin.checkInt,"int",(t=>"number"==typeof t.v?t.v:t.tp$hash()));t.__hash__={$name:"__hash__",$slot_name:"tp$hash",$slot_func:function(t){return t===Sk.builtin.none.none$?Sk.builtin.none.none$:m(t)},$wrapper:u(n,(t=>new Sk.builtin.int_(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return hash(self)."},t.__getattribute__={$name:"__getattribute__",$slot_name:"tp$getattr",$slot_func:function(t){return function(t,e){let n=this.ob$type.$typeLookup(Sk.builtin.str.$getattr);if(void 0===n)return _.call(this,t,e);const i=Sk.misceval.chain(_.call(this,t,e),(e=>Sk.misceval.tryCatch((()=>void 0!==e?e:(n.tp$descr_get&&(n=n.tp$descr_get(this,this.ob$type)),Sk.misceval.callsimOrSuspendArray(n,[t]))),(function(t){if(!(t instanceof Sk.builtin.AttributeError))throw t}))));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}},$wrapper:function(t,e,n){Sk.abstr.checkOneArg(this.$name,e,n);const i=e[0];if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("attribute name must be string, not '"+Sk.abstr.typeName(i)+"'");return e=this.call(t,i,!0),Sk.misceval.chain(e,(e=>{if(void 0===e)throw new Sk.builtin.AttributeError(Sk.abstr.typeName(t)+" has no attribute "+i.$jsstr());return e}))},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},t.__getattr__={$name:"__getattr__",$slot_name:"tp$getattr",$slot_func:t.__getattribute__.$slot_func,$wrapper:null,$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},t.__setattr__={$name:"__setattr__",$slot_name:"tp$setattr",$slot_func:d("__setattr__","__delattr__"),$wrapper:function(t,e,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,2,2),f(t,this),Sk.misceval.chain(this.call(t,e[0],e[1],!0),(()=>Sk.builtin.none.none$))},$textsig:"($self, name, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Implement setattr(self, name, value)."},t.__delattr__={$name:"__delattr__",$slot_name:"tp$setattr",$slot_func:t.__setattr__.$slot_func,$wrapper:function(t,e,n){return Sk.abstr.checkOneArg(this.$name,e,n),f(t,this),this.call(t,e[0]),Sk.builtin.none.none$},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Implement delattr(self, name)."},t.__get__={$name:"__get__",$slot_name:"tp$descr_get",$slot_func:function(t){return function(e,n,i){null===e&&(e=Sk.builtin.none.none$),null==n&&(n=Sk.builtin.none.none$);const s=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(s,[e,n]),i?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)}},$wrapper:function(t,e,n){if(Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,1,2),n=e[0],e=e[1],n===Sk.builtin.none.none$&&(n=null),e===Sk.builtin.none.none$&&(e=null),null===e&&null===n)throw new Sk.builtin.TypeError("__get__(None, None) is invalid");return this.call(t,n,e,!0)},$textsig:"($self, instance, owner, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Return an attribute of instance, which is of type owner."},t.__set__={$name:"__set__",$slot_name:"tp$descr_set",$slot_func:d("__set__","__delete__"),$wrapper:o,$textsig:"($self, instance, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set an attribute of instance to value."},t.__delete__={$name:"__delete__",$slot_name:"tp$descr_set",$slot_func:t.__set__.$slot_func,$wrapper:a,$textsig:"($self, instance, /)",$flags:{OneArg:!0},$doc:"Delete an attribute of instance."},t.__eq__={$name:"__eq__",$slot_name:"ob$eq",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self==value."},t.__ge__={$name:"__ge__",$slot_name:"ob$ge",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>=value."},t.__gt__={$name:"__gt__",$slot_name:"ob$gt",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>value."},t.__le__={$name:"__le__",$slot_name:"ob$le",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<=value."},t.__lt__={$name:"__lt__",$slot_name:"ob$lt",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return selfSk.misceval.callsimOrSuspendArray(n,[])),(t=>{if(!(t instanceof Sk.builtin.StopIteration))throw t;this.gi$ret=t.$value}));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}},$wrapper:function(t,e,n){return Sk.abstr.checkNoArgs(this.$name,e,n),Sk.misceval.chain(t.tp$iternext(!0),(t=>{if(void 0===t)throw new Sk.builtin.StopIteration;return t}))},$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement next(self)."},t.__len__={$name:"__len__",$slot_name:"sq$length",$slot_func:function(t){return function(e){const n=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e?(e=Sk.misceval.callsimOrSuspendArray(n,[]),Sk.misceval.chain(e,(t=>Sk.misceval.asIndexOrThrow(t)))):(e=Sk.misceval.callsimArray(n,[]),Sk.misceval.asIndexOrThrow(e))}},$wrapper:u((function(t,e,n){return Sk.abstr.checkNoArgs(this.$name,e,n),t=this.call(t,!0),Sk.misceval.chain(t,(t=>void 0===t?Sk.builtin.none.none$:t))}),(t=>new Sk.builtin.int_(t)),!0),$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return len(self)."},t.__contains__={$name:"__contains__",$slot_name:"sq$contains",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(i,[e]),(e=Sk.misceval.chain(e,(t=>Sk.misceval.isTrue(t)))).$isSuspension?n?e:Sk.misceval.retryOptionalSuspensionOrThrow(e):e}},$wrapper:u(s,(t=>new Sk.builtin.bool(t)),!0),$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return key in self."},t.__getitem__={$name:"__getitem__",$slot_name:"mp$subscript",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(i,[e]),n?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)}},$wrapper:s,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return self[key]."},t.__setitem__={$name:"__setitem__",$slot_name:"mp$ass_subscript",$slot_func:d("__setitem__","__delitem__","does not support item assignment"),$wrapper:o,$textsig:"($self, key, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set self[key] to value."},t.__delitem__={$name:"__delitem__",$slot_name:"mp$ass_subscript",$slot_func:t.__setitem__.$slot_func,$wrapper:a,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Delete self[key]."},t.__add__={$name:"__add__",$slot_name:"nb$add",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self+value."},t.__radd__={$name:"__radd__",$slot_name:"nb$reflected_add",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value+self."},t.__iadd__={$name:"__iadd__",$slot_name:"nb$inplace_add",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self+=value."},t.__sub__={$name:"__sub__",$slot_name:"nb$subtract",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self-value."},t.__rsub__={$name:"__rsub__",$slot_name:"nb$reflected_subtract",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value-self."},t.__imul__={$name:"__imul__",$slot_name:"nb$inplace_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self*=value."},t.__mul__={$name:"__mul__",$slot_name:"nb$multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self*value."},t.__rmul__={$name:"__rmul__",$slot_name:"nb$reflected_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value*self."},t.__isub__={$name:"__isub__",$slot_name:"nb$inplace_subtract",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self-=value."},t.__mod__={$name:"__mod__",$slot_name:"nb$remainder",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self%value."},t.__rmod__={$name:"__rmod__",$slot_name:"nb$reflected_remainder",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value%self."},t.__imod__={$name:"__imod__",$slot_name:"nb$inplace_remainder",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement value%=self."},t.__divmod__={$name:"__divmod__",$slot_name:"nb$divmod",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(self, value)."},t.__rdivmod__={$name:"__rdivmod__",$slot_name:"nb$reflected_divmod",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(value, self)"},t.__pos__={$name:"__pos__",$slot_name:"nb$positive",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"+self"},t.__neg__={$name:"__neg__",$slot_name:"nb$negative",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"-self"},t.__abs__={$name:"__abs__",$slot_name:"nb$abs",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"abs(self)"},t.__bool__={$name:"__bool__",$slot_name:"nb$bool",$slot_func:p("__bool__",Sk.builtin.checkBool,"bool",(t=>0!==t.v)),$wrapper:u(n,(t=>new Sk.builtin.bool(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"self != 0"},t.__invert__={$name:"__invert__",$slot_name:"nb$invert",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"~self"},t.__lshift__={$name:"__lshift__",$slot_name:"nb$lshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<>value."},t.__rrshift__={$name:"__rrshift__",$slot_name:"nb$reflected_rshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value>>self."},t.__ilshift__={$name:"__ilshift__",$slot_name:"nb$inplace_lshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self<<=value."},t.__irshift__={$name:"__irshift__",$slot_name:"nb$inplace_rshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self=>>value."},t.__and__={$name:"__and__",$slot_name:"nb$and",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self&value."},t.__rand__={$name:"__rand__",$slot_name:"nb$refelcted_and",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value&self."},t.__iand__={$name:"__iand__",$slot_name:"nb$and",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self&=value."},t.__xor__={$name:"__xor__",$slot_name:"nb$xor",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self^value."},t.__rxor__={$name:"__rxor__",$slot_name:"nb$reflected_xor",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value^self."},t.__ixor__={$name:"__ixor__",$slot_name:"nb$inplace_xor",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self^=value."},t.__or__={$name:"__or__",$slot_name:"nb$or",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self|value."},t.__ror__={$name:"__ror__",$slot_name:"nb$reflected_or",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value|self."},t.__ior__={$name:"__ior__",$slot_name:"nb$inplace_or",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self|=value."},t.__int__={$name:"__int__",$slot_name:"nb$int",$slot_func:p("__int__",Sk.builtin.checkInt,"int"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"},t.__float__={$name:"__float__",$slot_name:"nb$float",$slot_func:p("__float__",Sk.builtin.checkFloat,"float"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"float(self)"},t.__floordiv__={$name:"__floordiv__",$slot_name:"nb$floor_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self//value."},t.__rfloordiv__={$name:"__rfloordiv__",$slot_name:"nb$reflected_floor_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value//self."},t.__ifloordiv__={$name:"__ifloordiv__",$slot_name:"nb$inplace_floor_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self//=value."},t.__truediv__={$name:"__truediv__",$slot_name:"nb$divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self/value."},t.__rtruediv__={$name:"__rtruediv__",$slot_name:"nb$reflected_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value/self."},t.__itruediv__={$name:"__itruediv__",$slot_name:"nb$inplace_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self/=value."},t.__index__={$name:"__index__",$slot_name:"nb$index",$slot_func:p("__index__",Sk.builtin.checkInt,"int",(t=>t.v)),$wrapper:u(n,(t=>new Sk.builtin.int_(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return self converted to an integer, if self is suitable for use as an index into a list."},t.__pow__={$name:"__pow__",$slot_name:"nb$power",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return null==n?Sk.misceval.callsimArray(i,[e]):Sk.misceval.callsimArray(i,[e,n])}},$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(self, value, mod)."},t.__rpow__={$name:"__rpow__",$slot_name:"nb$reflected_power",$slot_func:t.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(value, self, mod)."},t.__ipow__={$name:"__ipow__",$slot_name:"nb$inplace_power",$slot_func:t.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Implement **="},t.__matmul__={$name:"__matmul__",$slot_name:"nb$matrix_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self@value."},t.__rmatmul__={$name:"__rmatmul__",$slot_name:"nb$reflected_matrix_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value@self."},t.__imatmul__={$name:"__imatmul__",$slot_name:"nb$inplace_matrix_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self@=value."},t.__long__={$name:"__long__",$slot_name:"nb$long",$slot_func:p("__long__",Sk.builtin.checkInt,"int"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"};var g,b={next:{$name:"next",$slot_name:"tp$iternext",$slot_func:t.__next__.$slot_func,$wrapper:t.__next__.$wrapper,$textsig:t.__next__.$textsig,$flags:t.__next__.$flags},__nonzero__:{$name:"__nonzero__",$slot_name:"nb$bool",$slot_func:p("__nonzero__",Sk.builtin.checkInt,"int",(t=>0!==t.v)),$wrapper:u(n,(t=>new Sk.builtin.bool(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"x.__nonzero__() <==> x != 0"},__div__:{$name:"__div__",$slot_name:"nb$divide",$slot_func:h,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__div__(y) <==> x/y"},__rdiv__:{$name:"__rdiv__",$slot_name:"nb$reflected_divide",$slot_func:h,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__rdiv__(y) <==> x/y"},__idiv__:{$name:"__idiv__",$slot_name:"nb$inplace_divide",$slot_func:h,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"implement self /= other"}};Sk.subSlots={main_slots:Object.entries({tp$init:"__init__",tp$call:"__call__",$r:"__repr__",tp$str:"__str__",tp$getattr:"__getattribute__",tp$setattr:["__setattr__","__delattr__"],ob$eq:"__eq__",ob$ne:"__ne__",ob$lt:"__lt__",ob$le:"__le__",ob$gt:"__gt__",ob$ge:"__ge__",tp$descr_get:"__get__",tp$descr_set:["__set__","__delete__"],tp$iter:"__iter__",tp$iternext:"__next__"}),number_slots:Object.entries({nb$abs:"__abs__",nb$negative:"__neg__",nb$positive:"__pos__",nb$int:"__int__",nb$long:"__long__",nb$float:"__float__",nb$index:"__index__",nb$add:"__add__",nb$reflected_add:"__radd__",nb$inplace_add:"__iadd__",nb$subtract:"__sub__",nb$reflected_subtract:"__rsub__",nb$inplace_subtract:"__isub__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_multiply:"__imul__",nb$floor_divide:"__floordiv__",nb$reflected_floor_divide:"__rfloordiv__",nb$inplace_floor_divide:"__ifloordiv__",nb$invert:"__invert__",nb$remainder:"__mod__",nb$reflected_remainder:"__rmod__",nb$inplace_remainder:"__imod__",nb$divmod:"__divmod__",nb$reflected_divmod:"__rdivmod__",nb$power:"__pow__",nb$reflected_power:"__rpow__",nb$inplace_power:"__ipow__",nb$divide:"__truediv__",nb$reflected_divide:"__rtruediv__",nb$inplace_divide:"__itruediv__",nb$bool:"__bool__",nb$and:"__and__",nb$reflected_and:"__rand__",nb$inplace_and:"__iand__",nb$or:"__or__",nb$reflected_or:"__ror__",nb$inplace_or:"__ior__",nb$xor:"__xor__",nb$reflected_xor:"__rxor__",nb$inplace_xor:"__ixor__",nb$lshift:"__lshift__",nb$reflected_lshift:"__rlshift__",nb$rshift:"__rshift__",nb$reflected_rshift:"__rrshift__",nb$inplace_lshift:"__ilshift__",nb$inplace_rshift:"__irshift__",nb$matrix_multiply:"__matmul__",nb$reflected_matrix_multiply:"__rmatmul__",nb$inplace_matrix_multiply:"__imatmul__"}),sequence_and_mapping_slots:Object.entries({sq$length:"__len__",sq$contains:"__contains__",mp$subscript:"__getitem__",mp$ass_subscript:["__setitem__","__delitem__"],nb$add:"__add__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_add:"__iadd__",nb$inplace_multiply:"__imul__"})},Sk.reflectedNumberSlots={nb$add:{reflected:"nb$reflected_add"},nb$subtract:{reflected:"nb$reflected_subtract",slot:function(t){return t instanceof this.constructor?t.nb$subtract(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$multiply:{reflected:"nb$reflected_multiply"},nb$divide:{reflected:"nb$reflected_divide",slot:function(t){return t instanceof this.constructor?t.nb$divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$floor_divide:{reflected:"nb$reflected_floor_divide",slot:function(t){return t instanceof this.constructor?t.nb$floor_divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$remainder:{reflected:"nb$reflected_remainder",slot:function(t){return t instanceof this.constructor?t.nb$remainder(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$divmod:{reflected:"nb$reflected_divmod",slot:function(t){return t instanceof this.constructor?t.nb$divmod(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$power:{reflected:"nb$reflected_power",slot:function(t,e){return t instanceof this.constructor?t.nb$power(this,e):Sk.builtin.NotImplemented.NotImplemented$}},nb$and:{reflected:"nb$reflected_and"},nb$or:{reflected:"nb$reflected_or"},nb$xor:{reflected:"nb$reflected_xor"},nb$lshift:{reflected:"nb$reflected_lshift",slot:function(t){return t instanceof this.constructor?t.nb$lshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$rshift:{reflected:"nb$reflected_rshift",slot:function(t){return t instanceof this.constructor?t.nb$rshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$matrix_multiply:{reflected:"nb$reflexted_matrix_multiply",slot:function(t){return t instanceof this.constructor?t.nb$matrix_multiply(this):Sk.builtin.NotImplemented.NotImplemented$}}},Sk.sequenceAndMappingSlots={sq$concat:["nb$add"],sq$repeat:["nb$multiply","nb$reflected_multiply"],mp$length:["sq$length"],sq$inplace_repeat:["nb$inplace_multiply"],sq$inplace_concat:["nb$inplace_add"]},Sk.dunderToSkulpt={__repr__:"$r",__str__:"tp$str",__init__:"tp$init",__new__:"tp$new",__hash__:"tp$hash",__call__:"tp$call",__iter__:"tp$iter",__next__:"tp$iternext",__eq__:"ob$eq",__ne__:"ob$ne",__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge",__abs__:"nb$abs",__neg__:"nb$negative",__pos__:"nb$positive",__int__:"nb$int",__float__:"nb$float",__index__:"nb$index",__add__:"nb$add",__radd__:"nb$reflected_add",__iadd__:"nb$inplace_add",__sub__:"nb$subtract",__rsub__:"nb$reflected_subtract",__isub__:"nb$inplace_subtract",__mul__:"nb$multiply",__rmul__:"nb$reflected_multiply",__imul__:"nb$inplace_multiply",__truediv__:"nb$divide",__rtruediv__:"nb$reflected_divide",__itruediv__:"nb$inplace_divide",__floordiv__:"nb$floor_divide",__rfloordiv__:"nb$reflected_floor_divide",__ifloordiv__:"nb$inplace_floor_divide",__invert__:"nb$invert",__mod__:"nb$remainder",__rmod__:"nb$reflected_remainder",__imod__:"nb$inplace_remainder",__divmod__:"nb$divmod",__rdivmod__:"nb$reflected_divmod",__pow__:"nb$power",__rpow__:"nb$reflected_power",__ipow__:"nb$inplace_power",__bool__:"nb$bool",__long__:"nb$long",__lshift__:"nb$lshift",__rlshift__:"nb$reflected_lshift",__ilshift__:"nb$inplace_lshift",__rshift__:"nb$rshift",__rrshift__:"nb$reflected_rshift",__irshift__:"nb$inplace_rshift",__and__:"nb$and",__rand__:"nb$reflected_and",__iand__:"nb$inplace_and",__or__:"nb$or",__ror__:"nb$reflected_or",__ior__:"nb$inplace_or",__xor__:"nb$xor",__rxor__:"nb$reflected_xor",__ixor__:"nb$inplace_xor",__matmul__:"nb$matrix_multiply",__rmatmul__:"nb$reflected_matrix_multiply",__imatmul__:"nb$inplace_matrix_multiply",__get__:"tp$descr_get",__set__:"tp$descr_set",__delete__:"tp$descr_set",__getattribute__:"tp$getattr",__getattr__:"tp$getattr",__setattr__:"tp$setattr",__delattr__:"tp$setattr",__len__:"sq$length",__contains__:"sq$contains",__getitem__:"mp$subscript",__setitem__:"mp$ass_subscript",__delitem__:"mp$ass_subscript"},Sk.exportSymbol("Sk.setupDunderMethods",Sk.setupDunderMethods),Sk.setupDunderMethods=function(t){function e(t,e,n){for(let i=0;i"tp$iternext"===t[0])),l=r.findIndex((t=>"nb$bool"===t[0])),u=Sk.dunderToSkulpt;if(t){u.__bool__="nb$bool",u.__next__="tp$iternext",delete u.__nonzero__,delete u.__div__,delete u.__rdiv__,delete u.__idiv__,delete u.next;for(let t in g)n[t]=g[t];for(let t in b)delete n[t];for(t=0;t")}const o={__doc__:{$get(){return this.d$def.$doc?new Sk.builtin.str(this.d$def.$doc):Sk.builtin.none.none$}},__objclass__:{$get(){return this.d$type}},__name__:{$get(){return new Sk.builtin.str(this.d$name)}}};t={__text_signature__:{$get(){return this.d$def.$textsig?new Sk.builtin.str(this.d$def.$textsig):Sk.builtin.none.none$}}},Sk.builtin.getset_descriptor=n("getset_descriptor",void 0,{constructor:function(t,e){this.d$def=e,this.$get=e.$get,this.$set=e.$set,this.d$type=t,this.d$name=e.$name},slots:{tp$descr_get(t,e,n){if(e=this.d$check(t))return e;if(void 0!==this.$get)return t=this.$get.call(t),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t);throw new Sk.builtin.AttributeError("getset_descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is not readable")},tp$descr_set(t,e,n){if(this.d$set_check(t),void 0!==this.$set)return t=this.$set.call(t,e),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t);throw new Sk.builtin.AttributeError("attribute '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is readonly")}}}),Sk.builtin.method_descriptor=n("method_descriptor","method",{constructor:function(t,e){this.d$def=e,this.$meth=e.$meth,this.d$type=t,this.d$name=e.$name||"",this.$flags=t=e.$flags||{},t.FastCall&&t.NoKwargs?this.tp$call=this.$methodFastCallNoKwargs:t.FastCall?this.tp$call=this.$methodFastCall:t.NoArgs?this.tp$call=this.$methodCallNoArgs:t.OneArg?this.tp$call=this.$methodCallOneArg:t.NamedArgs?this.tp$call=this.$methodCallNamedArgs:void 0!==t.MinArgs?this.tp$call=this.$methodCallMinArgs:(this.func_code=e.$meth,this.tp$call=this.$defaultCall,this.$memoiseFlags=Sk.builtin.func.prototype.$memoiseFlags,this.$resolveArgs=Sk.builtin.func.prototype.$resolveArgs)},slots:{tp$call(t,e){return this.tp$call(t,e)},tp$descr_get(t,e){let n;return(n=this.d$check(t))?n:new Sk.builtin.sk_method(this.d$def,t)}},getsets:t,proto:{$methodFastCall(t,e){const n=t.shift();return this.m$checkself(n),this.$meth.call(n,t,e)},$methodFastCallNoKwargs(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkNoKwargs(this.d$name,e),this.$meth.call(n,t)},$methodCallNoArgs(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkNoArgs(this.d$name,t,e),this.$meth.call(n)},$methodCallOneArg(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkOneArg(this.d$name,t,e),this.$meth.call(n,t[0])},$methodCallNamedArgs(t,e){const n=t.shift();return this.m$checkself(n),t=Sk.abstr.copyKeywordsToNamedArgs(this.d$name,this.$flags.NamedArgs,t,e,this.$flags.Defaults),this.$meth.call(n,...t)},$methodCallMinArgs(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkNoKwargs(this.d$name,e),Sk.abstr.checkArgsLen(this.d$name,t,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth.call(n,...t)},$defaultCall(t,e){return this.m$checkself(t[0]),Sk.builtin.func.prototype.tp$call.call(this,t,e)},m$checkself(t){if(void 0===t)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");this.d$check(t)}}}),Sk.builtin.wrapper_descriptor=n("wrapper_descriptor","slot wrapper",{constructor:function(t,e,n){this.d$def=e,this.d$type=t,this.d$name=n.$name=e.$name,this.d$wrapped=n},slots:{tp$descr_get(t,e){let n;return(n=this.d$check(t))?n:new Sk.builtin.method_wrapper(this,t)},tp$call(t,e){if(1>t.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const n=t.shift();if(!n.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(n)+"'");return this.raw$call(n,t,e)}},proto:{raw$call(t,e,n){return this.d$wrapped.$name=this.d$name,this.d$def.$wrapper.call(this.d$wrapped,t,e,n)}}}),Sk.builtin.method_wrapper=n("method_wrapper",void 0,{constructor:function(t,e){this.m$descr=t,this.m$self=e,this.d$def=t.d$def,this.d$name=t.d$name,this.d$type=t.d$type},slots:{tp$call(t,e){return this.m$descr.raw$call(this.m$self,t,e)},tp$richcompare(t,e){return("Eq"===e||"NotEq"===e)&&t instanceof Sk.builtin.method_wrapper?(t=this.m$self===t.m$self&&this.m$descr===t.m$descr,"Eq"===e?t:!t):Sk.builtin.NotImplemented.NotImplemented$},$r(){return new Sk.builtin.str("")}},getsets:{__self__:{$get(){return this.m$self}}}}),Sk.builtin.classmethod_descriptor=n("classmethod_descriptor","method",{constructor:function(t,e){this.d$def=e,this.$meth=e.$meth,this.d$type=t,this.d$name=e.$name||""},slots:{tp$call(t,e){if(1>t.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const n=t.shift();return this.tp$descr_get(null,n).tp$call(t,e)},tp$descr_get(t,e,n){if(void 0===e){if(null===t)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs an object or a type");e=e||t.ob$type}if(!e.ob$type.$isSubType(Sk.builtin.type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs a type not a '"+Sk.abstr.typeName(e)+"' as arg 2");if(!e.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(e)+"' object");return new Sk.builtin.sk_method(this.d$def,e)}},getsets:t}),[Sk.builtin.method_descriptor,Sk.builtin.getset_descriptor,Sk.builtin.wrapper_descriptor,Sk.builtin.method_wrapper,Sk.builtin.classmethod_descriptor].forEach((t=>{Sk.abstr.setUpSlots(t),Sk.abstr.setUpMethods(t),Sk.abstr.setUpGetSets(t)}))},function(t,e){Sk.builtin.sk_method=Sk.abstr.buildNativeClass("builtin_function_or_method",{constructor:function(t,e,n){this.$meth=t.$meth.bind(e),this.$doc=t.$doc,this.$self=e||null,this.$module=n?new Sk.builtin.str(n):null,this.$name=t.$name||t.$meth.name||"",this.m$def=t,this.$textsig=t.$textsig,this.$flags=t=t.$flags||{},t.FastCall&&t.NoKwargs?this.tp$call=this.$fastCallNoKwargs:t.FastCall?this.tp$call=this.$meth:t.NoArgs?this.tp$call=this.$callNoArgs:t.OneArg?this.tp$call=this.$callOneArg:t.NamedArgs?this.tp$call=this.$callNamedArgs:void 0!==t.MinArgs?this.tp$call=this.$callMinArgs:(this.func_code=this.$meth,this.tp$call=this.$defaultCallMethod)},proto:{$fastCallNoKwargs(t,e){return Sk.abstr.checkNoKwargs(this.$name,e),this.$meth(t)},$callNoArgs(t,e){return Sk.abstr.checkNoArgs(this.$name,t,e),this.$meth()},$callOneArg(t,e){return Sk.abstr.checkOneArg(this.$name,t,e),this.$meth(t[0])},$callNamedArgs(t,e){return t=Sk.abstr.copyKeywordsToNamedArgs(this.$name,this.$flags.NamedArgs,t,e,this.$flags.Defaults),this.$meth(...t)},$callMinArgs(t,e){return Sk.abstr.checkNoKwargs(this.$name,e),Sk.abstr.checkArgsLen(this.$name,t,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth(...t)},$defaultCallMethod(t,e){return null!==this.$self?Sk.builtin.func.prototype.tp$call.call(this,[this.$self,...t],e):Sk.builtin.func.prototype.tp$call.call(this,t,e)},$memoiseFlags(){return Sk.builtin.func.prototype.$memoiseFlags.call(this)},$resolveArgs(){return Sk.builtin.func.prototype.$resolveArgs.call(this)}},flags:{sk$unacceptableBase:!0},slots:{tp$getattr:Sk.generic.getAttr,$r(){return null===this.$self?new Sk.builtin.str(""):new Sk.builtin.str("")},tp$call(t,e){return this.tp$call(t,e)},tp$richcompare(t,e){return("Eq"===e||"NotEq"===e)&&t instanceof Sk.builtin.sk_method?(t=this.$self===t.$self&&this.m$def.$meth===t.m$def.$meth,"Eq"===e?t:!t):Sk.builtin.NotImplemented.NotImplemented$}},getsets:{__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(t){this.$module=t=t||Sk.builtin.none.none$}},__doc__:{$get(){return this.$doc?new Sk.builtin.str(this.$doc):Sk.builtin.none.none$}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__text_signature__:{$get(){return new Sk.builtin.str(this.$textsig)}},__self__:{$get(){return this.$self||Sk.sysModules.mp$lookup(this.$module)||Sk.builtin.none.none$}}}})},function(t,e){Sk.builtin.none=Sk.abstr.buildNativeClass("NoneType",{constructor:function(){return Sk.builtin.none.none$},slots:{tp$new:(t,e)=>(Sk.abstr.checkNoArgs("NoneType",t,e),Sk.builtin.none.none$),$r:()=>new Sk.builtin.str("None"),tp$as_number:!0,nb$bool:()=>!1},proto:{valueOf:()=>null},flags:{sk$unacceptableBase:!0}}),Sk.builtin.none.none$=Object.create(Sk.builtin.none.prototype,{v:{value:null,enumerable:!0}}),Sk.builtin.NotImplemented=Sk.abstr.buildNativeClass("NotImplementedType",{constructor:function(){return Sk.builtin.NotImplemented.NotImplemented$},slots:{$r:()=>new Sk.builtin.str("NotImplemented"),tp$new:(t,e)=>(Sk.abstr.checkNoArgs("NotImplementedType",t,e),Sk.builtin.NotImplemented.NotImplemented$)},flags:{sk$unacceptableBase:!0}}),Sk.builtin.NotImplemented.NotImplemented$=Object.create(Sk.builtin.NotImplemented.prototype,{v:{value:null,enumerable:!0}}),t=Sk.abstr.buildNativeClass("ellipsis",{constructor:function(){return Sk.builtin.Ellipsis},slots:{tp$new:(t,e)=>(Sk.abstr.checkNoArgs("ellipsis",t,e),Sk.builtin.Ellipsis),$r:()=>new Sk.builtin.str("Ellipsis")},flags:{sk$unacceptableBase:!0}}),Sk.builtin.Ellipsis=Object.create(t.prototype,{v:{value:"..."}})},function(t,e){const n=/^(?:(.)?([<>=\^]))?([\+\-\s])?(#)?(0)?(\d+)?(,|_)?(?:\.(\d+))?([bcdeEfFgGnosxX%])?$/;Sk.formatting={};let i=function(t,e,n,i){if(Sk.asserts.assert("string"==typeof e),t[6]){var s=parseInt(t[6],10);i=t[2]||(t[5]?"=":i?">":"<");let r=s-(e.length+(n?n.length:0));if(0>=r)return n+e;switch(s=(t[1]||(t[5]?"0":" ")).repeat(r),i){case"=":if("s"===t[9])throw new Sk.builtin.ValueError("'=' alignment not allowed in string format specifier");return n+s+e;case">":return s+n+e;case"<":return n+e+s;case"^":return t=Math.floor(r/2),s.substring(0,t)+n+e+s.substring(t)}}return n+e},s=function(t,e){return e?"-":"+"===t[3]?"+":" "===t[3]?" ":""};const r=/\B(?=(\d{3})+(?!\d))/g,o=/\B(?=([A-Za-z0-9]{4})+(?![A-Za-z0-9]))/g;let a=function(t,e,n){if(Sk.asserts.assert(e instanceof Sk.builtin.int_||e instanceof Sk.builtin.lng),t[8])throw new Sk.builtin.ValueError("Precision not allowed in integer format");var a=e.str$(n,!1);e=e.nb$isnegative(),e=s(t,e),t[4]&&(16===n?e+="0x":8===n?e+="0o":2===n&&(e+="0b"));const l=t[9];if("X"===l&&(a=a.toUpperCase()),"n"===t[9])a=(+a).toLocaleString();else if(t[7]){a=a.split(".");const e=t[7];if(","===e&&10!==n)throw new Sk.builtin.ValueError(`Cannot specify ',' with '${l}'`);a[0]=a[0].replace(10===n?r:o,e),a=a.join(".")}return i(t,a,e,!0)};Sk.formatting.mkNumber__format__=t=>function(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(e));return new Sk.builtin.str(function(t,e,r){if(!e)return t.str$(10,!0);if(!(e=e.match(n)))throw new Sk.builtin.ValueError("Invalid format specifier");var o=e[9];if(o||(o=r?"g":"d"),-1==(r?"fFeEgG%":"bcdoxXnfFeEgG%").indexOf(o))throw new Sk.builtin.ValueError("Unknown format code '"+e[9]+"' for object of type '"+Sk.abstr.typeName(t)+"'");switch(o){case"d":case"n":return a(e,t,10);case"x":case"X":return a(e,t,16);case"o":return a(e,t,8);case"b":return a(e,t,2);case"c":if(e[3])throw new Sk.builtin.ValueError("Sign not allowed with integer format specifier 'c'");if(e[4])throw new Sk.builtin.ValueError("Alternate form not allowed with integer format specifier 'c'");if(e[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");if(e[8])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");return i(e,String.fromCodePoint(Sk.builtin.asnum$(t)),"",!0);case"f":case"F":case"e":case"E":case"g":case"G":{if(e[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed in float format specifier");if("string"==typeof(r=Sk.builtin.asnum$(t))&&(r=Number(r)),1/0===r)return i(e,"inf","",!0);if(-1/0===r)return i(e,"inf","-",!0);if(isNaN(r))return i(e,"nan","",!0);t=!1,0>r&&(r=-r,t=!0);var l=["toExponential","toFixed","toPrecision"]["efg".indexOf(o.toLowerCase())];let n=e[8]?parseInt(e[8],10):6;if(r=r[l](n),-1!=="EFG".indexOf(o)&&(r=r.toUpperCase()),"g"===o.toLowerCase()||!e[9]){if(l=r.match(/\.(\d*[1-9])?(0+)$/)){let[,t,e]=l;r=r.slice(0,t?-e.length:-(e.length+1))}-1!=r.indexOf(".")||e[9]||(r+=".0")}return"e"===o.toLowerCase()&&(r=r.replace(/^([-+]?[0-9]*\.?[0-9]+[eE][-+]?)([0-9])?$/,"$10$2")),e[7]&&((o=r.toString().split("."))[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r=o.join(".")),i(e,r,s(e,t),!0)}case"%":if(e[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with format specifier '%'");return"string"==typeof(t=Sk.builtin.asnum$(t))&&(t=Number(t)),1/0===t?i(e,"inf%","",!0):-1/0===t?i(e,"inf%","-",!0):isNaN(t)?i(e,"nan%","",!0):(o=!1,0>t&&(t=-t,o=!0),r=e[8]?parseInt(e[8],10):6,t=(100*t).toFixed(r)+"%",i(e,t,s(e,o),!0));default:throw new Sk.builtin.ValueError("Unknown format code '"+e[9]+"'")}}(this,e.$jsstr(),t))},Sk.formatting.format=function(t,e){e=e||[];const n={};for(let t=0;tn?1/0:n;null!=(o=s.exec(t))&&li)return new Sk.builtin.tuple([new Sk.builtin.str(""),new Sk.builtin.str(""),new Sk.builtin.str(n)])}else if(i=n.indexOf(e),0>i)return new Sk.builtin.tuple([new Sk.builtin.str(n),new Sk.builtin.str(""),new Sk.builtin.str("")]);return new Sk.builtin.tuple([new Sk.builtin.str(n.substring(0,i)),new Sk.builtin.str(e),new Sk.builtin.str(n.substring(i+e.length))])}}function o(t,e){return function(n,i){if(n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),void 0===i)i=" ";else{if(!(i instanceof Sk.builtin.str&&1===i.sq$length()))throw new Sk.builtin.TypeError("the fill character must be a str of length 1");i=i.v}var s=this.sq$length();return s>=n?new Sk.builtin.str(this.v):e?(s=n-s,n=Math.floor(s/2)+(s&n&1),i=i.repeat(n)+this.v+i.repeat(s-n),new Sk.builtin.str(i)):(i=i.repeat(n-s),new Sk.builtin.str(t?i+this.v:this.v+i))}}function a(t,e,n){if(({start:e,end:n}=Sk.builtin.slice.startEnd$wrt(t,e,n)),t.$hasAstralCodePoints()){const i=t.codepoints[e];e=void 0===i?e+t.v.length-t.codepoints.length:i,n=void 0===(n=t.codepoints[n])?t.v.length:n}return{start:e,end:n}}function l(t){return function(e,n,i){if(e=this.get$tgt(e),({start:n,end:i}=a(this,n,i)),i=n&&e<=i?e:-1,this.codepoints){i=this.sq$length(),n=-1;for(let t=0;ts)return Sk.builtin.bool.false$;if(i=this.v.slice(i,s),n instanceof Sk.builtin.tuple){for(let s=Sk.abstr.iter(n),r=s.tp$iternext();void 0!==r;r=s.tp$iternext()){if(!(r instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("tuple for "+t+" must only contain str, not "+Sk.abstr.typeName(r));if(e(i,r.v))return Sk.builtin.bool.true$}return Sk.builtin.bool.false$}return new Sk.builtin.bool(e(i,n.v))}}function c(t){return void 0===g[t]?t:t+"_$rw$"}var p=/^[0-9!#_]/,h=Object.create(null);Sk.builtin.str=Sk.abstr.buildNativeClass("str",{constructor:function(t){if(Sk.asserts.assert(this instanceof Sk.builtin.str,"bad call to str - use 'new'"),"string"!=typeof t)if(void 0===t)t="";else if(null===t)t="None";else{if(void 0!==t.tp$str)return t.tp$str();if("number"!=typeof t)throw new Sk.builtin.TypeError("could not convert object of type '"+Sk.abstr.typeName(t)+"' to str");t=Number.isFinite(t)?String(t):String(t).replace("Infinity","inf").replace("NaN","nan")}const e=h[t];if(void 0!==e)return e;h[t]=this,this.$mangled=c(t),this.$savedKeyHash=t.replace(p,"!$&"),this.v=t},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'.",tp$new(t,e){if(e=e||[],this!==Sk.builtin.str.prototype)return this.$subtype_new(t,e);if(1>=t.length&&!e.length)return new Sk.builtin.str(t[0]);if(Sk.__future__.python3){const[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("str",["object","encoding","errors"],t,e);if(void 0===n||void 0===i&&void 0===s)return new Sk.builtin.str(n);if(Sk.builtin.bytes.check$encodeArgs("str",i,s),!Sk.builtin.checkBytes(n))throw new Sk.builtin.TypeError("decoding to str: need a bytes-like object, "+Sk.abstr.typeName(n)+" found");return Sk.builtin.bytes.$decode.call(n,i,s)}throw new Sk.builtin.TypeError("str takes at most one argument ("+(t.length+e.length)+" given)")},$r(){let t="'";-1!==this.v.indexOf("'")&&-1===this.v.indexOf('"')&&(t='"');const e=this.v.length;let n=t;for(let r=0;rs||57344<=s)&&!Sk.__future__.python3?n+="\\u"+("000"+s.toString(16)).slice(-4):55296<=s&&!Sk.__future__.python3?(i=this.v.codePointAt(r),r++,s="0000000"+(i=i.toString(16)).toString(16),n=4i||127<=s&&!Sk.__future__.python3?(2>(i=i.charCodeAt(0).toString(16)).length&&(i="0"+i),n+="\\x"+i):n+=i}return new Sk.builtin.str(n+t)},tp$str(){return this.constructor===Sk.builtin.str?this:new Sk.builtin.str(this.v)},tp$iter(){return new m(this)},tp$richcompare(t,e){if(!(t instanceof Sk.builtin.str))return Sk.builtin.NotImplemented.NotImplemented$;switch(e){case"Lt":return this.vt.v;case"GtE":return this.v>=t.v}},mp$subscript(t){let e;if(Sk.misceval.isIndex(t)){if(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError),e=this.sq$length(),0>t&&(t+=e),0>t||t>=e)throw new Sk.builtin.IndexError("string index out of range");return this.codepoints?new Sk.builtin.str(this.v.substring(this.codepoints[t],this.codepoints[t+1])):new Sk.builtin.str(this.v.charAt(t))}if(t instanceof Sk.builtin.slice){let n="";return e=this.sq$length(),this.codepoints?t.sssiter$(e,(t=>{n+=this.v.substring(this.codepoints[t],this.codepoints[t+1])})):t.sssiter$(e,(t=>{n+=this.v.charAt(t)})),new Sk.builtin.str(n)}throw new Sk.builtin.TypeError("string indices must be integers, not "+Sk.abstr.typeName(t))},sq$length(){return this.$hasAstralCodePoints()?this.codepoints.length:this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("cannot concatenate 'str' and '"+Sk.abstr.typeName(t)+"' objects");return new Sk.builtin.str(this.v+t.v)},sq$repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");if((t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let e="";for(let n=0;n' requires string as left operand not "+Sk.abstr.typeName(t));return-1!==this.v.indexOf(t.v)},tp$as_number:!0,nb$remainder:function(t){const e=this.sk$builtinBase;t.constructor===Sk.builtin.tuple||t instanceof Sk.builtin.dict||t instanceof Sk.builtin.mappingproxy||(t=new Sk.builtin.tuple([t]));var n=0,i=this.$jsstr().replace(/%(\([a-zA-Z0-9]+\))?([#0 +\-]+)?(\*|[0-9]+)?(\.(\*|[0-9]+))?[hlL]?([diouxXeEfFgGcrsb%])/g,(function(i,s,r,o,a,l,u){var c,p,h,_,d;o=Sk.builtin.asnum$(o),a=Sk.builtin.asnum$(a),void 0!==s&&""!==s||"%"==u||(c=n++),""===a&&(a=void 0);var f=p=h=_=d=!1;if(r&&(-1!==r.indexOf("-")?_=!0:-1!==r.indexOf("0")&&(d=!0),-1!==r.indexOf("+")?p=!0:-1!==r.indexOf(" ")&&(h=!0),f=-1!==r.indexOf("#")),a&&(a=parseInt(a.substr(1),10)),r=function(t,e){var n;e=Sk.builtin.asnum$(e);var i=!1;if("number"==typeof t){0>t&&(t=-t,i=!0);var s=t.toString(e)}else t instanceof Sk.builtin.float_?(2<(s=t.str$(e,!1)).length&&".0"===s.substr(-2)&&(s=s.substr(0,s.length-2)),i=t.nb$isnegative()):(t instanceof Sk.builtin.int_||t instanceof Sk.builtin.lng)&&(s=t.str$(e,!1),i=t.nb$isnegative());if(Sk.asserts.assert(void 0!==s,"unhandled number format"),t=!1,a)for(n=s.length;ne){for(this.codepoints=[],t=0;te&&t++;return!0}}return this.codepoints=null,!1},sk$asarray(){const t=[];if(this.$hasAstralCodePoints()){var e=this.codepoints;for(let n=0;ni)return new Sk.builtin.str(this.v.replace(t,e));let s=0;return t=this.v.replace(t,(t=>s++e?0:2*(t.length/2-e);for(e=[],0>=n?n=0:e.push(new Sk.builtin.str(this.v.slice(0,t[n-1])));n{if(!(t instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("sequence item "+e.length+": expected str, "+Sk.abstr.typeName(t)+" found");e.push(t.v)})),(()=>new Sk.builtin.str(e.join(this.v))))},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Concatenate any number of strings.\n\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\n\nExample: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'"},capitalize:{$meth:function(){return new Sk.builtin.str(this.v.charAt(0).toUpperCase()+this.v.slice(1).toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a capitalized version of the string.\n\nMore specifically, make the first character have upper case and the rest lower\ncase."},title:{$meth:function(){const t=this.v.replace(/[a-z][a-z]*/gi,(t=>t[0].toUpperCase()+t.substr(1).toLowerCase()));return new Sk.builtin.str(t)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a version of the string where each word is titlecased.\n\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case."},center:{$meth:o(!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a centered string of length width.\n\nPadding is done using the specified fill character (default is a space)."},count:{$meth:function(t,e,n){return t=this.get$tgt(t),({start:e,end:n}=a(this,e,n)),n int\n\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation."},expandtabs:{$meth:function(t){if(!Sk.builtin.checkInt(t))throw new Sk.builtin.TypeError("an integer is required, got type"+Sk.abstr.typeName(t));t=Sk.builtin.asnum$(t);const e=Array(t+1).join(" "),n=this.v.replace(/([^\r\n\t]*)\t/g,((n,i)=>i+e.slice(i.length%t)));return new Sk.builtin.str(n)},$flags:{NamedArgs:["tabsize"],Defaults:[8]},$textsig:"($self, /, tabsize=8)",$doc:"Return a copy where all tab characters are expanded using spaces.\n\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(t,e,n){return new Sk.builtin.int_(this.find$left(t,e,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},partition:{$meth:r(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings."},index:{$meth:function(t,e,n){if(-1===(t=this.find$left(t,e,n)))throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found, \nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},ljust:{$meth:o(!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a left-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},lower:{$meth(){return new Sk.builtin.str(this.v.toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to lowercase."},lstrip:{$meth:s(/^\s+/g,(t=>"^["+t+"]+")),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rfind:{$meth(t,e,n){return new Sk.builtin.int_(this.find$right(t,e,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rfind(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(t,e,n){if(-1===(t=this.find$right(t,e,n)))throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},rjust:{$meth:o(!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a right-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},rstrip:{$meth:s(/\s+$/g,(t=>"["+t+"]+$")),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with trailing whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rpartition:{$meth:r(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string."},splitlines:{$meth:function(t){t=Sk.misceval.isTrue(t);const e=this.v,n=[],i=e.length;var s=0;for(let o=0;o"^["+t+"]+|["+t+"]+$")),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading and trailing whitespace remove.\n\nIf chars is given and not None, remove characters in chars instead."},swapcase:{$meth(){const t=this.v.replace(/[a-z]/gi,(t=>{const e=t.toLowerCase();return e===t?t.toUpperCase():e}));return new Sk.builtin.str(t)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Convert uppercase characters to lowercase and lowercase characters to uppercase."},upper:{$meth(){return new Sk.builtin.str(this.v.toUpperCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to uppercase."},startswith:{$meth:u("startswith",((t,e)=>0===t.indexOf(e))),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try."},endswith:{$meth:u("endswith",((t,e)=>-1!==t.indexOf(e,t.length-e.length))),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try."},isascii:{$meth(){return new Sk.builtin.bool(/^[\x00-\x7F]*$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if all characters in the string are ASCII, False otherwise.\n\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too."},islower:{$meth:function(){return new Sk.builtin.bool(this.v.length&&/[a-z]/.test(this.v)&&!/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a lowercase string, False otherwise.\n\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string."},isupper:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[a-z]/.test(this.v)&&/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an uppercase string, False otherwise.\n\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string."},istitle:{$meth:function(){const t=this.v;let e,n=!1,i=!1;for(let s=0;s str\n\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces ('{' and '}')."},__format__:{$meth:Sk.formatting.formatString,$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:"Return a formatted version of the string as described by format_spec."},__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.str(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null}}}),Sk.exportSymbol("Sk.builtin.str",Sk.builtin.str);var _=/^[A-Za-z0-9]+$/,d=/([.*+?=|\\\/()\[\]\{\}^$])/g,f=/^[\s\xa0]+/;Sk.builtin.str.$py2decode=new Sk.builtin.method_descriptor(Sk.builtin.str,{$name:"decode",$meth(t,e){const n=new Sk.builtin.bytes(this.v);return Sk.builtin.bytes.$decode.call(n,t,e)},$flags:{NamedArgs:["encoding","errors"]}});var m=Sk.abstr.buildIteratorClass("str_iterator",{constructor:function(t){this.$index=0,t.$hasAstralCodePoints()?(this.$seq=t.codepoints,this.tp$iternext=()=>{const e=this.$seq[this.$index];if(void 0!==e)return new Sk.builtin.str(t.v.substring(e,this.$seq[++this.$index]))}):(this.$seq=t.v,this.tp$iternext=()=>{const t=this.$seq[this.$index++];if(void 0!==t)return new Sk.builtin.str(t)})},iternext(){return this.tp$iternext()},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),g={abstract:!0,as:!0,boolean:!0,break:!0,byte:!0,case:!0,catch:!0,char:!0,class:!0,continue:!0,const:!0,debugger:!0,default:!0,delete:!0,do:!0,double:!0,else:!0,enum:!0,export:!0,extends:!0,false:!0,final:!0,finally:!0,float:!0,for:!0,function:!0,goto:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,int:!0,interface:!0,is:!0,long:!0,namespace:!0,native:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,short:!0,static:!0,super:!0,switch:!0,synchronized:!0,this:!0,throw:!0,throws:!0,transient:!0,true:!0,try:!0,typeof:!0,use:!0,var:!0,void:!0,volatile:!0,while:!0,with:!0,constructor:!0,__defineGetter__:!0,__defineSetter__:!0,apply:!0,arguments:!0,call:!0,caller:!0,eval:!0,hasOwnProperty:!0,isPrototypeOf:!0,__lookupGetter__:!0,__lookupSetter__:!0,__noSuchMethod__:!0,propertyIsEnumerable:!0,prototype:!0,toSource:!0,toLocaleString:!0,toString:!0,unwatch:!0,valueOf:!0,watch:!0,length:!0,name:!0};Sk.builtin.str.reservedWords_=g,Sk.builtin.str.$fixReserved=c},function(t,e){Sk.builtin.func=Sk.abstr.buildNativeClass("function",{constructor:function(t,e,n,i){if(Sk.asserts.assert(this instanceof Sk.builtin.func,"builtin func should be called as a class with `new`"),this.func_code=t,this.func_globals=e||null,this.$name=t.co_name&&t.co_name.v||t.name||"",this.$d=Sk.builtin.dict?new Sk.builtin.dict:void 0,this.$doc=t.co_docstring||Sk.builtin.none.none$,this.$module=Sk.globals&&Sk.globals.__name__||Sk.builtin.none.none$,this.$qualname=t.co_qualname&&t.co_qualname.v||this.$name,void 0!==i)for(let t in i)n[t]=i[t];this.func_closure=n,this.func_annotations=null,this.$memoiseFlags(),this.memoised=t.co_fastcall||null,this.tp$call=t.co_fastcall?t.bind(this):Sk.builtin.func.prototype.tp$call.bind(this)},slots:{tp$getattr:Sk.generic.getAttr,tp$descr_get(t,e){return null===t?this:new Sk.builtin.method(this,t)},$r(){return new Sk.builtin.str("")},tp$call(t,e){if(this.memoised||(this.$memoiseFlags(),this.memoised=!0),void 0===this.co_argcount&&void 0===this.co_varnames&&!this.co_kwargs&&!this.func_closure){if(e&&0!==e.length)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");return this.func_code.apply(this.func_globals,t)}return t=this.$resolveArgs(t,e),this.func_closure&&t.push(this.func_closure),this.func_code.apply(this.func_globals,t)}},getsets:{__name__:{$get(){return new Sk.builtin.str(this.$name)},$set(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__name__ must be set to a string object");this.$name=t.$jsstr()}},__qualname__:{$get(){return new Sk.builtin.str(this.$qualname)},$set(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__qualname__ must be set to a string object");this.$qualname=t.$jsstr()}},__dict__:Sk.generic.getSetDict,__annotations__:{$get(){return null===this.func_annotations?this.func_annotations=new Sk.builtin.dict([]):Array.isArray(this.func_annotations)&&(this.func_annotations=Sk.abstr.keywordArrayToPyDict(this.func_annotations)),this.func_annotations},$set(t){if(void 0===t||Sk.builtin.checkNone(t))this.func_annotations=new Sk.builtin.dict([]);else{if(!(t instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("__annotations__ must be set to a dict object");this.func_annotations=t}}},__defaults__:{$get(){return null==this.$defaults?Sk.builtin.none.none$:new Sk.builtin.tuple(this.$defaults)},$set(t){if(void 0===t||Sk.builtin.checkNone(t))this.$defaults=null;else{if(!(t instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("__defaults__ must be set to a tuple object");this.$defaults=t.valueOf()}}},__doc__:{$get(){return this.$doc},$set(t){this.$doc=t||Sk.builtin.none.none$}},__module__:{$get(){return this.$module},$set(t){this.$module=t||Sk.builtin.none.none$}}},proto:{$memoiseFlags(){this.co_varnames=this.func_code.co_varnames,this.co_argcount=this.func_code.co_argcount,void 0===this.co_argcount&&this.co_varnames&&(this.co_argcount=this.co_varnames.length),this.co_kwonlyargcount=this.func_code.co_kwonlyargcount||0,this.co_varargs=this.func_code.co_varargs,this.co_kwargs=this.func_code.co_kwargs,this.$defaults=this.func_code.$defaults,this.$kwdefs=this.func_code.$kwdefs||[]},$resolveArgs:function(t,e){var n=this.co_argcount;void 0===n&&(n=this.co_varnames?this.co_varnames.length:t.length);var i=this.co_varnames||[],s=this.co_kwonlyargcount||0;let r,o=n+s;if(!(0!==s||this.co_kwargs||e&&0!==e.length||this.co_varargs)){if(t.length==n)return t;if(0===t.length&&this.$defaults&&this.$defaults.length===n){for(i=0;i!=this.$defaults.length;i++)t[i]=this.$defaults[i];return t}}this.co_kwargs&&(r=[]);var a=t.length;let l=t.length<=n?t:t.slice(0,n);if(this.co_varargs)t=t.length>l.length?t.slice(l.length):[],l[o]=new Sk.builtin.tuple(t);else if(a>n)throw new Sk.builtin.TypeError(`${this.$name}"() takes ${n} positional ${1==n?"argument":"arguments"} but ${a} ${1==a?"was":"were"} given`);if(e){if(this.func_code.no_kw)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");for(t=0;t"'"+t+"'")).join(", ")));for(;tt.indexOf(".")&&0>t.indexOf("e")&&0>t.indexOf("E"))return t;var e=0;if(0<=t.indexOf("e")){var n=t.substr(0,t.indexOf("e"));e=t.substr(t.indexOf("e")+1)}else 0<=t.indexOf("E")?(n=t.substr(0,t.indexOf("e")),e=t.substr(t.indexOf("E")+1)):n=t;if(e=parseInt(e,10),0>(t=n.indexOf("."))){if(0<=e){for(;0-e?n.substr(0,n.length+e):0}for(n=0===t?n.substr(1):tn.length;)n+="0";return 0>=t?0:n.substr(0,t)},Sk.exportSymbol("Sk.builtin.asnum$nofloat",Sk.builtin.asnum$nofloat),Sk.builtin.round=function(t,e){if(void 0===t)throw new Sk.builtin.TypeError("a float is required");if(!Sk.__future__.dunder_round){if(!Sk.builtin.checkNumber(t))throw new Sk.builtin.TypeError("a float is required");if(t.round$)return t.round$(e);throw new Sk.builtin.AttributeError(Sk.abstr.typeName(t)+" instance has no attribute '__float__'")}if(void 0!==e&&!Sk.builtin.checkNone(e)&&!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object cannot be interpreted as an index");if(void 0!==(t=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$round)))return void 0!==e?Sk.misceval.callsimArray(t,[e]):Sk.misceval.callsimArray(t,[]);throw new Sk.builtin.TypeError("a float is required")},Sk.builtin.len=function(t){if(!t.sq$length)throw new Sk.builtin.TypeError("object of type '"+Sk.abstr.typeName(t)+"' has no len()");return t=t.sq$length(!0),Sk.misceval.chain(t,(t=>new Sk.builtin.int_(t)))},Sk.builtin.min=function(t,e){let n;const i=t.length;if(!i)throw new Sk.builtin.TypeError("min expected 1 argument, got 0");const[s,r]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],e,[null,Sk.builtin.none.none$]);if(1{if(o=t,void 0!==o)return Sk.builtin.checkNone(r)?Sk.misceval.iterFor(n,(t=>{Sk.misceval.richCompareBool(t,o,"Lt")&&(o=t)})):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[o]),(t=>Sk.misceval.iterFor(n,(e=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[e]),(n=>{Sk.misceval.richCompareBool(n,t,"Lt")&&(o=e,t=n)}))))))}),(()=>{if(void 0===o){if(null===s)throw new Sk.builtin.ValueError("min() arg is an empty sequence");o=s}return o}))},Sk.builtin.max=function(t,e){let n;const i=t.length;if(!i)throw new Sk.builtin.TypeError("max expected 1 argument, got 0");const[s,r]=Sk.abstr.copyKeywordsToNamedArgs("max",["default","key"],[],e,[null,Sk.builtin.none.none$]);if(1{if(o=t,void 0!==o)return Sk.builtin.checkNone(r)?Sk.misceval.iterFor(n,(t=>{Sk.misceval.richCompareBool(t,o,"Gt")&&(o=t)})):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[o]),(t=>Sk.misceval.iterFor(n,(e=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[e]),(n=>{Sk.misceval.richCompareBool(n,t,"Gt")&&(o=e,t=n)}))))))}),(()=>{if(void 0===o){if(null===s)throw new Sk.builtin.ValueError("max() arg is an empty sequence");o=s}return o}))},Sk.builtin.min.co_fastcall=Sk.builtin.max.co_fastcall=1,Sk.builtin.any=function(t){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){if(Sk.misceval.isTrue(t))return new Sk.misceval.Break(Sk.builtin.bool.true$)})),(t=>t||Sk.builtin.bool.false$))},Sk.builtin.all=function(t){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){if(!Sk.misceval.isTrue(t))return new Sk.misceval.Break(Sk.builtin.bool.false$)})),(t=>t||Sk.builtin.bool.true$))},Sk.builtin.sum=function(t,e){const n=Sk.abstr.iter(t);if(void 0===e)var i=new Sk.builtin.int_(0);else{if(Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("sum() can't sum strings [use ''.join(seq) instead]");i=e}return t=void 0===e||e.constructor===Sk.builtin.int_?Sk.misceval.iterFor(n,(t=>{if(t.constructor!==Sk.builtin.int_)return t.constructor===Sk.builtin.float_?(i=i.nb$float().nb$add(t),new Sk.misceval.Break("float")):(i=Sk.abstr.numberBinOp(i,t,"Add"),new Sk.misceval.Break("slow"));i=i.nb$add(t)})):e.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(t,(t=>"float"===t?Sk.misceval.iterFor(n,(t=>{if(t.constructor!==Sk.builtin.float_&&t.constructor!==Sk.builtin.int_)return i=Sk.abstr.numberBinOp(i,t,"Add"),new Sk.misceval.Break("slow");i=i.nb$add(t)})):t),(t=>{if("slow"===t)return Sk.misceval.iterFor(n,(t=>{i=Sk.abstr.numberBinOp(i,t,"Add")}))}),(()=>i))},Sk.builtin.zip=function(){var t,e;if(0===arguments.length)return new Sk.builtin.list([]);var n=[];for(e=0;et||1114112<=t)throw new Sk.builtin.ValueError("chr() arg not in range(0x110000)")}else if(0>t||256<=t)throw new Sk.builtin.ValueError("chr() arg not in range(256)");return new Sk.builtin.str(String.fromCodePoint(t))},Sk.builtin.unichr=function(t){if(Sk.builtin.pyCheckArgsLen("unichr",arguments.length,1,1),!Sk.builtin.checkInt(t))throw new Sk.builtin.TypeError("an integer is required");t=Sk.builtin.asnum$(t);try{return new Sk.builtin.str(String.fromCodePoint(t))}catch(t){if(t instanceof RangeError)throw new Sk.builtin.ValueError(t.message);throw t}},Sk.builtin.int2str_=function(t,e,n){let i=Sk.misceval.asIndexOrThrow(t),s=i.toString(e);return s=0>i?"-"+n+s.slice(1):n+s,2!==e&&!Sk.__future__.python3&&(t instanceof Sk.builtin.lng||JSBI.__isBigInt(i))&&(s+="L"),new Sk.builtin.str(s)},Sk.builtin.hex=function(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("hex() argument can't be converted to hex");return Sk.builtin.int2str_(t,16,"0x")},Sk.builtin.oct=function(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("oct() argument can't be converted to hex");return Sk.__future__.octal_number_literal?Sk.builtin.int2str_(t,8,"0o"):Sk.builtin.int2str_(t,8,"0")},Sk.builtin.bin=function(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object can't be interpreted as an index");return Sk.builtin.int2str_(t,2,"0b")},Sk.builtin.dir=function(t){if(void 0!==t)return t=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$dir),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[]),(t=>Sk.builtin.sorted(t)));throw new Sk.builtin.NotImplementedError("skulpt does not yet support dir with no args")},Sk.builtin.repr=function(t){return t.$r()},Sk.builtin.ascii=function(t){return Sk.misceval.chain(t.$r(),(t=>{let e,n;for(n=0;n=s?(2>(i=s.toString(16)).length&&(i="0"+i),e+="\\x"+i):127s||57344<=s?e+="\\u"+("000"+s.toString(16)).slice(-4):55296<=s?(i=t.v.codePointAt(n),n++,s="0000000"+(i=i.toString(16)).toString(16),e=4t.tp$getattr(e,!0)),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t}));return Sk.misceval.chain(i,(i=>{if(void 0===i){if(void 0!==n)return n;throw new Sk.builtin.AttributeError(t.sk$attrError()+" has no attribute "+Sk.misceval.objectRepr(e))}return i}))},Sk.builtin.setattr=function(t,e,n){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("attribute name must be string");return Sk.misceval.chain(t.tp$setattr(e,n,!0),(()=>Sk.builtin.none.none$))},Sk.builtin.raw_input=function(t){var e=t||"";return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(function(t){return Sk.inputfunTakesPrompt?Sk.builtin.file.$readline(t.$d.stdin,null,e):Sk.misceval.chain(void 0,(function(){return Sk.misceval.callsimOrSuspendArray(t.$d.stdout.write,[t.$d.stdout,new Sk.builtin.str(e)])}),(function(){return Sk.misceval.callsimOrSuspendArray(t.$d.stdin.readline,[t.$d.stdin])}))}))},Sk.builtin.input=Sk.builtin.raw_input,Sk.builtin.jseval=function(t){return t=Sk.global.eval(Sk.ffi.remapToJs(t)),Sk.ffi.remapToPy(t)},Sk.builtin.jsmillis=function(){return console.warn("jsmillis is deprecated"),(new Date).valueOf()};const n=Sk.abstr.buildNativeClass("code",{constructor:function(t,e){this.compiled=e,this.code=e.code,this.filename=t},slots:{tp$new(t,e){throw new Sk.builtin.NotImplementedError("cannot construct a code object in skulpt")},$r(){return new Sk.builtin.str(", file "+this.filename+">")}}});Sk.builtin.compile=function(t,e,i,s,r,o){return Sk.builtin.pyCheckType("source","str",Sk.builtin.checkString(t)),Sk.builtin.pyCheckType("filename","str",Sk.builtin.checkString(e)),Sk.builtin.pyCheckType("mode","str",Sk.builtin.checkString(i)),t=t.$jsstr(),e=e.$jsstr(),i=i.$jsstr(),Sk.misceval.chain(Sk.compile(t,e,i,!0),(t=>new n(e,t)))},Sk.builtin.exec=function(t,e,i){let s=e&&e.__file__;if(s=void 0!==s&&Sk.builtin.checkString(s)?s.toString():"",Sk.builtin.checkString(t))t=Sk.compile(t.$jsstr(),s,"exec",!0);else if("string"==typeof t)t=Sk.compile(t,s,"exec",!0);else if(!(t instanceof n))throw new Sk.builtin.TypeError("exec() arg 1 must be a string, bytes or code object");Sk.asserts.assert(void 0===e||e.constructor===Object,"internal calls to exec should be called with a javascript object for globals"),Sk.asserts.assert(void 0===i||i.constructor===Object,"internal calls to exec should be called with a javascript object for locals");const r=Sk.globals;return e=e||r,Sk.misceval.chain(t,(t=>Sk.global.eval(t.code)(e,i)),(t=>(Sk.globals=r,t)))},Sk.builtin.eval=function(t,e,i){if(Sk.builtin.checkString(t))t=t.$jsstr();else if(Sk.builtin.checkBytes(t))throw new Sk.builtin.NotImplementedError("bytes for eval is not yet implemented in skulpt");if("string"==typeof t){t=t.trim();var s=Sk.parse("?",t);if(1<(s=Sk.astFromParse(s.cst,"?",s.flags)).body.length||!(s.body[0]instanceof Sk.astnodes.Expr))throw new Sk.builtin.SyntaxError("invalid syntax");t="__final_res__ = "+t}else if(!(t instanceof n))throw new Sk.builtin.TypeError("eval() arg 1 must be a string, bytes or code object");return Sk.misceval.chain(Sk.builtin.exec(t,e,i),(t=>{const e=t.__final_res__||Sk.builtin.none.none$;return delete t.__final_res__,e}))},Sk.builtin.map=function(t,e){var n,i,s=[];if(Sk.builtin.pyCheckArgsLen("map",arguments.length,2),2((t=new Sk.builtin.list(t)).list$sort(e,n,i),t)))},Sk.builtin.filter=function(t,e){var n;if(Sk.builtin.pyCheckArgsLen("filter",arguments.length,2,2),!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not iterable");var i=function(){return[]},s=function(t,e){return t.push(e),t},r=function(t){return new Sk.builtin.list(t)};e.ob$type===Sk.builtin.str?(i=function(){return new Sk.builtin.str("")},s=function(t,e){return t.sq$concat(e)},r=function(t){return t}):e.ob$type===Sk.builtin.tuple&&(r=function(t){return new Sk.builtin.tuple(t)});var o=i(),a=Sk.abstr.iter(e);for(n=a.tp$iternext();void 0!==n;n=a.tp$iternext())i=t===Sk.builtin.none.none$?new Sk.builtin.bool(n):Sk.misceval.callsimArray(t,[n]),Sk.misceval.isTrue(i)&&(o=s(o,n));return r(o)},Sk.builtin.hasattr=function(t,e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("hasattr(): attribute name must be string");const n=Sk.misceval.tryCatch((()=>t.tp$getattr(e,!0)),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t}));return Sk.misceval.chain(n,(t=>void 0===t?Sk.builtin.bool.false$:Sk.builtin.bool.true$))},Sk.builtin.pow=function(t,e,n){if(void 0===n||Sk.builtin.checkNone(n))return Sk.abstr.numberBinOp(t,e,"Pow");if(!(Sk.builtin.checkInt(t)&&Sk.builtin.checkInt(e)&&Sk.builtin.checkInt(n))){if(Sk.builtin.checkFloat(t)||Sk.builtin.checkComplex(t))return t.nb$power(e,n);throw new Sk.builtin.TypeError("unsupported operand type(s) for ** or pow(): '"+Sk.abstr.typeName(t)+"', '"+Sk.abstr.typeName(e)+"', '"+Sk.abstr.typeName(n)+"'")}return t.nb$power(e,n)},Sk.builtin.quit=function(t){throw t=new Sk.builtin.str(t).v,new Sk.builtin.SystemExit(t)},Sk.builtin.issubclass=function(t,e){if(!Sk.builtin.checkClass(t))throw new Sk.builtin.TypeError("issubclass() arg 1 must be a class");var n=Sk.builtin.checkClass(e);if(!(n||e instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("issubclass() arg 2 must be a class or tuple of classes");if(n)return t.$isSubType(e)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(n=0;n{if(void 0===n){if(e)return e;if(void 0!==(n=t.gi$ret)&&n!==Sk.builtin.none.none$)throw new Sk.builtin.StopIteration(n);throw new Sk.builtin.StopIteration}return n}))},Sk.builtin.reload=function(){throw new Sk.builtin.NotImplementedError("reload is not yet implemented")},Sk.builtin.vars=function(){throw new Sk.builtin.NotImplementedError("vars is not yet implemented")},Sk.builtin.apply_=function(){throw new Sk.builtin.NotImplementedError("apply is not yet implemented")},Sk.builtin.buffer=function(){throw new Sk.builtin.NotImplementedError("buffer is not yet implemented")},Sk.builtin.coerce=function(){throw new Sk.builtin.NotImplementedError("coerce is not yet implemented")},Sk.builtin.intern=function(){throw new Sk.builtin.NotImplementedError("intern is not yet implemented")}},function(t,e){function n(t,e){return e=new this.constructor,this.ht$type&&a.call(e),e.args=new Sk.builtin.tuple(t.slice(0)),e}function i(t,e){Sk.abstr.checkNoKwargs(Sk.abstr.typeName(this),e),this.args=new Sk.builtin.tuple(t.slice(0))}function s(){return 1>=this.args.v.length?new Sk.builtin.str(this.args.v[0]):this.args.$r()}function r(t,e,n,s,r,o){r||(r=[]);const a=s?{}:{sk$solidBase:!1};return n={tp$init:s||i,tp$doc:n},o&&(n.tp$str=o),Sk.abstr.buildNativeClass(e,{base:t,constructor:function(...e){t.apply(this,e),r.forEach(((t,n)=>{this["$"+t]=Sk.ffi.remapToPy(e[n])}))},slots:n,getsets:Object.fromEntries(r.map((t=>[t,{$get(){return this["$"+t]||Sk.builtin.none.none$},$set(e){this["$"+t]=e||Sk.builtin.none.none$}}]))),flags:a})}function o(t,e,s){const r=t.prototype.tp$init;return s={tp$doc:s,tp$init:r},r===i&&(s.tp$new=n),Sk.abstr.buildNativeClass(e,{base:t,constructor:function(...e){t.apply(this,e)},slots:s,flags:{sk$solidBase:!1}})}const a=Sk.abstr.buildNativeClass("BaseException",{constructor:function t(e,...n){Sk.asserts.assert(this instanceof t,"bad call to exception constructor, use 'new'"),"string"==typeof e&&(e=new Sk.builtin.str(e)),this.args=new Sk.builtin.tuple(e?[e]:[]),this.traceback=2<=n.length?[{filename:n[0]||"",lineno:n[1]}]:[],this.context=this.cause=null,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"Common base class for all exceptions",tp$new:n,tp$init:i,$r(){let t=this.tp$name;return t+="("+this.args.v.map((t=>Sk.misceval.objectRepr(t))).join(", ")+")",new Sk.builtin.str(t)},tp$str:s},getsets:{args:{$get(){return this.args},$set(t){if(void 0===t)throw new Sk.builtin.TypeError("args may not be deleted");this.args=new Sk.builtin.tuple(t)}},__cause__:{$get(){return this.$cause||Sk.builtin.none.none$},$set(t){if(!(Sk.builtin.checkNone(t)||t instanceof Sk.builtin.BaseException))throw new B("exception cause must be None or derive from BaseException");this.$cause=t}},__dict__:Sk.generic.getSetDict},proto:{toString(){let t=this.tp$name;return t+=": "+this.tp$str().v,0!==this.traceback.length?t+" on line "+this.traceback[0].lineno:t+" at "}}});t=o(a,"SystemExit","Request to exit from the interpreter."),e=o(a,"KeyboardInterrupt","Program interrupted by user.");const l=o(a,"GeneratorExit","Request that a generator exit."),u=o(a,"Exception","Common base class for all non-exit exceptions."),c=r(u,"StopIteration","Signal the end from iterator.__next__().",(function(t,e){i.call(this,t,e),this.$value=t[0]||Sk.builtin.none.none$}),["value"]),p=o(u,"StopAsyncIteration","Signal the end from iterator.__anext__()."),h=o(u,"ArithmeticError","Base class for arithmetic errors."),_=o(h,"FloatingPointError","Floating point operation failed."),d=o(h,"OverflowError","Result too large to be represented."),f=o(h,"ZeroDivisionError","Second argument to a division or modulo operation was zero."),m=o(u,"AssertionError","Assertion failed."),g=o(u,"AttributeError","Attribute not found."),b=o(u,"BufferError","Buffer error."),S=o(u,"EOFError","Read beyond end of file."),k=r(u,"ImportError","Import can't find module, or can't find name in module.",(function(t,e){i.call(this,t);const[n,s]=Sk.abstr.copyKeywordsToNamedArgs("ImportError",["name","path"],[],e);this.$name=n,this.$path=s,1===t.length&&(this.$msg=t[0])}),["msg","name","path"],(function(){return Sk.builtin.checkString(this.$msg)?this.$msg:s.call(this)})),y=o(k,"ModuleNotFoundError","Module not found."),T=o(u,"LookupError","Base class for lookup errors."),v=o(T,"IndexError","Sequence index out of range."),$=r(T,"KeyError","Mapping key not found.",null,null,(function(){return 1===this.args.v.length?this.args.v[0].$r():s.call(this)})),w=o(u,"MemoryError","Out of memory."),E=o(u,"NameError","Name not found globally."),I=o(E,"UnboundLocalError","Local name referenced but not bound to a value."),A=r(u,"OSError","Base class for I/O related errors.",(function(t,e){i.call(this,t,e)})),O=o(A,"FileNotFoundError","File not found."),M=o(A,"TimeoutError","Timeout expired."),C=o(u,"ReferenceError","Weak ref proxy used after referent went away."),R=o(u,"RuntimeError","Unspecified run-time error."),x=o(R,"NotImplementedError","Method or function hasn't been implemented yet."),N=o(R,"RecursionError","Recursion limit exceeded."),L=r(u,"SyntaxError","Invalid syntax.",(function(t,e){i.call(this,t,e),1<=t.length&&(this.$msg=t[0]),2===t.length&&(t=new Sk.builtin.tuple(t[1]).v,this.$filename=t[0],this.$lineno=t[1],this.$offset=t[2],this.$text=t[3])}),["msg","filename","lineno","offset","text"],(function(){return s.call(this)})),D=o(L,"IndentationError","Improper indentation."),F=o(D,"TabError","Improper mixture of spaces and tabs."),P=o(u,"SystemError","Internal error in the Skulpt interpreter."),B=o(u,"TypeError","Inappropriate argument type."),V=o(u,"ValueError","Inappropriate argument value (of correct type)."),U=o(V,"UnicodeError","Unicode related error."),Y=o(U,"UnicodeDecodeError","Unicode decoding error."),j=o(U,"UnicodeEncodeError","Unicode encoding error.");Object.assign(Sk.builtin,{BaseException:a,SystemExit:t,KeyboardInterrupt:e,GeneratorExit:l,Exception:u,StopIteration:c,StopAsyncIteration:p,ArithmeticError:h,FloatingPointError:_,OverflowError:d,ZeroDivisionError:f,AssertionError:m,AttributeError:g,BufferError:b,EOFError:S,ImportError:k,ModuleNotFoundError:y,LookupError:T,IndexError:v,KeyError:$,MemoryError:w,NameError:E,UnboundLocalError:I,OSError:A,IOError:A,FileNotFoundError:O,TimeoutError:M,ReferenceError:C,RuntimeError:R,NotImplementedError:x,RecursionError:N,SyntaxError:L,IndentationError:D,TabError:F,SystemError:P,TypeError:B,ValueError:V,UnicodeError:U,UnicodeDecodeError:Y,UnicodeEncodeError:j}),Sk.builtin.SuspensionError=o(u,"SuspensionError","Unsupported Suspension in code."),Sk.builtin.ExternalError=Sk.abstr.buildNativeClass("ExternalError",{constructor:function(...t){if(this.nativeError=t[0],!Sk.builtin.checkString(this.nativeError)&&(t[0]=this.nativeError.toString(),t[0].startsWith("RangeError: Maximum call")))return t[0]="Maximum call stack size exceeded",new N(...t);u.apply(this,t)},base:u}),Sk.builtin.getExcInfo=function(t){return new Sk.builtin.tuple([t.ob$type||Sk.builtin.none.none$,t,Sk.builtin.none.none$])}},function(t,e){Sk.builtin.method=Sk.abstr.buildNativeClass("method",{constructor:function(t,e){Sk.asserts.assert(this instanceof Sk.builtin.method,"bad call to method constructor, use 'new'"),this.im_func=t,this.im_self=e,this.im_call=t.tp$call},slots:{$r(){let t=this.im_func.tp$getattr(Sk.builtin.str.$qualname)||this.im_func.tp$getattr(Sk.builtin.str.$name);return t=t&&t.v||"?",new Sk.builtin.str("")},tp$hash(){return Sk.abstr.objectHash(this.im_self)+Sk.abstr.objectHash(this.im_func)},tp$call(t,e){var n=this.im_call;if(void 0===n)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this.im_func)+"' object is not callable");return t=[this.im_self,...t],n.call(this.im_func,t,e)},tp$new(t,e){if(Sk.abstr.checkNoKwargs("method",e),Sk.abstr.checkArgsLen("method",t,2,2),e=t[0],t=t[1],!Sk.builtin.checkCallable(e))throw new Sk.builtin.TypeError("first argument must be callable");if(Sk.builtin.checkNone(t))throw new Sk.builtin.TypeError("self must not be None");return new Sk.builtin.method(e,t)},tp$richcompare(t,e){if("Eq"!=e&&"NotEq"!=e||!(t instanceof Sk.builtin.method))return Sk.builtin.NotImplemented.NotImplemented$;let n;try{n=Sk.misceval.richCompareBool(this.im_self,t.im_self,"Eq",!1)&&this.im_func==t.im_func}catch(t){n=!1}return"Eq"==e?n:!n},tp$descr_get(t,e){return this},tp$getattr(t,e){const n=Sk.abstr.lookupSpecial(this,t);return void 0!==n?n:this.im_func.tp$getattr(t,e)}},getsets:{__func__:{$get(){return this.im_func}},__self__:{$get(){return this.im_self}},__doc__:{$get(){return this.im_func.tp$getattr(Sk.builtin.str.$doc)}}},flags:{sk$unacceptableBase:!0}})},function(t,e){function n(t){if(null!=t){if(!0===t.sk$int)return t.v;if(void 0!==t.nb$index)return t.nb$index();if("number"==typeof t&&Number.isInteger(t))return t}}function i(t,e){const i=n(t);if(void 0!==i)return i;throw e=(e||"'{tp$name}' object cannot be interpreted as an integer").replace("{tp$name}",Sk.abstr.typeName(t)),new Sk.builtin.TypeError(e)}Sk.misceval={},Sk.misceval.Suspension=function(t,e,n){this.$isSuspension=!0,void 0!==t&&void 0!==e&&(this.resume=function(){return t(e.resume())}),this.child=e,this.optional=void 0!==e&&e.optional,this.data=void 0===n&&void 0!==e?e.data:n},Sk.exportSymbol("Sk.misceval.Suspension",Sk.misceval.Suspension),Sk.misceval.retryOptionalSuspensionOrThrow=function(t,e){for(;t instanceof Sk.misceval.Suspension;){if(!t.optional){e=new Sk.builtin.SuspensionError(e||"Cannot call a function that blocks or suspends here");const n=[];for(;null!=t;)t.$lineno&&n.push({filename:t.$filename,lineno:t.$lineno,colno:t.$colno}),t=t.child;throw n.reverse(),e.traceback.push(...n),e}t=t.resume()}return t},Sk.exportSymbol("Sk.misceval.retryOptionalSuspensionOrThrow",Sk.misceval.retryOptionalSuspensionOrThrow),Sk.misceval.isIndex=function(t){return null!=t&&(void 0!==t.nb$index||"number"==typeof t&&Number.isInteger(t))},Sk.exportSymbol("Sk.misceval.isIndex",Sk.misceval.isIndex),Sk.misceval.asIndex=n,Sk.misceval.asIndexSized=function(t,e,n){if("number"==typeof(n=i(t,n)))return n;if(null==e)return JSBI.lessThan(n,JSBI.__ZERO)?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;throw new e("cannot fit '"+Sk.abstr.typeName(t)+"' into an index-sized integer")},Sk.misceval.asIndexOrThrow=i,Sk.misceval.applySlice=function(t,e,n,i){return Sk.abstr.objectGetItem(t,new Sk.builtin.slice(e,n,null),i)},Sk.exportSymbol("Sk.misceval.applySlice",Sk.misceval.applySlice),Sk.misceval.assignSlice=function(t,e,n,i,s){return e=new Sk.builtin.slice(e,n),null===i?Sk.abstr.objectDelItem(t,e):Sk.abstr.objectSetItem(t,e,i,s)},Sk.exportSymbol("Sk.misceval.assignSlice",Sk.misceval.assignSlice),Sk.misceval.arrayFromArguments=function(t){var e;if(1!=t.length)return t;var n=t[0];if(n instanceof Sk.builtin.set?n=n.tp$iter().$obj:n instanceof Sk.builtin.dict&&(n=Sk.builtin.dict.prototype.keys.func_code(n)),n instanceof Sk.builtin.list||n instanceof Sk.builtin.tuple)return n.v;if(Sk.builtin.checkIterable(n)){for(t=[],e=(n=Sk.abstr.iter(n)).tp$iternext();void 0!==e;e=n.tp$iternext())t.push(e);return t}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(n)+"' object is not iterable")},Sk.exportSymbol("Sk.misceval.arrayFromArguments",Sk.misceval.arrayFromArguments),Sk.misceval.iterator=Sk.abstr.buildIteratorClass("iterator",{constructor:function(t,e){this.tp$iternext=e?t:function(e){let n=t();return e||void 0===n||!n.$isSuspension?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)}},iternext:function(t){return this.tp$iternext(t)},flags:{sk$unacceptableBase:!0}}),Sk.misceval.swappedOp_={Eq:"Eq",NotEq:"NotEq",Lt:"Gt",LtE:"GtE",Gt:"Lt",GtE:"LtE"},Sk.misceval.opSymbols={Eq:"==",NotEq:"!=",Lt:"<",LtE:"<=",Gt:">",GtE:">=",Is:"is",IsNot:"is not",In_:"in",NotIn:"not in"},Sk.misceval.richCompareBool=function(t,e,n,i){Sk.asserts.assert(t.sk$object&&e.sk$object,"JS object passed to richCompareBool");var s=t.ob$type,r=e.ob$type,o=r!==s&&void 0===r.sk$baseClass&&r.$isSubType(s);if(!Sk.__future__.python3&&s!==r&&("GtE"===n||"Gt"===n||"LtE"===n||"Lt"===n)){var a=[Sk.builtin.float_,Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.bool];const i=[Sk.builtin.dict,Sk.builtin.enumerate,Sk.builtin.filter_,Sk.builtin.list,Sk.builtin.map_,Sk.builtin.str,Sk.builtin.tuple,Sk.builtin.zip_];var l=a.indexOf(s);if(s=i.indexOf(s),a=a.indexOf(r),r=i.indexOf(r),t===Sk.builtin.none.none$)switch(n){case"Lt":case"LtE":return!0;case"Gt":case"GtE":return!1}if(e===Sk.builtin.none.none$)switch(n){case"Lt":case"LtE":return!1;case"Gt":case"GtE":return!0}if(-1!==l&&-1!==r)switch(n){case"Lt":case"LtE":return!0;case"Gt":case"GtE":return!1}if(-1!==s&&-1!==a)switch(n){case"Lt":case"LtE":return!1;case"Gt":case"GtE":return!0}if(-1!==s&&-1!==r)switch(n){case"Lt":return sr;case"GtE":return s>=r}}if("Is"===n)return t===e;if("IsNot"===n)return t!==e;if("In"===n)return Sk.misceval.chain(Sk.abstr.sequenceContains(e,t,i),Sk.misceval.isTrue);if("NotIn"===n)return Sk.misceval.chain(Sk.abstr.sequenceContains(e,t,i),(function(t){return!Sk.misceval.isTrue(t)}));if(l=(r={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"})[n],o&&(i=e[i=r[Sk.misceval.swappedOp_[n]]](t))!==Sk.builtin.NotImplemented.NotImplemented$||(i=t[l](e))!==Sk.builtin.NotImplemented.NotImplemented$||!o&&(i=e[i=r[Sk.misceval.swappedOp_[n]]](t))!==Sk.builtin.NotImplemented.NotImplemented$)return Sk.misceval.isTrue(i);if(!Sk.__future__.python3){if(o=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$cmp))try{if(i=Sk.misceval.callsimArray(o,[e]),Sk.builtin.checkNumber(i)){if(i=Sk.builtin.asnum$(i),"Eq"===n)return 0===i;if("NotEq"===n)return 0!==i;if("Lt"===n)return 0>i;if("Gt"===n)return 0=i;if("GtE"===n)return 0<=i}if(i!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch(t){throw new Sk.builtin.TypeError("comparison did not return an int")}if(o=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$cmp))try{if(i=Sk.misceval.callsimArray(o,[t]),Sk.builtin.checkNumber(i)){if(i=Sk.builtin.asnum$(i),"Eq"===n)return 0===i;if("NotEq"===n)return 0!==i;if("Lt"===n)return 0i;if("LtE"===n)return 0<=i;if("GtE"===n)return 0>=i}if(i!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch(t){throw new Sk.builtin.TypeError("comparison did not return an int")}if(t===Sk.builtin.none.none$&&e===Sk.builtin.none.none$){if("Eq"===n)return t.v===e.v;if("NotEq"===n)return t.v!==e.v;if("Gt"===n)return t.v>e.v;if("GtE"===n)return t.v>=e.v;if("Lt"===n)return t.v";throw t}},Sk.exportSymbol("Sk.misceval.objectRepr",Sk.misceval.objectRepr),Sk.misceval.opAllowsEquality=function(t){switch(t){case"LtE":case"Eq":case"GtE":return!0}return!1},Sk.exportSymbol("Sk.misceval.opAllowsEquality",Sk.misceval.opAllowsEquality),Sk.misceval.isTrue=function(t){return!0===t||t===Sk.builtin.bool.true$||!1!==t&&t!==Sk.builtin.bool.false$&&null!=t&&(t.nb$bool?t.nb$bool():t.sq$length?0!==t.sq$length():!!t)},Sk.exportSymbol("Sk.misceval.isTrue",Sk.misceval.isTrue),Sk.misceval.softspace_=!1,Sk.misceval.print_=function(t){Sk.misceval.softspace_&&("\n"!==t&&Sk.output(" "),Sk.misceval.softspace_=!1);var e=new Sk.builtin.str(t);return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(function(t){return Sk.misceval.apply(t.$d.stdout.write,void 0,void 0,void 0,[t.$d.stdout,e])}),(function(){var t;(t=0===e.v.length)||(t=!("\n"===(t=e.v[e.v.length-1])||"\t"===t||"\r"===t)),(t||" "===e.v[e.v.length-1])&&(Sk.misceval.softspace_=!0)}))},Sk.exportSymbol("Sk.misceval.print_",Sk.misceval.print_),Sk.misceval.loadname=function(t,e){if(void 0!==(e=e[t]))return e;if(void 0!==(e=Sk.builtins[t]))return e;throw new Sk.builtin.NameError("name '"+Sk.unfixReserved(t)+"' is not defined")},Sk.exportSymbol("Sk.misceval.loadname",Sk.misceval.loadname),Sk.misceval.call=function(t,e,n,i,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.apply(t,e,n,i,s)},Sk.exportSymbol("Sk.misceval.call",Sk.misceval.call),Sk.misceval.callAsync=function(t,e,n,i,s,r){return r=Array.prototype.slice.call(arguments,5),Sk.misceval.applyAsync(t,e,n,i,s,r)},Sk.exportSymbol("Sk.misceval.callAsync",Sk.misceval.callAsync),Sk.misceval.callOrSuspend=function(t,e,n,i,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.applyOrSuspend(t,e,n,i,s)},Sk.exportSymbol("Sk.misceval.callOrSuspend",Sk.misceval.callOrSuspend),Sk.misceval.callsim=function(t,e){return e=Array.prototype.slice.call(arguments,1),Sk.misceval.apply(t,void 0,void 0,void 0,e)},Sk.exportSymbol("Sk.misceval.callsim",Sk.misceval.callsim),Sk.misceval.callsimArray=function(t,e,n){return e=e||[],Sk.misceval.retryOptionalSuspensionOrThrow(Sk.misceval.callsimOrSuspendArray(t,e,n))},Sk.exportSymbol("Sk.misceval.callsimArray",Sk.misceval.callsimArray),Sk.misceval.callsimAsync=function(t,e,n){return n=Array.prototype.slice.call(arguments,2),Sk.misceval.applyAsync(t,e,void 0,void 0,void 0,n)},Sk.exportSymbol("Sk.misceval.callsimAsync",Sk.misceval.callsimAsync),Sk.misceval.callsimOrSuspend=function(t,e){return e=Array.prototype.slice.call(arguments,1),Sk.misceval.applyOrSuspend(t,void 0,void 0,void 0,e)},Sk.exportSymbol("Sk.misceval.callsimOrSuspend",Sk.misceval.callsimOrSuspend),Sk.misceval.callsimOrSuspendArray=function(t,e,n){return e=e||[],void 0!==t&&t.tp$call?t.tp$call(e,n):Sk.misceval.applyOrSuspend(t,void 0,void 0,n,e)},Sk.exportSymbol("Sk.misceval.callsimOrSuspendArray",Sk.misceval.callsimOrSuspendArray),Sk.misceval.apply=function(t,e,n,i,s){return(t=Sk.misceval.applyOrSuspend(t,e,n,i,s))instanceof Sk.misceval.Suspension?Sk.misceval.retryOptionalSuspensionOrThrow(t):t},Sk.exportSymbol("Sk.misceval.apply",Sk.misceval.apply),Sk.misceval.asyncToPromise=function(t,e){return new Promise((function(n,i){try{!function t(s){try{for(var r=function(){try{t(s.resume())}catch(t){i(t)}},o=function(t){try{s.data.result=t,r()}catch(t){i(t)}},a=function(t){try{s.data.error=t,r()}catch(t){i(t)}};s instanceof Sk.misceval.Suspension;){var l=e&&(e[s.data.type]||e["*"]);if(l){var u=l(s);if(u)return void u.then(t,i)}if("Sk.promise"==s.data.type)return void s.data.promise.then(o,a);if("Sk.yield"==s.data.type)return void Sk.global.setImmediate(r);if("Sk.delay"==s.data.type)return void Sk.global.setImmediate(r);if(!s.optional)throw new Sk.builtin.SuspensionError("Unhandled non-optional suspension of type '"+s.data.type+"'");s=s.resume()}n(s)}catch(t){i(t)}}(t())}catch(t){i(t)}}))},Sk.exportSymbol("Sk.misceval.asyncToPromise",Sk.misceval.asyncToPromise),Sk.misceval.applyAsync=function(t,e,n,i,s,r){return Sk.misceval.asyncToPromise((function(){return Sk.misceval.applyOrSuspend(e,n,i,s,r)}),t)},Sk.exportSymbol("Sk.misceval.applyAsync",Sk.misceval.applyAsync),Sk.misceval.chain=function(t,e){for(var n,i,s=1,r=t;;){if(s==arguments.length)return r;if(r&&r.$isSuspension)break;r=arguments[s](r),s++}for(i=Array(arguments.length-s),n=0;nt[i++]},e,n)},Sk.misceval.arrayFromIterable=function(t,e){if(void 0===t)return[];if(void 0===t.ht$type&&void 0!==t.sk$asarray)return t.sk$asarray();const n=[];return t=Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{n.push(t)})),(()=>n)),e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},Sk.misceval.Break=function(t){if(!(this instanceof Sk.misceval.Break))return new Sk.misceval.Break(t);this.brValue=t},Sk.exportSymbol("Sk.misceval.Break",Sk.misceval.Break),Sk.misceval.applyOrSuspend=function(t,e,n,i,s){var r;if(null==t||t===Sk.builtin.none.none$)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not callable");"function"==typeof t&&void 0===t.tp$call&&(t=new Sk.builtin.func(t));var o=t.tp$call;if(void 0!==o){if(n)for(r=(n=n.tp$iter()).tp$iternext();void 0!==r;r=n.tp$iternext())s.push(r);if(e)for(r=(n=Sk.abstr.iter(e)).tp$iternext();void 0!==r;r=n.tp$iternext()){if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("Function keywords must be strings");i.push(r.v),i.push(Sk.abstr.objectGetItem(e,r,!1))}return o.call(t,s,i,e)}if(void 0!==(o=t.__call__))return s.unshift(t),Sk.misceval.apply(o,e,n,i,s);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not callable")},Sk.exportSymbol("Sk.misceval.applyOrSuspend",Sk.misceval.applyOrSuspend),Sk.misceval.promiseToSuspension=function(t){var e=new Sk.misceval.Suspension;return e.resume=function(){if(e.data.error)throw e.data.error;return e.data.result},e.data={type:"Sk.promise",promise:t},e},Sk.exportSymbol("Sk.misceval.promiseToSuspension",Sk.misceval.promiseToSuspension),Sk.misceval.buildClass=function(t,e,n,i,s,r){n=new Sk.builtin.str(n);const o=new Sk.builtin.tuple(i);let a;i=i||[];var l=!0;const u=(r=r||[]).indexOf("metaclass");-1{if(t=t.ob$type,!n.$isSubType(t)){if(!t.$isSubType(n))throw new Sk.builtin.TypeError("metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases");n=t}})),n}(a,i));let c=null;a!==Sk.builtin.type&&([c,h]=function(t,e,n,i,s){const r=t.tp$getattr(Sk.builtin.str.$prepare);let o,a=null;if(void 0===r)return[a,o];if(a=Sk.misceval.callsimArray(r,[e,n],i),!Sk.builtin.checkMapping(a))throw new Sk.builtin.TypeError(s?t.prototype.tp$name:".__prepare__() must return a mapping not '"+Sk.abstr.typeName(a)+"'");return o={get(t,e){try{return Sk.abstr.objectGetItem(t,new Sk.builtin.str(Sk.unfixReserved(e)))}catch(t){if(!(t instanceof Sk.builtin.KeyError))throw t}},set:(t,e,n)=>(Sk.abstr.objectSetItem(t,new Sk.builtin.str(Sk.unfixReserved(e)),n),!0)},[a,o]}(a,n,o,r,l)),i=!1;let p={};if(null===c)c=new Sk.builtin.dict([]);else if(c.constructor===Sk.builtin.dict||function(){const t=(Sk.global.navigator||{}).userAgent||"";return-1{Sk.abstr.objectSetItem(c,new Sk.builtin.str(t),p[t])})),Sk.misceval.callsimOrSuspendArray(a,[n,o,c],r)},Sk.exportSymbol("Sk.misceval.buildClass",Sk.misceval.buildClass)},function(t,e){Sk.builtin.callable_iter_=Sk.abstr.buildIteratorClass("callable_iterator",{constructor:function(t,e){if(!Sk.builtin.checkCallable(t))throw new Sk.builtin.TypeError("iter(v, w): v must be callable");this.$callable=t,this.$sentinel=e,this.$flag=!1},iternext(t){if(!0!==this.$flag){if(t)return t=Sk.misceval.callsimOrSuspendArray(this.$callable,[]),Sk.misceval.chain(t,(t=>{if(!Sk.misceval.richCompareBool(t,this.$sentinel,"Eq",!0))return t;this.$flag=!0}));if(t=Sk.misceval.callsimArray(this.$callable,[]),!Sk.misceval.richCompareBool(t,this.$sentinel,"Eq",!1))return t;this.$flag=!0}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.seq_iter_=Sk.abstr.buildIteratorClass("iterator",{constructor:function(t){this.$index=0,this.$seq=t},iternext(t){let e;return e=Sk.misceval.tryCatch((()=>this.$seq.mp$subscript(new Sk.builtin.int_(this.$index++),t)),(t=>{if(!(t instanceof Sk.builtin.IndexError||t instanceof Sk.builtin.StopIteration))throw t;this.gi$ret=t.$value||Sk.builtin.none.none$})),t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},methods:{__length_hint__:{$flags:{NoArgs:!0},$meth(){if(this.$seq.sq$length)return this.$seq.sq$length()-this.$index;throw new Sk.builtin.NotImplementedError("len is not implemented for "+Sk.abstr.typeName(this.$seq))}}},flags:{sk$unacceptableBase:!0}}),Sk.exportSymbol("Sk.builtin.callable_iter_",Sk.builtin.callable_iter_)},function(t,e){Sk.builtin.list=Sk.abstr.buildNativeClass("list",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.list,"bad call to list, use 'new' with an Array of python objects"),this.v=t,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"Built-in mutable sequence.\n\nIf no argument is given, the constructor creates a new empty list.\nThe argument must be an iterable if specified.",tp$new:Sk.generic.new,tp$init(t,e){return Sk.abstr.checkNoKwargs("list",e),Sk.abstr.checkArgsLen("list",t,0,1),Sk.misceval.chain(Sk.misceval.arrayFromIterable(t[0],!0),(t=>{this.v=t}))},$r(){if(this.in$repr)return new Sk.builtin.str("[...]");this.in$repr=!0;const t=this.v.map((t=>Sk.misceval.objectRepr(t)));return this.in$repr=!1,new Sk.builtin.str("["+t.join(", ")+"]")},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new n(this)},sq$length(){return this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.list))throw new Sk.builtin.TypeError("can only concatenate list to list");return new Sk.builtin.list(this.v.concat(t.v))},sq$contains(t){for(let e=this.tp$iter(),n=e.tp$iternext();void 0!==n;n=e.tp$iternext())if(n===t||Sk.misceval.richCompareBool(n,t,"Eq"))return!0;return!1},sq$repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");if((t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;const e=[];for(let n=0;n{e.push(this.v[t])})),new Sk.builtin.list(e)}throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(t))},mp$ass_subscript(t,e){void 0===e?this.del$subscript(t):this.ass$subscript(t,e)},sq$inplace_concat(t){return t===this?(this.v.push(...this.v),this):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.v.push(t)})),(()=>this))},sq$inplace_repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const e=this.v.length;if(0>=t)this.v.length=0;else if(t*e>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;for(let n=1;n{this.v.push(t)})),(()=>Sk.builtin.none.none$))},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Extend list by appending elements from the iterable."},pop:{$meth(t){t=void 0===t?this.v.length-1:Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError),t=this.list$inRange(t,"pop index out of range");const e=this.v[t];return this.v.splice(t,1),e},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, index=-1, /)",$doc:"Remove and return item at index (default last).\n\nRaises IndexError if list is empty or index is out of range."},remove:{$meth(t){if(-1===(t=this.list$indexOf(t)))throw new Sk.builtin.ValueError("list.remove(x): x not in list");return this.v.splice(t,1),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Remove first occurrence of value.\n\nRaises ValueError if the value is not present."},sort:{$meth(t,e){if(t.length)throw new Sk.builtin.TypeError("sort() takes no positional arguments");const[n,i]=Sk.abstr.copyKeywordsToNamedArgs("sort",["key","reverse"],t,e,[Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(void 0,n,i)},$flags:{FastCall:!0},$textsig:"($self, /, *, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."},index:{$meth(t,e,n){if(void 0!==e&&!Sk.misceval.isIndex(e)||void 0!==n&&!Sk.misceval.isIndex(n))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");if(-1===(e=this.list$indexOf(t,e,n)))throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in list");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:"Return first index of value.\n\nRaises ValueError if the value is not present."},count:{$meth(t){let e=0;const n=this.v.length;for(let i=0;it&&(t+=this.v.length),0<=t&&t{n.push(t)})),!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("must assign iterable to extended slice");if(t=Sk.misceval.arrayFromIterable(e),n.length!==t.length)throw new Sk.builtin.ValueError("attempt to assign sequence of size "+t.length+" to extended slice of size "+n.length);for(e=0;e{this.v.splice(t-n,1),n+=e}))},valueOf(){return this.v}}}),Sk.exportSymbol("Sk.builtin.list",Sk.builtin.list),Sk.builtin.list.py2$methods={sort:{$name:"sort",$meth(t,e){const[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("sort",["cmp","key","reverse"],t,e,[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(n,i,s)},$flags:{FastCall:!0},$textsig:"($self, cmp=None, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."}};var n=Sk.abstr.buildIteratorClass("list_iterator",{constructor:function(t){this.$index=0,this.$seq=t.v},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),i=Sk.abstr.buildIteratorClass("list_reverseiterator",{constructor:function(t){this.$index=t.v.length-1,this.$seq=t.v},iternext(){const t=this.$seq[this.$index--];if(void 0!==t)return t;this.tp$iternext=()=>{}},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}})},function(t,e,n){function i(t){var e=t.replace(y,"").replace(T,"_").toLowerCase();return void 0===(e=k[e])?t:e}function s(t,e,n){if(void 0===e)e="utf-8";else{if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError(t+"() argument "+("bytesstr".includes(t)?2:1)+" must be str not "+Sk.abstr.typeName(e));e=e.$jsstr()}if(void 0===n)n="strict";else{if(!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError(t+"() argument "+("bytesstr".includes(t)?3:2)+" must be str not "+Sk.abstr.typeName(n));n=n.$jsstr()}return{encoding:e,errors:n}}function r(t,e,n){if(t=t.$jsstr(),e=i(e),"strict"!==n&&"ignore"!==n&&"replace"!==n)throw new Sk.builtin.NotImplementedError("'"+n+"' error handling not implemented in Skulpt");if("ascii"===e){for(s in e=[],t){const i=t.charCodeAt(s);if(127=t?"\\x":"\\u";return 3===(t=t.toString(16)).length&&(t=t.slice(1,3)),1===t.length?e+"0"+t:e+t}function a(t,e){if(({encoding:t,errors:e}=s("decode",t,e)),t=i(t),"strict"!==e&&"ignore"!==e&&"replace"!==e)throw new Sk.builtin.NotImplementedError("'"+e+"' error handling not implemented in Skulpt");if("ascii"===t){t=this.v;var n="";for(let i=0;i=n&&en)return new Sk.builtin.tuple([new Sk.builtin.bytes,new Sk.builtin.bytes,this])}else if(n=this.find$subleft(e,0,this.v.length),0>n)return new Sk.builtin.tuple([this,new Sk.builtin.bytes,new Sk.builtin.bytes]);return new Sk.builtin.tuple([new Sk.builtin.bytes(this.v.subarray(0,n)),new Sk.builtin.bytes(e),new Sk.builtin.bytes(this.v.subarray(n+e.length))])}}function p(t,e){return function(n){var i=void 0===n||n===Sk.builtin.none.none$?new Uint8Array([9,10,11,12,13,32,133]):this.get$raw(n);n=0;var s=this.v.length;if(t)for(;nn&&i.includes(this.v[s-1]);)s--;for(i=new Uint8Array(s-n),s=0;s=t||32===t}function d(t){return 97<=t&&122>=t}function f(t){return 65<=t&&90>=t}function m(t){return 48<=t&&57>=t}function g(t,e){return function(){return 0===this.v.length?e?Sk.builtin.bool.true$:Sk.builtin.bool.false$:this.v.every((e=>t(e)))?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function b(t,e){return function(){let n=!1;for(let i=0;i0<=t&&255>=t)),"bad internal call to bytes with array"),this.v=new Uint8Array(t);else if("string"==typeof t){let e;const n=new Uint8Array(t.length),i=t.length;for(let s=0;s bytes\nbytes(string, encoding[, errors]) -> bytes\nbytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\nbytes(int) -> bytes object of size given by the parameter initialized with null bytes\nbytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n - an iterable yielding integers in range(256)\n - a text string encoded using the specified encoding\n - any object implementing the buffer API.\n - an integer",tp$new(t,e){if(this!==Sk.builtin.bytes.prototype)return this.$subtype_new(t,e);let n;if(e=e||[],!(1>=t.length&&0==+e.length)){if([t,e,n]=Sk.abstr.copyKeywordsToNamedArgs("bytes",[null,"pySource","errors"],t,e),({encoding:e,errors:n}=s("bytes",e,n)),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("encoding or errors without a string argument");return r(t,e,n)}if(void 0===(t=t[0]))return new Sk.builtin.bytes;if(void 0!==(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$bytes)))return t=Sk.misceval.callsimOrSuspendArray(e,[]),Sk.misceval.chain(t,(t=>{if(!Sk.builtin.checkBytes(t))throw new Sk.builtin.TypeError("__bytes__ returned non-bytes (type "+Sk.abstr.typeName(t)+")");return t}));if(Sk.misceval.isIndex(t)){if(0>(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError)))throw new Sk.builtin.ValueError("negative count");return new Sk.builtin.bytes(t)}if(Sk.builtin.checkBytes(t))return new Sk.builtin.bytes(t.v);if(Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("string argument without an encoding");if(Sk.builtin.checkIterable(t)){let e=[];return t=Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(0>(t=Sk.misceval.asIndexSized(t))||255new Sk.builtin.bytes(e)))}throw new Sk.builtin.TypeError("cannot convert '"+Sk.abstr.typeName(t)+"' object into bytes")},$r(){let t,e="'";const n=-1!==this.v.indexOf(34);let i="";for(let s=0;st||10t||13t||126t.length||n[i]>t[i];case"GtE":return i===s&&n.length>=t.length||n[i]>=t[i]}},tp$hash(){return new Sk.builtin.str(this.$jsstr()).tp$hash()},tp$as_sequence_or_mapping:!0,mp$subscript(t){if(Sk.misceval.isIndex(t)){let e=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError);if(void 0!==e){if(0>e&&(e=this.v.length+e),0>e||e>=this.v.length)throw new Sk.builtin.IndexError("index out of range");return new Sk.builtin.int_(this.v[e])}}else if(t instanceof Sk.builtin.slice){const e=[];return t.sssiter$(this.v.length,(t=>{e.push(this.v[t])})),new Sk.builtin.bytes(new Uint8Array(e))}throw new Sk.builtin.TypeError("byte indices must be integers or slices, not "+Sk.abstr.typeName(t))},sq$length(){return this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("can't concat "+Sk.abstr.typeName(t)+" to bytes");const e=new Uint8Array(this.v.length+t.v.length);let n;for(n=0;nNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;if(0>=t)return new Sk.builtin.bytes;t=new Uint8Array(e);let n=0;for(;n(t=Sk.misceval.asIndexOrThrow(t,"argument should be integer or bytes-like object, not {tp$name}"))||255(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError))?1/0:e,null!==(t=Sk.builtin.checkNone(t)?null:this.get$raw(t))&&!t.length)throw new Sk.builtin.ValueError("empty separator");return{sep:t,maxsplit:e}},find$left:u(!1),find$right:u(!0),find$subleft:function(t,e,n){n=n-t.length+1;let i=e;for(;it===this.v[i+e])))return i;i++}return-1},find$subright(t,e,n){let i=n-t.length;for(;i>=e;){if(t.every(((t,e)=>t===this.v[i+e])))return i;i--}return-1},$subtype_new(t,e){const n=new this.constructor;return t=Sk.builtin.bytes.prototype.tp$new(t,e),n.v=t.v,n},sk$asarray(){const t=[];return this.v.forEach((e=>{t.push(new Sk.builtin.int_(e))})),t},valueOf(){return this.v}},flags:{str$encode:r,$decode:a,check$encodeArgs:s},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.bytes(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null},capitalize:{$meth(){const t=this.v.length;if(0===t)return new Sk.builtin.bytes(this.v);const e=new Uint8Array(t);let n=this.v[0];e[0]=d(n)?n-32:n;for(let i=1;i copy of B\n\nReturn a copy of B with only its first character capitalized (ASCII)\nand the rest lower-cased."},center:{$meth:h("center",!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.center(width[, fillchar]) -> copy of B\n\nReturn B centered in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},count:{$meth(t,e,n){t=this.get$tgt(t),({start:e,end:n}=Sk.builtin.slice.startEnd$wrt(this,e,n));let i=0;if("number"==typeof t)for(;et===this.v[s+e]))&&(i++,s+=t.length-1)}return new Sk.builtin.int_(i)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.count(sub[, start[, end]]) -> int\n\nReturn the number of non-overlapping occurrences of subsection sub in\nbytes B[start:end]. Optional arguments start and end are interpreted\nas in slice notation."},decode:{$meth:a,$flags:{NamedArgs:["encoding","errors"]},$textsig:"($self, /, encoding='utf-8', errors='strict')",$doc:"Decode the bytes using the codec registered for encoding.\n\n encoding\n The encoding with which to decode the bytes.\n errors\n The error handling scheme to use for the handling of decoding errors.\n The default is 'strict' meaning that decoding errors raise a\n UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n as well as any other name registered with codecs.register_error that\n can handle UnicodeDecodeErrors."},endswith:{$meth:l("endswith",((t,e)=>{const n=t.length-e.length;return 0<=n&&e.every(((e,i)=>e===t[n+i]))})),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if B ends with the specified suffix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nsuffix can also be a tuple of bytes to try."},expandtabs:{$meth(t){t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"an integer is required (got type {tp$nam})");const e=[];let n=0;for(let s=0;s copy of B\n\nReturn a copy of B where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(t,e,n){return new Sk.builtin.int_(this.find$left(t,e,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},hex:{$meth(){let t="";for(let e=0;e string\n\nCreate a string of hexadecimal numbers from a bytes object.\nExample: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'."},index:{$meth:function(t,e,n){if(-1===(t=this.find$left(t,e,n)))throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the subsection is not found."},isalnum:{$meth:g((t=>m(t)||d(t)||f(t))),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalnum() -> bool\n\nReturn True if all characters in B are alphanumeric\nand there is at least one character in B, False otherwise."},isalpha:{$meth:g((t=>65<=t&&90>=t||97<=t&&122>=t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalpha() -> bool\n\nReturn True if all characters in B are alphabetic\nand there is at least one character in B, False otherwise."},isascii:{$meth:g((t=>0<=t&&127>=t),!0),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isascii() -> bool\n\nReturn True if B is empty or all characters in B are ASCII,\nFalse otherwise."},isdigit:{$meth:g(m),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isdigit() -> bool\n\nReturn True if all characters in B are digits\nand there is at least one character in B, False otherwise."},islower:{$meth:b(d,f),$flags:{NoArgs:!0},$textsig:null,$doc:"B.islower() -> bool\n\nReturn True if all cased characters in B are lowercase and there is\nat least one cased character in B, False otherwise."},isspace:{$meth:g(_),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isspace() -> bool\n\nReturn True if all characters in B are whitespace\nand there is at least one character in B, False otherwise."},istitle:{$meth:function(){let t=!1,e=!1;for(let n=0;n bool\n\nReturn True if B is a titlecased string and there is at least one\ncharacter in B, i.e. uppercase characters may only follow uncased\ncharacters and lowercase characters only cased ones. Return False\notherwise."},isupper:{$meth:b(f,d),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isupper() -> bool\n\nReturn True if all cased characters in B are uppercase and there is\nat least one cased character in B, False otherwise."},join:{$meth(t){const e=[];let n=0;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(!(t instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("sequence item "+n+": expected a bytes-like object, "+Sk.abstr.typeName(t)+" found");n++,e.length&&e.push(...this.v),e.push(...t.v)})),(()=>new Sk.builtin.bytes(new Uint8Array(e))))},$flags:{OneArg:!0},$textsig:"($self, iterable_of_bytes, /)",$doc:"Concatenate any number of bytes objects.\n\nThe bytes whose method is called is inserted in between each pair.\n\nThe result is returned as a new bytes object.\n\nExample: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'."},ljust:{$meth:h("ljust",!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.ljust(width[, fillchar]) -> copy of B\n\nReturn B left justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},lower:{$meth:S((t=>f(t)?t+32:t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.lower() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to lowercase."},lstrip:{$meth:p(!0,!1),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading ASCII whitespace."},partition:{$meth:c(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original bytes\nobject and two empty bytes objects."},replace:{$meth(t,e,n){t=this.get$raw(t),e=this.get$raw(e),n=0>(n=void 0===n?-1:Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError))?1/0:n;const i=[];let s=0;for(var r=0;r int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(t,e,n){if(-1===(t=this.find$right(t,e,n)))throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaise ValueError when the subsection is not found."},rjust:{$meth:h("rjust",!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.rjust(width[, fillchar]) -> copy of B\n\nReturn B right justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)"},rpartition:{$meth:c(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty bytes\nobjects and the original bytes object."},rsplit:{$meth:function(t,e){({sep:t,maxsplit:e}=this.get$splitArgs(t,e));const n=[];let i=0,s=this.v.length;if(null!==t){for(;0<=s&&is)break;for(t=s+1,s--;0<=s&&!_(this.v[s]);)s--;n.push(new Sk.builtin.bytes(this.v.subarray(s+1,t))),i++}if(0<=s){for(;_(this.v[s]);)s--;0<=s&&n.push(new Sk.builtin.bytes(this.v.subarray(0,s+1)))}}return new Sk.builtin.list(n.reverse())},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the sections in the bytes, using sep as the delimiter.\n\n sep\n The delimiter according which to split the bytes.\n None (the default value) means split on ASCII whitespace characters\n (space, tab, return, newline, formfeed, vertical tab).\n maxsplit\n Maximum number of splits to do.\n -1 (the default value) means no limit.\n\nSplitting is done starting at the end of the bytes and working to the front."},rstrip:{$meth:p(!1,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip trailing ASCII whitespace."},split:{$meth:function(t,e){({sep:t,maxsplit:e}=this.get$splitArgs(t,e));const n=[],i=this.v.length;let s=0,r=0;if(null!==t){for(;re.length<=t.length&&e.every(((e,n)=>e===t[n])))),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if B starts with the specified prefix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nprefix can also be a tuple of bytes to try."},strip:{$meth:p(!0,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading and trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading and trailing ASCII whitespace."},swapcase:{$meth:S((t=>f(t)?t+32:d(t)?t-32:t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.swapcase() -> copy of B\n\nReturn a copy of B with uppercase ASCII characters converted\nto lowercase ASCII and vice versa."},title:{$meth(){const t=this.v.length,e=new Uint8Array(t);let n=!1;for(let i=0;i copy of B\n\nReturn a titlecased version of B, i.e. ASCII words start with uppercase\ncharacters, all remaining cased characters have lowercase."},upper:{$meth:S((t=>d(t)?t-32:t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.upper() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to uppercase."},zfill:{$meth(t){const e=(t=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError))-this.v.length;if(0>=e)return new Sk.builtin.bytes(this.v);const n=new Uint8Array(t);let i,s=0;for(43!==this.v[0]&&45!==this.v[0]||(n[0]=this.v[0],s++),n.fill(48,s,s+e),i=s,s+=e;s copy of B\n\nPad a numeric string B with zeros on the left, to fill a field\nof the specified width. B is never truncated."}},classmethods:{fromhex:{$meth:function(t){function e(e){for(let n=o;n b'\\\\xb9\\\\x01\\\\xef'."}}});var w=Sk.abstr.buildIteratorClass("bytes_iterator",{constructor:function(t){this.$index=0,this.$seq=t.v},iternext(){const t=this.$seq[this.$index++];if(void 0!==t)return new Sk.builtin.int_(t)},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}});Sk.exportSymbol("Sk.builtin.bytes",Sk.builtin.bytes)},function(t,e,n){(function(t){!function(t){function e(){}function n(){}var i=String.fromCharCode,s={}.toString,r=s.call(t.SharedArrayBuffer),o=s(),a=t.Uint8Array,l=a||Array,u=a?ArrayBuffer:l,c=u.isView||function(t){return t&&"length"in t},p=s.call(u.prototype);u=n.prototype;var h=t.TextEncoder,_=new(a?Uint16Array:l)(32);e.prototype.decode=function(t){if(!c(t)){var e=s.call(t);if(e!==p&&e!==r&&e!==o)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");t=a?new l(t):t||[]}for(var n,u,h,d=e="",f=0,m=0|t.length,g=m-32|0,b=0,S=0,k=0,y=-1;f>4){case 15:if(2!=(h=255&t[f=f+1|0])>>6||247>6?S+4|0:24,u=u+256&768;case 13:case 12:b<<=6,b|=(31&u)<<6|63&(h=255&t[f=f+1|0]),S=S+7|0,f>6&&b>>S&&1114112>b?(u=b,0<=(b=b-65536|0)&&(y=55296+(b>>10)|0,u=56320+(1023&b)|0,31>k?(_[k]=y,k=k+1|0,y=-1):(h=y,y=u,u=h))):(f=f-(u>>=8)-1|0,u=65533),b=S=0,n=f<=g?32:m-f|0;default:_[k]=u;continue;case 11:case 10:case 9:case 8:}_[k]=65533}if(d+=i(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15],_[16],_[17],_[18],_[19],_[20],_[21],_[22],_[23],_[24],_[25],_[26],_[27],_[28],_[29],_[30],_[31]),32>k&&(d=d.slice(0,k-32|0)),f>>31,y=-1,d.length=o)i[s]=o;else{if(2047>=o)i[s]=192|o>>6;else{t:{if(55296<=o)if(56319>=o){var u=0|t.charCodeAt(e=e+1|0);if(56320<=u&&57343>=u){if(65535<(o=(o<<10)+u-56613888|0)){i[s]=240|o>>18,i[s=s+1|0]=128|o>>12&63,i[s=s+1|0]=128|o>>6&63,i[s=s+1|0]=128|63&o;continue}break t}o=65533}else 57343>=o&&(o=65533);!r&&e<<1>12,i[s=s+1|0]=128|o>>6&63}i[s=s+1|0]=128|63&o}}return a?i.subarray(0,s):i.slice(0,s)},h||(t.TextDecoder=e,t.TextEncoder=n)}(void 0===t?"undefined"==typeof self?this:self:t)}).call(this,n(0))},function(t,e){Sk.builtin.tuple=Sk.abstr.buildNativeClass("tuple",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.tuple,"bad call to tuple, use 'new' with an Array of python objects"),this.v=t,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"Built-in immutable sequence.\n\nIf no argument is given, the constructor returns an empty tuple.\nIf iterable is specified the tuple is initialized from iterable's items.\n\nIf the argument is a tuple, the return value is the same object.",$r(){if(this.in$repr)return new Sk.builtin.str("(...)");this.in$repr=!0;let t=this.v.map((t=>Sk.misceval.objectRepr(t)));return this.in$repr=!1,t=t.join(", "),1===this.v.length&&(t+=","),new Sk.builtin.str("("+t+")")},tp$new(t,e){return this!==Sk.builtin.tuple.prototype?this.$subtype_new(t,e):(Sk.abstr.checkNoKwargs("tuple",e),Sk.abstr.checkArgsLen("tuple",t,0,1),void 0===(t=t[0])?new Sk.builtin.tuple([]):t.constructor===Sk.builtin.tuple?t:Sk.misceval.chain(Sk.misceval.arrayFromIterable(t,!0),(t=>new Sk.builtin.tuple(t))))},tp$hash(){let t,e=3430008,n=1000003;const i=this.v.length;for(let s=0;s(t=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError))&&(t=this.v.length+t),0>t||t>=this.v.length)throw new Sk.builtin.IndexError("tuple index out of range");return this.v[t]}if(t instanceof Sk.builtin.slice){const e=[];return t.sssiter$(this.v.length,(t=>{e.push(this.v[t])})),new Sk.builtin.tuple(e)}throw new Sk.builtin.TypeError("tuple indices must be integers or slices, not "+Sk.abstr.typeName(t))},sq$length(){return this.v.length},sq$repeat(t){if(1===(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))&&this.constructor===Sk.builtin.tuple)return this;const e=[];for(let n=0;n(this.$seq=t.$items(),this.$version=t.$version,n&&(this.$seq=this.$seq.reverse()),this.tp$iternext=this.constructor.prototype.tp$iternext,this.tp$iternext())},iternext:e,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0},proto:{next$item:a}})}function a(){if(this.$version!==this.$orig.$version){if(this.$seq.length!==this.$orig.get$size())throw new Sk.builtin.RuntimeError("dict changed size during iteration");throw new Sk.builtin.RuntimeError("dictionary keys changed during iteration")}return this.$seq[this.$index++]}Sk.builtin.dict=Sk.abstr.buildNativeClass("dict",{constructor:function(t){void 0===t&&(t=[]),Sk.asserts.assert(Array.isArray(t)&&0==t.length%2&&this instanceof Sk.builtin.dict,"bad call to dict constructor"),this.size=0,this.entries=Object.create(null),this.buckets={};for(let e=0;e new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n d = {}\n for k, v in iterable:\n d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n in the keyword argument list. For example: dict(one=1, two=2)",$r(){if(this.in$repr)return new Sk.builtin.str("{...}");this.in$repr=!0;const t=this.$items().map((t=>{var[e,n]=t;return Sk.misceval.objectRepr(e)+": "+Sk.misceval.objectRepr(n)}));return this.in$repr=!1,new Sk.builtin.str("{"+t.join(", ")+"}")},tp$new:Sk.generic.new,tp$init(t,e){return this.update$common(t,e,"dict")},tp$iter(){return new h(this)},tp$richcompare(t,e){let n;if(!(t instanceof Sk.builtin.dict)||"Eq"!==e&&"NotEq"!==e)return Sk.builtin.NotImplemented.NotImplemented$;if(t===this)n=!0;else if(this.size!==t.size)n=!1;else{let e;n=this.$items().every((n=>{var[i,s]=n;return e=t.mp$lookup(i),void 0!==e&&(e===s||Sk.misceval.richCompareBool(s,e,"Eq"))}))}return"Eq"===e?n:!n},nb$or(t){if(!(t instanceof Sk.builtin.dict))return Sk.builtin.NotImplemented.NotImplemented$;const e=this.dict$copy();return e.dict$merge(t),e},nb$reflected_or(t){return t instanceof Sk.builtin.dict?((t=t.dict$copy()).dict$merge(this),t):Sk.builtin.NotImplemented.NotImplemented$},nb$inplace_or(t){return Sk.misceval.chain(this.update$onearg(t),(()=>this))},sq$length(){return this.get$size()},sq$contains(t){return void 0!==this.mp$lookup(t)},mp$subscript(t,e){var n=this.mp$lookup(t);if(void 0!==n)return n;if(void 0!==(n=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$missing)))return t=Sk.misceval.callsimOrSuspendArray(n,[t]),e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t);throw new Sk.builtin.KeyError(t)},mp$ass_subscript(t,e){if(void 0===e){if(void 0===this.pop$item(t))throw new Sk.builtin.KeyError(t)}else this.set$item(t,e)}},methods:{__reversed__:{$meth(){return new f(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator over the dict keys."},get:{$meth(t,e){return this.mp$lookup(t)||e||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Return the value for key if key is in the dictionary, else default."},setdefault:{$meth(t,e){let i;const s=n(t);return i="string"==typeof s?this.entries[s]:this.get$bucket_item(t,s),void 0!==i?i[1]:(e=e||Sk.builtin.none.none$,"string"==typeof s?this.entries[s]=[t,e]:this.set$bucket_item(t,e,s),this.size++,this.$version++,e)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Insert key with a value of default if key is not in the dictionary.\n\nReturn the value for key if key is in the dictionary, else default."},pop:{$meth(t,e){const n=this.pop$item(t);if(void 0!==n)return n[1];if(void 0!==e)return e;throw new Sk.builtin.KeyError(t)},$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\nIf key is not found, d is returned if given, otherwise KeyError is raised"},popitem:{$meth(){const t=this.get$size();if(0===t)throw new Sk.builtin.KeyError("popitem(): dictionary is empty");const[e,n]=this.$items()[t-1];return this.pop$item(e),new Sk.builtin.tuple([e,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.popitem() -> (k, v), remove and return some (key, value) pair as a\n2-tuple; but raise KeyError if D is empty."},keys:{$meth(){return new u(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return new p(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return new c(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"},update:{$meth(t,e){return Sk.misceval.chain(this.update$common(t,e,"update"),(()=>Sk.builtin.none.none$))},$flags:{FastCall:!0},$textsig:null,$doc:"D.update([E, ]**F) -> None. Update D from dict/iterable E and F.\nIf E is present and has a .keys() method, then does: for k in E: D[k] = E[k]\nIf E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v\nIn either case, this is followed by: for k in F: D[k] = F[k]"},clear:{$meth(){this.size=0,this.$version++,this.entries=Object.create(null),this.buckets={}},$flags:{NoArgs:!0},$textsig:null,$doc:"D.clear() -> None. Remove all items from D."},copy:{$meth(){return this.dict$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Object.assign({fromkeys:{$meth:function(t,e){e=e||Sk.builtin.none.none$;let n=this===Sk.builtin.dict?new this:this.tp$call([],[]);return Sk.misceval.chain(n,(i=>(n=i,Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>n.mp$ass_subscript(t,e,!0))))),(()=>n))},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($type, iterable, value=None, /)",$doc:"Create a new dictionary with keys from iterable and values set to value."}},Sk.generic.classGetItem),proto:{quick$lookup:function(t){if(void 0!==(t=this.entries[t.$savedKeyHash]))return t[1]},mp$lookup:function(t){const e=n(t);if(void 0!==(t="string"==typeof e?this.entries[e]:this.get$bucket_item(t,e)))return t[1]},get$size(){return this.size},sk$asarray(){return Object.values(this.entries).map((t=>t[0]))},update$common:function(t,e,n){let i;return Sk.abstr.checkArgsLen(n,t,0,1),void 0!==(t=t[0])&&(i=this.update$onearg(t)),Sk.misceval.chain(i,(()=>{if(e)for(let t=0;tvoid 0===t))&&delete this.buckets[e],i},set$bucket_item:function(t,e,n){let i=this.buckets[n];t=[t,e],void 0===i?(this.buckets[n]=[t],n="#"+n+"_0"):-1!==(e=i.indexOf(void 0))?(n="#"+n+"_"+e,i[e]=t):(n="#"+n+"_"+i.length,i.push(t)),this.entries[n]=t},pop$item:function(t){const e=n(t);if("string"==typeof e?(t=this.entries[e],delete this.entries[e]):t=this.pop$bucket_item(t,e),void 0!==t)return this.size--,this.$version++,t},dict$merge:function(t){if(t.tp$iter!==Sk.builtin.dict.prototype.tp$iter){if(void 0===(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$keys)))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(e),(e=>Sk.misceval.iterFor(Sk.abstr.iter(e),(e=>Sk.misceval.chain(Sk.abstr.objectGetItem(t,e,!0),(t=>{this.set$item(e,t)}))))))}var e=t.tp$iter();for(let n=e.tp$iternext();void 0!==n;n=e.tp$iternext()){const e=t.mp$subscript(n);this.set$item(n,e)}},dict$merge_seq:function(t){let e=0;return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("cannot convert dictionary update sequence element #"+e+" to a sequence");if(2!==(t=Sk.misceval.arrayFromIterable(t)).length)throw new Sk.builtin.ValueError("dictionary update sequence element #"+e+" has length "+t.length+"; 2 is required");this.set$item(t[0],t[1]),e++}))}}});const l={tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,$r(){if(this.in$repr)return new Sk.builtin.str("...");this.in$repr=!0;let t=Sk.misceval.arrayFromIterable(this);return t=t.map((t=>Sk.misceval.objectRepr(t))),this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+t.join(", ")+"])")},tp$richcompare(t,e){if(!(Sk.builtin.checkAnySet(t)||t instanceof u||t instanceof p))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.sq$length(),i=t.sq$length();switch(e){case"NotEq":case"Eq":let r;return this===t?r=!0:n===i&&(r=s(this,t)),"NotEq"===e?!r:r;case"Lt":return ni&&s(t,this);case"GtE":return n>=i&&s(t,this)}},nb$subtract(t){const e=i(this);return e.difference.$meth.call(e,t)},nb$and(t){const e=i(this);return e.intersection.$meth.call(e,t)},nb$or(t){const e=i(this);return e.union.$meth.call(e,t)},nb$xor(t){const e=i(this);return e.symmetric_difference.$meth.call(e,t)},sq$length(){return this.dict.get$size()}};var u=r("dict_keys",{sq$contains(t){return void 0!==this.dict.mp$lookup(t)},tp$iter(){return new h(this.dict)}},(function(){return new f(this.dict)})),c=r("dict_values",{tp$iter(){return new d(this.dict)}},(function(){return new g(this.dict)})),p=r("dict_items",{sq$contains(t){if(!(t instanceof Sk.builtin.tuple&&2===t.sq$length()))return!1;var e=t.mp$subscript(new Sk.builtin.int_(0));return t=t.mp$subscript(new Sk.builtin.int_(1)),void 0!==(e=this.dict.mp$lookup(e))&&(e===t||Sk.misceval.richCompareBool(e,t,"Eq"))},tp$iter(){return new _(this.dict)}},(function(){return new m(this.dict)})),h=o("dict_keyiterator",(function(){const t=this.next$item();return t&&t[0]})),_=o("dict_itemiterator",(function(){const t=this.next$item();return t&&new Sk.builtin.tuple([t[0],t[1]])})),d=o("dict_valueiterator",(function(){const t=this.next$item();return t&&t[1]})),f=o("dict_reversekeyiterator",h.prototype.tp$iternext,!0),m=o("dict_reverseitemiterator",_.prototype.tp$iternext,!0),g=o("dict_reversevalueiterator",d.prototype.tp$iternext,!0);Sk.builtin.dict.py2$methods={has_key:{$name:"has_key",$flags:{OneArg:!0},$meth(t){return new Sk.builtin.bool(this.sq$contains(t))},$doc:"D.has_key(k) -> True if D has a key k, else False"},keys:{$name:"keys",$meth(){return new Sk.builtin.list(this.sk$asarray())},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$name:"items",$meth(){return new Sk.builtin.list(this.$items().map((t=>{var[e,n]=t;return new Sk.builtin.tuple([e,n])})))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$name:"values",$meth(){return new Sk.builtin.list(this.$items().map((t=>([,t]=t,t))))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"}}},function(t,e){Sk.builtin.mappingproxy=Sk.abstr.buildNativeClass("mappingproxy",{constructor:function(t){if(Sk.asserts.assert(this instanceof Sk.builtin.mappingproxy,"bad call to mapping proxy, use 'new'"),void 0!==t){const e=t.constructor;e===Object||null===e||t.hasOwnProperty("sk$object")?(this.mapping=new Sk.builtin.dict([]),function(t,e){Object.defineProperties(t,{entries:{get:()=>{const t=Object.create(null);return Object.entries(e).forEach((e=>{var[n,i]=e;(n=Sk.unfixReserved(n)).includes("$")||(n=new Sk.builtin.str(n),t[n.$savedKeyHash]=[n,i])})),t},configurable:!0},size:{get:()=>Object.keys(e).map((t=>Sk.unfixReserved(t))).filter((t=>!t.includes("$"))).length,configurable:!0}})}(this.mapping,t)):Sk.builtin.checkMapping(t)?this.mapping=t:Sk.asserts.fail("unhandled case for mappingproxy")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$new(t,e){if(Sk.abstr.checkNoKwargs("mappingproxy",e),Sk.abstr.checkOneArg("mappingproxy",t,e),t=t[0],!Sk.builtin.checkMapping(t))throw new Sk.builtin.TypeError("mappingproxy() argument must be a mapping, not "+Sk.abstr.typeName(t));return(e=new Sk.builtin.mappingproxy).mapping=t,e},tp$richcompare(t,e){return Sk.misceval.richCompareBool(this.mapping,t,e)},tp$str(){return this.mapping.tp$str()},$r(){return new Sk.builtin.str("mappingproxy("+Sk.misceval.objectRepr(this.mapping)+")")},mp$subscript(t,e){return this.mapping.mp$subscript(t,e)},sq$contains(t){return this.mapping.sq$contains(t)},sq$length(){return this.mapping.sq$length()},tp$iter(){return this.mapping.tp$iter()},tp$as_number:!0,nb$or(t){return t instanceof Sk.builtin.mappingproxy&&(t=t.mapping),Sk.abstr.numberBinOp(this.mapping,t,"BitOr")},nb$reflected_or(t){return t instanceof Sk.builtin.mappingproxy&&(t=t.mapping),Sk.abstr.numberBinOp(t,this.mapping,"BitOr")},nb$inplace_or(t){throw new Sk.builtin.TypeError("'|=' is not supported by "+Sk.abstr.typeName(this)+"; use '|' instead")}},methods:{get:{$meth(t,e){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$get),t,e)},$flags:{FastCall:!0},$textsig:null,$doc:"D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."},keys:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$keys),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$items),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$values),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> a set-like object providing a view on D's values"},copy:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$copy),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Sk.generic.classGetItem,proto:{str$get:new Sk.builtin.str("get"),str$copy:new Sk.builtin.str("copy"),str$keys:new Sk.builtin.str("keys"),str$items:new Sk.builtin.str("items"),str$values:new Sk.builtin.str("values"),mp$lookup(t){return this.mapping.mp$lookup(t)}},flags:{sk$unacceptableBase:!0}})},function(t,e){Sk.builtin.property=Sk.abstr.buildNativeClass("property",{constructor:function(t,e,n,i){this.prop$get=t||Sk.builtin.none.none$,this.prop$set=e||Sk.builtin.none.none$,this.prop$del=n||Sk.builtin.none.none$,this.prop$doc=i||t&&t.$doc||Sk.builtin.none.none$},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(t,e){t=Sk.abstr.copyKeywordsToNamedArgs("property",["fget","fset","fdel","doc"],t,e,Array(4).fill(Sk.builtin.none.none$)),this.prop$get=t[0],this.prop$set=t[1],this.prop$del=t[2],Sk.builtin.checkNone(t[3])?Sk.builtin.checkNone(t[0])||(this.prop$doc=t[0].$doc||t[3]):this.prop$doc=t[3]},tp$doc:"Property attribute.\n\n fget\n function to be used for getting an attribute value\n fset\n function to be used for setting an attribute value\n fdel\n function to be used for del'ing an attribute\n doc\n docstring\n\nTypical use is to define a managed attribute x:\n\nclass C(object):\n def getx(self): return self._x\n def setx(self, value): self._x = value\n def delx(self): del self._x\n x = property(getx, setx, delx, 'I'm the 'x' property.')\n\nDecorators make defining new properties or modifying existing ones easy:\n\nclass C(object):\n @property\n def x(self):\n 'I am the 'x' property.'\n return self._x\n @x.setter\n def x(self, value):\n self._x = value\n @x.deleter\n def x(self):\n del self._x",tp$descr_get(t,e,n){if(null===t)return this;if(void 0===this.prop$get)throw new Sk.builtin.AttributeError("unreadable attribute");return t=Sk.misceval.callsimOrSuspendArray(this.prop$get,[t]),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},tp$descr_set(t,e,n){let i;if(i=null==e?this.prop$del:this.prop$set,Sk.builtin.checkNone(i))throw new Sk.builtin.AttributeError("can't "+(null==e?"delete":"set")+" attribute");if(!i.tp$call)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(i)+"' is not callable");return t=null==e?i.tp$call([t]):i.tp$call([t,e]),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},methods:{getter:{$meth(t){return new Sk.builtin.property(t,this.prop$set,this.prop$del,this.prop$doc)},$flags:{OneArg:!0}},setter:{$meth(t){return new Sk.builtin.property(this.prop$get,t,this.prop$del,this.prop$doc)},$flags:{OneArg:!0}},deleter:{$meth(t){return new Sk.builtin.property(this.prop$get,this.prop$set,t,this.prop$doc)},$flags:{OneArg:!0}}},getsets:{fget:{$get(){return this.prop$get}},fset:{$get(){return this.prop$set}},fdel:{$get(){return this.prop$del}},__doc__:{$get(){return this.prop$doc},$set(t){this.prop$doc=t=t||Sk.builtin.none.none$}}}}),Sk.builtin.classmethod=Sk.abstr.buildNativeClass("classmethod",{constructor:function(t){this.cm$callable=t,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(t,e){Sk.abstr.checkNoKwargs("classmethod",e),Sk.abstr.checkArgsLen("classmethod",t,1,1),this.cm$callable=t[0]},tp$doc:"classmethod(function) -> method\n\nConvert a function to be a class method.\n\nA class method receives the class as implicit first argument,\njust like an instance method receives the instance.\nTo declare a class method, use this idiom:\n\n class C:\n @classmethod\n def f(cls, arg1, arg2, ...):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\nIf a class method is called for a derived class, the derived class\nobject is passed as the implied first argument.\n\nClass methods are different than C++ or Java static methods.\nIf you want those, see the staticmethod builtin.",tp$descr_get(t,e,n){const i=this.cm$callable;if(void 0===i)throw new Sk.builtin.RuntimeError("uninitialized classmethod object");return void 0===e&&(e=t.ob$type),(t=i.tp$descr_get)?t.call(i,e,n):new Sk.builtin.method(i,e)}},getsets:{__func__:{$get(){return this.cm$callable}},__dict__:Sk.generic.getSetDict}}),Sk.builtin.staticmethod=Sk.abstr.buildNativeClass("staticmethod",{constructor:function(t){this.sm$callable=t,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(t,e){Sk.abstr.checkNoKwargs("staticmethod",e),Sk.abstr.checkArgsLen("staticmethod",t,1,1),this.sm$callable=t[0]},tp$doc:"staticmethod(function) -> method\n\nConvert a function to be a static method.\n\nA static method does not receive an implicit first argument.\nTo declare a static method, use this idiom:\n\n class C:\n @staticmethod\n def f(arg1, arg2, ...):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\n\nStatic methods in Python are similar to those found in Java or C++.\nFor a more advanced concept, see the classmethod builtin.",tp$descr_get(t,e){if(void 0===this.sm$callable)throw new Sk.builtin.RuntimeError("uninitialized staticmethod object");return this.sm$callable}},getsets:{__func__:{$get(){return this.sm$callable}},__dict__:Sk.generic.getSetDict}})},function(t,e){function n(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;if(n=n.v,"number"==typeof i&&"number"==typeof n){const e=t(i,n);if(p(e))return new Sk.builtin.int_(e)}return i=_(i),n=_(n),new Sk.builtin.int_(e(i,n))}}function i(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;return n=n.v,"number"==typeof i&&"number"==typeof n?t(i,n):(i=_(i),n=_(n),e(i,n))}}function s(t,e){return function(){let n=this.v;if("number"==typeof n){const e=t(n);if(void 0!==e)return new Sk.builtin.int_(e);n=_(n)}return new Sk.builtin.int_(e(n))}}function r(){return new Sk.builtin.int_(this.v)}function o(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;if(0===(n=n.v))throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return"number"==typeof i&&"number"==typeof n?new Sk.builtin.int_(t(i,n)):(i=_(i),n=_(n),new Sk.builtin.int_(JSBI.numberIfSafe(e(i,n))))}}function a(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;if(n.nb$isnegative())throw new Sk.builtin.ValueError("negative shift count");let i=this.v;if(0===i)return new Sk.builtin.int_(0);if(n=n.v,"number"==typeof i&&"number"==typeof n&&53>n){const e=t(i,n);if(void 0!==e)return new Sk.builtin.int_(e)}return i=_(i),n=_(n),new Sk.builtin.int_(e(i,n))}}function l(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;return n=n.v,"number"==typeof i&&"number"==typeof n&&Math.abs(i)=-Number.MAX_SAFE_INTEGER}function h(t){return t<=Number.MAX_SAFE_INTEGER&&t>=-Number.MAX_SAFE_INTEGER?+t:JSBI.BigInt(t)}function _(t){return"number"==typeof t?JSBI.BigInt(t):t}function d(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("'byteorder' must be str, not "+Sk.abstr.typeName(t));if("little"===(t=t.toString()))return 1;if("big"===t)return 0;throw new Sk.builtin.ValueError("byteorder must be either 'little' or 'big'")}Sk.builtin.int_=Sk.abstr.buildNativeClass("int",{constructor:function(t){let e;if(Sk.asserts.assert(this instanceof Sk.builtin.int_,"bad call to int use 'new'"),"number"==typeof t){if(-6t)return $[t];e=t}else if(JSBI.__isBigInt(t))e=t;else{if(void 0===t)return w;if("string"==typeof t)e=h(t);else{if(t.nb$int)return t.nb$int();Sk.asserts.fail("bad argument to int constructor")}}this.v=e},slots:{tp$as_number:!0,tp$doc:"int(x=0) -> integer\nint(x, base=10) -> integer\n\nConvert a number or string to an integer, or return 0 if no arguments\nare given. If x is a number, return x.__int__(). For floating point\nnumbers, this truncates towards zero.\n\nIf x is not a number or if base is given, then x must be a string,\nbytes, or bytearray instance representing an integer literal in the\ngiven base. The literal can be preceded by '+' or '-' and be surrounded\nby whitespace. The base defaults to 10. Valid bases are 0 and 2-36.\nBase 0 means to interpret the base from the string as an integer literal.\n>>> int('0b100', base=0)\n4",$r(){return new Sk.builtin.str(this.v.toString())},tp$hash(){var t=this.v;if("number"==typeof t){if(-1===t)return-2;if(536870911>t&&-536870911t==e),JSBI.equal),ob$ne:i(((t,e)=>t!=e),JSBI.notEqual),ob$gt:i(((t,e)=>t>e),JSBI.greaterThan),ob$ge:i(((t,e)=>t>=e),JSBI.greaterThanOrEqual),ob$lt:i(((t,e)=>tt<=e),JSBI.lessThanOrEqual),nb$int:r,nb$index(){return this.v},nb$float(){var t=this.v;if("number"==typeof t)return new Sk.builtin.float_(t);if(1/0===(t=parseFloat(JSBI.toNumber(t)))||-1/0===t)throw new Sk.builtin.OverflowError("int too large to convert to float");return new Sk.builtin.float_(t)},nb$isnegative(){const t=this.v;return"number"==typeof t?0>t:JSBI.lessThan(t,JSBI.__ZERO)},nb$ispositive(){const t=this.v;return"number"==typeof t?0<=t:JSBI.greaterThanOrEqual(t,JSBI.__ZERO)},nb$bool(){return 0!==this.v},nb$positive:r,nb$negative:s((t=>-t),JSBI.unaryMinus),nb$add:n(((t,e)=>t+e),((t,e)=>JSBI.numberIfSafe(JSBI.add(t,e)))),nb$subtract:n(((t,e)=>t-e),((t,e)=>JSBI.numberIfSafe(JSBI.subtract(t,e)))),nb$multiply:n(((t,e)=>t*e),((t,e)=>t===JSBI.__ZERO||e===JSBI.__ZERO?0:JSBI.multiply(t,e))),nb$divide:function(t){if(!Sk.__future__.python3)return this.nb$floor_divide(t);if(!(t instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;var e=this.v,n=t.v;if(0===n)throw new Sk.builtin.ZeroDivisionError("division by zero");if("number"==typeof e&&"number"==typeof n)return new Sk.builtin.float_(e/n);if(e=_(e),n=_(n),t=JSBI.lessThan(JSBI.bitwiseXor(e,n),JSBI.__ZERO),JSBI.equal(e,JSBI.__ZERO))return new Sk.builtin.float_(t?-0:0);if(e=u(e),n=u(n),JSBI.greaterThanOrEqual(e,JSBI.multiply(k,n)))throw new Sk.builtin.OverflowError("int/int too large to represent as a float");var i=e.toString(2).length-n.toString(2).length,s=JSBI.BigInt(0>i?-i:i);if((0<=i&&JSBI.greaterThanOrEqual(e,JSBI.multiply(JSBI.exponentiate(b,s),n))||0>i&&JSBI.greaterThanOrEqual(JSBI.multiply(e,JSBI.exponentiate(b,s)),n))&&(i+=1),i=Math.max(i,g)-m,e=JSBI.leftShift(e,JSBI.BigInt(Math.max(-i,0))),n=JSBI.leftShift(n,JSBI.BigInt(Math.max(i,0))),s=JSBI.divide(e,n),e=JSBI.remainder(e,n),e=JSBI.multiply(b,e),(JSBI.greaterThan(e,n)||JSBI.equal(e,n)&&JSBI.equal(JSBI.remainder(s,b),S))&&(s=JSBI.add(s,S)),1/0===(s=JSBI.toNumber(s))||-1/0===s)throw new Sk.builtin.OverflowError("int/int too large to represent as a float");return n=s*Math.pow(2,i),new Sk.builtin.float_(t?-n:n)},nb$floor_divide:o(((t,e)=>Math.floor(t/e)),c),nb$remainder:o(((t,e)=>t-Math.floor(t/e)*e),((t,e)=>JSBI.subtract(t,JSBI.multiply(e,c(t,e))))),nb$divmod(t){const e=this.nb$floor_divide(t);return t=this.nb$remainder(t),e===Sk.builtin.NotImplemented.NotImplemented$||t===Sk.builtin.NotImplemented.NotImplemented$?Sk.builtin.NotImplemented.NotImplemented$:new Sk.builtin.tuple([e,t])},nb$and:l(((t,e)=>t&e),JSBI.bitwiseAnd),nb$or:l(((t,e)=>t|e),JSBI.bitwiseOr),nb$xor:l(((t,e)=>t^e),JSBI.bitwiseXor),nb$abs:s(Math.abs,u),nb$lshift:a(((t,e)=>{if(p(t=2*t*T[e]))return t}),JSBI.leftShift),nb$rshift:a(((t,e)=>{Math.floor(t/T[e+1])}),((t,e)=>JSBI.numberIfSafe(JSBI.signedRightShift(t,e)))),nb$invert:s((t=>Math.abs(t)JSBI.numberIfSafe(JSBI.bitwiseNot(t)))),nb$power(t,e){let n;if(void 0!==e&&Sk.builtin.checkNone(e)&&(e=void 0),!(t instanceof Sk.builtin.int_&&(void 0===e||e instanceof Sk.builtin.int_)))return Sk.builtin.NotImplemented.NotImplemented$;const i=t.nb$isnegative();if(i&&void 0===e)return this.nb$float().nb$power(t.nb$float());let s=this.v;if(t=t.v,"number"==typeof s&&"number"==typeof t){const i=Math.pow(s,t);if(p(i)&&(n=new Sk.builtin.int_(i),void 0===e))return n}if(void 0!==e){if(i)throw new Sk.builtin.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");if(0===e.v)throw new Sk.builtin.ValueError("pow() 3rd argument cannot be 0");return void 0!==n?n.nb$remainder(e):new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.powermod(_(s),_(t),_(e.v))))}return new Sk.builtin.int_(JSBI.exponentiate(_(s),_(t)))},nb$long(){return new Sk.builtin.lng(this.v)}},getsets:{real:{$get:r,$doc:"the real part of a complex number"},imag:{$get:()=>w,$doc:"the imaginary part of a complex number"},numerator:{$get:r},denominator:{$get:()=>E}},classmethods:{from_bytes:{$meth(t,e){Sk.abstr.checkArgsLen("from_bytes",t,0,2);let[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("from_bytes",["bytes","byteorder","signed"],t,e,[Sk.builtin.bool.false$]);if(t=d(i),n instanceof Sk.builtin.bytes||(n=Sk.misceval.callsimArray(Sk.builtin.bytes,[n])),Sk.misceval.isTrue(s))throw new Sk.builtin.NotImplementedError("from_bytes with signed=True is not yet implemented in Skulpt");const r=[];return n.valueOf().forEach((t=>{r.push(t.toString(16).padStart(2,"0"))})),t&&r.reverse(),t=new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.BigInt("0x"+(r.join("")||"0")))),this===Sk.builtin.int_?t:Sk.misceval.callsimArray(this,[t])},$flags:{FastCall:!0}}},methods:{conjugate:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Returns self, the complex conjugate of any int."},bit_length:{$meth(){let t=this.v;return 0===t?new Sk.builtin.int_(0):(t="number"==typeof t?Math.abs(t):u(t),new Sk.builtin.int_(t.toString(2).length))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Number of bits necessary to represent self in binary.\n\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6"},to_bytes:{$meth(t,e){Sk.abstr.checkArgsLen("to_bytes",t,0,2);let[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("to_bytes",["length","byteorder","signed"],t,e,[Sk.builtin.bool.false$]);if(t=d(i),n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),0>n)throw new Sk.builtin.ValueError("length argument must be non-negative");if(Sk.misceval.isTrue(s))throw new Sk.builtin.NotImplementedError("to_bytes with signed=True is not yet implemented in Skulpt");if(this.nb$isnegative())throw new Sk.builtin.OverflowError("can't convert negative int to unsigned");(e=JSBI.BigInt(this.v).toString(16)).length%2&&(e="0"+e);var r=e.length/2;if(r>n){if(0===n&&"00"===e)return new Sk.builtin.bytes;throw new Sk.builtin.OverflowError("int too big to convert")}const o=Array(n).fill(0);r=n-r;let a=0;for(;rMath.abs(e)?new Sk.builtin.int_(0):Sk.__future__.bankers_rounding?(e/=t,n=Math.round(e),new Sk.builtin.int_((.5==(0e||36= 2 and <= 36");if("string"==typeof e&&(e=Number(e)),"0x"===t.substring(0,2).toLowerCase()){if(16===e||0===e)t=t.substring(2),e=16;else if(34>e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}else if("0b"===t.substring(0,2).toLowerCase()){if(2===e||0===e)t=t.substring(2),e=2;else if(12>e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}else if("0o"===t.substring(0,2).toLowerCase()){if(8===e||0===e)t=t.substring(2),e=8;else if(25>e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}else if("0"===t.charAt(0)){if("0"===t)return 0;8!==e&&0!==e||(e=8)}if(0===e&&(e=10),-1!==t.indexOf("_")){if(-1!==t.indexOf("__"))throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'");t=10!==e?t.replace(y,""):t.charAt(0)+t.substring(1).replace(y,"")}if(0===t.length)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'");for(n=0;n=r?o=r-48:65<=r&&90>=r?o=r-65+10:97<=r&&122>=r&&(o=r-97+10),o>=e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}if(s&&(t="-"+t),p(o=parseInt(t,e)))return o;for(i=!1,"-"===t[0]&&(i=!0,t=t.substring(1)),e=JSBI.BigInt(e),s=S,n=JSBI.__ZERO,r=t.length-1;0<=r;r--)48<=(o=t.charCodeAt(r))&&57>=o?o-=48:65<=o&&90>=o?o=o-65+10:97<=o&&122>=o&&(o=o-97+10),o=JSBI.multiply(JSBI.BigInt(o),s),n=JSBI.add(n,o),s=JSBI.multiply(s,e);return i&&(n=JSBI.multiply(n,JSBI.BigInt(-1))),n},Sk.builtin.int_.py2$methods={},Sk.longFromStr=function(t,e){return Sk.__future__.python3?new Sk.builtin.int_(h(t)):(t=Sk.str2number(t,e),new Sk.builtin.lng(t))},Sk.exportSymbol("Sk.longFromStr",Sk.longFromStr),Sk.builtin.int_.withinThreshold=p,Sk.builtin.int_.stringToNumberOrBig=h;const T=[.5,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,0x800000000000,281474976710656,562949953421312,0x4000000000000,0x8000000000000,4503599627370496,9007199254740992];Sk.builtin.lng=Sk.abstr.buildNativeClass("long",{base:Sk.builtin.int_,constructor:function(t){void 0!==(t=Sk.builtin.int_.call(this,t))&&(this.v=t.v)},slots:{$r(){return new Sk.builtin.str(this.v.toString()+"L")},tp$as_number:!0,nb$negative(){return new Sk.builtin.lng(v.nb$negative.call(this).v)},nb$positive(){return new Sk.builtin.lng(v.nb$positive.call(this).v)}}});const v=Sk.builtin.int_.prototype,$=[];for(t=-5;257>t;t++)$[t]=Object.create(Sk.builtin.int_.prototype,{v:{value:t}});const w=$[0],E=$[1]},function(t,e){const n=Sk.builtin.int_.prototype;Sk.builtin.bool=Sk.abstr.buildNativeClass("bool",{constructor:function(t){return Sk.misceval.isTrue(t)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},base:Sk.builtin.int_,slots:{tp$doc:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",tp$new:(t,e)=>(Sk.abstr.checkNoKwargs("bool",e),Sk.abstr.checkArgsLen("bool",t,0,1),new Sk.builtin.bool(t[0])),$r(){return this.v?this.str$True:this.str$False},tp$as_number:!0,nb$and(t){return t.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v&t.v):n.nb$and.call(this,t)},nb$or(t){return t.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v|t.v):n.nb$or.call(this,t)},nb$xor(t){return t.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v^t.v):n.nb$xor.call(this,t)}},flags:{sk$unacceptableBase:!0},methods:{__format__:{$meth(){return this.$r()},$flags:{OneArg:!0}}},proto:{str$False:new Sk.builtin.str("False"),str$True:new Sk.builtin.str("True"),valueOf(){return!!this.v}}}),Sk.exportSymbol("Sk.builtin.bool",Sk.builtin.bool),Sk.builtin.bool.true$=Object.create(Sk.builtin.bool.prototype,{v:{value:1,enumerable:!0}}),Sk.builtin.bool.false$=Object.create(Sk.builtin.bool.prototype,{v:{value:0,enumerable:!0}})},function(t,e){function n(t){const e=[t,0];if(0===t)return e;var n=Math.abs(t);let i=Math.max(-1023,Math.floor(Math.log2(n))+1);for(n*=Math.pow(2,-i);.5>n;)n*=2,i--;for(;1<=n;)n*=.5,i++;return 0>t&&(n=-n),e[0]=n,e[1]=i,e}function i(){return new Sk.builtin.float_(this.v)}function s(t){return function(e){const n=this.v;if("number"!=typeof(e=e.v)){if(!JSBI.__isBigInt(e))return Sk.builtin.NotImplemented.NotImplemented$;if(1/0==(e=parseFloat(JSBI.toNumber(e)))||-1/0==e)throw new Sk.builtin.OverflowError("int too large to convert to float")}return t(n,e)}}function r(t,e){return function(n){const i=this.v;if("number"!=typeof(n=n.v)){if(!JSBI.__isBigInt(n))return Sk.builtin.NotImplemented.NotImplemented$;if(void 0!==e)return e(i,n)}return t(i,n)}}function o(t){const e=s(t);return function(t,n){if(void 0!==n&&!Sk.builtin.checkNone(n))throw new Sk.builtin.TypeError("pow() 3rd argument not allowed unless all arguments are integers");return e.call(this,t)}}function a(t,e){if(0===e)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return 1/0===t?1/0===e||-1/0===t?new Sk.builtin.float_(NaN):0>e?new Sk.builtin.float_(-1/0):new Sk.builtin.float_(1/0):-1/0===t?1/0===e||-1/0===t?new Sk.builtin.float_(NaN):0>e?new Sk.builtin.float_(1/0):new Sk.builtin.float_(-1/0):new Sk.builtin.float_(t/e)}function l(t,e){if(1/0===t||-1/0===t)return new Sk.builtin.float_(NaN);if(0===e)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return 1/0===e?0>t?new Sk.builtin.float_(-1):new Sk.builtin.float_(0):-1/0===e?0>t||0!==t?new Sk.builtin.float_(0):new Sk.builtin.float_(-1):new Sk.builtin.float_(Math.floor(t/e))}function u(t,e){if(0===e)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if(0===t)return new Sk.builtin.float_(0);if(1/0===e)return 1/0===t||-1/0===t?new Sk.builtin.float_(NaN):0t?0n&&(n+=e):0>e&&0!==n&&(n+=e),0===n&&(0>e?n=-0:-1/0==1/0/n&&(n=0)),new Sk.builtin.float_(n)}function c(t,e){if(0>t&&0!=e%1)return new Sk.builtin.complex(t,0).nb$power(new Sk.builtin.complex(e,0));if(0===t&&0>e)throw new Sk.builtin.ZeroDivisionError("0.0 cannot be raised to a negative power");const n=Math.pow(t,e);if(1/0===Math.abs(n)&&1/0!==Math.abs(t)&&1/0!==Math.abs(e))throw new Sk.builtin.OverflowError("Numerical result out of range");return new Sk.builtin.float_(n)}Sk.builtin.float_=Sk.abstr.buildNativeClass("float",{constructor:function(t){if(Sk.asserts.assert(this instanceof Sk.builtin.float_,"bad call to float use 'new'"),"number"==typeof t)this.v=t;else if(void 0===t)this.v=0;else if("string"==typeof t)this.v=parseFloat(t);else{if(t.nb$float)return t.nb$float();Sk.asserts.fail("bad argument to float constructor")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$doc:"Convert a string or number to a floating point number, if possible.",tp$hash(){var t=this.v;if(!Number.isFinite(t))return Number.isNaN(t)?0:0e&&(t=-1,e=-e);let s,r=0;for(;e;)r=r<<28&536870911|r>>1,e*=268435456,i-=28,s=Math.trunc(e),e-=s,r+=s,536870911<=r&&(r-=536870911);return i=0<=i?i%29:28-(-1-i)%29,r=(r<>29-i)*t,-1===r?-2:r},$r(){return new Sk.builtin.str(this.str$(10,!0))},tp$new(t,e){if(e&&e.length)throw new Sk.builtin.TypeError("float() takes no keyword arguments");if(t&&1t?Math.ceil(t):Math.floor(t),Sk.builtin.int_.withinThreshold(t)?new Sk.builtin.int_(t):new Sk.builtin.int_(JSBI.BigInt(t))},nb$float:i,nb$long(){return new Sk.builtin.lng(this.nb$int().v)},nb$add:s(((t,e)=>new Sk.builtin.float_(t+e))),nb$subtract:s(((t,e)=>new Sk.builtin.float_(t-e))),nb$reflected_subtract:s(((t,e)=>new Sk.builtin.float_(e-t))),nb$multiply:s(((t,e)=>new Sk.builtin.float_(t*e))),nb$divide:s(a),nb$reflected_divide:s(((t,e)=>a(e,t))),nb$floor_divide:s(l),nb$reflected_floor_divide:s(((t,e)=>l(e,t))),nb$remainder:s(u),nb$reflected_remainder:s(((t,e)=>u(e,t))),nb$divmod:s(((t,e)=>new Sk.builtin.tuple([l(t,e),u(t,e)]))),nb$reflected_divmod:s(((t,e)=>new Sk.builtin.tuple([l(e,t),u(e,t)]))),nb$power:o(c),nb$reflected_power:o(((t,e)=>c(e,t))),nb$abs(){return new Sk.builtin.float_(Math.abs(this.v))},nb$negative(){return new Sk.builtin.float_(-this.v)},nb$positive(){return new Sk.builtin.float_(this.v)},nb$bool(){return 0!==this.v},nb$isnegative(){return 0>this.v},nb$ispositive(){return 0<=this.v},ob$eq:r(((t,e)=>t==e),JSBI.EQ),ob$ne:r(((t,e)=>t!=e),JSBI.NE),ob$gt:r(((t,e)=>t>e),JSBI.GT),ob$ge:r(((t,e)=>t>=e),JSBI.GE),ob$lt:r(((t,e)=>tt<=e),JSBI.LE)},getsets:{real:{$get:i,$doc:"the real part of a complex number"},imag:{$get:()=>new Sk.builtin.float_(0),$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:i,$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return self, the complex conjugate of any float."},__trunc__:{$meth(){return this.nb$int()},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return the Integral closest to x between 0 and x."},__round__:{$meth(t){return this.round$(t)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, ndigits=None, /)",$doc:"Return the Integral closest to x, rounding half toward even.\n\nWhen an argument is passed, work like built-in round(x, ndigits)."},as_integer_ratio:{$meth(){if(!Number.isFinite(this.v)){if(Number.isNaN(this.v))throw new Sk.builtin.ValueError("cannot convert NaN to integer ratio");throw new Sk.builtin.OverflowError("cannot convert Infinity to integer ratio")}let[t,e]=n(this.v);for(var i=0;300>i&&t!=Math.floor(t);i++)t*=2,e--;i=new Sk.builtin.int_(Math.abs(e));let s=new Sk.builtin.int_(t),r=new Sk.builtin.int_(1);return 0>> (10.0).as_integer_ratio()\n(10, 1)\n>>> (0.0).as_integer_ratio()\n(0, 1)\n>>> (-.25).as_integer_ratio()\n(-1, 4)"},is_integer:{$meth(){return new Sk.builtin.bool(Number.isInteger(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the float is an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([this])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!0),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{valueOf(){return this.v}}});const p=/_[eE]|[eE]_|\._|_\.|[+-]_|__/,h=/_(?=[^_])/g;Sk.builtin.float_.PyFloat_Check=function(t){return void 0!==t&&!!(Sk.builtin.checkNumber(t)||Sk.builtin.checkFloat(t)||t.ob$type.$isSubType(Sk.builtin.float_))},Sk.builtin.float_.prototype.toFixed=function(t){return t=Sk.builtin.asnum$(t),this.v.toFixed(t)},Sk.builtin.float_.prototype.round$=function(t){var e=Sk.builtin.asnum$(this),n=void 0===t?0:Sk.misceval.asIndexSized(t);if(Sk.__future__.bankers_rounding){e*=Math.pow(10,n);var i=Math.round(e);return n=(.5==(0n.length?e.toExponential():e.toExponential(11)),0>n.indexOf("e")&&0<=n.indexOf(".")){for(;"0"==n.charAt(n.length-1);)n=n.substring(0,n.length-1);"."==n.charAt(n.length-1)&&(n+="0")}n=(n=(n=n.replace(/\.0+e/,"e","i")).replace(/(e[-+])([1-9])$/,"$10$2")).replace(/0+(e.*)/,"$1")}else n=e.toString(t);return 0===this.v&&-1/0==1/this.v&&(n="-"+n),0>n.indexOf(".")&&0>n.indexOf("E")&&0>n.indexOf("e")&&(n+=".0"),n},Sk.builtin.float_.py2$methods={}},function(t,e){function n(t){let e=t.v;if("number"==typeof e)return e;if(t.nb$float&&(e=t.nb$float()),void 0===e)throw new Sk.builtin.TypeError("a float is required");return e.v}function i(t,e,n){return n===Sk.builtin.complex.prototype?new Sk.builtin.complex(t,e):(n=new n.constructor,Sk.builtin.complex.call(n,t,e),n)}function s(t,e){return function(n){const i=this.real,s=this.imag;var r=n.real;const o=n.v;if("number"==typeof r)n=n.imag;else if("number"==typeof o)r=o,n=0;else{if(!JSBI.__isBigInt(o))return Sk.builtin.NotImplemented.NotImplemented$;if(void 0===e){if(1/0==(r=parseFloat(JSBI.toNumber(o)))||-1/0==r)throw new Sk.builtin.OverflowError("int too large to convert to float")}else r=o.toString();n=0}return t(i,s,r,n)}}function r(t,e,n,i){var s=Math.abs(n);const r=Math.abs(i);if(s>=r){if(0===s)throw new Sk.builtin.ZeroDivisionError("complex division by zero");i=(t+e*(s=i/n))/(n+=i*s),t=(e-t*s)/n}else r>=s?(n=n*(s=n/i)+i,Sk.asserts.assert(0!==i),i=(t*s+e)/n,t=(e*s-t)/n):t=i=NaN;return new Sk.builtin.complex(i,t)}function o(t,e,n,i){if(0===n&&0===i){i=1;var s=0}else if(0===t&&0===e){if(0!==i||0>n)throw new Sk.builtin.ZeroDivisionError("complex division by zero");s=i=0}else{const r=Math.hypot(t,e);s=Math.pow(r,n),n*=t=Math.atan2(e,t),0!==i&&(s/=Math.exp(t*i),n+=i*Math.log(r)),i=s*Math.cos(n),s*=Math.sin(n)}return new Sk.builtin.complex(i,s)}function a(t,e,n){let i=1;var s=new Sk.builtin.complex(1,0);for(t=new Sk.builtin.complex(t,e);0=i;)n&i&&(s=new Sk.builtin.complex(s.real*t.real-s.imag*t.imag,s.real*t.imag+t.real*s.imag)),i<<=1,t=new Sk.builtin.complex(t.real*t.real-t.imag*t.imag,2*t.real*t.imag);return s}function l(t,e,n,i,s){switch(s=!1,e){case"e":case"f":case"g":break;case"E":s=!0,e="e";break;case"F":s=!0,e="f";break;case"r":if(0!==n)throw Error("Bad internall call");n=17,e="g";break;default:throw Error("Bad internall call")}if(isNaN(t))t="nan";else if(1/0===t)t="inf";else if(-1/0===t)t="-inf";else{i&l.Py_DTSF_ADD_DOT_0&&(e="g");var r="%"+(i&l.Py_DTSF_ALT?"#":"");null!=n&&(r=r+"."+n),t=(t=(r=new Sk.builtin.str(r+e)).nb$remainder(new Sk.builtin.float_(t))).v}return i&l.Py_DTSF_SIGN&&"-"!==t[0]&&(t="+"+t),s&&(t=t.toUpperCase()),t}Sk.builtin.complex=Sk.abstr.buildNativeClass("complex",{constructor:function(t,e){Sk.asserts.assert(this instanceof Sk.builtin.complex,"bad call to complex constructor, use 'new'"),this.real=t,this.imag=e},slots:{tp$as_number:!0,tp$doc:"Create a complex number from a real part and an optional imaginary part.\n\nThis is equivalent to (real + imag*1j) where imag defaults to 0.",tp$hash(){var t=new Sk.builtin.float_(this.real).tp$hash();return t=1003*new Sk.builtin.float_(this.imag).tp$hash()+t,Sk.builtin.int_.withinThreshold(t)?t:new Sk.builtin.int_(JSBI.BigInt(t)).tp$hash()},tp$getattr:Sk.generic.getAttr,tp$new(t,e){{var s,r=(t=Sk.abstr.copyKeywordsToNamedArgs("complex",["real","imag"],t,e,[null,null]))[1];let a=e=!1;var o=t[0];if(null!=o&&o.constructor===Sk.builtin.complex&&null==r)e=o;else if(Sk.builtin.checkString(o)){if(null!=r)throw new Sk.builtin.TypeError("complex() can't take second arg if first is a string");e=Sk.builtin.complex.complex_subtype_from_string(o,this)}else{if(null!=r&&Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("complex() second arg can't be a string");if(null==o?t=null:t=void 0!==(t=Sk.abstr.lookupSpecial(o,Sk.builtin.str.$complex))?Sk.misceval.callsimArray(t,[]):null,null!=t&&t!==Sk.builtin.NotImplemented.NotImplemented$){if(!u(t))throw new Sk.builtin.TypeError("__complex__ should return a complex object");o=t}if(null!=o&&void 0===o.nb$float)throw new Sk.builtin.TypeError("complex() first argument must be a string or a number, not '"+Sk.abstr.typeName(o)+"'");if(null!=r&&void 0===r.nb$float)throw new Sk.builtin.TypeError("complex() second argument must be a number, not '"+Sk.abstr.typeName(o)+"'");null==o?o=t=0:u(o)?(t=o.real,o=o.imag,e=!0):(t=n(o),o=0),null==r?r=s=0:u(r)?(s=r.real,r=r.imag,a=!0):(s=n(r),r=0),!0===a&&(t-=r),!0===e&&(s+=o),e=i(t,s,this)}}return e},tp$richcompare(t,e){if("Eq"!==e&&"NotEq"!==e){if(Sk.builtin.checkNumber(t)||u(t))throw new Sk.builtin.TypeError("no ordering relation is defined for complex numbers");return Sk.builtin.NotImplemented.NotImplemented$}return s((function(t,n,i,s){return t=t==i&&n==s,"Eq"===e?t:!t}),!0).call(this,t)},$r(){{var t,e;let s=t="";var n=this.real,i=this.imag;(e=0===n)&&(e=1==(n?0>n?-1:1:0>1/n?-1:1)),e?(n="",e=l(i,"g",null,0,null)):(n=t=l(n,"g",null,0,null),e=l(i,"g",null,l.Py_DTSF_SIGN,null),0===i&&-1/0==1/i&&e&&"-"!==e[0]&&(e="-"+e),t="(",s=")"),i=new Sk.builtin.str(""+t+n+e+"j"+s)}return i},nb$int(){throw new Sk.builtin.TypeError("can't convert complex to int")},nb$long(){throw new Sk.builtin.TypeError("can't convert complex to long")},nb$float(){throw new Sk.builtin.TypeError("can't convert complex to float")},nb$positive(){return new Sk.builtin.complex(this.real,this.imag)},nb$negative(){return new Sk.builtin.complex(-this.real,-this.imag)},nb$bool(){return this.real||this.imag},nb$add:s(((t,e,n,i)=>new Sk.builtin.complex(t+n,e+i))),nb$subtract:s(((t,e,n,i)=>new Sk.builtin.complex(t-n,e-i))),nb$reflected_subtract:s(((t,e,n,i)=>new Sk.builtin.complex(n-t,i-e))),nb$multiply:s(((t,e,n,i)=>new Sk.builtin.complex(n*t-i*e,t*i+e*n))),nb$divide:s(r),nb$reflected_divide:s(((t,e,n,i)=>r(n,i,t,e))),nb$floor_divide(t){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$reflected_floor_divide(t){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$remainder(t){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$reflected_remainder(t){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$divmod(t){throw new Sk.builtin.TypeError("can't take floor or mod of complex number.")},nb$power(t,e){if(null!=e&&!Sk.builtin.checkNone(e))throw new Sk.builtin.ValueError("complex modulo");return _.call(this,t)},nb$reflected_power(t,e){if(null!=e&&!Sk.builtin.checkNone(e))throw new Sk.builtin.ValueError("complex modulo");return d.call(this,t)},nb$abs(){var t=this.real;const e=this.imag;if(!Number.isFinite(t)||!Number.isFinite(e))return 1/0===t||-1/0===t?new Sk.builtin.float_(Math.abs(t)):1/0===e||-1/0===e?new Sk.builtin.float_(Math.abs(e)):new Sk.builtin.float_(NaN);if(t=Math.hypot(t,e),!Number.isFinite(t))throw new Sk.builtin.OverflowError("absolute value too large");return new Sk.builtin.float_(t)}},getsets:{real:{$get(){return new Sk.builtin.float_(this.real)},$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(this.imag)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth(){return new Sk.builtin.complex(this.real,-this.imag)},$flags:{NoArgs:!0},$textsig:null,$doc:"complex.conjugate() -> complex\n\nReturn the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.float_(this.real),new Sk.builtin.float_(this.imag)])},$flags:{NoArgs:!0},$textsig:null,$doc:Sk.builtin.none.none$},__format__:{$meth(t){if(Sk.builtin.checkString(t))throw new Sk.builtin.NotImplementedError("__format__ is not implemented for complex type.");throw new Sk.builtin.TypeError("__format__ requires str")},$flags:{OneArg:!0},$textsig:null,$doc:"complex.__format__() -> str\n\nConvert to a string according to format_spec."}}}),Sk.exportSymbol("Sk.builtin.complex",Sk.builtin.complex);const u=Sk.builtin.checkComplex,c=/_[eE]|[eE]_|\._|_\.|[+-]_|_j|j_/,p=/_(?=[^_])/g;Sk.builtin.complex.complex_subtype_from_string=function(t,e){e=e||Sk.builtin.complex.prototype;var n=0,s=0,r=!1;if(Sk.builtin.checkString(t))t=Sk.ffi.remapToJs(t);else if("string"!=typeof t)throw new TypeError("provided unsupported string-alike argument");if(-1!==t.indexOf("\0")||0===t.length||""===t)throw new Sk.builtin.ValueError("complex() arg is a malformed string");var o=0;for(t=(t=t.replace(/inf|infinity/gi,"Infinity")).replace(/nan/gi,"NaN");" "===t[o];)o++;if("("===t[o])for(r=!0,o++;" "===t[o];)o++;if(-1!==t.indexOf("_")){if(c.test(t))throw new Sk.builtin.ValueError("could not convert string to complex: '"+t+"'");t=t.charAt(0)+t.substring(1).replace(p,"")}var a=/^(?:[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[eE][+-]?\d+)?|NaN|Infinity))/,l=t.substr(o),u=l.match(a);if(null!==u)if("j"===t[o+=u[0].length]||"J"===t[o])s=parseFloat(u[0]),o++;else if("+"===t[o]||"-"===t[o]){if(n=parseFloat(u[0]),null!==(u=t.substr(o).match(a))?(s=parseFloat(u[0]),o+=u[0].length):(s="+"===t[o]?1:-1,o++),"j"!==t[o]&&"J"!==t[o])throw new Sk.builtin.ValueError("complex() arg is malformed string");o++}else n=parseFloat(u[0]);else null!==(u=u=l.match(/^([+-]?[jJ])/))&&(s=1===u[0].length||"+"===u[0][0]?1:-1,o+=u[0].length);for(;" "===t[o];)o++;if(r){if(")"!==t[o])throw new Sk.builtin.ValueError("complex() arg is malformed string");for(o++;" "===t[o];)o++}if(t.length!==o)throw new Sk.builtin.ValueError("complex() arg is malformed string");return i(n,s,e)};const h=(t,e,n,i)=>{const s=0|n;return 0===i&&n===s?(100s?t=o(t,e,s,0):0h(n,i,t,e)));l.Py_DTSF_SIGN=1,l.Py_DTSF_ADD_DOT_0=2,l.Py_DTSF_ALT=4,l.Py_DTST_FINITE=0,l.Py_DTST_INFINITE=1,l.Py_DTST_NAN=2},function(t,e){Sk.builtin.slice=Sk.abstr.buildNativeClass("slice",{constructor:function(t,e,n){void 0===e&&void 0===n&&(e=t,t=Sk.builtin.none.none$),void 0===e&&(e=Sk.builtin.none.none$),void 0===n&&(n=Sk.builtin.none.none$),this.start=t,this.stop=e,this.step=n},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"slice(stop)\nslice(start, stop[, step])\n\nCreate a slice object. This is used for extended slicing (e.g. a[0:10:2]).",tp$hash:Sk.builtin.none.none$,tp$new:(t,e)=>(Sk.abstr.checkNoKwargs("slice",e),Sk.abstr.checkArgsLen("slice",t,1,3),new Sk.builtin.slice(...t)),$r(){const t=Sk.misceval.objectRepr(this.start),e=Sk.misceval.objectRepr(this.stop),n=Sk.misceval.objectRepr(this.step);return new Sk.builtin.str("slice("+t+", "+e+", "+n+")")},tp$richcompare(t,e){if(t.ob$type!==Sk.builtin.slice)return Sk.builtin.NotImplemented.NotImplemented$;const n=new Sk.builtin.tuple([this.start,this.stop,this.step]);return t=new Sk.builtin.tuple([t.start,t.stop,t.step]),n.tp$richcompare(t,e)}},getsets:{start:{$get(){return this.start}},step:{$get(){return this.step}},stop:{$get(){return this.stop}}},methods:{indices:{$meth:function(t){if(0>(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError)))throw new Sk.builtin.TypeError("length should not be negative");const{start:e,stop:n,step:i}=this.slice$indices(t);return new Sk.builtin.tuple([new Sk.builtin.int_(e),new Sk.builtin.int_(n),new Sk.builtin.int_(i)])},$doc:"S.indices(len) -> (start, stop, stride)\n\nAssuming a sequence of length len, calculate the start and stop\nindices, and the stride length of the extended slice described by\nS. Out of bounds indices are clipped in a manner consistent with the\nhandling of normal slices.",$textsig:null,$flags:{OneArg:!0}}},proto:{slice$as_indices(t){let e;var n=t?t=>Sk.misceval.asIndexSized(t,null,"slice indices must be integers or None or have an __index__ method"):t=>Sk.misceval.asIndexOrThrow(t,"slice indices must be integers or None or have an __index__ method");if(Sk.builtin.checkNone(this.step))e=1;else if(e=n(this.step),0===e)throw new Sk.builtin.ValueError("slice step cannot be zero");return{start:t=Sk.builtin.checkNone(this.start)?null:n(this.start),stop:n=Sk.builtin.checkNone(this.stop)?null:n(this.stop),step:e}},$wrt:(t,e,n,i,s)=>(s=s?e=>JSBI.__isBigInt(e)?JSBI.add(e,JSBI.BigInt(t)):e+t:e=>e+t,0e&&(0>(e=s(e))&&(e=0)),null===n||n>t?n=t:0>n&&(n=s(n))):(null===e||e>=t?e=t-1:0>e&&(e=s(e)),null===n?n=-1:0>n&&(0>(n=s(n))&&(n=-1))),{start:e,stop:n,step:i}),slice$indices(t,e){let{start:n,stop:i,step:s}=this.slice$as_indices(!0,e);return this.$wrt(t,n,i,s,e)},sssiter$(t,e){let{start:n,stop:i,step:s}=this.slice$indices(t,!0);if(0i;t+=s)e(t)}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.slice.startEnd$wrt=function(t,e,n){return t=t.sq$length(),void 0===e||Sk.builtin.checkNone(e)?e=0:0>(e=Sk.misceval.asIndexSized(e,null,"slice indices must be integers or have an __index__ method"))&&(0>(e+=t)&&(e=0)),void 0===n||Sk.builtin.checkNone(n)?n=t:0>(n=Sk.misceval.asIndexSized(n,null,"slice indices must be integers or have an __index__ method"))?0>(n+=t)&&(n=0):n>t&&(n=t),{start:e,end:n}}},function(t,e){function n(t){return function(e){return Sk.builtin.checkAnySet(e)?t.call(this,e):Sk.builtin.NotImplemented.NotImplemented$}}function i(t){return t instanceof Sk.builtin.set&&t.tp$hash===Sk.builtin.none.none$&&(t=new Sk.builtin.frozenset(Sk.misceval.arrayFromIterable(t))),t}t={},Sk.builtin.set=Sk.abstr.buildNativeClass("set",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.set,"Bad call to set - must be called with an Array and 'new'");const e=[];for(let n=0;n new empty set object\nset(iterable) -> new set object\n\nBuild an unordered collection of unique elements.",tp$init(t,e){return Sk.abstr.checkNoKwargs("set",e),Sk.abstr.checkArgsLen("set",t,0,1),this.set$clear(),(t=t[0])&&this.set$update(t)},tp$new:Sk.generic.new,$r(){if(this.in$repr)return new Sk.builtin.str(Sk.abstr.typeName(this)+"(...)");this.in$repr=!0;const t=this.sk$asarray().map((t=>Sk.misceval.objectRepr(t)));return this.in$repr=!1,Sk.__future__.python3?0===t.length?new Sk.builtin.str(Sk.abstr.typeName(this)+"()"):this.ob$type!==Sk.builtin.set?new Sk.builtin.str(Sk.abstr.typeName(this)+"({"+t.join(", ")+"})"):new Sk.builtin.str("{"+t.join(", ")+"}"):new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+t.join(", ")+"])")},tp$iter(){return new s(this)},tp$richcompare(t,e){if(!Sk.builtin.checkAnySet(t))return Sk.builtin.NotImplemented.NotImplemented$;switch(e){case"NotEq":case"Eq":return t=this===t||this.get$size()===t.get$size()&&Sk.misceval.isTrue(this.set$issubset(t)),"Eq"===e?t:!t;case"LtE":return this===t||Sk.misceval.isTrue(this.set$issubset(t));case"GtE":return this===t||Sk.misceval.isTrue(t.set$issubset(this));case"Lt":return this.get$size()t.get$size()&&Sk.misceval.isTrue(t.set$issubset(this))}},nb$subtract:n((function(t){return this.difference.$meth.call(this,t)})),nb$and:n((function(t){return this.intersection.$meth.call(this,t)})),nb$or:n((function(t){return this.union.$meth.call(this,t)})),nb$xor:n((function(t){return this.symmetric_difference.$meth.call(this,t)})),nb$inplace_subtract:n((function(t){return t===this&&(t=t.set$copy()),Sk.misceval.chain(this.difference_update.$meth.call(this,t),(()=>this))})),nb$inplace_and:n((function(t){return Sk.misceval.chain(this.intersection_update.$meth.call(this,t),(()=>this))})),nb$inplace_or:n((function(t){return Sk.misceval.chain(this.update.$meth.call(this,t),(()=>this))})),nb$inplace_xor:n((function(t){return t===this&&(t=t.set$copy()),Sk.misceval.chain(this.symmetric_difference_update.$meth.call(this,t),(()=>this))})),sq$length(){return this.get$size()},sq$contains(t){return t=i(t),this.v.sq$contains(t)}},methods:{add:{$meth(t){return this.set$add(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Add an element to a set.\n\nThis has no effect if the element is already present."},clear:{$meth(){return this.set$clear(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove all elements from this set."},copy:{$meth(){return this.set$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a shallow copy of a set."},discard:{$meth(t){return t=i(t),this.set$discard(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set if it is a member.\n\nIf the element is not a member, do nothing."},difference:{$meth(...t){const e=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>e.set$difference_update(t))),(()=>e))},$flags:{MinArgs:0},$textsig:null,$doc:"Return the difference of two or more sets as a new set.\n\n(i.e. all elements that are in this set but not the others.)"},difference_update:{$meth(...t){return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>this.set$difference_update(t))),(()=>Sk.builtin.none.none$))},$flags:{MinArgs:0},$textsig:null,$doc:"Remove all elements of another set from this set."},intersection:{$meth(...t){return this.set$intersection_multi(...t)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the intersection of two sets as a new set.\n\n(i.e. all elements that are in both sets.)"},intersection_update:{$meth(...t){return Sk.misceval.chain(this.set$intersection_multi(...t),(t=>(this.swap$bodies(t),Sk.builtin.none.none$)))},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the intersection of itself and another."},isdisjoint:{$meth(t){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(this.sq$contains(t))return new Sk.misceval.Break(Sk.builtin.bool.false$)})),(t=>t||Sk.builtin.bool.true$))},$flags:{OneArg:!0},$textsig:null,$doc:"Return True if two sets have a null intersection."},issubset:{$meth(t){return Sk.builtin.checkAnySet(t)||(t=this.set$make_basetype(t)),Sk.misceval.chain(t,(t=>this.set$issubset(t)))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether another set contains this set."},issuperset:{$meth(t){return Sk.builtin.checkAnySet(t)||(t=this.set$make_basetype(t)),Sk.misceval.chain(t,(t=>t.set$issubset(this)))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether this set contains another set."},pop:{$meth(){if(0===this.get$size())throw new Sk.builtin.KeyError("pop from an empty set");return Sk.misceval.callsimArray(this.v.popitem,[this.v]).v[0]},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return an arbitrary set element.\nRaises KeyError if the set is empty."},remove:{$meth(t){const e=i(t);if(this.v.mp$lookup(e))return this.v.mp$ass_subscript(e),Sk.builtin.none.none$;throw new Sk.builtin.KeyError(t)},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set; it must be a member.\n\nIf the element is not a member, raise a KeyError."},symmetric_difference:{$meth(t){let e;return Sk.misceval.chain(this.set$make_basetype(t),(t=>(e=t,e.set$symmetric_diff_update(this))),(()=>e))},$flags:{OneArg:!0},$textsig:null,$doc:"Return the symmetric difference of two sets as a new set.\n\n(i.e. all elements that are in exactly one of the sets.)"},symmetric_difference_update:{$meth(t){return Sk.builtin.checkAnySet(t)||(t=this.set$make_basetype(t)),Sk.misceval.chain(t,(t=>this.set$symmetric_diff_update(t)),(()=>Sk.builtin.none.none$))},$flags:{OneArg:!0},$textsig:null,$doc:"Update a set with the symmetric difference of itself and another."},union:{$meth(...t){const e=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>e.set$update(t))),(()=>e))},$flags:{MinArgs:0},$textsig:null,$doc:"Return the union of sets as a new set.\n\n(i.e. all elements that are in either set.)"},update:{$meth(...t){return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>this.set$update(t))),(()=>Sk.builtin.none.none$))},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the union of itself and others."}},classmethods:Sk.generic.classGetItem,proto:Object.assign(t,{sk$asarray(){return this.v.sk$asarray()},get$size(){return this.v.sq$length()},set$add(t){this.v.mp$ass_subscript(t,!0)},set$make_basetype(t){return Sk.misceval.chain(Sk.misceval.arrayFromIterable(t,!0),(t=>new this.sk$builtinBase(t)))},set$discard(t){return this.v.pop$item(t)},set$clear(){this.v=new Sk.builtin.dict([])},set$copy(){const t=new this.sk$builtinBase;return t.v=this.v.dict$copy(),t},set$difference_update(t){return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.set$discard(t)}))},set$intersection(t){const e=new this.sk$builtinBase;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.sq$contains(t)&&e.set$add(t)})),(()=>e))},set$intersection_multi(...t){if(!t.length)return this.set$copy();let e=this;return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>Sk.misceval.chain(e.set$intersection(t),(t=>{e=t})))),(()=>e))},set$issubset(t){if(this.get$size()>t.get$size())return Sk.builtin.bool.false$;for(let e=this.tp$iter(),n=e.tp$iternext();void 0!==n;n=e.tp$iternext())if(!t.sq$contains(n))return Sk.builtin.bool.false$;return Sk.builtin.bool.true$},set$symmetric_diff_update(t){return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{void 0===this.set$discard(t)&&this.set$add(t)}))},set$update(t){return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.set$add(t)}))},swap$bodies(t){this.v=t.v}})}),Sk.exportSymbol("Sk.builtin.set",Sk.builtin.set),e=Sk.builtin.set.prototype,Sk.builtin.frozenset=Sk.abstr.buildNativeClass("frozenset",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.frozenset,"bad call to frozen set - must be called with 'new'");const e=[];for(let n=0;n empty frozenset object\nfrozenset(iterable) -> frozenset object\n\nBuild an immutable unordered collection of unique elements.",tp$hash(){let t=1927868237;const e=this.sk$asarray();t*=e.length+1;for(let n=0;nt.length?new Sk.builtin.frozenset(t):Sk.builtin.frozenset.$emptyset)))},$r:e.$r,tp$iter:e.tp$iter,tp$richcompare:e.tp$richcompare,nb$subtract:e.nb$subtract,nb$and:e.nb$and,nb$or:e.nb$or,nb$xor:e.nb$xor,sq$length:e.sq$length,sq$contains:e.sq$contains},methods:{copy:Object.assign({},e.copy.d$def,{$meth(){return this.constructor===this.sk$builtinBase?this:new Sk.builtin.frozenset(this.sk$asarray())}}),difference:e.difference.d$def,intersection:e.intersection.d$def,isdisjoint:e.isdisjoint.d$def,issubset:e.issubset.d$def,issuperset:e.issuperset.d$def,symmetric_difference:e.symmetric_difference.d$def,union:e.union.d$def},classmethods:Sk.generic.classGetItem,proto:Object.assign({$subtype_new(t,e){const n=new this.constructor;return Sk.misceval.chain(Sk.builtin.frozenset.prototype.tp$new(t),(t=>(n.v=t.v,n)))}},t)}),Sk.builtin.frozenset.$emptyset=new Sk.builtin.frozenset([]),Sk.exportSymbol("Sk.builtin.frozenset",Sk.builtin.frozenset);var s=Sk.abstr.buildIteratorClass("set_iterator",{constructor:function(t){this.$index=0,this.$seq=t.sk$asarray(),this.$orig=t},iternext:Sk.generic.iterNextWithArrayCheckSize,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}})},function(t,e){Sk.builtin.print=function(t,e){let n,[i,s,r]=Sk.abstr.copyKeywordsToNamedArgs("print",["sep","end","file","flush"],[],e);if(void 0===i||Sk.builtin.checkNone(i))i=" ";else{if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("sep must be None or a string, not "+Sk.abstr.typeName(i));i=i.$jsstr()}if(void 0===s||Sk.builtin.checkNone(s))s="\n";else{if(!Sk.builtin.checkString(s))throw new Sk.builtin.TypeError("end must be None or a string, not "+Sk.abstr.typeName(s));s=s.$jsstr()}if(void 0!==r&&!Sk.builtin.checkNone(r)&&(n=Sk.abstr.lookupSpecial(r,Sk.builtin.str.$write),void 0===n))throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(r)+"' object has no attribute 'write'");const o=new Sk.builtin.str(t.map((t=>new Sk.builtin.str(t).toString())).join(i)+s);if(void 0===n)return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(t=>(n=Sk.abstr.lookupSpecial(t.$d.stdout,Sk.builtin.str.$write))&&Sk.misceval.callsimOrSuspendArray(n,[o])));Sk.misceval.callsimArray(n,[o])},Sk.builtin.print.co_fastcall=1},function(t,e){Sk.builtin.module=Sk.abstr.buildNativeClass("module",{constructor:function(){this.$d={}},slots:{tp$doc:"Create a module object.\n\nThe name must be a string; the optional doc argument can have any type.",tp$getattr(t,e){var n=this.$d[t.$mangled];if(void 0!==n)return n;if(void 0!==(n=this.ob$type.$typeLookup(t))){const t=n.tp$descr_get;return t?t.call(n,this,this.ob$type,e):n}const i=this.$d.__getattr__;return void 0!==i?(n=Sk.misceval.tryCatch((()=>Sk.misceval.callsimOrSuspendArray(i,[t])),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t})),e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)):void 0},tp$setattr:Sk.generic.setAttr,tp$new:Sk.generic.new,tp$init(t,e){const[n,i]=Sk.abstr.copyKeywordsToNamedArgs("module",["name","doc"],t,e,[Sk.builtin.none.none$]);Sk.builtin.pyCheckType("module","string",n),this.init$dict(n,i)},$r(){let t=this.get$name();if(void 0!==t){var e=this.get$mod_reprf();if(void 0!==e)return Sk.misceval.callsimOrSuspendArray(e,[this])}return t=void 0===t?"'?'":t,e=void 0===(e=this.from$file())?this.empty_or$loader():e,new Sk.builtin.str("")}},getsets:{__dict__:{$get(){return new Sk.builtin.mappingproxy(this.$d)}}},methods:{__dir__:{$meth(){const t=this.tp$getattr(Sk.builtin.str.$dict);if(!Sk.builtin.checkMapping(t))throw new Sk.builtin.TypeError("__dict__ is not a dictionary");const e=t.mp$lookup(Sk.builtin.str.$dir);return void 0!==e?Sk.misceval.callsimOrSuspendArray(e,[]):new Sk.builtin.list(Sk.misceval.arrayFromIterable(t))},$flags:{NoArgs:!0},$doc:"__dir__() -> list\nspecialized dir() implementation"}},proto:{sk$hasDict:!0,init$dict(t,e){this.$d.__name__=t,this.$d.__doc__=e,this.$d.__package__=Sk.builtin.none.none$,this.$d.__spec__=Sk.builtin.none.none$,this.$d.__loader__=Sk.builtin.none.none$},sk$attrError(){let t=this.get$name();return t=void 0===t?"module":"module "+t,this.$initializing&&(t="(most likely due to a circular import) partially initialized "+t),t},get$name(){const t=this.tp$getattr(Sk.builtin.str.$name);return t&&Sk.misceval.objectRepr(t)},from$file(){const t=this.tp$getattr(Sk.builtin.str.$file);return t&&" from "+Sk.misceval.objectRepr(t)},empty_or$loader(){if(this.$js&&this.$js.includes("$builtinmodule"))return" (built-in)";const t=this.tp$getattr(Sk.builtin.str.$loader);return void 0===t||Sk.builtin.checkNone(t)?"":" ("+Sk.misceval.objectRepr(t)+")"},get$mod_reprf(){const t=this.tp$getattr(Sk.builtin.str.$loader);return t&&t.tp$getattr(this.str$mod_repr)},str$mod_repr:new Sk.builtin.str("module_repr")}}),Sk.exportSymbol("Sk.builtin.module",Sk.builtin.module)},function(t,e){Sk.builtin.structseq_types={},Sk.builtin.make_structseq=function(t,e,n,i,s){i=void 0===i?{}:i,s=void 0===s?null:s;const r=t+"."+e,o=[],a={};Object.keys(n).forEach(((t,e)=>{o.push(t),a[t]={$get(){return this.v[e]},$doc:n[t]}}));const l=o.length;let u=l;Object.keys(i).forEach(((t,e)=>{a[t]={$get(){return this.$hidden[e]||Sk.builtin.none.none$},$doc:i[t]},u++}));var c=Sk.abstr.buildNativeClass(r,{constructor:function(t,e){Sk.asserts.assert(this instanceof c),Sk.builtin.tuple.call(this,t),this.$hidden=e||[]},base:Sk.builtin.tuple,slots:{tp$new(t,e){if(Sk.abstr.checkOneArg(r,t,e),(t=Sk.misceval.arrayFromIterable(t[0])).lengthu)throw new Sk.builtin.TypeError(r+"() takes an at most "+u+"-sequence ("+t.length+"-sequence given)");return new c(t.slice(0,l),t.slice(l))},tp$doc:s||Sk.builtin.none.none$,$r(){var t;if(0===this.v.length)return new Sk.builtin.str(r+"()");var e=[];for(t=0;t")}},iternext(t,e){var n=this;if(this.gi$running)throw new Sk.builtin.ValueError("generator already executing");return this.gi$running=!0,void 0===e&&(e=Sk.builtin.none.none$),this.gi$sentvalue=e,e=[this],this.func_closure&&e.push(this.func_closure),function e(i){if(i instanceof Sk.misceval.Suspension){if(t)return new Sk.misceval.Suspension(e,i);i=Sk.misceval.retryOptionalSuspensionOrThrow(i)}if(n.gi$running=!1,Sk.asserts.assert(void 0!==i),Array.isArray(i))return n.gi$resumeat=i[0],i[1];n.gi$ret=i}(this.func_code.apply(this.func_globals,e))},methods:{send:{$meth(t){return Sk.misceval.chain(this.tp$iternext(!0,t),(t=>{if(void 0===t)throw void 0!==(t=this.gi$ret)&&t!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(t):new Sk.builtin.StopIteration;return t}))},$flags:{OneArg:!0},$doc:"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration."}}}),Sk.exportSymbol("Sk.builtin.generator",Sk.builtin.generator),Sk.builtin.makeGenerator=function(t,e){var n,i=new Sk.builtin.generator(null,null,null);for(n in i.tp$iternext=t,e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i},Sk.exportSymbol("Sk.builtin.makeGenerator",Sk.builtin.makeGenerator)},function(t,e){Sk.builtin.file=function(t,e,n){var i;if(!(this instanceof Sk.builtin.file))return new Sk.builtin.file(t,e,n);if(this.mode=e,this.name=Sk.ffi.remapToJs(t),this.closed=!1,"/dev/stdout"===this.name)this.data$=Sk.builtin.none.none$,this.fileno=1;else if("/dev/stdin"===this.name)this.fileno=0;else if("/dev/stderr"===this.name)this.fileno=2;else{if(Sk.inBrowser)if(this.fileno=10,null==(n=document.getElementById(t.v))){if("w"!=e.v&&"a"!=e.v)throw new Sk.builtin.IOError("[Errno 2] No such file or directory: '"+t.v+"'");this.data$=""}else"textarea"==n.nodeName.toLowerCase()?this.data$=n.value:this.data$=n.textContent;else this.fileno=11,this.data$=Sk.read(t.v);for(i in this.lineList=this.data$.split("\n"),this.lineList=this.lineList.slice(0,-1),this.lineList)this.lineList[i]+="\n";this.currentLine=0}return this.pos$=0,Sk.fileopen&&10<=this.fileno&&Sk.fileopen(this),this},Sk.abstr.setUpInheritance("file",Sk.builtin.file,Sk.builtin.object),Sk.abstr.setUpBuiltinMro(Sk.builtin.file),Sk.builtin.file.prototype.$r=function(){return new Sk.builtin.str("<"+(this.closed?"closed":"open")+"file '"+this.name+"', mode '"+Sk.ffi.remapToJs(this.mode)+"'>")},Sk.builtin.file.prototype.tp$iter=function(){var t={tp$iter:function(){return t},$obj:this,$index:this.currentLine,$lines:this.lineList,tp$iternext:function(){if(!(t.$index>=t.$lines.length))return new Sk.builtin.str(t.$lines[t.$index++])}};return t},Sk.abstr.setUpSlots(Sk.builtin.file),Sk.builtin.file.prototype.__enter__=new Sk.builtin.func((function(t){return t})),Sk.builtin.file.prototype.__exit__=new Sk.builtin.func((function(t){return Sk.misceval.callsimArray(Sk.builtin.file.prototype.close,[t])})),Sk.builtin.file.prototype.close=new Sk.builtin.func((function(t){return t.closed=!0,Sk.builtin.none.none$})),Sk.builtin.file.prototype.flush=new Sk.builtin.func((function(t){})),Sk.builtin.file.prototype.fileno=new Sk.builtin.func((function(t){return this.fileno})),Sk.builtin.file.prototype.isatty=new Sk.builtin.func((function(t){return!1})),Sk.builtin.file.prototype.read=new Sk.builtin.func((function(t,e){var n=t.data$.length;if(t.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var i=void 0===e?n:Sk.ffi.remapToJs(e);return i=new Sk.builtin.str(t.data$.substr(t.pos$,i)),t.pos$=void 0===e?n:t.pos$+Sk.ffi.remapToJs(e),t.pos$>=n&&(t.pos$=n),i})),Sk.builtin.file.$readline=function(t,e,n){if(0===t.fileno){if(t=Sk.ffi.remapToJs(n),(t=Sk.inputfun(t||""))instanceof Promise||t&&"function"==typeof t.then){var i=new Sk.misceval.Suspension;return i.resume=function(){if(i.data.error)throw i.data.error;return new Sk.builtin.str(i.data.result)},i.data={type:"Sk.promise",promise:t},i}return new Sk.builtin.str(t)}return e="",t.currentLinen(t,e))));if("object"===i){if((i=t.constructor)===Object&&Object.getPrototypeOf(t)===c||void 0===i)return e.dictHook?e.dictHook(t):l(t,e);if(i===Uint8Array)return new Sk.builtin.bytes(t);if(i===Set)return a(t,e);if(i===Map){const i=new Sk.builtin.dict;return t.forEach(((t,s)=>{i.mp$ass_subscript(n(s,e),n(t,e))})),i}return i===Sk.misceval.Suspension?t:e.proxyHook?e.proxyHook(t):u(t)}if(e.unhandledHook)return e.unhandledHook(t);Sk.asserts.fail("unhandled remap case of type "+i)}function i(t,e){if(null==t)return t;const n=t.valueOf();if(null===n)return n;const o=typeof n;return e=e||{},"string"===o?e.stringHook?e.stringHook(n):n:"boolean"===o?n:"number"===o?e.numberHook?e.numberHook(n,t):n:JSBI.__isBigInt(n)?e.bigintHook?e.bigintHook(n,t):n:Array.isArray(n)?e.arrayHook?e.arrayHook(n,t):n.map((t=>i(t,e))):n.sk$object?t instanceof Sk.builtin.dict?e.dictHook?e.dictHook(t):r(t,e):t instanceof Sk.builtin.set?e.setHook?e.setHook(t):new Set(s(t,e)):e.unhandledHook?e.unhandledHook(t):void 0:"object"===o?e.objectHook?e.objectHook(n,t):n:"function"===o?e.funcHook?e.funcHook(n,t):n:void Sk.asserts.fail("unhandled type "+o)}function s(t,e){return Array.from(t,(t=>i(t,e)))}function r(t,e){const n={};return t.$items().forEach((t=>{var[s,r]=t;n[s.valueOf()]=i(r,e)})),n}function o(t){return Number.isInteger(t)?Math.abs(t)n(t,e))))}function l(t,e){const i=new Sk.builtin.dict;return Object.entries(t).forEach((t=>{var[s,r]=t;i.mp$ass_subscript(new Sk.builtin.str(s),n(r,e))})),i}function u(t,e){if(null==t)return Sk.builtin.none.none$;var i=typeof t;if("object"!==i&&"function"!==i)return n(t);if(e=e||{},i=_.get(t)){if(e.bound===i.$bound)return i;e.name||(e.name=i.$name)}return e=new g(t,e),_.set(t,e),e}Sk.ffi={remapToPy:n,remapToJs:i,toPy:n,toJs:i,isTrue:function(t){return null!=t&&t.nb$bool?t.nb$bool():t.sq$length?0!==t.sq$length():!!t},toJsString:function(t){return String(t)},toJsNumber:function(t){return Number(t)},toJsArray:s,toJsHashMap:r,toPyDict:l,toPyFloat:function(t){return new Sk.builtin.float_(Number(t))},toPyInt:function(t){if("number"==typeof t)return t=Math.trunc(t),Math.abs(t)n(t,e))))},toPyTuple:function(t,e){return new Sk.builtin.tuple(Array.from(t,(t=>n(t,e))))},toPySet:a,numberToPy:o,proxy:u};const c=Object.prototype,p=Function.prototype,h=/^-?\d+$/,_=new WeakMap,d={dictHook:t=>u(t),unhandledHook:t=>String(t)},f=(t,e)=>({dictHook:t=>u(t),funcHook:n=>u(n,{bound:t,name:e}),unhandledHook:t=>String(t)}),m={unhandledHook:t=>{var e=_.get(t);if(e)return e;if(e={v:t,$isPyWrapped:!0,unwrap:()=>t},void 0===t.tp$call)return _.set(t,e),e;const s=(...e)=>{e=e.map((t=>n(t,d)));let s=Sk.misceval.tryCatch((()=>Sk.misceval.chain(t.tp$call(e),(t=>i(t,m)))),(t=>{if(!Sk.uncaughtException)throw t;Sk.uncaughtException(t)}));for(;s instanceof Sk.misceval.Suspension;){if(!s.optional)return Sk.misceval.asyncToPromise((()=>s));s=s.resume()}return s};return _.set(t,Object.assign(s,e)),s}},g=Sk.abstr.buildNativeClass("Proxy",{constructor:function(t,e){if(void 0===t)throw new Sk.builtin.TypeError("Proxy cannot be called from python");this.js$wrapped=t,this.$module=null,this.$methods=Object.create(null),this.in$repr=!1,e||(e={}),Object.defineProperties(this,this.memoized$slots),"function"==typeof t?(this.is$callable=!0,this.$bound=e.bound,this.$name=e.name||t.name||"(native JS)",2>=this.$name.length&&(this.$name+=" (native JS)")):(this.is$callable=!1,delete this.is$type,this.is$type=!1,this.$name=e.name)},slots:{tp$doc:"proxy for a javascript object",tp$hash(){return Sk.builtin.object.prototype.tp$hash.call(this.js$wrapped)},tp$getattr(t){return this.$lookup(t)||Sk.generic.getAttr.call(this,t)},tp$setattr(t,e){t=t.toString(),void 0===e?delete this.js$wrapped[t]:this.js$wrapped[t]=i(e,m)},$r(){if(this.is$callable){if(this.is$type||!this.$bound)return new Sk.builtin.str("<"+this.tp$name+" '"+this.$name+"'>");var t=Sk.misceval.objectRepr(u(this.$bound));return new Sk.builtin.str("")}return this.js$proto===c?this.in$repr?new Sk.builtin.str("{...}"):(this.in$repr=!0,t=Object.entries(this.js$wrapped).map((t=>{var[e,i]=t;return i=n(i,f(this.js$wrapped,e)),"'"+e+"': "+Sk.misceval.objectRepr(i)})),t=new Sk.builtin.str("proxyobject({"+t.join(", ")+"})"),this.in$repr=!1,t):new Sk.builtin.str("<"+this.tp$name+" "+("proxyobject"===this.tp$name?"object":"proxyobject")+">")},tp$as_sequence_or_mapping:!0,mp$subscript(t){const e=this.$lookup(t);if(void 0===e)throw new Sk.builtin.LookupError(t);return e},mp$ass_subscript(t,e){return this.tp$setattr(t,e)},sq$contains(t){return i(t)in this.js$wrapped},ob$eq(t){return this.js$wrapped===t.js$wrapped},ob$ne(t){return this.js$wrapped!==t.js$wrapped},tp$as_number:!0,nb$bool(){return this.js$proto===c?0new Sk.builtin.str(t)))))},$flags:{NoArgs:!0}},__new__:{$meth(t,...e){if(!(t instanceof g))throw new Sk.builtin.TypeError("expected a proxy object as the first argument not "+Sk.abstr.typeName(t));try{return t.$new(e)}catch(e){if(e instanceof TypeError&&e.message.includes("not a constructor"))throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(t)+" is not a constructor");throw e}},$flags:{MinArgs:1}},__call__:{$meth(t,e){if("function"!=typeof this.js$wrapped)throw new Sk.builtin.TypeError("'"+this.tp$name+"' object is not callable");return this.$call(t,e)},$flags:{FastCall:!0}},keys:{$meth(){return new Sk.builtin.list(Object.keys(this.js$wrapped).map((t=>new Sk.builtin.str(t))))},$flags:{NoArgs:!0}},get:{$meth(t,e){return this.$lookup(t)||e||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2}}},getsets:{__class__:{$get(){return n(this.js$wrapped.constructor,d)},$set(){throw new Sk.builtin.TypeError("not writable")}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(t){this.$module=t}}},proto:{valueOf(){return this.js$wrapped},$new(t,e){return Sk.abstr.checkNoKwargs("__new__",e),n(new this.js$wrapped(...t.map((t=>i(t,m)))),{dictHook:t=>u(t),proxyHook:t=>u(t,{name:this.$name})})},$call(t,e){return Sk.abstr.checkNoKwargs("__call__",e),Sk.misceval.chain(this.js$wrapped.apply(this.$bound,t.map((t=>i(t,m)))),(t=>t instanceof Promise?Sk.misceval.promiseToSuspension(t):t),(t=>n(t,d)))},$lookup(t){t=t.toString();const e=this.js$wrapped[t];return void 0!==e?n(e,f(this.js$wrapped,t)):t in this.js$wrapped?Sk.builtin.none.none$:void 0},memoized$slots:{js$proto:{configurable:!0,get(){return delete this.js$proto,this.js$proto=Object.getPrototypeOf(this.js$wrapped)}},$dir:{configurable:!0,get(){const t=[];let e=this.js$wrapped;for(;null!=e&&e!==c&&e!==p;)t.push(...Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return new Set(t)}},tp$iter:{configurable:!0,get(){return delete this.tp$iter,void 0!==this.js$wrapped[Symbol.iterator]?this.tp$iter=()=>u(this.js$wrapped[Symbol.iterator]()):this.tp$iter=()=>{throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(this)+" is not iterable")}}},tp$iternext:{configurable:!0,get(){if(delete this.tp$iternext,void 0!==this.js$wrapped.next)return this.tp$iternext=()=>{const t=this.js$wrapped.next().value;return t&&n(t,d)}}},sq$length:{configurable:!0,get(){if(delete this.sq$length,!this.is$callable&&void 0!==this.js$wrapped.length)return this.sq$length=()=>this.js$wrapped.length}},tp$call:{configurable:!0,get(){if(delete this.tp$call,this.is$callable)return this.tp$call=this.is$type?this.$new:this.$call}},tp$name:{configurable:!0,get(){if(delete this.tp$name,this.is$callable)return this.tp$name=this.is$type?"proxyclass":this.$bound?"proxymethod":"proxyfunction";{const t=this.js$wrapped;let e=t[Symbol.toStringTag]||this.$name||t.constructor&&t.constructor.name||"proxyobject";return"Object"===e?e="proxyobject":2>=e.length&&(e=u(t.constructor).$name),this.tp$name=e}}},is$type:{configurable:!0,get(){delete this.is$type;var t=this.js$wrapped;const e=t.prototype;if(void 0===e)return this.is$type=t===Sk.global.Proxy;{const e=S.call(t).match(b);t=null===e?null:"class"===e[0]||!k.has(t)}return!0===t?this.is$type=!0:!1===t?this.is$type=!1:1e;r+=n)s.push(new Sk.builtin.int_(r));else{if(t=r=JSBI.BigInt(t),n=JSBI.BigInt(n),e=JSBI.BigInt(e),JSBI.greaterThan(n,JSBI.__ZERO))for(;JSBI.lessThan(r,e);)s.push(new Sk.builtin.int_(i(r))),r=JSBI.add(r,n);else for(;JSBI.greaterThan(r,e);)s.push(new Sk.builtin.int_(i(r))),r=JSBI.add(r,n);t=i(t),n=i(n),e=i(e)}return new Sk.builtin.range_(t,e,n,s)}function i(t){return JSBI.lessThan(t,JSBI.__MAX_SAFE)&&JSBI.greaterThan(t,JSBI.__MIN_SAFE)?JSBI.toNumber(t):t}Sk.builtin.range_=Sk.abstr.buildNativeClass("range",{constructor:function(t,e,n,i){this.start=t,this.stop=e,this.step=n,this.v=i},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"range(stop) -> range object\nrange(start, stop[, step]) -> range object\n\nReturn an object that produces a sequence of integers from start (inclusive)\nto stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.\nstart defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.\nThese are exactly the valid indices for a list of 4 elements.\nWhen step is given, it specifies the increment (or decrement).",tp$new:(t,e)=>(Sk.abstr.checkNoKwargs("range",e),Sk.abstr.checkArgsLen("range",t,1,3),n(t[0],t[1],t[2])),$r(){let t="range("+this.start+", "+this.stop;return 1!=this.step&&(t+=", "+this.step),new Sk.builtin.str(t+")")},tp$richcompare(t,e){return"Eq"!==e&&"NotEq"!==e||t.ob$type!==Sk.builtin.range_?Sk.builtin.NotImplemented.NotImplemented$:(t=new Sk.builtin.list(t.v),new Sk.builtin.list(this.v).tp$richcompare(t,e))},tp$iter(){return new s(this)},nb$bool(){return 0!==this.v.length},sq$contains(t){const e=this.v;for(let n=0;n(t=Sk.misceval.asIndexSized(t))&&(t=this.v.length+t),0>t||t>=this.v.length)throw new Sk.builtin.IndexError("range object index out of range");return this.v[t]}if(t.constructor===Sk.builtin.slice){const e=[],n=this.v;t.sssiter$(n.length,(t=>{e.push(n[t])}));let{start:i,stop:s,step:r}=t.slice$indices(n.length);return i=Sk.misceval.asIndex(n[i])||this.start,s=Sk.misceval.asIndex(n[s])||this.stop,r="number"==typeof this.step?r*this.step:JSBI.multiply(this.step,JSBI.BigInt(r)),new Sk.builtin.range_(i,s,r,e)}throw new Sk.builtin.TypeError("range indices must be integers or slices, not "+Sk.abstr.typeName(t))}},getsets:{start:{$get(){return new Sk.builtin.int_(this.start)}},step:{$get(){return new Sk.builtin.int_(this.step)}},stop:{$get(){return new Sk.builtin.int_(this.stop)}}},methods:{__reversed__:{$meth(){return new r(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator."},count:{$meth(t){let e=0;for(let n=0;n integer -- return number of occurrences of value"},index:{$meth(t){for(let e=0;e integer -- return index of value.\nRaise ValueError if the value is not present."}},proto:{sk$asarray(){return this.v.slice(0)}},flags:{sk$unacceptableBase:!0}});var s=Sk.abstr.buildIteratorClass("range_iterator",{constructor:function(t){this.$index=0,this.$seq=t.v},iternext(){return this.$seq[this.$index++]},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),r=Sk.abstr.buildIteratorClass("range_reverseiterator",{constructor:function(t){this.$seq=t.v,this.$index=this.$seq.length-1},iternext(){return this.$seq[this.$index--]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}});Sk.builtin.range=Sk.builtin.xrange=function(t,e,i){return t=n(t,e,i),new Sk.builtin.list(t.v)}},function(t,e){Sk.builtin.enumerate=Sk.abstr.buildIteratorClass("enumerate",{constructor:function(t,e){if(!(this instanceof Sk.builtin.enumerate))throw TypeError("Failed to construct 'enumerate': Please use the 'new' operator");return this.$iterable=t,this.$index=e,this},iternext(t){const e=Sk.misceval.chain(this.$iterable.tp$iternext(t),(t=>{if(void 0!==t)return new Sk.builtin.tuple([new Sk.builtin.int_(this.$index++),t])}));return t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},slots:{tp$doc:"Return an enumerate object.\n\n iterable\n an object supporting iteration\n\nThe enumerate object yields pairs containing a count (from start, which\ndefaults to zero) and a value yielded by the iterable argument.\n\nenumerate is useful for obtaining an indexed list:\n (0, seq[0]), (1, seq[1]), (2, seq[2]), ...",tp$new(t,e){let[n,i]=Sk.abstr.copyKeywordsToNamedArgs("enumerate",["iterable","start"],t,e,[new Sk.builtin.int_(0)]);return n=Sk.abstr.iter(n),i=Sk.misceval.asIndexOrThrow(i),this===Sk.builtin.enumerate.prototype?new Sk.builtin.enumerate(n,i):(t=new this.constructor,Sk.builtin.enumerate.call(t,n,i),t)}},classmethods:Sk.generic.classGetItem}),Sk.exportSymbol("Sk.builtin.enumerate",Sk.builtin.enumerate)},function(t,e){Sk.builtin.filter_=Sk.abstr.buildIteratorClass("filter",{constructor:function(t,e){this.$func=t,this.$iterable=e},iternext(t){const e=Sk.misceval.iterFor(this.$iterable,(t=>Sk.misceval.chain(this.check$filter(t),(t=>t?new Sk.misceval.Break(t):void 0))));return t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},slots:{tp$doc:"Return an iterator yielding those items of iterable for which function(item)\nis true. If function is None, return the items that are true.",tp$new(t,e){let[n,i]=Sk.abstr.copyKeywordsToNamedArgs("filter",["predicate","iterable"],t,e,[]);return n=Sk.builtin.checkNone(n)?null:n,i=Sk.abstr.iter(i),this===Sk.builtin.filter_.prototype?new Sk.builtin.filter_(n,i):(t=new this.constructor,Sk.builtin.filter_.call(t,n,i),t)}},proto:{check$filter(t){let e;return e=null===this.$func?t:Sk.misceval.callsimOrSuspendArray(this.$func,[t]),Sk.misceval.chain(e,(e=>Sk.misceval.isTrue(e)?t:void 0))}}}),Sk.exportSymbol("Sk.builtin.filter_",Sk.builtin.filter_)},function(t,e){Sk.builtin.map_=Sk.abstr.buildIteratorClass("map",{constructor:function(t,e){this.$func=t,this.$iters=e},iternext(t){const e=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,(n=>Sk.misceval.chain(n.tp$iternext(t),(t=>{if(void 0===t)return new Sk.misceval.Break(!0);e.push(t)})))),(t=>t?void 0:Sk.misceval.callsimOrSuspendArray(this.$func,e)));return t?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:"map(func, *iterables) --\x3e map object\n\nMake an iterator that computes the function using arguments from\neach of the iterables. Stops when the shortest iterable is exhausted.",tp$new(t,e){this===Sk.builtin.map_.prototype&&Sk.abstr.checkNoKwargs("map",e),Sk.abstr.checkArgsLen("map",t,2),e=t[0];const n=[];for(let e=1;ethis.$idx)){var e=Sk.misceval.tryCatch((()=>Sk.abstr.objectGetItem(this.$seq,new Sk.builtin.int_(this.$idx--),t)),(t=>{if(!(t instanceof Sk.builtin.IndexError))throw t;this.$idx=-1}));return t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)}},slots:{tp$doc:"Return a reverse iterator over the values of the given sequence.",tp$new(t,e){if(this===Sk.builtin.reversed.prototype&&Sk.abstr.checkNoKwargs("reversed",e),Sk.abstr.checkArgsLen("reversed",t,1,1),t=t[0],void 0!==(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$reversed)))return Sk.misceval.callsimArray(e,[]);if(!Sk.builtin.checkSequence(t)||void 0===Sk.abstr.lookupSpecial(t,Sk.builtin.str.$len))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not a sequence");return this===Sk.builtin.reversed.prototype?new Sk.builtin.reversed(t):(e=new this.constructor,Sk.builtin.reversed.call(e,t),e)}},methods:{__length_hint__:{$meth:function(){return 0<=this.$idx?new Sk.builtin.int_(this.$idx):new Sk.builtin.int_(0)},$flags:{NoArgs:!0}}}})},function(t,e){Sk.builtin.zip_=Sk.abstr.buildIteratorClass("zip",{constructor:function(t){this.$iters=t,0===t.length&&(this.tp$iternext=()=>{})},iternext(t){const e=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,(n=>Sk.misceval.chain(n.tp$iternext(t),(t=>{if(void 0===t)return new Sk.misceval.Break(!0);e.push(t)})))),(t=>t?void 0:new Sk.builtin.tuple(e)));return t?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:"zip(iter1 [,iter2 [...]]) --\x3e zip object\n\nReturn a zip object whose .__next__() method returns a tuple where\nthe i-th element comes from the i-th iterable argument. The .__next__()\nmethod continues until the shortest iterable in the argument sequence\nis exhausted and then it raises StopIteration.",tp$new(t,e){this===Sk.builtin.zip_.prototype&&Sk.abstr.checkNoKwargs("zip",e),e=[];for(let n=0;n":n.T_RARROW,".":n.T_DOT,"...":n.T_ELLIPSIS,"/":n.T_SLASH,"//":n.T_DOUBLESLASH,"//=":n.T_DOUBLESLASHEQUAL,"/=":n.T_SLASHEQUAL,":":n.T_COLON,";":n.T_SEMI,"<":n.T_LESS,"<<":n.T_LEFTSHIFT,"<<=":n.T_LEFTSHIFTEQUAL,"<=":n.T_LESSEQUAL,"=":n.T_EQUAL,"==":n.T_EQEQUAL,">":n.T_GREATER,">=":n.T_GREATEREQUAL,">>":n.T_RIGHTSHIFT,">>=":n.T_RIGHTSHIFTEQUAL,"@":n.T_AT,"@=":n.T_ATEQUAL,"[":n.T_LSQB,"]":n.T_RSQB,"^":n.T_CIRCUMFLEX,"^=":n.T_CIRCUMFLEXEQUAL,"{":n.T_LBRACE,"|":n.T_VBAR,"|=":n.T_VBAREQUAL,"}":n.T_RBRACE,"~":n.T_TILDE};var i={};!function(){for(var t in n)i[n[t]]=t}(),["tok_name","ISTERMINAL","ISNONTERMINAL","ISEOF"].concat(Object.keys(i).map((function(t){return i[t]}))),Sk.token={},Sk.token.tokens=n,Sk.token.tok_name=i,Sk.token.EXACT_TOKEN_TYPES=t,Sk.token.ISTERMINAL=function(t){return t=n.T_NT_OFFSET},Sk.token.ISEOF=function(t){return t==n.T_ENDMARKER},Sk.exportSymbol("Sk.token",Sk.token),Sk.exportSymbol("Sk.token.tokens",Sk.token.tokens),Sk.exportSymbol("Sk.token.tok_name",Sk.token.tok_name),Sk.exportSymbol("Sk.token.EXACT_TOKEN_TYPES"),Sk.exportSymbol("Sk.token.ISTERMINAL",Sk.token.ISTERMINAL),Sk.exportSymbol("Sk.token.ISNONTERMINAL",Sk.token.ISNONTERMINAL),Sk.exportSymbol("Sk.token.ISEOF",Sk.token.ISEOF)},function(t,e){Sk.OpMap={"(":Sk.token.tokens.T_LPAR,")":Sk.token.tokens.T_RPAR,"[":Sk.token.tokens.T_LSQB,"]":Sk.token.tokens.T_RSQB,":":Sk.token.tokens.T_COLON,",":Sk.token.tokens.T_COMMA,";":Sk.token.tokens.T_SEMI,"+":Sk.token.tokens.T_PLUS,"-":Sk.token.tokens.T_MINUS,"*":Sk.token.tokens.T_STAR,"/":Sk.token.tokens.T_SLASH,"|":Sk.token.tokens.T_VBAR,"&":Sk.token.tokens.T_AMPER,"<":Sk.token.tokens.T_LESS,">":Sk.token.tokens.T_GREATER,"=":Sk.token.tokens.T_EQUAL,".":Sk.token.tokens.T_DOT,"%":Sk.token.tokens.T_PERCENT,"`":Sk.token.tokens.T_BACKQUOTE,"{":Sk.token.tokens.T_LBRACE,"}":Sk.token.tokens.T_RBRACE,"@":Sk.token.tokens.T_AT,"@=":Sk.token.tokens.T_ATEQUAL,"==":Sk.token.tokens.T_EQEQUAL,"!=":Sk.token.tokens.T_NOTEQUAL,"<>":Sk.token.tokens.T_NOTEQUAL,"<=":Sk.token.tokens.T_LESSEQUAL,">=":Sk.token.tokens.T_GREATEREQUAL,"~":Sk.token.tokens.T_TILDE,"^":Sk.token.tokens.T_CIRCUMFLEX,"<<":Sk.token.tokens.T_LEFTSHIFT,">>":Sk.token.tokens.T_RIGHTSHIFT,"**":Sk.token.tokens.T_DOUBLESTAR,"+=":Sk.token.tokens.T_PLUSEQUAL,"-=":Sk.token.tokens.T_MINEQUAL,"*=":Sk.token.tokens.T_STAREQUAL,"/=":Sk.token.tokens.T_SLASHEQUAL,"%=":Sk.token.tokens.T_PERCENTEQUAL,"&=":Sk.token.tokens.T_AMPEREQUAL,"|=":Sk.token.tokens.T_VBAREQUAL,"^=":Sk.token.tokens.T_CIRCUMFLEXEQUAL,"<<=":Sk.token.tokens.T_LEFTSHIFTEQUAL,">>=":Sk.token.tokens.T_RIGHTSHIFTEQUAL,"**=":Sk.token.tokens.T_DOUBLESTAREQUAL,"//":Sk.token.tokens.T_DOUBLESLASH,"//=":Sk.token.tokens.T_DOUBLESLASHEQUAL,"->":Sk.token.tokens.T_RARROW,"...":Sk.token.tokens.T_ELLIPSIS},Sk.ParseTables={sym:{and_expr:257,and_test:258,annassign:259,arglist:260,argument:261,arith_expr:262,assert_stmt:263,async_funcdef:264,async_stmt:265,atom:266,atom_expr:267,augassign:268,break_stmt:269,classdef:270,comp_for:271,comp_if:272,comp_iter:273,comp_op:274,comparison:275,compound_stmt:276,continue_stmt:277,debugger_stmt:278,decorated:279,decorator:280,decorators:281,del_stmt:282,dictorsetmaker:283,dotted_as_name:284,dotted_as_names:285,dotted_name:286,encoding_decl:287,eval_input:288,except_clause:289,expr:290,expr_stmt:291,exprlist:292,factor:293,file_input:294,flow_stmt:295,for_stmt:296,funcdef:297,global_stmt:298,if_stmt:299,import_as_name:300,import_as_names:301,import_from:302,import_name:303,import_stmt:304,lambdef:305,lambdef_nocond:306,nonlocal_stmt:307,not_test:308,or_test:309,parameters:310,pass_stmt:311,power:312,print_stmt:313,raise_stmt:314,return_stmt:315,shift_expr:316,simple_stmt:317,single_input:256,sliceop:318,small_stmt:319,star_expr:320,stmt:321,subscript:322,subscriptlist:323,suite:324,term:325,test:326,test_nocond:327,testlist:328,testlist_comp:329,testlist_star_expr:330,tfpdef:331,trailer:332,try_stmt:333,typedargslist:334,varargslist:335,vfpdef:336,while_stmt:337,with_item:338,with_stmt:339,xor_expr:340,yield_arg:341,yield_expr:342,yield_stmt:343},number2symbol:{256:"single_input",257:"and_expr",258:"and_test",259:"annassign",260:"arglist",261:"argument",262:"arith_expr",263:"assert_stmt",264:"async_funcdef",265:"async_stmt",266:"atom",267:"atom_expr",268:"augassign",269:"break_stmt",270:"classdef",271:"comp_for",272:"comp_if",273:"comp_iter",274:"comp_op",275:"comparison",276:"compound_stmt",277:"continue_stmt",278:"debugger_stmt",279:"decorated",280:"decorator",281:"decorators",282:"del_stmt",283:"dictorsetmaker",284:"dotted_as_name",285:"dotted_as_names",286:"dotted_name",287:"encoding_decl",288:"eval_input",289:"except_clause",290:"expr",291:"expr_stmt",292:"exprlist",293:"factor",294:"file_input",295:"flow_stmt",296:"for_stmt",297:"funcdef",298:"global_stmt",299:"if_stmt",300:"import_as_name",301:"import_as_names",302:"import_from",303:"import_name",304:"import_stmt",305:"lambdef",306:"lambdef_nocond",307:"nonlocal_stmt",308:"not_test",309:"or_test",310:"parameters",311:"pass_stmt",312:"power",313:"print_stmt",314:"raise_stmt",315:"return_stmt",316:"shift_expr",317:"simple_stmt",318:"sliceop",319:"small_stmt",320:"star_expr",321:"stmt",322:"subscript",323:"subscriptlist",324:"suite",325:"term",326:"test",327:"test_nocond",328:"testlist",329:"testlist_comp",330:"testlist_star_expr",331:"tfpdef",332:"trailer",333:"try_stmt",334:"typedargslist",335:"varargslist",336:"vfpdef",337:"while_stmt",338:"with_item",339:"with_stmt",340:"xor_expr",341:"yield_arg",342:"yield_expr",343:"yield_stmt"},dfas:{256:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],257:[[[[44,1]],[[45,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],258:[[[[46,1]],[[47,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],259:[[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],{48:1}],260:[[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],261:[[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],262:[[[[55,1]],[[30,0],[43,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],263:[[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],{24:1}],264:[[[[10,1]],[[56,2]],[[0,2]]],{10:1}],265:[[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],{10:1}],266:[[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,33:1,35:1,38:1}],267:[[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],268:[[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],{67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:1,75:1,76:1,77:1,78:1,79:1}],269:[[[[39,1]],[[0,1]]],{39:1}],270:[[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],{13:1}],271:[[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],{10:1,34:1}],272:[[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],{37:1}],273:[[[[87,1],[54,1]],[[0,1]]],{10:1,34:1,37:1}],274:[[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],{8:1,83:1,88:1,89:1,90:1,91:1,92:1,93:1,94:1}],275:[[[[95,1]],[[96,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],276:[[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],{4:1,10:1,13:1,20:1,21:1,34:1,37:1,41:1,42:1}],277:[[[[40,1]],[[0,1]]],{40:1}],278:[[[[17,1]],[[0,1]]],{17:1}],279:[[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],{41:1}],280:[[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],{41:1}],281:[[[[106,1]],[[106,1],[0,1]]],{41:1}],282:[[[[27,1]],[[82,2]],[[0,2]]],{27:1}],283:[[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],284:[[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],285:[[[[109,1]],[[52,0],[0,1]]],{25:1}],286:[[[[25,1]],[[110,0],[0,1]]],{25:1}],287:[[[[25,1]],[[0,1]]],{25:1}],288:[[[[111,1]],[[2,1],[112,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],289:[[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],{113:1}],290:[[[[114,1]],[[115,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],291:[[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],292:[[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],{6:1,7:1,9:1,11:1,12:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],293:[[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],294:[[[[2,0],[112,1],[121,0]],[[0,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1,112:1}],295:[[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],{5:1,23:1,31:1,39:1,40:1}],296:[[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],{34:1}],297:[[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],{4:1}],298:[[[[26,1]],[[25,2]],[[52,1],[0,2]]],{26:1}],299:[[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{37:1}],300:[[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],301:[[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],{25:1}],302:[[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],{36:1}],303:[[[[32,1]],[[133,2]],[[0,2]]],{32:1}],304:[[[[134,1],[135,1]],[[0,1]]],{32:1,36:1}],305:[[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],{14:1}],306:[[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],{14:1}],307:[[[[18,1]],[[25,2]],[[52,1],[0,2]]],{18:1}],308:[[[[8,1],[137,2]],[[46,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],309:[[[[138,1]],[[139,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],310:[[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],{35:1}],311:[[[[28,1]],[[0,1]]],{28:1}],312:[[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],313:[[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],{16:1}],314:[[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],{5:1}],315:[[[[23,1]],[[111,2],[0,1]],[[0,2]]],{23:1}],316:[[[[143,1]],[[144,0],[142,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],317:[[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],318:[[[[48,1]],[[49,2],[0,1]],[[0,2]]],{48:1}],319:[[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],320:[[[[15,1]],[[95,2]],[[0,2]]],{15:1}],321:[[[[1,1],[3,1]],[[0,1]]],{4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],322:[[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],323:[[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],324:[[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],{2:1,5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],325:[[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],326:[[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],327:[[[[165,1],[84,1]],[[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],328:[[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],329:[[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],330:[[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],331:[[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],{25:1}],332:[[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],{35:1,38:1,110:1}],333:[[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],{20:1}],334:[[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],335:[[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],336:[[[[25,1]],[[0,1]]],{25:1}],337:[[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{21:1}],338:[[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],339:[[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],{42:1}],340:[[[[172,1]],[[173,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],341:[[[[111,2],[36,1]],[[49,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,36:1,38:1,43:1}],342:[[[[31,1]],[[174,2],[0,1]],[[0,2]]],{31:1}],343:[[[[62,1]],[[0,1]]],{31:1}]},states:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],[[[44,1]],[[45,0],[0,1]]],[[[46,1]],[[47,0],[0,1]]],[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],[[[55,1]],[[30,0],[43,0],[0,1]]],[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],[[[10,1]],[[56,2]],[[0,2]]],[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],[[[39,1]],[[0,1]]],[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],[[[87,1],[54,1]],[[0,1]]],[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],[[[95,1]],[[96,0],[0,1]]],[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],[[[40,1]],[[0,1]]],[[[17,1]],[[0,1]]],[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],[[[106,1]],[[106,1],[0,1]]],[[[27,1]],[[82,2]],[[0,2]]],[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[109,1]],[[52,0],[0,1]]],[[[25,1]],[[110,0],[0,1]]],[[[25,1]],[[0,1]]],[[[111,1]],[[2,1],[112,2]],[[0,2]]],[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],[[[114,1]],[[115,0],[0,1]]],[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],[[[2,0],[112,1],[121,0]],[[0,1]]],[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],[[[26,1]],[[25,2]],[[52,1],[0,2]]],[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],[[[32,1]],[[133,2]],[[0,2]]],[[[134,1],[135,1]],[[0,1]]],[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],[[[18,1]],[[25,2]],[[52,1],[0,2]]],[[[8,1],[137,2]],[[46,2]],[[0,2]]],[[[138,1]],[[139,0],[0,1]]],[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],[[[28,1]],[[0,1]]],[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],[[[23,1]],[[111,2],[0,1]],[[0,2]]],[[[143,1]],[[144,0],[142,0],[0,1]]],[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],[[[48,1]],[[49,2],[0,1]],[[0,2]]],[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],[[[15,1]],[[95,2]],[[0,2]]],[[[1,1],[3,1]],[[0,1]]],[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],[[[165,1],[84,1]],[[0,1]]],[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[25,1]],[[0,1]]],[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],[[[172,1]],[[173,0],[0,1]]],[[[111,2],[36,1]],[[49,2]],[[0,2]]],[[[31,1]],[[174,2],[0,1]],[[0,2]]],[[[62,1]],[[0,1]]]],labels:[[0,"EMPTY"],[317,null],[4,null],[276,null],[1,"def"],[1,"raise"],[1,"True"],[3,null],[1,"not"],[1,"None"],[55,null],[2,null],[25,null],[1,"class"],[1,"lambda"],[16,null],[1,"print"],[1,"debugger"],[1,"nonlocal"],[52,null],[1,"try"],[1,"while"],[31,null],[1,"return"],[1,"assert"],[1,null],[1,"global"],[1,"del"],[1,"pass"],[54,null],[15,null],[1,"yield"],[1,"import"],[1,"False"],[1,"for"],[7,null],[1,"from"],[1,"if"],[9,null],[1,"break"],[1,"continue"],[49,null],[1,"with"],[14,null],[316,null],[19,null],[308,null],[1,"and"],[11,null],[326,null],[22,null],[261,null],[12,null],[35,null],[271,null],[325,null],[297,null],[339,null],[296,null],[26,null],[283,null],[8,null],[342,null],[329,null],[10,null],[266,null],[332,null],[45,null],[38,null],[40,null],[50,null],[46,null],[41,null],[42,null],[36,null],[43,null],[48,null],[44,null],[37,null],[39,null],[324,null],[260,null],[292,null],[1,"in"],[309,null],[273,null],[327,null],[272,null],[28,null],[21,null],[27,null],[29,null],[1,"is"],[30,null],[20,null],[290,null],[274,null],[333,null],[299,null],[270,null],[337,null],[279,null],[265,null],[281,null],[264,null],[286,null],[280,null],[320,null],[1,"as"],[284,null],[23,null],[328,null],[0,null],[1,"except"],[340,null],[18,null],[330,null],[268,null],[259,null],[312,null],[293,null],[321,null],[269,null],[277,null],[314,null],[315,null],[343,null],[1,"else"],[310,null],[51,null],[1,"elif"],[300,null],[301,null],[285,null],[303,null],[302,null],[335,null],[275,null],[258,null],[1,"or"],[334,null],[267,null],[34,null],[262,null],[33,null],[319,null],[13,null],[295,null],[263,null],[291,null],[311,null],[307,null],[313,null],[282,null],[298,null],[304,null],[278,null],[318,null],[322,null],[5,null],[6,null],[47,null],[17,null],[24,null],[305,null],[306,null],[323,null],[289,null],[1,"finally"],[331,null],[336,null],[338,null],[257,null],[32,null],[341,null]],keywords:{False:33,None:9,True:6,and:47,as:108,assert:24,break:39,class:13,continue:40,debugger:17,def:4,del:27,elif:130,else:127,except:113,finally:168,for:34,from:36,global:26,if:37,import:32,in:83,is:92,lambda:14,nonlocal:18,not:8,or:139,pass:28,print:16,raise:5,return:23,try:20,while:21,with:42,yield:31},tokens:{0:112,1:25,2:11,3:7,4:2,5:159,6:160,7:35,8:61,9:38,10:64,11:48,12:52,13:146,14:43,15:30,16:15,17:162,18:115,19:45,20:94,21:89,22:50,23:110,24:163,25:12,26:59,27:90,28:88,29:91,30:93,31:22,32:173,33:144,34:142,35:53,36:74,37:78,38:68,39:79,40:69,41:72,42:73,43:75,44:77,45:67,46:71,47:161,48:76,49:41,50:70,51:129,52:19,54:29,55:10},start:256}},function(t,e){function n(t,e){return this.filename=t,this.grammar=e,this.p_flags=0,this}n.FUTURE_PRINT_FUNCTION="print_function",n.FUTURE_UNICODE_LITERALS="unicode_literals",n.FUTURE_DIVISION="division",n.FUTURE_ABSOLUTE_IMPORT="absolute_import",n.FUTURE_WITH_STATEMENT="with_statement",n.FUTURE_NESTED_SCOPES="nested_scopes",n.FUTURE_GENERATORS="generators",n.CO_FUTURE_PRINT_FUNCTION=65536,n.CO_FUTURE_UNICODE_LITERALS=131072,n.CO_FUTURE_DIVISON=8192,n.CO_FUTURE_ABSOLUTE_IMPORT=16384,n.CO_FUTURE_WITH_STATEMENT=32768,n.prototype.setup=function(t){t=t||this.grammar.start,this.stack=[{dfa:this.grammar.dfas[t],state:0,node:{type:t,value:null,context:null,children:[]}}],this.used_names={}},n.prototype.addtoken=function(t,e,n){var i,s=this.classify(t,e,n);t:for(;;){var r=this.stack[this.stack.length-1],o=r.dfa[0],a=o[r.state];for(i=0;ic),this.shift(t,e,u,n),n=u;1===o[n].length&&0===o[n][0][0]&&o[n][0][1]===n;){if(this.pop(),0===this.stack.length)return!0;n=(r=this.stack[this.stack.length-1]).state,o=r.dfa[0]}return!1}if(256<=c&&(l=(l=this.grammar.dfas[c])[1]).hasOwnProperty(s)){this.push(c,this.grammar.dfas[c],u,n);continue t}}e:{for(o=[0,r.state],r=a.length;r--;)if(a[r][0]===o[0]&&a[r][1]===o[1]){a=!0;break e}a=!1}if(!a)throw t=n[0][0],new Sk.builtin.SyntaxError("bad input",this.filename,t,n);if(this.pop(),0===this.stack.length)throw new Sk.builtin.SyntaxError("too much input",this.filename)}},n.prototype.classify=function(t,e,i){if(t===Sk.token.tokens.T_NAME){this.used_names[e]=!0;var s=this.grammar.keywords.hasOwnProperty(e)&&this.grammar.keywords[e];if("print"===e&&(this.p_flags&n.CO_FUTURE_PRINT_FUNCTION||!0===Sk.__future__.print_function)&&(s=!1),s)return s}if(!(s=this.grammar.tokens.hasOwnProperty(t)&&this.grammar.tokens[t])){e="#"+t;for(let n in Sk.token.tokens)if(Sk.token.tokens[n]==t){e=n;break}throw new Sk.builtin.SyntaxError("bad token "+e,this.filename,i[0][0],i)}return s},n.prototype.shift=function(t,e,n,i){var s=this.stack[this.stack.length-1].dfa,r=this.stack[this.stack.length-1].node;r.children.push({type:t,value:e,lineno:i[0][0],col_offset:i[0][1],children:null}),this.stack[this.stack.length-1]={dfa:s,state:n,node:r}},n.prototype.push=function(t,e,n,i){t={type:t,value:null,lineno:i[0][0],col_offset:i[0][1],children:[]},this.stack[this.stack.length-1]={dfa:this.stack[this.stack.length-1].dfa,state:n,node:this.stack[this.stack.length-1].node},this.stack.push({dfa:e,state:0,node:t})},n.prototype.pop=function(){var t=this.stack.pop().node;if(t)if(0!==this.stack.length){this.stack[this.stack.length-1].node.children.push(t)}else this.rootnode=t,this.rootnode.used_names=this.used_names},Sk.parse=function(t,e){var i,s=Sk.token.tokens.T_COMMENT,r=Sk.token.tokens.T_NL,o=Sk.token.tokens.T_OP,a=Sk.token.tokens.T_ENDMARKER,l=Sk.token.tokens.T_ENCODING,u=!1,c=function(t,e){return void 0===e&&(e="file_input"),t=new n(t,Sk.ParseTables),"file_input"===e?t.setup(Sk.ParseTables.sym.file_input):Sk.asserts.fail("todo;"),t}(t);if(Sk._tokenize(t,(i=e.split("\n").reverse().map((function(t){return t+"\n"})),function(){if(0===i.length)throw new Sk.builtin.Exception("EOF");return i.pop()}),"utf-8",(function(t){var e=null;t.type!==s&&t.type!==r&&t.type!==l&&(t.type===o&&(e=Sk.OpMap[t.string]),c.addtoken(e||t.type,t.string,[t.start,t.end,t.line]),t.type===a&&(u=!0))})),!u)throw new Sk.builtin.SyntaxError("incomplete input",this.filename);return{cst:c.rootnode,flags:c.p_flags}},Sk.parseTreeDump=function(t,e){var n,i=""+(e=e||"");if(256<=t.type)for(i+=Sk.ParseTables.number2symbol[t.type]+"\n",n=0;n=i(e)||o+2==i(e)&&s(e,o+1).type==V.T_COMMA)throw new Sk.builtin.SyntaxError("named arguments must follow bare *",t.c_filename,e.lineno);(_=s(e,o+1)).type==V.T_COMMA?o=$(t,e,o+=2,u,c):(p=v(t,_),(o+=3)t.c_feature_version)return o(t,l,"Async functions are only supported in Python 3.5 and greater"),null;r(l,B.funcdef);var d=h(s(l,p));if(u(t,0,s(l,p),0))return null;var f=w(t,s(l,p+1));if(!f)return null;if(s(l,p+2).type==V.T_RARROW){if(!(c=F(t,s(l,p+3))))return null;p+=2}if(s(l,p+3).type==V.T_TYPE_COMMENT){if(!(_=V.T_NEW_TYPE_COMMENT(s(l,p+3))))return null;p+=1}var g=m(t,s(l,p+3));if(!g)return null;if(1":return Sk.astnodes.RShift;case"&":return Sk.astnodes.BitAnd;case"^":return Sk.astnodes.BitXor;case"|":return Sk.astnodes.BitOr;case"*":return"*"===e.value.charAt(1)?Sk.astnodes.Pow:Sk.astnodes.Mult;case"@":if(Sk.__future__.python3)return Sk.astnodes.MatMult;default:Sk.asserts.fail("invalid augassign")}}(0,s(e,1)),a,e.lineno,e.col_offset)}if(s(e,1).type===B.annassign){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("Annotated assignment is not supported in Python 2",t.c_filename,e.lineno);n=s(e,0);var l=s(e,1),p=1;for(o=n;1==i(o);)o=s(o,0);switch(0o(r,a,"f-string: expecting '}'");for(Sk.asserts.assert(e<=n);e=e),Sk.asserts.assert("{"==t.charAt(e-1)),Sk.asserts.assert("}"==t.charAt(n)||"!"==t.charAt(n)||":"==t.charAt(n)),t=t.substring(e,n),/^\s*$/.test(t)&&o(i,s,"f-string: empty expression not allowed");try{let e=Sk.parse("","("+t+")");var r=Sk.astFromParse(e.cst,"",e.flags)}catch(t){throw t.traceback&&t.traceback[0]&&((r=t.traceback[0]).lineno=(r.lineno||1)-1+s.lineno,r.filename=i.c_filename),t}return Sk.asserts.assert(1==r.body.length&&r.body[0].constructor===Sk.astnodes.Expr),r.body[0].value}(t,l,e,r,a),"!"==t.charAt(e)&&(++e>=n&&d(),c=t.charAt(e),e++,"s"!=c&&"r"!=c&&"a"!=c&&o(r,a,"f-string: invalid conversion character: expected 's', 'r', or 'a'")),e>=n&&d(),":"==t.charAt(e)&&(++e>=n&&d(),[u,e]=x(t,e,n,i,s+1,r,a)),(e>=n||"}"!=t.charAt(e))&&d(),e++,[new Sk.astnodes.FormattedValue(l,c,u,a.lineno,a.col_offset),e]}function x(t,e,n,i,s,r,o){let a=[],l=t=>{if(-1!==t.indexOf("}")){if(/(^|[^}])}(}})*($|[^}])/.test(t))throw new Sk.builtin.SyntaxError("f-string: single '}' is not allowed",r.c_filename,o.lineno,o.col_offset);t=t.replace(/}}/g,"}")}a.push(new Sk.astnodes.Str(new Sk.builtin.str(t),o.lineno,o.col_offset,r.end_lineno,o.end_col_offset))};for(;ei&&(u=-1,n=i))}if(-1===u){l(t.substring(e,n)),e=n;break}if(u+1=l.length){if("None"===l)return new Sk.astnodes.NameConstant(Sk.builtin.none.none$,e.lineno,e.col_offset);if("True"===l)return new Sk.astnodes.NameConstant(Sk.builtin.bool.true$,e.lineno,e.col_offset);if("False"===l)return new Sk.astnodes.NameConstant(Sk.builtin.bool.false$,e.lineno,e.col_offset)}return t=h(l),new Sk.astnodes.Name(t,Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset);case V.T_STRING:n=[];for(var u=0;u=y&&o(p,_,"Truncated \\xNN escape"),T+=String.fromCharCode(parseInt(b.substr(m+1,2),16)),m+=2):k||"u"!==g?k||"U"!==g?T+="\\"+g:(m+8>=y&&o(p,_,"Truncated \\UXXXXXXXX escape"),T+=String.fromCodePoint(parseInt(b.substr(m+1,8),16)),m+=8):(m+4>=y&&o(p,_,"Truncated \\uXXXX escape"),T+=String.fromCharCode(parseInt(b.substr(m+1,4),16)),m+=4))):k&&127l.charCodeAt(1)&&(l="0o"+l.substring(1)),n=!0,"l"!==u&&"L"!==u||(l=l.slice(0,-1),n=!1),l=(u=Number(l))>Number.MAX_SAFE_INTEGER?n?new Sk.builtin.int_(JSBI.BigInt(l)):new Sk.builtin.lng(JSBI.BigInt(l)):n?new Sk.builtin.int_(u):new Sk.builtin.lng(u)),new t(l,e.lineno,e.col_offset);case V.T_ELLIPSIS:return new Sk.astnodes.Ellipsis(e.lineno,e.col_offset,e.end_lineno,e.end_col_offset);case V.T_LPAR:return(n=s(e,1)).type==V.T_RPAR?new Sk.astnodes.Tuple([],Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset):n.type==B.yield_expr?F(t,n):1==i(n)?M(t,n):s(n,1).type==B.comp_for?d(S(t,n),e):d(M(t,n),e);case V.T_LSQB:return(n=s(e,1)).type==V.T_RSQB?new Sk.astnodes.List([],Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset):(r(n,B.testlist_comp),1==i(n)||s(n,1).type==V.T_COMMA?(t=f(t,n))?new Sk.astnodes.List(t,Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset):null:(l=n,Sk.asserts.assert(l.type==B.testlist_comp),d(t=O(t,l,1),e)));case V.T_LBRACE:if((n=s(e,1)).type==V.T_RBRACE)return new Sk.astnodes.Dict(null,null,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset);if(l=s(n,0).type==V.T_DOUBLESTAR,1==i(n)||13-l&&s(n,3-l).type==B.comp_for){if(l)return o(t,e,"dict unpacking cannot be used in dict comprehension"),null;l=n,Sk.asserts.assert(3>11&7,this.__namespaces=n||[]}function i(t,e,n,i,s){this.symFlags={},this.name=e,this.varnames=[],this.children=[],this.blockType=n,this.returnsValue=this.varkeywords=this.varargs=this.generator=this.childHasFree=this.hasFree=this.isNested=!1,this.lineno=s,this.table=t,t.cur&&(t.cur.nested||"function"===t.cur.blockType)&&(this.isNested=!0),i.scopeId=a++,t.stss[i.scopeId]=this,this.symbols={}}function s(t){this.filename=t,this.top=this.cur=null,this.stack=[],this.curClass=this.global=null,this.tmpname=0,this.stss={}}function r(t,e){var n;for(n=0;n>11&7)||2==t}))),this._funcGlobals},i.prototype.get_frees=function(){return Sk.asserts.assert("function"==this.get_type(),"get_frees only valid for function scopes"),this._funcFrees||(this._funcFrees=this._identsMatching((function(t){return 4==(t>>11&7)}))),this._funcFrees},i.prototype.get_methods=function(){var t;if(Sk.asserts.assert("class"==this.get_type(),"get_methods only valid for class scopes"),!this._classMethods){var e=[];for(t=0;t>11&7},s.prototype.getStsForAst=function(t){return Sk.asserts.assert(void 0!==t.scopeId,"ast wasn't added to st?"),t=this.stss[t.scopeId],Sk.asserts.assert(void 0!==t,"unknown sym tab entry"),t},s.prototype.SEQStmt=function(t){var e,n;if(null!==t){Sk.asserts.assert(Sk.isArrayLike(t),"SEQ: nodes isn't array? got "+t.toString());var i=t.length;for(n=0;n","").replace(" ","_"))};var a=Sk.builtin.str.reservedWords_;n.prototype.makeConstant=function(t){var e,n="";for(e=0;e Sk.execLimit) {throw new Sk.builtin.TimeoutError(Sk.timeoutMsg())}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(t=t+"if (!$waking && ($dateNow - Sk.lastYield > Sk.yieldLimit)) {var $susp = $saveSuspension({data: {type: 'Sk.yield'}, resume: function() {}}, '"+this.filename+"',$currLineNo,$currColNo);",t+="$susp.$blk = $blk;$susp.optional = true;return $susp;}$waking = false;",this.u.doesSuspend=!0)),t},n.prototype._jumpfalse=function(t,e){t=this._gr("jfalse","(",t,"===false||!Sk.misceval.isTrue(",t,"))"),o("if(",t,"){/*test failed */$blk=",e,";continue;}")},n.prototype._jumpundef=function(t,e){o("if(",t,"===undefined){$blk=",e,";continue;}")},n.prototype._jumpnotundef=function(t,e){o("if(",t,"!==undefined){$blk=",e,";continue;}")},n.prototype._jumptrue=function(t,e){t=this._gr("jtrue","(",t,"===true||Sk.misceval.isTrue(",t,"))"),o("if(",t,"){/*test passed */$blk=",e,";continue;}")},n.prototype._jump=function(t){null===this.u.blocks[this.u.curblock]._next&&(o("$blk=",t,";"),this.u.blocks[this.u.curblock]._next=t)},n.prototype._checkSuspension=function(t){if(this.u.canSuspend){var e=this.newBlock("function return or resume suspension");this._jump(e),this.setBlock(e),t=t||{lineno:"$currLineNo",col_offset:"$currColNo"},o("if ($ret && $ret.$isSuspension) { return $saveSuspension($ret,'"+this.filename+"',"+t.lineno+","+t.col_offset+"); }"),this.u.doesSuspend=!0,this.u.tempsToSave=this.u.tempsToSave.concat(this.u.localtemps)}else o("if ($ret && $ret.$isSuspension) { $ret = Sk.misceval.retryOptionalSuspensionOrThrow($ret); }")},n.prototype.cunpackstarstoarray=function(t,e){if(!t||0==t.length)return"[]";let n=!1;for(let i of t){if(e&&n)throw new Sk.builtin.SyntaxError("Extended argument unpacking is not permitted in Python 2");i.constructor===Sk.astnodes.Starred&&(n=!0)}if(n){e=this._gr("unpack","[]");for(let n of t)n.constructor!==Sk.astnodes.Starred?o(e,".push(",this.vexpr(n),");"):(o("$ret = Sk.misceval.iterFor(Sk.abstr.iter(",this.vexpr(n.value),"), function(e) { ",e,".push(e); });"),this._checkSuspension());return e}return"["+t.map((t=>this.vexpr(t))).join(",")+"]"},n.prototype.cunpackkwstoarray=function(t,e){var n="undefined";if(t&&0=n.length&&(n=this.vexpr(s),"dict"===t?(t=this.vexpr(r),o(e,".mp$ass_subscript(",t,",",n,");")):"list"===t?o(e,".v.push(",n,");"):"set"===t&&o(e,".v.mp$ass_subscript(",n,", true);"),this._jump(c),this.setBlock(c)),this._jump(u),this.setBlock(p),e},n.prototype.cyield=function(t){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,t.lineno);var e="Sk.builtin.none.none$";return t.value&&(e=this.vexpr(t.value)),t=this.newBlock("after yield"),o("return [/*resume*/",t,",/*ret*/",e,"];"),this.setBlock(t),"$gen.gi$sentvalue"},n.prototype.cyieldfrom=function(t){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,t.lineno);var e=this.vexpr(t.value);e=this._gr("iter","Sk.abstr.iter(",e,")"),o("$gen."+e+"=",e,";");var n=this.newBlock("after iter"),i=this.newBlock("after yield from");this._jump(n),this.setBlock(n);var s=this.gensym("retval");o(e,"=$gen.",e,";"),o("var ",s,";"),o("if ($gen.gi$sentvalue === Sk.builtin.none.none$ || "+e+".constructor === Sk.builtin.generator) {"),o("$ret=",e,".tp$iternext(true, $gen.gi$sentvalue);"),o("} else {");var r=this.makeConstant("new Sk.builtin.str('send');");return o("$ret=Sk.misceval.tryCatch("),o("function(){"),o("return Sk.misceval.callsimOrSuspendArray(Sk.abstr.gattr(",e,",",r,"), [$gen.gi$sentvalue]);},"),o("function (e) { "),o("if (e instanceof Sk.builtin.StopIteration) { "),o(e,".gi$ret = e.$value;"),o("return undefined;"),o("} else { throw e; }"),o("}"),o(");"),o("}"),this._checkSuspension(t),o(s,"=$ret;"),o("if(",s,"===undefined) {"),o("$gen.gi$sentvalue=$gen."+e+".gi$ret;"),o("$blk=",i,";continue;"),o("}"),o("return [/*resume*/",n,",/*ret*/",s,"];"),this.setBlock(i),"$gen.gi$sentvalue"},n.prototype.ccompare=function(t){var e;Sk.asserts.assert(t.ops.length===t.comparators.length);var n=this.vexpr(t.left),i=t.ops.length,s=this.newBlock("done"),r=this._gr("compareres","null");for(e=0;ethis.u.lineno&&(this.u.lineno=t.lineno,this.u.linenoSet=!1),t.constructor){case Sk.astnodes.BoolOp:return this.cboolop(t);case Sk.astnodes.BinOp:return this._gr("binop","Sk.abstr.numberBinOp(",this.vexpr(t.left),",",this.vexpr(t.right),",'",t.op.prototype._astname,"')");case Sk.astnodes.UnaryOp:return this._gr("unaryop","Sk.abstr.numberUnaryOp(",this.vexpr(t.operand),",'",t.op.prototype._astname,"')");case Sk.astnodes.Lambda:return this.clambda(t);case Sk.astnodes.IfExp:return this.cifexp(t);case Sk.astnodes.Dict:return this.cdict(t);case Sk.astnodes.ListComp:return this.clistcomp(t);case Sk.astnodes.DictComp:return this.cdictcomp(t);case Sk.astnodes.SetComp:return this.csetcomp(t);case Sk.astnodes.GeneratorExp:return this.cgenexp(t);case Sk.astnodes.Yield:return this.cyield(t);case Sk.astnodes.YieldFrom:return this.cyieldfrom(t);case Sk.astnodes.Compare:return this.ccompare(t);case Sk.astnodes.Call:return e=this.ccall(t),this.annotateSource(t),e;case Sk.astnodes.Num:if("number"==typeof t.n)return t.n;if(t.n instanceof Sk.builtin.lng)return this.makeConstant("new Sk.builtin.lng('"+t.n.v.toString()+"')");if(t.n instanceof Sk.builtin.int_)return"number"==typeof t.n.v?this.makeConstant("new Sk.builtin.int_("+t.n.v+")"):this.makeConstant("new Sk.builtin.int_('"+t.n.v.toString()+"')");if(t.n instanceof Sk.builtin.float_)return t=0===t.n.v&&-1/0==1/t.n.v?"-0":t.n.v,this.makeConstant("new Sk.builtin.float_("+t+")");if(t.n instanceof Sk.builtin.complex)return this.makeConstant("new Sk.builtin.complex("+(0===t.n.real&&-1/0==1/t.n.real?"-0":t.n.real)+", "+(0===t.n.imag&&-1/0==1/t.n.imag?"-0":t.n.imag)+")");Sk.asserts.fail("unhandled Num type");case Sk.astnodes.Bytes:if(Sk.__future__.python3){for(e=[],t=t.s.$jsstr(),n=0;ni||127<=i&&256>i?n+"\\x"+("0"+i.toString(16)).substr(-2):256<=i?n+"\\u"+("000"+i.toString(16)).substr(-4):n+t.charAt(s);return t=n+'"',e.call(this,"new Sk.builtin.str(",t,")");case Sk.astnodes.Attribute:switch(t.ctx!==Sk.astnodes.AugLoad&&t.ctx!==Sk.astnodes.AugStore&&(s=this.vexpr(t.value)),i=(i=t.attr.$r().v).substring(1,i.length-1),i=r(this.u.private_,new Sk.builtin.str(i)).v,i=this.makeConstant("new Sk.builtin.str('"+i+"')"),t.ctx){case Sk.astnodes.AugLoad:return o("$ret = ",n,".tp$getattr(",i,", true);"),this._checkSuspension(t),o("\nif ($ret === undefined) {"),o("\nthrow new Sk.builtin.AttributeError(",n,'.sk$attrError() + " has no attribute \'" + ',i,'.$jsstr() + "\'");'),o("\n};"),this._gr("lattr","$ret");case Sk.astnodes.Load:return o("$ret = ",s,".tp$getattr(",i,", true);"),this._checkSuspension(t),o("\nif ($ret === undefined) {"),o("\nthrow new Sk.builtin.AttributeError(",s,'.sk$attrError() + " has no attribute \'" + ',i,'.$jsstr() + "\'");'),o("\n};"),this._gr("lattr","$ret");case Sk.astnodes.AugStore:o("$ret = undefined;"),o("if(",e,"!==undefined){"),o("$ret = ",n,".tp$setattr(",i,",",e,", true);"),o("}"),this._checkSuspension(t);break;case Sk.astnodes.Store:o("$ret = ",s,".tp$setattr(",i,",",e,", true);"),this._checkSuspension(t);break;case Sk.astnodes.Del:o("$ret = ",s,".tp$setattr(",i,", undefined, true);"),this._checkSuspension(t);break;default:Sk.asserts.fail("invalid attribute expression")}break;case Sk.astnodes.Subscript:switch(t.ctx){case Sk.astnodes.AugLoad:return o("$ret = Sk.abstr.objectGetItem(",n,",",i,", true);"),this._checkSuspension(t),this._gr("gitem","$ret");case Sk.astnodes.Load:case Sk.astnodes.Store:case Sk.astnodes.Del:return this.vslice(t.slice,t.ctx,this.vexpr(t.value),e);case Sk.astnodes.AugStore:o("$ret=undefined;"),o("if(",e,"!==undefined){"),o("$ret=Sk.abstr.objectSetItem(",n,",",i,",",e,", true)"),o("}"),this._checkSuspension(t);break;default:Sk.asserts.fail("invalid subscript expression")}break;case Sk.astnodes.Name:return this.nameop(t.id,t.ctx,e);case Sk.astnodes.NameConstant:if(t.ctx===Sk.astnodes.Store||t.ctx===Sk.astnodes.AugStore||t.ctx===Sk.astnodes.Del)throw new Sk.builtin.SyntaxError("can not assign to a constant name");switch(t.value){case Sk.builtin.none.none$:return"Sk.builtin.none.none$";case Sk.builtin.bool.true$:return"Sk.builtin.bool.true$";case Sk.builtin.bool.false$:return"Sk.builtin.bool.false$";default:Sk.asserts.fail("invalid named constant")}break;case Sk.astnodes.List:return this.ctuplelistorset(t,e,"list");case Sk.astnodes.Tuple:return this.ctuplelistorset(t,e,"tuple");case Sk.astnodes.Set:return this.ctuplelistorset(t,e,"set");case Sk.astnodes.Starred:if(t.ctx===Sk.astnodes.Store)throw new Sk.builtin.SyntaxError("starred assignment target must be in a list or tuple",this.filename,t.lineno);throw new Sk.builtin.SyntaxError("can't use starred expression here",this.filename,t.lineno);case Sk.astnodes.JoinedStr:return this.cjoinedstr(t);case Sk.astnodes.FormattedValue:return this.cformattedvalue(t);case Sk.astnodes.Ellipsis:return this.makeConstant("Sk.builtin.Ellipsis");default:Sk.asserts.fail("unhandled case "+t.constructor.name+" vexpr")}},n.prototype.vseqexpr=function(t,e){var n;Sk.asserts.assert(void 0===e||t.length===e.length);var i=[];for(n=0;n",this.u.blocks[e]._next=null,e},n.prototype.setBlock=function(t){Sk.asserts.assert(0<=t&&t0) { $err=err; $blk=$exc.pop(); } else { throw err; } }};",o+="var $saveSuspension = function($child, $filename, $lineno, $colno) {var susp = new Sk.misceval.Suspension(); susp.child=$child;susp.resume=function(){"+t.scopename+".$wakingSuspension=susp; return "+t.scopename+"("+(t.ste.generator?"$gen":"")+"); };susp.data=susp.child.data;susp.$blk=$blk;susp.$loc=$loc;susp.$gbl=$gbl;susp.$exc=$exc;susp.$err=$err;susp.$postfinally=$postfinally;susp.$filename=$filename;susp.$lineno=$lineno;susp.$colno=$colno;susp.optional=susp.child.optional;"+(r?"susp.$cell=$cell;":""),s={},e=0;et?this.vexpr(t):"undefined"))),i&&i.vararg&&(d=i.vararg),i&&i.kwarg&&(f=i.kwarg),!Sk.__future__.python3&&i&&i.kwonlyargs&&0!=i.kwonlyargs.length)throw new Sk.builtin.SyntaxError("Keyword-only arguments are not supported in Python 2");var m=this.enterScope(e,t,t.lineno,this.canSuspend),g=this.u.ste.generator,b=this.u.ste.hasFree,S=this.u.ste.childHasFree,k=this.newBlock("codeobj entry");this.u.prefixCode="var "+m+"=(function "+this.niceName(e.v)+"$(";var y=[];if(g){if(f)throw new Sk.builtin.SyntaxError(e.v+"(): keyword arguments in generators not supported",this.filename,t.lineno);if(d)throw new Sk.builtin.SyntaxError(e.v+"(): variable number of arguments in generators not supported",this.filename,t.lineno);y.push("$gen")}else{for(f&&(y.push("$kwa"),this.u.tempsToSave.push("$kwa")),u=0;i&&u0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} }});",a.call(this,m),i){for(let t of i.args)c.push(t.arg.v);for(let t of i.kwonlyargs||[])c.push(t.arg.v);this.u.argnames=c}if(this.exitScope(),0"),null,t.args,(function(e){e=this.vexpr(t.body),o("return ",e,";")}))},n.prototype.cifexp=function(t){var e=this.newBlock("next of ifexp"),n=this.newBlock("end of ifexp"),i=this._gr("res","null"),s=this.vexpr(t.test);return this._jumpfalse(s,e),o(i,"=",this.vexpr(t.body),";"),this._jump(n),this.setBlock(e),o(i,"=",this.vexpr(t.orelse),";"),this._jump(n),this.setBlock(n),i},n.prototype.cgenexpgen=function(t,e,n){var i=this.newBlock("start for "+e),s=this.newBlock("skip for "+e);this.newBlock("if cleanup for "+e);var r=this.newBlock("end for "+e),a=t[e];if(0===e)var l="$loc.$iter0";else{var u=this.vexpr(a.iter);l="$loc."+this.gensym("iter"),o(l,"=","Sk.abstr.iter(",u,");")}this._jump(i),this.setBlock(i),this.annotateSource(n),o("$ret = Sk.abstr.iternext(",l,this.u.canSuspend?", true":", false",");"),this._checkSuspension(n),u=this._gr("next","$ret"),this._jumpundef(u,r),this.vexpr(a.target,u);var c=a.ifs?a.ifs.length:0;for(l=0;l=t.length&&(this.annotateSource(n),t=this.vexpr(n),o("return [",s,"/*resume*/,",t,"/*ret*/];"),this.setBlock(s)),this._jump(i),this.setBlock(r),1===e&&o("return Sk.builtin.none.none$;")},n.prototype.cgenexp=function(t){var e=this.buildcodeobj(t,new Sk.builtin.str(""),null,null,(function(e){this.cgenexpgen(t.generators,0,t.elt)}));return e=this._gr("gener","Sk.misceval.callsimArray(",e,");"),o(e,".gi$locals.$iter0=Sk.abstr.iter(",this.vexpr(t.generators[0].iter),");"),e},n.prototype.cclass=function(t){Sk.asserts.assert(t instanceof Sk.astnodes.ClassDef);var e=this.vseqexpr(t.decorator_list),n=this.vseqexpr(t.bases);let i=this.cunpackkwstoarray(t.keywords);var s=this.enterScope(t.name,t,t.lineno),r=this.newBlock("class entry");this.u.prefixCode="var "+s+"=(function $"+t.name.v+"$class_outer($globals,$locals,$cell){var $gbl=$globals,$loc=$locals,$free=$globals;",this.u.switchCode+="(function $"+t.name.v+"$_closure($cell){",this.u.switchCode+="var $blk="+r+",$exc=[],$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.switchCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.switchCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.switchCode+="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }}}",this.u.suffixCode+="}).call(null, $cell);});",this.u.private_=t.name,this.cbody(t.body,t.name),o("return;"),this.exitScope(),o("$ret = Sk.misceval.buildClass($gbl,",s,",",t.name.$r().v,",[",n,"], $cell, ",i,");"),this._checkSuspension();for(let t of e.reverse())o("$ret = Sk.misceval.callsimOrSuspendArray(",t,", [$ret]);"),this._checkSuspension();this.nameop(t.name,Sk.astnodes.Store,"$ret")},n.prototype.ccontinue=function(t){var e=this.peekFinallyBlock();if(0==this.u.continueBlocks.length)throw new Sk.builtin.SyntaxError("'continue' outside loop",this.filename,t.lineno);t=this.u.continueBlocks[this.u.continueBlocks.length-1],Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length),e&&e.breakDepth==this.u.continueBlocks.length?o("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},n.prototype.cbreak=function(t){var e=this.peekFinallyBlock();if(0===this.u.breakBlocks.length)throw new Sk.builtin.SyntaxError("'break' outside loop",this.filename,t.lineno);t=this.u.breakBlocks[this.u.breakBlocks.length-1],e&&e.breakDepth==this.u.breakBlocks.length?o("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},n.prototype.vstmt=function(t,e){if(this.u.lineno=t.lineno,this.u.linenoSet=!1,this.u.localtemps=[],Sk.debugging&&this.u.canSuspend){var n=this.newBlock("debug breakpoint for line "+t.lineno);o("if (Sk.breakpoints('"+this.filename+"',"+t.lineno+","+t.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.debug'}, resume: function() {}}, '"+this.filename+"',"+t.lineno+","+t.col_offset+");","$susp.$blk = "+n+";","$susp.optional = true;","return $susp;","}"),this._jump(n),this.setBlock(n),this.u.doesSuspend=!0}switch(this.annotateSource(t),t.constructor){case Sk.astnodes.FunctionDef:this.cfunction(t,e);break;case Sk.astnodes.ClassDef:this.cclass(t);break;case Sk.astnodes.Return:if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'return' outside function",this.filename,t.lineno);n=t.value?this.vexpr(t.value):"Sk.builtin.none.none$",0==this.u.finallyBlocks.length?o("return ",n,";"):(o("$postfinally={returning:",n,"};"),this._jump(this.peekFinallyBlock().blk));break;case Sk.astnodes.Delete:this.vseqexpr(t.targets);break;case Sk.astnodes.Assign:var i=t.targets.length;for(n=this.vexpr(t.value),e=0;e"!==t.name.v){var e=t.name.$r().v;e=e.substring(1,e.length-1),o(t.scopename,".co_name=new Sk.builtins['str']('",e,"');"),this.stack.length&&"class"==this.u.ste.blockType&&o(t.scopename,".co_qualname=new Sk.builtins['str']('"+this.u.name.v+"."+e+"');")}for(var n in t.consts)t.consts.hasOwnProperty(n)&&(t.suffixCode+=n+" = "+t.consts[n]+";")},n.prototype.cbody=function(t,e){var n=0;const i=this.maybeCDocstringOfBody(t);for(null!==i&&(o("$loc.__doc__ = ",i,";"),n=1);n"),t,0,this.canSuspend),n=this.newBlock("module entry");if(this.u.prefixCode="var "+e+"=(function($forcegbl, $forceloc){",this.u.varDeclsCode="var $gbl = $forcegbl || {}, $blk="+n+",$exc=[],$loc=$forceloc || $gbl,$cell={},$err=undefined;var $ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.varDeclsCode+="var $waking=false; if ("+e+".$wakingSuspension!==undefined) { $wakeFromSuspension(); $waking=true; }if (Sk.retainGlobals) { if (Sk.globals) { $gbl = Sk.globals; Sk.globals = $gbl; $loc = $gbl; } else { Sk.globals = $gbl; }} else { Sk.globals = $gbl; }",this.u.switchCode="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}",this.u.suffixCode+="}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} } });",t.constructor===Sk.astnodes.Module)this.cbody(t.body),o("return $loc;");else Sk.asserts.fail("todo; unhandled case in compilerMod");return this.exitScope(),this.result.push(this.outputAllUnits()),e},Sk.compile=function(t,e,i,s){i=Sk.__future__,Sk.__future__=Object.create(Sk.__future__);var r=Sk.parse(e,t),o=Sk.astFromParse(r.cst,e,r.flags);return r=r.flags,s=(t=new n(e,Sk.symboltable(o,e),r,s,t)).cmod(o),Sk.__future__=i,{funcname:"$compiledmod",code:`var $compiledmod = function() {${t.result.join("")}\nreturn ${s};}();\n$compiledmod;`,filename:e}},Sk.exportSymbol("Sk.compile",Sk.compile),Sk.resetCompiler=function(){Sk.gensymcount=0},Sk.exportSymbol("Sk.resetCompiler",Sk.resetCompiler),Sk.fixReserved=s,Sk.exportSymbol("Sk.fixReserved",Sk.fixReserved),Sk.unfixReserved=function(t){return t.replace(/_\$rw\$$/,"")},Sk.exportSymbol("Sk.unfixReserved",Sk.unfixReserved),Sk.mangleName=r,Sk.exportSymbol("Sk.mangleName",Sk.mangleName),Sk.reservedWords_=a,Sk.exportSymbol("Sk.reservedWords_",Sk.reservedWords_)},function(t,e){Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.importSearchPathForName=function(t,e,n){var i=t.replace(/\./g,"/"),s=function(t,e){return Sk.misceval.chain(Sk.misceval.tryCatch((function(){return Sk.read(t)}),(function(t){})),(function(n){if(void 0!==n)return new Sk.misceval.Break({filename:t,code:n,packagePath:e})}))};return void 0===n&&(n=Sk.realsyspath),Sk.misceval.iterFor(n.tp$iter(),(function(t){return Sk.misceval.chain(s(t.v+"/"+i+e,!1),(function(n){return n||s(t.v+"/"+i+"/__init__"+e,t.v+"/"+i)}))}))},Sk.importSetUpPath=function(t){if(!Sk.realsyspath){var e=[new Sk.builtin.str("src/builtin"),new Sk.builtin.str("src/lib"),new Sk.builtin.str(".")];for(t=0;ti;++i)t+=" ";n[e-1]="/* "+t+e+" */ "+n[e-1]}return n.join("\n")}(r),Sk.debugout(r)}"$compiledmod"!==i.funcname&&(r+="\n"+i.funcname+";");var o=new Sk.builtin.str(n),l=new Sk.builtin.str(t);Sk.sysmodules.mp$ass_subscript(o,c),s&&s.tp$setattr(l,c);var u=Sk.global.eval(r);c.init$dict(o,Sk.builtin.none.none$),c.$d.__package__=i.packagePath?o:m?new Sk.builtin.str(_+m):h||Sk.builtin.none.none$,i.packagePath&&(c.$d.__path__=new Sk.builtin.tuple([new Sk.builtin.str(i.packagePath)])),i.filename&&"$builtinmodule"!==i.funcname&&(c.$d.__file__=new Sk.builtin.str(i.filename));var p=s&&s.$initializing;return c.$initializing=!0,s&&!p&&(s.$initializing=!0),Sk.misceval.tryCatch((()=>Sk.misceval.chain(u(c.$d),(t=>(c.$initializing=!1,s&&!p&&(s.$initializing=!1),t)))),(t=>{try{Sk.abstr.objectDelItem(Sk.sysmodules,o)}catch(t){}if(s)try{s.tp$setattr(l,void 0)}catch(t){}throw c.$initializing=!1,s&&!p&&(s.$initializing=!1),t}))}}),(function(e){var n;if(void 0===e){if(r&&!p)return;throw new Sk.builtin.ModuleNotFoundError("No module named "+Sk.misceval.objectRepr(new Sk.builtin.str(t)))}if(e!==c.$d){for(n in c.$d)e[n]||(e[n]=c.$d[n]);c.$d=e}if(Sk.onAfterImport&&"function"==typeof Sk.onAfterImport)try{Sk.onAfterImport(t)}catch(t){}return p?(u.tp$setattr(new Sk.builtin.str(f[f.length-1]),c),p):c}))}));return o?g:Sk.misceval.retryOptionalSuspensionOrThrow(g)},Sk.importModule=function(t,e,n){return Sk.importModuleInternal_(t,e,void 0,void 0,void 0,!1,n)},Sk.importMain=function(t,e,n){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(t,e,"__main__",void 0,void 0,!1,n)},Sk.importMainWithBody=function(t,e,n,i){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(t,e,"__main__",n,void 0,!1,i)},Sk.importBuiltinWithBody=function(t,e,n,i){return Sk.importModuleInternal_(t,e,"__builtin__."+t,n,void 0,!1,i)},Sk.builtin.__import__=function(t,e,n,i,s){t=t.toString();var r,o=Sk.globals;if(null==s&&(s=Sk.__future__.absolute_import?0:-1),0!==s&&e.__package__&&e.__package__!==Sk.builtin.none.none$){if((r=e.__package__.v)&&0=e.length)throw new Sk.builtin.ImportError("Attempted relative import beyond toplevel package");e.length-=s-1,r=e.join(".")}var a=Sk.sysmodules.quick$lookup(new Sk.builtin.str(r))}if(0Sk.importModuleInternal_(s,void 0,void 0,void 0,n,!0,!0)))}return Sk.misceval.chain(...e,(function(){return Sk.asserts.assert(n),n}))}return e}),(function(t){return o!==Sk.globals&&(Sk.globals=o),t}))},Sk.importStar=function(t,e,n){if(n=t.tp$getattr(new Sk.builtin.str("__all__")))for(let i=Sk.abstr.iter(n),s=i.tp$iternext();void 0!==s;s=i.tp$iternext())e[s.v]=Sk.abstr.gattr(t,s);else{n=Object.getOwnPropertyNames(t.$d);for(let i in n)"_"!=n[i].charAt(0)&&(e[n[i]]=t.$d[n[i]])}},Sk.exportSymbol("Sk.importMain",Sk.importMain),Sk.exportSymbol("Sk.importMainWithBody",Sk.importMainWithBody),Sk.exportSymbol("Sk.importBuiltinWithBody",Sk.importBuiltinWithBody),Sk.exportSymbol("Sk.builtin.__import__",Sk.builtin.__import__),Sk.exportSymbol("Sk.importStar",Sk.importStar)},function(t,e){Sk.builtin.timSort=function(t,e){this.list=new Sk.builtin.list(t.v),this.MIN_GALLOP=7,this.listlength=e||t.sq$length()},Sk.builtin.timSort.prototype.lt=function(t,e){return Sk.misceval.richCompareBool(t,e,"Lt")},Sk.builtin.timSort.prototype.le=function(t,e){return!this.lt(e,t)},Sk.builtin.timSort.prototype.setitem=function(t,e){this.list.v[t]=e},Sk.builtin.timSort.prototype.binary_sort=function(t,e){var n;for(n=t.base+e;n>1);this.lt(e,t.getitem(r))?s=r:i=r+1}for(Sk.asserts.assert(i===s),r=n;r>i;r--)t.setitem(r,t.getitem(r-1));t.setitem(i,e)}},Sk.builtin.timSort.prototype.count_run=function(t){var e;if(1>=t.len)var n=t.len,i=!1;else if(n=2,this.lt(t.getitem(t.base+1),t.getitem(t.base)))for(i=!0,e=t.base+2;ee.len)){for(this.merge_init(),t=this.merge_compute_minrun(e.len);0s&&(l=s),a+=n,l+=n}else{for(s=n+1;ls&&(l=s),o=n-a,a=n-l,l=o}for(Sk.asserts.assert(-1<=a>1),i(e.getitem(e.base+n),t)?a=n+1:l=n;return Sk.asserts.assert(a==l),l},Sk.builtin.timSort.prototype.merge_init=function(){this.min_gallop=this.MIN_GALLOP,this.pending=[]},Sk.builtin.timSort.prototype.merge_lo=function(t,e){var n,i,s;Sk.asserts.assert(0=r)break}else{if(this.setitem(o,t.popleft()),o++,1==t.len)return;if(i=0,++n>=r)break}for(r+=1;;){for(this.min_gallop=r-=1=t.len)return;if(this.setitem(o,e.popleft()),o++,0===e.len)return;for(i=this.gallop(t.getitem(t.base),e,0,!1),s=e.base;s=r)break}else{if(o--,this.setitem(o,l),e.len--,1==e.len)return;if(n=0,++i>=r)break}}for(r+=1;;){this.min_gallop=r-=1t.base+u-1;s--)o--,this.setitem(o,t.getitem(s));if(t.len-=n,0===t.len)return;if(o--,this.setitem(o,e.popright()),1==e.len)return;for(a=t.getitem(t.base+t.len-1),u=this.gallop(a,e,e.len-1,!1),i=e.len-u,s=e.base+e.len-1;s>e.base+u-1;s--)o--,this.setitem(o,e.getitem(s));if(e.len-=i,1>=e.len)return;if(o--,this.setitem(o,t.popright()),0===t.len)return;if(nt.base-1;s--)o--,this.setitem(o,t.getitem(s));for(s=e.base+e.len-1;s>e.base-1;s--)o--,this.setitem(o,e.getitem(s))}},Sk.builtin.timSort.prototype.merge_at=function(t){0>t&&(t=this.pending.length+t);var e=this.pending[t],n=this.pending[t+1];Sk.asserts.assert(0>=1;return t+e},Sk.builtin.listSlice=function(t,e,n){this.list=t,this.base=e,this.len=n},Sk.builtin.listSlice.prototype.copyitems=function(){var t=this.base,e=this.base+this.len;return Sk.asserts.assert(0<=t<=e),new Sk.builtin.listSlice(new Sk.builtin.list(this.list.v.slice(t,e)),0,this.len)},Sk.builtin.listSlice.prototype.advance=function(t){this.base+=t,this.len-=t,Sk.asserts.assert(this.base<=this.list.sq$length())},Sk.builtin.listSlice.prototype.getitem=function(t){return this.list.v[t]},Sk.builtin.listSlice.prototype.setitem=function(t,e){this.list.v[t]=e},Sk.builtin.listSlice.prototype.popleft=function(){var t=this.list.v[this.base];return this.base++,this.len--,t},Sk.builtin.listSlice.prototype.popright=function(){return this.len--,this.list.v[this.base+this.len]},Sk.builtin.listSlice.prototype.reverse=function(){for(var t,e,n=this.list,i=this.base,s=i+this.len-1;i same as super(__class__, )\nsuper(type) -> unbound super object\nsuper(type, obj) -> bound super object; requires isinstance(obj, type)\nsuper(type, type2) -> bound super object; requires issubclass(type2, type)\nTypical use to call a cooperative superclass method:\nclass C(B):\n def meth(self, arg):\n super().meth(arg)\nThis works for class methods too:\nclass C(B):\n @classmethod\n def cmeth(cls, arg):\n super().cmeth(arg)\n",tp$new:Sk.generic.new,tp$init(t,e){if(Sk.abstr.checkNoKwargs("super",e),Sk.abstr.checkArgsLen("super",t,1,2),e=t[0],t=t[1],!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("must be type, not "+Sk.abstr.typeName(e));this.obj=t,this.type=e,null!=this.obj&&(this.obj_type=this.$supercheck(e,this.obj))},$r(){return this.obj?new Sk.builtin.str(", <"+Sk.abstr.typeName(this.obj)+" object>>"):new Sk.builtin.str(", NULL>")},tp$getattr(t,e){let n=this.obj_type;if(null==n)return Sk.generic.getAttr.call(this,t,e);var i=n.prototype.tp$mro;const s=i.length;if(t===Sk.builtin.str.$class)return Sk.generic.getAttr.call(this,t,e);let r,o;for(r=0;r+1=s)return Sk.generic.getAttr.call(this,t,e);for(t=t.$mangled;r(Sk.abstr.checkNoKwargs("GenericAlias",e),Sk.abstr.checkArgsLen("GenericAlias",t,2,2),new Sk.builtin.GenericAlias(t[0],t[1])),tp$getattr(t,e){return Sk.builtin.checkString(t)&&!this.attr$exc.includes(t)?this.$origin.tp$getattr(t,e):Sk.generic.getAttr.call(this,t,e)},$r(){const t=this.ga$repr(this.$origin);let e="";return this.$args.v.forEach(((t,n)=>{e+=0{this.is$typevar(e)&&0>this.tuple$index(t,e)&&t.push(e)})),this.$params=new Sk.builtin.tuple(t)},tuple$index:(t,e)=>t.indexOf(e),is$typevar(t){if("TypeVar"!==t.tp$name)return!1;if(void 0===(t=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$module)))throw Sk.builtin.RuntimeError("found object withought a __module__");return"typing"===t.toString()},ga$repr(t){if(t===Sk.builtin.Ellipsis)return"...";if(Sk.abstr.lookupSpecial(t,this.str$orig)&&Sk.abstr.lookupSpecial(t,this.str$args))return Sk.misceval.objectRepr(t);const e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$qualname);if(void 0===e)return Sk.misceval.objectRepr(t);const n=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$module);return void 0===n||Sk.builtin.checkNone(n)?Sk.misceval.objectRepr(t):"builtins"===n.toString()?e.toString():n.toString()+"."+e.toString()},str$orig:new Sk.builtin.str("__origin__"),str$args:new Sk.builtin.str("__args__"),attr$exc:"__origin__ __args__ __parameters__ __mro_entries__ __reduce_ex__ __reduce__".split(" ").map((t=>new Sk.builtin.str(t)))}})},function(t,e){function n(t,e){let n;if(void 0===t||Sk.builtin.checkNone(t))t=void 0;else{if(!(t instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError(e+" must be a dict or None, not "+Sk.abstr.typeName(t));n={},t.$items().forEach((t=>{var[e,i]=t;Sk.builtin.checkString(e)&&(n[e.$mangled]=i)}))}return n}function i(t,e){if(void 0!==t&&!Sk.builtin.checkNone(t))for(let n in e)t.mp$ass_subscript(new Sk.builtin.str(Sk.unfixReserved(n)),e[n])}Sk.builtins={round:null,len:null,min:null,max:null,sum:null,abs:null,fabs:null,ord:null,chr:null,hex:null,oct:null,bin:null,dir:null,repr:null,open:null,isinstance:null,hash:null,getattr:null,hasattr:null,id:null,sorted:null,any:null,all:null,enumerate:Sk.builtin.enumerate,filter:Sk.builtin.filter_,map:Sk.builtin.map_,range:Sk.builtin.range_,reversed:Sk.builtin.reversed,zip:Sk.builtin.zip_,BaseException:Sk.builtin.BaseException,AttributeError:Sk.builtin.AttributeError,ValueError:Sk.builtin.ValueError,Exception:Sk.builtin.Exception,ZeroDivisionError:Sk.builtin.ZeroDivisionError,AssertionError:Sk.builtin.AssertionError,ImportError:Sk.builtin.ImportError,ModuleNotFoundError:Sk.builtin.ModuleNotFoundError,IndentationError:Sk.builtin.IndentationError,IndexError:Sk.builtin.IndexError,LookupError:Sk.builtin.LookupError,KeyError:Sk.builtin.KeyError,TypeError:Sk.builtin.TypeError,UnicodeDecodeError:Sk.builtin.UnicodeDecodeError,UnicodeEncodeError:Sk.builtin.UnicodeEncodeError,NameError:Sk.builtin.NameError,UnboundLocalError:Sk.builtin.UnboundLocalError,IOError:Sk.builtin.IOError,NotImplementedError:Sk.builtin.NotImplementedError,SystemExit:Sk.builtin.SystemExit,OverflowError:Sk.builtin.OverflowError,OperationError:Sk.builtin.OperationError,NegativePowerError:Sk.builtin.NegativePowerError,RuntimeError:Sk.builtin.RuntimeError,RecursionError:Sk.builtin.RecursionError,StopIteration:Sk.builtin.StopIteration,SyntaxError:Sk.builtin.SyntaxError,SystemError:Sk.builtin.SystemError,KeyboardInterrupt:Sk.builtin.KeyboardInterrupt,float_$rw$:Sk.builtin.float_,int_$rw$:Sk.builtin.int_,bool:Sk.builtin.bool,complex:Sk.builtin.complex,dict:Sk.builtin.dict,file:Sk.builtin.file,frozenset:Sk.builtin.frozenset,function:Sk.builtin.func,generator:Sk.builtin.generator,list:Sk.builtin.list,long_$rw$:Sk.builtin.lng,method:Sk.builtin.method,object:Sk.builtin.object,slice:Sk.builtin.slice,str:Sk.builtin.str,set:Sk.builtin.set,tuple:Sk.builtin.tuple,type:Sk.builtin.type,input:null,raw_input:new Sk.builtin.func(Sk.builtin.raw_input),setattr:null,jseval:Sk.builtin.jseval,jsmillis:Sk.builtin.jsmillis,quit:new Sk.builtin.func(Sk.builtin.quit),exit:new Sk.builtin.func(Sk.builtin.quit),print:null,divmod:null,format:null,globals:null,issubclass:null,iter:null,execfile:Sk.builtin.execfile,help:Sk.builtin.help,memoryview:Sk.builtin.memoryview,reload:Sk.builtin.reload,super_$rw$:Sk.builtin.super_,unichr:new Sk.builtin.func(Sk.builtin.unichr),vars:Sk.builtin.vars,apply_$rw$:Sk.builtin.apply_,buffer:Sk.builtin.buffer,coerce:Sk.builtin.coerce,intern:Sk.builtin.intern,property:Sk.builtin.property,classmethod:Sk.builtin.classmethod,staticmethod:Sk.builtin.staticmethod,Ellipsis:Sk.builtin.Ellipsis},t=Sk.builtin.none.none$,e=new Sk.builtin.tuple;const s=new Sk.builtin.int_(0);Sk.abstr.setUpModuleMethods("builtins",Sk.builtins,{__import__:{$meth(t,e,i,s,r){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__import__() argument 1 must be str, not "+t.tp$name);if(t===Sk.builtin.str.$empty&&0===r.v)throw new Sk.builtin.ValueError("Empty module name");return e=n(e,"globals")||{},s=Sk.ffi.remapToJs(s),r=Sk.ffi.remapToJs(r),Sk.builtin.__import__(t,e,void 0,s,r)},$flags:{NamedArgs:["name","globals","locals","fromlist","level"],Defaults:[t,t,e,s]},$textsig:null,$doc:"__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module\n\nImport a module. Because this function is meant for use by the Python\ninterpreter and not for general use, it is better to use\nimportlib.import_module() to programmatically import a module.\n\nThe globals argument is only used to determine the context;\nthey are not modified. The locals argument is unused. The fromlist\nshould be a list of names to emulate ``from name import ...'', or an\nempty list to emulate ``import name''.\nWhen importing a module from a package, note that __import__('A.B', ...)\nreturns package A when fromlist is empty, but its submodule B when\nfromlist is not empty. The level argument is used to determine whether to\nperform absolute or relative imports: 0 is absolute, while a positive number\nis the number of parent directories to search relative to the current module."},abs:{$meth:Sk.builtin.abs,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the argument."},all:{$meth:Sk.builtin.all,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for all values x in the iterable.\n\nIf the iterable is empty, return True."},any:{$meth:Sk.builtin.any,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for any x in the iterable.\n\nIf the iterable is empty, return False."},ascii:{$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},bin:{$meth:Sk.builtin.bin,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the binary representation of an integer.\n\n >>> bin(2796202)\n '0b1010101010101010101010'"},callable:{$meth:Sk.builtin.callable,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return whether the object is callable (i.e., some kind of function).\n\nNote that classes are callable, as are instances of classes with a\n__call__() method."},chr:{$meth:Sk.builtin.chr,$flags:{OneArg:!0},$textsig:"($module, i, /)",$doc:"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."},compile:{$meth:Sk.builtin.compile,$flags:{MinArgs:3,MaxArgs:6},$textsig:"($module, /, source, filename, mode, flags=0,\n dont_inherit=False, optimize=-1)",$doc:"Compile source into a code object that can be executed by exec() or eval().\n\nThe source code may represent a Python module, statement or expression.\nThe filename will be used for run-time error messages.\nThe mode must be 'exec' to compile a module, 'single' to compile a\nsingle (interactive) statement, or 'eval' to compile an expression.\nThe flags argument, if present, controls which future statements influence\nthe compilation of the code.\nThe dont_inherit argument, if true, stops the compilation inheriting\nthe effects of any future statements in effect in the code calling\ncompile; if absent or false these statements do influence the compilation,\nin addition to any features explicitly specified."},delattr:{$meth:Sk.builtin.delattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Deletes the named attribute from the given object.\n\ndelattr(x, 'y') is equivalent to ``del x.y''"},dir:{$meth:Sk.builtin.dir,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"dir([object]) -> list of strings\n\nIf called without an argument, return the names in the current scope.\nElse, return an alphabetized list of names comprising (some of) the attributes\nof the given object, and of attributes reachable from it.\nIf the object supplies a method named __dir__, it will be used; otherwise\nthe default dir() logic is used and returns:\n for a module object: the module's attributes.\n for a class object: its attributes, and recursively the attributes\n of its bases.\n for any other object: its attributes, its class's attributes, and\n recursively the attributes of its class's base classes."},divmod:{$meth:Sk.builtin.divmod,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return the tuple (x//y, x%y). Invariant: div*y + mod == x."},eval_$rw$:{$name:"eval",$meth:function(t,e,s){const r=n(e,"globals"),o=n(s,"locals");return Sk.misceval.chain(Sk.builtin.eval(t,r,o),(t=>(i(e,r),i(s,o),t)))},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Evaluate the given source in the context of globals and locals.\n\nThe source may be a string representing a Python expression\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},exec:{$meth:function(t,e,s){const r=n(e,"globals"),o=n(s,"locals");return Sk.misceval.chain(Sk.builtin.exec(t,r,o),(t=>(i(e,r),i(s,o),Sk.builtin.none.none$)))},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Execute the given source in the context of globals and locals.\n\nThe source may be a string representing one or more Python statements\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},format:{$meth:Sk.builtin.format,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, value, format_spec='', /)",$doc:"Return value.__format__(format_spec)\n\nformat_spec defaults to the empty string.\nSee the Format Specification Mini-Language section of help('FORMATTING') for\ndetails."},getattr:{$meth:Sk.builtin.getattr,$flags:{MinArgs:2,MaxArgs:3},$textsig:null,$doc:"getattr(object, name[, default]) -> value\n\nGet a named attribute from an object; getattr(x, 'y') is equivalent to x.y.\nWhen a default argument is given, it is returned when the attribute doesn't\nexist; without it, an exception is raised in that case."},globals:{$meth:Sk.builtin.globals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return the dictionary containing the current scope's global variables.\n\nNOTE: Updates to this dictionary *will* affect name lookups in the current\nglobal scope and vice-versa."},hasattr:{$meth:Sk.builtin.hasattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Return whether the object has an attribute with the given name.\n\nThis is done by calling getattr(obj, name) and catching AttributeError."},hash:{$meth:Sk.builtin.hash,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the hash value for the given object.\n\nTwo objects that compare equal must also have the same hash value, but the\nreverse is not necessarily true."},hex:{$meth:Sk.builtin.hex,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the hexadecimal representation of an integer.\n\n >>> hex(12648430)\n '0xc0ffee'"},id:{$meth:Sk.builtin.id,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the identity of an object.\n\nThis is guaranteed to be unique among simultaneously existing objects.\n(CPython uses the object's memory address.)"},input:{$meth:Sk.builtin.input,$flags:{MinArgs:0,MaxArgs:1},$textsig:"($module, prompt=None, /)",$doc:"Read a string from standard input. The trailing newline is stripped.\n\nThe prompt string, if given, is printed to standard output without a\ntrailing newline before reading input.\n\nIf the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.\nOn *nix systems, readline is used if available."},isinstance:{$meth:Sk.builtin.isinstance,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, class_or_tuple, /)",$doc:"Return whether an object is an instance of a class or of a subclass thereof.\n\nA tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\nor ...`` etc."},issubclass:{$meth:Sk.builtin.issubclass,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, cls, class_or_tuple, /)",$doc:"Return whether 'cls' is a derived from another class or is the same class.\n\nA tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\nor ...`` etc."},iter:{$meth:Sk.builtin.iter,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, iterable /)",$doc:"iter(iterable) -> iterator\niter(callable, sentinel) -> iterator\n\nGet an iterator from an object. In the first form, the argument must\nsupply its own iterator, or be a sequence.\nIn the second form, the callable is called until it returns the sentinel."},len:{$meth:Sk.builtin.len,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the number of items in a container."},locals:{$meth:Sk.builtin.locals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return a dictionary containing the current scope's local variables.\n\nNOTE: Whether or not updates to this dictionary will affect name lookups in\nthe local scope and vice-versa is *implementation dependent* and not\ncovered by any backwards compatibility guarantees."},max:{$meth:Sk.builtin.max,$flags:{FastCall:!0},$textsig:null,$doc:"max(iterable, *[, default=obj, key=func]) -> value\nmax(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its biggest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the largest argument."},min:{$meth:Sk.builtin.min,$flags:{FastCall:!0},$textsig:null,$doc:"min(iterable, *[, default=obj, key=func]) -> value\nmin(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its smallest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the smallest argument."},next:{$name:"next",$meth:Sk.builtin.next_,$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"next(iterator[, default])\n\nReturn the next item from the iterator. If default is given and the iterator\nis exhausted, it is returned instead of raising StopIteration."},oct:{$meth:Sk.builtin.oct,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the octal representation of an integer.\n\n >>> oct(342391)\n '0o1234567'"},open:{$meth:Sk.builtin.open,$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"open(name[, mode[, buffering]]) -> file object\n\nOpen a file using the file() type, returns a file object. This is the\npreferred way to open a file. See file.__doc__ for further information."},ord:{$meth:Sk.builtin.ord,$flags:{OneArg:!0},$textsig:"($module, c, /)",$doc:"Return the Unicode code point for a one-character string."},pow:{$meth:Sk.builtin.pow,$flags:{MinArgs:2,MaxArgs:3},$textsig:"($module, x, y, z=None, /)",$doc:"Equivalent to x**y (with two arguments) or x**y % z (with three arguments)\n\nSome types, such as ints, are able to use a more efficient algorithm when\ninvoked using the three argument form."},print:{$meth:Sk.builtin.print,$flags:{FastCall:!0},$textsig:null,$doc:"print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile: a file-like object (stream); defaults to the current sys.stdout.\nsep: string inserted between values, default a space.\nend: string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream."},repr:{$meth:Sk.builtin.repr,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the canonical string representation of the object.\n\nFor many object types, including most builtins, eval(repr(obj)) == obj."},round:{$meth:Sk.builtin.round,$flags:{NamedArgs:["number","ndigits"]},$textsig:"($module, /, number, ndigits=None)",$doc:"Round a number to a given precision in decimal digits.\n\nThe return value is an integer if ndigits is omitted or None. Otherwise\nthe return value has the same type as the number. ndigits may be negative."},setattr:{$meth:Sk.builtin.setattr,$flags:{MinArgs:3,MaxArgs:3},$textsig:"($module, obj, name, value, /)",$doc:"Sets the named attribute on the given object to the specified value.\n\nsetattr(x, 'y', v) is equivalent to ``x.y = v''"},sorted:{$meth:Sk.builtin.sorted,$flags:{NamedArgs:[null,"cmp","key","reverse"],Defaults:[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]},$textsig:"($module, iterable, /, *, key=None, reverse=False)",$doc:"Return a new list containing all items from the iterable in ascending order.\n\nA custom key function can be supplied to customize the sort order, and the\nreverse flag can be set to request the result in descending order."},sum:{$meth:Sk.builtin.sum,$flags:{NamedArgs:[null,"start"],Defaults:[new Sk.builtin.int_(0)]},$textsig:"($module, iterable, /, start=0)",$doc:"Return the sum of a 'start' value (default: 0) plus an iterable of numbers\n\nWhen the iterable is empty, return the start value.\nThis function is intended specifically for use with numeric values and may\nreject non-numeric types."},vars:{$meth:Sk.builtin.vars,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"vars([object]) -> dictionary\n\nWithout arguments, equivalent to locals().\nWith an argument, equivalent to object.__dict__."}}),Sk.setupObjects=function(t){t?(Sk.builtins.filter=Sk.builtin.filter_,Sk.builtins.map=Sk.builtin.map_,Sk.builtins.zip=Sk.builtin.zip_,Sk.builtins.range=Sk.builtin.range_,delete Sk.builtins.reduce,delete Sk.builtins.xrange,delete Sk.builtins.StandardError,delete Sk.builtins.unicode,delete Sk.builtins.basestring,delete Sk.builtins.long_$rw$,Sk.builtin.int_.prototype.$r=function(){return new Sk.builtin.str(this.v.toString())},delete Sk.builtin.int_.prototype.tp$str,delete Sk.builtin.bool.prototype.tp$str,delete Sk.builtins.raw_input,delete Sk.builtins.unichr,delete Sk.builtin.str.prototype.decode,Sk.builtins.bytes=Sk.builtin.bytes,Sk.builtins.ascii=new Sk.builtin.sk_method({$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},null,"builtins")):(Sk.builtins.range=new Sk.builtin.sk_method({$meth:Sk.builtin.range,$name:"range",$flags:{MinArgs:1,MaxArgs:3}},void 0,"builtins"),Sk.builtins.xrange=new Sk.builtin.sk_method({$meth:Sk.builtin.xrange,$name:"xrange",$flags:{MinArgs:1,MaxArgs:3}},null,"builtins"),Sk.builtins.reduce=new Sk.builtin.sk_method({$meth:Sk.builtin.reduce,$name:"reduce",$flags:{MinArgs:2,MaxArgs:3}},null,"builtins"),Sk.builtins.filter=new Sk.builtin.func(Sk.builtin.filter),Sk.builtins.map=new Sk.builtin.func(Sk.builtin.map),Sk.builtins.zip=new Sk.builtin.func(Sk.builtin.zip),Sk.builtins.StandardError=Sk.builtin.Exception,Sk.builtins.unicode=Sk.builtin.str,Sk.builtins.basestring=Sk.builtin.str,Sk.builtins.long_$rw$=Sk.builtin.lng,Sk.builtin.int_.prototype.$r=function(){const t=this.v;return"number"==typeof t?new Sk.builtin.str(t.toString()):new Sk.builtin.str(t.toString()+"L")},Sk.builtin.int_.prototype.tp$str=function(){return new Sk.builtin.str(this.v.toString())},Sk.builtin.bool.prototype.tp$str=function(){return this.$r()},Sk.builtins.raw_input=new Sk.builtin.func(Sk.builtin.raw_input),Sk.builtins.unichr=new Sk.builtin.func(Sk.builtin.unichr),Sk.builtin.str.prototype.decode=Sk.builtin.str.$py2decode,delete Sk.builtins.bytes,delete Sk.builtins.ascii)},Sk.exportSymbol("Sk.setupObjects",Sk.setupObjects),Sk.exportSymbol("Sk.builtins",Sk.builtins)},function(t,e){Sk.builtin.str.$empty=new Sk.builtin.str(""),Sk.builtin.str.$emptystr=Sk.builtin.str.$empty,Sk.builtin.str.$utf8=new Sk.builtin.str("utf-8"),Sk.builtin.str.$ascii=new Sk.builtin.str("ascii"),Sk.builtin.str.$default_factory=new Sk.builtin.str("default_factory"),Sk.builtin.str.$imag=new Sk.builtin.str("imag"),Sk.builtin.str.$real=new Sk.builtin.str("real"),Sk.builtin.str.$abs=new Sk.builtin.str("__abs__"),Sk.builtin.str.$bases=new Sk.builtin.str("__bases__"),Sk.builtin.str.$bytes=new Sk.builtin.str("__bytes__"),Sk.builtin.str.$call=new Sk.builtin.str("__call__"),Sk.builtin.str.$class=new Sk.builtin.str("__class__"),Sk.builtin.str.$class_getitem=new Sk.builtin.str("__class_getitem__"),Sk.builtin.str.$cmp=new Sk.builtin.str("__cmp__"),Sk.builtin.str.$complex=new Sk.builtin.str("__complex__"),Sk.builtin.str.$contains=new Sk.builtin.str("__contains__"),Sk.builtin.str.$copy=new Sk.builtin.str("__copy__"),Sk.builtin.str.$dict=new Sk.builtin.str("__dict__"),Sk.builtin.str.$dir=new Sk.builtin.str("__dir__"),Sk.builtin.str.$doc=new Sk.builtin.str("__doc__"),Sk.builtin.str.$enter=new Sk.builtin.str("__enter__"),Sk.builtin.str.$eq=new Sk.builtin.str("__eq__"),Sk.builtin.str.$exit=new Sk.builtin.str("__exit__"),Sk.builtin.str.$index=new Sk.builtin.str("__index__"),Sk.builtin.str.$init=new Sk.builtin.str("__init__"),Sk.builtin.str.$initsubclass=new Sk.builtin.str("__init_subclass__"),Sk.builtin.str.$int_=new Sk.builtin.str("__int__"),Sk.builtin.str.$iter=new Sk.builtin.str("__iter__"),Sk.builtin.str.$file=new Sk.builtin.str("__file__"),Sk.builtin.str.$float_=new Sk.builtin.str("__float__"),Sk.builtin.str.$format=new Sk.builtin.str("__format__"),Sk.builtin.str.$ge=new Sk.builtin.str("__ge__"),Sk.builtin.str.$getattr=new Sk.builtin.str("__getattr__"),Sk.builtin.str.$getattribute=new Sk.builtin.str("__getattribute__"),Sk.builtin.str.$getitem=new Sk.builtin.str("__getitem__"),Sk.builtin.str.$gt=new Sk.builtin.str("__gt__"),Sk.builtin.str.$keys=new Sk.builtin.str("keys"),Sk.builtin.str.$le=new Sk.builtin.str("__le__"),Sk.builtin.str.$len=new Sk.builtin.str("__len__"),Sk.builtin.str.$length_hint=new Sk.builtin.str("__length_hint__"),Sk.builtin.str.$loader=new Sk.builtin.str("__loader__"),Sk.builtin.str.$lt=new Sk.builtin.str("__lt__"),Sk.builtin.str.$module=new Sk.builtin.str("__module__"),Sk.builtin.str.$missing=new Sk.builtin.str("__missing__"),Sk.builtin.str.$name=new Sk.builtin.str("__name__"),Sk.builtin.str.$ne=new Sk.builtin.str("__ne__"),Sk.builtin.str.$new=new Sk.builtin.str("__new__"),Sk.builtin.str.$next=new Sk.builtin.str("__next__"),Sk.builtin.str.$path=new Sk.builtin.str("__path__"),Sk.builtin.str.$prepare=new Sk.builtin.str("__prepare__"),Sk.builtin.str.$qualname=new Sk.builtin.str("__qualname__"),Sk.builtin.str.$repr=new Sk.builtin.str("__repr__"),Sk.builtin.str.$reversed=new Sk.builtin.str("__reversed__"),Sk.builtin.str.$round=new Sk.builtin.str("__round__"),Sk.builtin.str.$setattr=new Sk.builtin.str("__setattr__"),Sk.builtin.str.$setitem=new Sk.builtin.str("__setitem__"),Sk.builtin.str.$slots=new Sk.builtin.str("__slots__"),Sk.builtin.str.$str=new Sk.builtin.str("__str__"),Sk.builtin.str.$setname=new Sk.builtin.str("__set_name__"),Sk.builtin.str.$trunc=new Sk.builtin.str("__trunc__"),Sk.builtin.str.$write=new Sk.builtin.str("write"),Sk.misceval.op2method_={Eq:Sk.builtin.str.$eq,NotEq:Sk.builtin.str.$ne,Gt:Sk.builtin.str.$gt,GtE:Sk.builtin.str.$ge,Lt:Sk.builtin.str.$lt,LtE:Sk.builtin.str.$le}},function(t,e,n){function i(t,e,n,i,s){this.type=t,this.string=e,this.start=n,this.end=i,this.line=s}function s(t){return"("+Array.prototype.slice.call(arguments).join("|")+")"}function r(t){return s.apply(null,arguments)+"?"}function o(t,e){for(var n=t.length;n--;)if(t[n]===e)return!0;return!1}function a(t){return t=t.normalize("NFKC"),E.test(t)}function l(){return" FR RF Br BR Fr r B R b bR f rb rB F Rf U rF u RB br fR fr rf Rb".split(" ")}function u(t){t?delete Sk.token.EXACT_TOKEN_TYPES["<>"]:Sk.token.EXACT_TOKEN_TYPES["<>"]=Sk.token.tokens.T_NOTEQUAL,I=Object.keys(Sk.token.EXACT_TOKEN_TYPES).sort(),A=s.apply(this,I.reverse().map((function(t){return t&&d.test(t)?t.replace(_,"\\$&"):t}))),O=s("\\r?\\n",A)}n.r(e),(t={Cc:"\\0-\\x1F\\x7F-\\x9F",Cf:"\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB",Co:"\\uE000-\\uF8FF",Cs:"\\uD800-\\uDFFF",Ll:"a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0529\\u052B\\u052D\\u052F\\u0560-\\u0588\\u10D0-\\u10FA\\u10FD-\\u10FF\\u13F8-\\u13FD\\u1C80-\\u1C88\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA699\\uA69B\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793-\\uA795\\uA797\\uA799\\uA79B\\uA79D\\uA79F\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7AF\\uA7B5\\uA7B7\\uA7B9\\uA7BB\\uA7BD\\uA7BF\\uA7C3\\uA7C8\\uA7CA\\uA7F6\\uA7FA\\uAB30-\\uAB5A\\uAB60-\\uAB68\\uAB70-\\uABBF\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A",Lm:"\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uAB69\\uFF70\\uFF9E\\uFF9F",Lo:"\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1100-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAAE0-\\uAAEA\\uAAF2\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Lt:"\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC",Lu:"A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0528\\u052A\\u052C\\u052E\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u13A0-\\u13F5\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA698\\uA69A\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA796\\uA798\\uA79A\\uA79C\\uA79E\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA-\\uA7AE\\uA7B0-\\uA7B4\\uA7B6\\uA7B8\\uA7BA\\uA7BC\\uA7BE\\uA7C2\\uA7C4-\\uA7C7\\uA7C9\\uA7F5\\uFF21-\\uFF3A",M:"\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Mc:"\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\u302E\\u302F\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uAA7D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC",Me:"\\u0488\\u0489\\u1ABE\\u20DD-\\u20E0\\u20E2-\\u20E4\\uA670-\\uA672",Mn:"\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Nd:"0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19",Nl:"\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF",No:"\\xB2\\xB3\\xB9\\xBC-\\xBE\\u09F4-\\u09F9\\u0B72-\\u0B77\\u0BF0-\\u0BF2\\u0C78-\\u0C7E\\u0D58-\\u0D5E\\u0D70-\\u0D78\\u0F2A-\\u0F33\\u1369-\\u137C\\u17F0-\\u17F9\\u19DA\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u215F\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA830-\\uA835",Pc:"_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F",Pd:"\\-\\u058A\\u05BE\\u1400\\u1806\\u2010-\\u2015\\u2E17\\u2E1A\\u2E3A\\u2E3B\\u2E40\\u301C\\u3030\\u30A0\\uFE31\\uFE32\\uFE58\\uFE63\\uFF0D",Pe:"\\)\\]\\}\\u0F3B\\u0F3D\\u169C\\u2046\\u207E\\u208E\\u2309\\u230B\\u232A\\u2769\\u276B\\u276D\\u276F\\u2771\\u2773\\u2775\\u27C6\\u27E7\\u27E9\\u27EB\\u27ED\\u27EF\\u2984\\u2986\\u2988\\u298A\\u298C\\u298E\\u2990\\u2992\\u2994\\u2996\\u2998\\u29D9\\u29DB\\u29FD\\u2E23\\u2E25\\u2E27\\u2E29\\u3009\\u300B\\u300D\\u300F\\u3011\\u3015\\u3017\\u3019\\u301B\\u301E\\u301F\\uFD3E\\uFE18\\uFE36\\uFE38\\uFE3A\\uFE3C\\uFE3E\\uFE40\\uFE42\\uFE44\\uFE48\\uFE5A\\uFE5C\\uFE5E\\uFF09\\uFF3D\\uFF5D\\uFF60\\uFF63",Pf:"\\xBB\\u2019\\u201D\\u203A\\u2E03\\u2E05\\u2E0A\\u2E0D\\u2E1D\\u2E21",Pi:"\\xAB\\u2018\\u201B\\u201C\\u201F\\u2039\\u2E02\\u2E04\\u2E09\\u2E0C\\u2E1C\\u2E20",Po:"!-#%-'\\*,\\.\\/:;\\?@\\xA1\\xA7\\xB6\\xB7\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u166E\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u1805\\u1807-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2016\\u2017\\u2020-\\u2027\\u2030-\\u2038\\u203B-\\u203E\\u2041-\\u2043\\u2047-\\u2051\\u2053\\u2055-\\u205E\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00\\u2E01\\u2E06-\\u2E08\\u2E0B\\u2E0E-\\u2E16\\u2E18\\u2E19\\u2E1B\\u2E1E\\u2E1F\\u2E2A-\\u2E2E\\u2E30-\\u2E39\\u2E3C-\\u2E3F\\u2E41\\u2E43-\\u2E4F\\u2E52\\u3001-\\u3003\\u303D\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFE10-\\uFE16\\uFE19\\uFE30\\uFE45\\uFE46\\uFE49-\\uFE4C\\uFE50-\\uFE52\\uFE54-\\uFE57\\uFE5F-\\uFE61\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF07\\uFF0A\\uFF0C\\uFF0E\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3C\\uFF61\\uFF64\\uFF65",Ps:"\\(\\[\\{\\u0F3A\\u0F3C\\u169B\\u201A\\u201E\\u2045\\u207D\\u208D\\u2308\\u230A\\u2329\\u2768\\u276A\\u276C\\u276E\\u2770\\u2772\\u2774\\u27C5\\u27E6\\u27E8\\u27EA\\u27EC\\u27EE\\u2983\\u2985\\u2987\\u2989\\u298B\\u298D\\u298F\\u2991\\u2993\\u2995\\u2997\\u29D8\\u29DA\\u29FC\\u2E22\\u2E24\\u2E26\\u2E28\\u2E42\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\u3016\\u3018\\u301A\\u301D\\uFD3F\\uFE17\\uFE35\\uFE37\\uFE39\\uFE3B\\uFE3D\\uFE3F\\uFE41\\uFE43\\uFE47\\uFE59\\uFE5B\\uFE5D\\uFF08\\uFF3B\\uFF5B\\uFF5F\\uFF62",Sc:"\\$\\xA2-\\xA5\\u058F\\u060B\\u07FE\\u07FF\\u09F2\\u09F3\\u09FB\\u0AF1\\u0BF9\\u0E3F\\u17DB\\u20A0-\\u20BF\\uA838\\uFDFC\\uFE69\\uFF04\\uFFE0\\uFFE1\\uFFE5\\uFFE6",Sk:"\\^`\\xA8\\xAF\\xB4\\xB8\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u309B\\u309C\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uAB5B\\uAB6A\\uAB6B\\uFBB2-\\uFBC1\\uFF3E\\uFF40\\uFFE3",Sm:"\\+<->\\|~\\xAC\\xB1\\xD7\\xF7\\u03F6\\u0606-\\u0608\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u2118\\u2140-\\u2144\\u214B\\u2190-\\u2194\\u219A\\u219B\\u21A0\\u21A3\\u21A6\\u21AE\\u21CE\\u21CF\\u21D2\\u21D4\\u21F4-\\u22FF\\u2320\\u2321\\u237C\\u239B-\\u23B3\\u23DC-\\u23E1\\u25B7\\u25C1\\u25F8-\\u25FF\\u266F\\u27C0-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u27FF\\u2900-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2AFF\\u2B30-\\u2B44\\u2B47-\\u2B4C\\uFB29\\uFE62\\uFE64-\\uFE66\\uFF0B\\uFF1C-\\uFF1E\\uFF5C\\uFF5E\\uFFE2\\uFFE9-\\uFFEC",So:"\\xA6\\xA9\\xAE\\xB0\\u0482\\u058D\\u058E\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u09FA\\u0B70\\u0BF3-\\u0BF8\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u214A\\u214C\\u214D\\u214F\\u218A\\u218B\\u2195-\\u2199\\u219C-\\u219F\\u21A1\\u21A2\\u21A4\\u21A5\\u21A7-\\u21AD\\u21AF-\\u21CD\\u21D0\\u21D1\\u21D3\\u21D5-\\u21F3\\u2300-\\u2307\\u230C-\\u231F\\u2322-\\u2328\\u232B-\\u237B\\u237D-\\u239A\\u23B4-\\u23DB\\u23E2-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u25B6\\u25B8-\\u25C0\\u25C2-\\u25F7\\u2600-\\u266E\\u2670-\\u2767\\u2794-\\u27BF\\u2800-\\u28FF\\u2B00-\\u2B2F\\u2B45\\u2B46\\u2B4D-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA828-\\uA82B\\uA836\\uA837\\uA839\\uAA77-\\uAA79\\uFDFD\\uFFE4\\uFFE8\\uFFED\\uFFEE\\uFFFC\\uFFFD",Zl:"\\u2028",Zp:"\\u2029",Zs:" \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000"}).C=t.Cc+t.Cf+t.Cs+t.Co,t.L=t.Lu+t.Ll+t.Lt+t.Lm+t.Mn+t.Lo,t.LC=t.Lu+t.Ll+t.Lt,t.M=t.Mn+t.Mc+t.Me,t.N=t.Nd+t.Nl+t.No,t.P=t.Pc+t.Pd+t.Ps+t.Pe+t.Pi+t.Pf+t.Po,t.S=t.Sm+t.Sc+t.Sk+t.So,t.Z=t.Zs+t.Zl+t.Zp,t.w="_"+t.L+t.N,t.b="(?:["+t.w+"](?:[^"+t.w+"]|$)|(?:^|[^"+t.w+"])["+t.w+"])",t.bOut="(?=[^"+t.w+"]|$)",t.bIn="(?:^|[^"+t.w+"])",t.bInCapture="(?:^|([^"+t.w+"]))",t.B="(?:["+t.w+"]["+t.w+"]|[^"+t.w+"][^"+t.w+"])",t.d=t.N;var c=Sk.token.tokens;const p=Sk.builtin.SyntaxError,h=Sk.builtin.SyntaxError;i.prototype.exact_type=function(){return this.type==c.T_OP&&this.string in Sk.token.EXACT_TOKEN_TYPES?Sk.token.EXACT_TOKEN_TYPES[this.string]:this.type};var _=/[\\^$.*+?()[\]{}|]/g,d=RegExp(_.source);const{Lu:f,Ll:m,Lt:g,Lm:b,Lo:S,Nl:k,Mn:y,Mc:T,Nd:v,Pc:$}=t,w="["+(t=f+m+g+b+S+k+"_\\u1885-\\u1886\\u2118\\u212E\\u309B-\\u309C")+"]+["+(t+y+T+v+$)+"\\u00B7\\u0387\\u1369-\\u1371\\u19DA]*",E=new RegExp("^"+w+"$");Sk.token.isIdentifier=a,function(t){s.apply(null,arguments)}("\\\\\\r?\\n[ \\f\\t]*"),r("#[^\\r\\n]*"),t=s("[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?","\\.[0-9](?:_?[0-9])*")+r("[eE][-+]?[0-9](?:_?[0-9])*");var I,A,O,M=s(t,"[0-9](?:_?[0-9])*[eE][-+]?[0-9](?:_?[0-9])*"),C=s("[0-9](?:_?[0-9])*[jJ]",M+"[jJ]");t=s.apply(null,l()),e=s(t+"'''",t+'"""'),s(t+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'",t+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*"'),u(!0),Sk.token.setupTokens=u;var R=s(t+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*"+s("'","\\\\\\r?\\n"),t+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*'+s('"',"\\\\\\r?\\n")),x=s("\\\\\\r?\\n|$","#[^\\r\\n]*",e),N={};t=l();for(let e of t)N[e+"'"]="^[^'\\\\]*(?:\\\\.[^'\\\\]*)*'",N[e+'"']='^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"',N[e+"'''"]="^[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''",N[e+'"""']='^[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';let L=[],D=[];for(let e of t)L.push(e+'"'),L.push(e+"'"),D.push(e+'"""'),D.push(e+"'''");Sk._tokenize=function(t,e,n,r){var l=Sk.__future__.python3?"":"(?:L?)";l=s("0[xX](?:_?[0-9a-fA-F])+"+l,"0[bB](?:_?[01])+"+l,Sk.__future__.silent_octal_literal?"0([oO]?)(?:_?[0-7])+"+l:"0([oO])(?:_?[0-7])+"+l,"(?:0(?:_?0)*|[1-9](?:_?[0-9])*)"+l),l=s(C,M,l),l="[ \\f\\t]*"+s(x,l,O,R,w),l=new RegExp(l);var u,_,d,f=0,m=0,g=0,b="",S=0,k=null,y=[0],T=void 0,v=void 0;void 0!==n&&("utf-8-sig"==n&&(n="utf-8"),r(new i(c.T_ENCODING,n,[0,0],[0,0],"")));for(var $=n="";;){try{n=$,$=e()}catch(t){$=""}f+=1;var E=0,I=$.length;if(b){if(!$)throw new p("EOF in multi-line string",t,v[0],v[1]);T.lastIndex=0;var A=T.exec($);if(!A){S&&"\\\n"!==$.substring($.length-2)&&"\\\r\n"!==$.substring($.length-3)?(r(new i(c.T_ERRORTOKEN,b+$,v,[f,$.length],k)),b="",k=null):(b+=$,k+=$);continue}E=_=A[0].length,r(new i(c.T_STRING,b+$.substring(0,_),v,[f,_],k+$)),b="",S=0,k=null}else if(0!=m||g){if(!$)throw new p("EOF in multi-line statement",t,f,0);g=0}else{if(!$)break;for(u=0;Ey[y.length-1]&&(y.push(u),r(new i(c.T_INDENT,$.substring(E),[f,0],[f,E],$)));u{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{controls_type:()=>nt,controls_typeLists:()=>it,lists_zip:()=>st,lists_zip_container:()=>rt,lists_zip_item:()=>ot,unpack_iterable_object:()=>at,variables_change:()=>tt,variables_get:()=>Q,variables_global:()=>et,variables_set:()=>Z});var e={};n.r(e),n.d(e,{base_setup:()=>ct,controls_delay:()=>pt,controls_end_program:()=>ht,controls_except:()=>wt,controls_finally:()=>Et,controls_flow_statements:()=>bt,controls_for:()=>St,controls_forEach:()=>ft,controls_for_range:()=>kt,controls_if:()=>_t,controls_if_else:()=>vt,controls_if_elseif:()=>Tt,controls_if_if:()=>yt,controls_lambda:()=>At,controls_main:()=>ut,controls_pass:()=>Ot,controls_range:()=>dt,controls_repeat_ext:()=>It,controls_thread:()=>Mt,controls_try:()=>$t,controls_try_finally:()=>gt,controls_whileUntil:()=>mt,do_while:()=>Ct,garbage_collection:()=>Rt,get_mem_alloc:()=>xt,get_mem_free:()=>Nt,get_unique_identifier:()=>Lt});var i={};n.r(i),n.d(i,{base_map:()=>ne,math_arithmetic:()=>Vt,math_bit:()=>Yt,math_constant:()=>Pt,math_constant_mp:()=>Bt,math_constrain:()=>Wt,math_dec:()=>Gt,math_indexer_number:()=>Kt,math_map:()=>Jt,math_max_min:()=>Ht,math_number:()=>Ft,math_number_base_conversion:()=>qt,math_random:()=>zt,math_random_seed:()=>Qt,math_round:()=>Zt,math_selfcalcu:()=>Ut,math_to_int:()=>Xt,math_trig:()=>jt,text_to_number:()=>te,text_to_number_skulpt:()=>ee,turn_to_int:()=>ie});var s={};n.r(s),n.d(s,{ascii_to_char:()=>ue,char_to_ascii:()=>ce,number_to_text:()=>pe,os_system:()=>De,text:()=>re,text_capital:()=>ke,text_center:()=>ye,text_char:()=>ae,text_char_at:()=>de,text_char_at2:()=>_e,text_char_at3:()=>Re,text_compareTo:()=>Ce,text_compare_to:()=>Se,text_create_with_container:()=>Ae,text_create_with_item:()=>Oe,text_encode:()=>Ne,text_equals_starts_ends:()=>be,text_eval:()=>Le,text_find:()=>Te,text_format:()=>Ie,text_format_noreturn:()=>xe,text_join:()=>le,text_join_seq:()=>ve,text_length:()=>he,text_random_char:()=>fe,text_replace:()=>$e,text_split:()=>we,text_strip:()=>Ee,text_substring:()=>ge,text_substring2:()=>me,text_substring3:()=>Me,text_textarea:()=>oe});var r={};n.r(r),n.d(r,{list_many_input:()=>on,list_tolist:()=>cn,list_tolist2:()=>bn,list_trig:()=>nn,lists_2d_get_col_row_data:()=>Ue,lists_2d_get_data_with_col_row:()=>Ve,lists_append_extend:()=>qe,lists_change_to:()=>rn,lists_change_to_general:()=>ln,lists_clear:()=>Qe,lists_create_with:()=>Ye,lists_create_with2:()=>pn,lists_create_with_container:()=>Ge,lists_create_with_item:()=>Xe,lists_create_with_noreturn:()=>an,lists_create_with_text:()=>je,lists_create_with_text2:()=>hn,lists_del_general:()=>un,lists_find:()=>en,lists_getIndex3:()=>_n,lists_getSublist3:()=>dn,lists_get_index:()=>Pe,lists_get_random_item:()=>ze,lists_get_random_sublist:()=>We,lists_get_sublist:()=>Be,lists_insert_value:()=>Je,lists_insert_value2:()=>mn,lists_pop:()=>tn,lists_remove_at:()=>Ze,lists_remove_at2:()=>gn,lists_reverse:()=>Ke,lists_setIndex3:()=>fn,lists_set_index:()=>He,lists_sort:()=>sn});var o={};n.r(o),n.d(o,{dicts_add_change_del:()=>Nn,dicts_add_or_change:()=>En,dicts_clear:()=>On,dicts_create_with:()=>kn,dicts_create_with_container:()=>yn,dicts_create_with_item:()=>Tn,dicts_create_with_noreturn:()=>Fn,dicts_deldict:()=>xn,dicts_delete:()=>In,dicts_get:()=>$n,dicts_get_default:()=>wn,dicts_items:()=>Mn,dicts_keys:()=>vn,dicts_length:()=>Rn,dicts_pop:()=>Ln,dicts_setdefault:()=>Dn,dicts_to_json:()=>Bn,dicts_todict:()=>Pn,dicts_update:()=>An,dicts_values:()=>Cn,json_to_dicts:()=>Vn});var a={};n.r(a),n.d(a,{logic_boolean:()=>Hn,logic_compare:()=>Yn,logic_compare_continous:()=>jn,logic_is:()=>Jn,logic_is_in:()=>Wn,logic_negate:()=>Xn,logic_null:()=>qn,logic_operation:()=>Gn,logic_tobool:()=>Kn,logic_true_or_false:()=>zn});var l={};n.r(l),n.d(l,{sdcard_mount:()=>ki,sdcard_use_spi_init:()=>Si,storage_can_write_ornot:()=>oi,storage_change_dir:()=>gi,storage_close_file:()=>li,storage_delete_file:()=>ci,storage_file_seek:()=>_i,storage_file_tell:()=>hi,storage_file_write:()=>ni,storage_fileopen:()=>Zn,storage_fileopen_new:()=>ti,storage_fileopen_new_encoding:()=>ei,storage_get_a_line:()=>ri,storage_get_contents:()=>si,storage_get_contents_without_para:()=>ii,storage_get_current_dir:()=>di,storage_get_file_size:()=>pi,storage_get_filename:()=>ai,storage_is_file:()=>bi,storage_list_all_files:()=>ui,storage_make_dir:()=>fi,storage_open_file_with_os:()=>Qn,storage_rename:()=>mi});var u={};n.r(u),n.d(u,{procedures_callnoreturn:()=>wi,procedures_callreturn:()=>Ei,procedures_defnoreturn:()=>yi,procedures_defreturn:()=>Ti,procedures_ifreturn:()=>Ii,procedures_mutatorarg:()=>$i,procedures_mutatorcontainer:()=>vi,procedures_return:()=>Ai});var c={};n.r(c),n.d(c,{tuple_change_to:()=>Vi,tuple_create_with:()=>Mi,tuple_create_with_container:()=>Ci,tuple_create_with_item:()=>Ri,tuple_create_with_noreturn:()=>Gi,tuple_create_with_text2:()=>xi,tuple_create_with_text_return:()=>Ni,tuple_del:()=>Fi,tuple_find:()=>Ui,tuple_getIndex:()=>Li,tuple_getSublist:()=>ji,tuple_get_random_item:()=>Hi,tuple_get_sublist:()=>Xi,tuple_join:()=>Pi,tuple_length:()=>Di,tuple_max:()=>Bi,tuple_totuple:()=>qi,tuple_trig:()=>Yi});var p={};n.r(p),n.d(p,{set_add_discard:()=>is,set_clear:()=>ts,set_create_with:()=>Wi,set_create_with_container:()=>Ji,set_create_with_item:()=>Ki,set_create_with_text_return:()=>os,set_length:()=>Qi,set_operate:()=>es,set_operate_update:()=>ns,set_pop:()=>Zi,set_sub:()=>ss,set_toset:()=>as,set_update:()=>rs});var h={};n.r(h),n.d(h,{html_content:()=>hs,html_content_more:()=>_s,html_document:()=>us,html_form:()=>fs,html_head_body:()=>ps,html_style:()=>ds,html_style_color:()=>gs,html_style_content:()=>ms,html_text:()=>bs,html_title:()=>cs});var _={};n.r(_),n.d(_,{attribute_access:()=>Rs,function_call:()=>Os,function_call_container:()=>Ms,function_call_item:()=>Cs,raw_block:()=>ys,raw_empty:()=>vs,raw_expression:()=>Ts,raw_table:()=>ks,text_comment:()=>$s,text_print_multiple:()=>Es,text_print_multiple_container:()=>Is,text_print_multiple_item:()=>As,type_check:()=>ws});var d={};n.r(d),n.d(d,{algorithm_add_path:()=>Bs,algorithm_add_school:()=>Ls,algorithm_all_books:()=>er,algorithm_all_books_sequence:()=>nr,algorithm_book_scale:()=>dr,algorithm_check_feet:()=>wr,algorithm_chick_calculate:()=>$r,algorithm_color_seclet:()=>jr,algorithm_current_school:()=>Xs,algorithm_del_path:()=>Vs,algorithm_delete_book:()=>cr,algorithm_delete_books:()=>pr,algorithm_delete_books2:()=>hr,algorithm_divide_books:()=>lr,algorithm_find_path:()=>Ds,algorithm_first_book:()=>ir,algorithm_fz_calc:()=>Or,algorithm_fz_calc_first_min:()=>Mr,algorithm_fz_compare:()=>Cr,algorithm_fz_move:()=>xr,algorithm_fz_set_min:()=>Rr,algorithm_get_book_num:()=>br,algorithm_get_current_location:()=>Ur,algorithm_get_half_books:()=>ur,algorithm_hxdb_add:()=>Pr,algorithm_hxdb_init_soldier:()=>Lr,algorithm_hxdb_last_line:()=>Fr,algorithm_hxdb_result:()=>Br,algorithm_hxdb_stand_in_line:()=>Dr,algorithm_init_fzsf:()=>Ar,algorithm_init_hxdb:()=>Nr,algorithm_init_jttl:()=>yr,algorithm_move_recent:()=>Ws,algorithm_new_path:()=>Fs,algorithm_next_book:()=>or,algorithm_no_left:()=>Ys,algorithm_no_path:()=>Hs,algorithm_no_ring2:()=>sr,algorithm_not_home:()=>Js,algorithm_not_school:()=>Ks,algorithm_number_add:()=>mr,algorithm_number_zero:()=>fr,algorithm_prepare:()=>Ns,algorithm_prepare2:()=>Gs,algorithm_prepare_2_1:()=>qs,algorithm_prepare_2_2:()=>zs,algorithm_print_book2:()=>_r,algorithm_print_divide:()=>kr,algorithm_print_jttl_answer:()=>Er,algorithm_print_number:()=>gr,algorithm_print_path:()=>js,algorithm_print_path2:()=>Qs,algorithm_print_sequence:()=>Sr,algorithm_rabbit_add:()=>Ir,algorithm_rabbit_number_in_range:()=>vr,algorithm_rabbit_zero:()=>Tr,algorithm_return_path:()=>Us,algorithm_set_path:()=>Ps,algorithm_two_left:()=>ar,algorithm_void_path:()=>Yr,algorithm_yes_ring2:()=>rr,hanoi_init:()=>Zs,hanoi_init_offline:()=>Vr,hanoi_move:()=>tr});var f={};n.r(f),n.d(f,{factory_block:()=>to,factory_block_return:()=>eo,factory_block_return_with_textarea:()=>io,factory_block_with_textarea:()=>no,factory_callMethod_noreturn:()=>Qr,factory_callMethod_return:()=>Zr,factory_create_with_container:()=>zr,factory_create_with_item:()=>Wr,factory_declare:()=>Kr,factory_from_import:()=>Xr,factory_function_noreturn:()=>qr,factory_function_return:()=>Jr,factory_import:()=>Hr});var m={};n.r(m),n.d(m,{array_create:()=>yo,array_toarray:()=>Lo,dataframe_create:()=>ao,dataframe_create_from_index:()=>uo,dataframe_create_from_one_index:()=>lo,dataframe_get:()=>Ro,numpy_trig:()=>Oo,pandas_readcsv:()=>Co,pl_axes:()=>go,pl_bar:()=>wo,pl_hist:()=>Io,pl_label:()=>ko,pl_legend:()=>bo,pl_pie:()=>Eo,pl_plot:()=>fo,pl_plot_bar:()=>To,pl_plot_easy:()=>_o,pl_plot_scatter:()=>vo,pl_plot_xy:()=>$o,pl_savefig:()=>xo,pl_show:()=>mo,pl_subplot:()=>Mo,pl_text:()=>No,pl_ticks:()=>Ao,pl_title:()=>So,plot_axes:()=>Bo,plot_bar:()=>Ho,plot_hist:()=>zo,plot_label:()=>Yo,plot_legend:()=>Vo,plot_pie:()=>qo,plot_plot:()=>Fo,plot_plot_bar:()=>jo,plot_plot_easy:()=>Do,plot_plot_scatter:()=>Go,plot_plot_xy:()=>Xo,plot_savefig:()=>Ko,plot_show:()=>Po,plot_subplot:()=>Jo,plot_text:()=>Qo,plot_ticks:()=>Wo,plot_title:()=>Uo,series_create:()=>ro,series_create_from_index:()=>oo,series_create_from_text:()=>co,series_get_num:()=>ho,series_index_value:()=>po});var g={};n.r(g),n.d(g,{inout_input:()=>ta,inout_print:()=>ea,inout_print_container:()=>oa,inout_print_end:()=>ia,inout_print_inline:()=>na,inout_print_item:()=>aa,inout_print_many:()=>ra,inout_type_input:()=>sa});var b={};n.r(b),n.d(b,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>va,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Ta,IOT_EMQX_PING:()=>ka,IOT_FORMATTING:()=>ba,IOT_FORMAT_STRING:()=>Sa,IOT_MIXIO_NTP:()=>ya,IOT_MIXIO_PUBLISH:()=>ca,IOT_MIXIO_SUBSCRIBE:()=>pa,IOT_MIXIO_UNSUBSCRIBE:()=>ha,iot_mixio_check:()=>fa,iot_mixio_connect:()=>ua,iot_mixio_connect_only:()=>da,iot_mixio_disconnect:()=>_a,iot_mixio_format_msg:()=>ga,iot_mixio_format_topic:()=>ma,iot_mixly_key:()=>$a,iot_mixly_key_py:()=>wa});var S={};n.r(S),n.d(S,{Panic_with_status_code:()=>Ma,base_delay:()=>Ia,controls_millis:()=>Aa,controls_mstimer2:()=>Ra,controls_mstimer2_start:()=>xa,controls_mstimer2_stop:()=>Na,reset:()=>Ca,time_localtime:()=>Oa,time_sleep:()=>La});var k={};n.r(k),n.d(k,{turtle_bgcolor:()=>nl,turtle_bgcolor_hex:()=>pl,turtle_bgcolor_hex_new:()=>ol,turtle_circle:()=>Za,turtle_circle_advanced:()=>tl,turtle_clear:()=>qa,turtle_clone:()=>rl,turtle_color:()=>ul,turtle_color_hex:()=>cl,turtle_color_seclet:()=>yl,turtle_create:()=>Fa,turtle_done:()=>Pa,turtle_exitonclick:()=>Ba,turtle_fill:()=>Wa,turtle_fillcolor:()=>sl,turtle_fillcolor_hex:()=>_l,turtle_fillcolor_hex_new:()=>ll,turtle_getscreen:()=>Tl,turtle_goto:()=>Ga,turtle_listen:()=>El,turtle_move:()=>Va,turtle_numinput:()=>ml,turtle_onclick:()=>$l,turtle_onkey:()=>vl,turtle_ontimer:()=>wl,turtle_pencolor:()=>il,turtle_pencolor_hex:()=>hl,turtle_pencolor_hex_new:()=>al,turtle_penup:()=>za,turtle_pos_shape:()=>Ha,turtle_rotate:()=>Ua,turtle_screen_delay:()=>ja,turtle_screen_savefig:()=>Il,turtle_setheading:()=>Ya,turtle_setxy:()=>Xa,turtle_shape:()=>dl,turtle_shapesize:()=>fl,turtle_size:()=>Ka,turtle_size_speed:()=>Ja,turtle_speed:()=>Qa,turtle_textinput:()=>gl,turtle_visible:()=>el,turtle_write:()=>bl,turtle_write_format:()=>Sl,turtle_write_format_skulpt:()=>kl});var y={};n.r(y),n.d(y,{controls_type:()=>Rl,controls_typeLists:()=>xl,lists_zip:()=>Nl,unpack_iterable_object:()=>Ll,variables_change:()=>Ml,variables_get:()=>Al,variables_global:()=>Cl,variables_set:()=>Ol});var T={};n.r(T),n.d(T,{Panic_with_status_code:()=>Xl,base_setup:()=>Fl,controls_delay:()=>Gl,controls_flow_statements:()=>jl,controls_for:()=>Vl,controls_forEach:()=>Jl,controls_for_range:()=>Ul,controls_if:()=>Pl,controls_interrupts:()=>zl,controls_lambda:()=>Ql,controls_main:()=>Dl,controls_millis:()=>Hl,controls_nointerrupts:()=>Wl,controls_pass:()=>tu,controls_range:()=>Kl,controls_repeat:()=>lu,controls_repeat_ext:()=>iu,controls_thread:()=>eu,controls_try_finally:()=>Bl,controls_whileUntil:()=>Yl,do_while:()=>nu,garbage_collection:()=>su,get_mem_alloc:()=>ru,get_mem_free:()=>ou,get_unique_identifier:()=>au,reset:()=>ql,time_sleep:()=>Zl});var v={};n.r(v),n.d(v,{base_map:()=>Ou,math_arithmetic:()=>_u,math_bit:()=>hu,math_constant:()=>cu,math_constant_mp:()=>pu,math_constrain:()=>Tu,math_dec:()=>gu,math_indexer_number:()=>wu,math_map:()=>yu,math_max_min:()=>Su,math_number:()=>uu,math_number_base_conversion:()=>vu,math_random:()=>ku,math_random_seed:()=>$u,math_round:()=>Eu,math_selfcalcu:()=>du,math_single:()=>fu,math_to_int:()=>bu,math_trig:()=>mu,text_to_number:()=>Iu,text_to_number_skulpt:()=>Au,turn_to_int:()=>Mu});var w={};n.r(w),n.d(w,{ascii_to_char:()=>Lu,char_to_ascii:()=>Du,number_to_text:()=>Fu,os_system:()=>oc,text:()=>Cu,text_capital:()=>Hu,text_center:()=>qu,text_char:()=>xu,text_char_at:()=>Vu,text_char_at2:()=>Bu,text_char_at3:()=>ic,text_compareTo:()=>nc,text_compare_to:()=>ju,text_encode:()=>sc,text_equals_starts_ends:()=>Yu,text_eval:()=>rc,text_find:()=>zu,text_format:()=>Zu,text_format_noreturn:()=>tc,text_join:()=>Nu,text_join_seq:()=>Wu,text_length:()=>Pu,text_random_char:()=>Uu,text_replace:()=>Ju,text_split:()=>Ku,text_strip:()=>Qu,text_substring:()=>Xu,text_substring2:()=>Gu,text_substring3:()=>ec,text_textarea:()=>Ru});var E={};n.r(E),n.d(E,{list_many_input:()=>Ec,list_tolist:()=>Fc,list_tolist2:()=>Pc,list_trig:()=>vc,lists_2d_get_col_row_data:()=>uc,lists_2d_get_data_with_col_row:()=>lc,lists_append_extend:()=>dc,lists_change_to:()=>wc,lists_change_to_general:()=>Ac,lists_clear:()=>Sc,lists_create_with:()=>cc,lists_create_with2:()=>Mc,lists_create_with_noreturn:()=>Ic,lists_create_with_text:()=>pc,lists_create_with_text2:()=>Cc,lists_del_general:()=>Oc,lists_find:()=>kc,lists_getIndex3:()=>Rc,lists_getSublist3:()=>xc,lists_get_index:()=>hc,lists_get_random_item:()=>fc,lists_get_random_sublist:()=>mc,lists_get_sublist:()=>ac,lists_insert_value:()=>gc,lists_insert_value2:()=>Lc,lists_pop:()=>Tc,lists_remove_at:()=>yc,lists_remove_at2:()=>Dc,lists_reverse:()=>bc,lists_setIndex3:()=>Nc,lists_set_index:()=>_c,lists_sort:()=>$c});var I={};n.r(I),n.d(I,{dicts_add_change_del:()=>Kc,dicts_add_or_change:()=>jc,dicts_clear:()=>Hc,dicts_create_with:()=>Bc,dicts_create_with_noreturn:()=>tp,dicts_deldict:()=>Jc,dicts_delete:()=>Gc,dicts_get:()=>Uc,dicts_get_default:()=>Yc,dicts_items:()=>qc,dicts_keys:()=>Vc,dicts_length:()=>Wc,dicts_pop:()=>Qc,dicts_setdefault:()=>Zc,dicts_to_json:()=>np,dicts_todict:()=>ep,dicts_update:()=>Xc,dicts_values:()=>zc,json_to_dicts:()=>ip});var A={};n.r(A),n.d(A,{logic_boolean:()=>lp,logic_compare:()=>sp,logic_compare_continous:()=>rp,logic_is:()=>hp,logic_is_in:()=>pp,logic_negate:()=>ap,logic_null:()=>up,logic_operation:()=>op,logic_tobool:()=>_p,logic_true_or_false:()=>cp});var O={};n.r(O),n.d(O,{sdcard_mount:()=>Dp,sdcard_use_spi_init:()=>Lp,storage_can_write_ornot:()=>Tp,storage_change_dir:()=>Mp,storage_close_file:()=>$p,storage_delete_file:()=>Ep,storage_file_seek:()=>Op,storage_file_tell:()=>Ap,storage_file_write:()=>bp,storage_fileopen:()=>fp,storage_fileopen_new:()=>mp,storage_fileopen_new_encoding:()=>gp,storage_get_a_line:()=>yp,storage_get_contents:()=>kp,storage_get_contents_without_para:()=>Sp,storage_get_current_dir:()=>Cp,storage_get_file_size:()=>Ip,storage_get_filename:()=>vp,storage_is_file:()=>Np,storage_list_all_files:()=>wp,storage_make_dir:()=>Rp,storage_open_file_with_os:()=>dp,storage_rename:()=>xp});var M={};n.r(M),n.d(M,{procedures_callnoreturn:()=>Vp,procedures_callreturn:()=>Bp,procedures_defnoreturn:()=>Pp,procedures_defreturn:()=>Fp,procedures_ifreturn:()=>Up,procedures_return:()=>Yp});var C={};n.r(C),n.d(C,{tuple_change_to:()=>Kp,tuple_create_with:()=>jp,tuple_create_with_noreturn:()=>eh,tuple_create_with_text2:()=>Gp,tuple_create_with_text_return:()=>Xp,tuple_del:()=>zp,tuple_find:()=>Qp,tuple_getIndex:()=>Hp,tuple_getSublist:()=>th,tuple_get_random_item:()=>ih,tuple_get_sublist:()=>nh,tuple_join:()=>Wp,tuple_length:()=>qp,tuple_max:()=>Jp,tuple_totuple:()=>sh,tuple_trig:()=>Zp});var R={};n.r(R),n.d(R,{set_add_discard:()=>ph,set_clear:()=>lh,set_create_with:()=>rh,set_create_with_text_return:()=>dh,set_length:()=>oh,set_operate:()=>uh,set_operate_update:()=>ch,set_pop:()=>ah,set_sub:()=>hh,set_toset:()=>fh,set_update:()=>_h});var x={};n.r(x),n.d(x,{html_content:()=>Sh,html_content_more:()=>kh,html_document:()=>mh,html_form:()=>Th,html_head_body:()=>bh,html_style:()=>yh,html_style_content:()=>vh,html_text:()=>$h,html_title:()=>gh});var N={};n.r(N),n.d(N,{attribute_access:()=>Ch,function_call:()=>Mh,raw_block:()=>wh,raw_empty:()=>Ih,raw_expression:()=>Eh,raw_table:()=>Ah,type_check:()=>Oh});var L={};n.r(L),n.d(L,{algorithm_add_path:()=>Fh,algorithm_add_school:()=>xh,algorithm_all_books:()=>t_,algorithm_all_books_sequence:()=>Zh,algorithm_book_scale:()=>c_,algorithm_check_feet:()=>b_,algorithm_chick_calculate:()=>g_,algorithm_color_seclet:()=>L_,algorithm_current_school:()=>jh,algorithm_del_path:()=>Ph,algorithm_delete_book:()=>l_,algorithm_divide_books:()=>o_,algorithm_find_path:()=>Nh,algorithm_first_book:()=>e_,algorithm_fz_calc:()=>T_,algorithm_fz_compare:()=>v_,algorithm_fz_move:()=>w_,algorithm_fz_set_min:()=>$_,algorithm_get_current_location:()=>x_,algorithm_get_half_books:()=>a_,algorithm_hxdb_add:()=>M_,algorithm_hxdb_init_soldier:()=>I_,algorithm_hxdb_last_line:()=>O_,algorithm_hxdb_result:()=>C_,algorithm_hxdb_stand_in_line:()=>A_,algorithm_init_fzsf:()=>y_,algorithm_init_hxdb:()=>E_,algorithm_init_jttl:()=>d_,algorithm_move_recent:()=>qh,algorithm_new_path:()=>Lh,algorithm_next_book:()=>s_,algorithm_no_left:()=>Vh,algorithm_no_path:()=>Gh,algorithm_no_ring2:()=>n_,algorithm_not_home:()=>zh,algorithm_not_school:()=>Wh,algorithm_number_add:()=>h_,algorithm_number_zero:()=>p_,algorithm_prepare:()=>Rh,algorithm_prepare2:()=>Yh,algorithm_prepare_2_1:()=>Xh,algorithm_prepare_2_2:()=>Hh,algorithm_print_book2:()=>u_,algorithm_print_jttl_answer:()=>S_,algorithm_print_number:()=>__,algorithm_print_path:()=>Uh,algorithm_print_path2:()=>Jh,algorithm_rabbit_add:()=>k_,algorithm_rabbit_number_in_range:()=>m_,algorithm_rabbit_zero:()=>f_,algorithm_return_path:()=>Bh,algorithm_set_path:()=>Dh,algorithm_two_left:()=>r_,algorithm_void_path:()=>N_,algorithm_yes_ring2:()=>i_,hanoi_init:()=>Kh,hanoi_init_offline:()=>R_,hanoi_move:()=>Qh});var D={};n.r(D),n.d(D,{factory_block:()=>j_,factory_block_return:()=>G_,factory_block_return_with_textarea:()=>H_,factory_block_with_textarea:()=>X_,factory_callMethod_noreturn:()=>U_,factory_callMethod_return:()=>Y_,factory_declare:()=>V_,factory_from_import:()=>D_,factory_function_noreturn:()=>P_,factory_function_return:()=>B_,factory_import:()=>F_});var F={};n.r(F),n.d(F,{array_create:()=>ld,array_toarray:()=>Td,dataframe_create:()=>W_,dataframe_create_from_index:()=>J_,dataframe_create_from_one_index:()=>K_,dataframe_get:()=>Sd,numpy_trig:()=>md,pandas_readcsv:()=>bd,pl_axes:()=>nd,pl_bar:()=>hd,pl_hist:()=>dd,pl_label:()=>ad,pl_legend:()=>rd,pl_pie:()=>_d,pl_plot:()=>sd,pl_plot_bar:()=>ud,pl_plot_easy:()=>id,pl_plot_scatter:()=>cd,pl_plot_xy:()=>pd,pl_savefig:()=>kd,pl_show:()=>ed,pl_subplot:()=>gd,pl_text:()=>yd,pl_ticks:()=>fd,pl_title:()=>od,plot_axes:()=>$d,plot_bar:()=>xd,plot_hist:()=>Ld,plot_label:()=>Od,plot_legend:()=>Id,plot_pie:()=>Nd,plot_plot:()=>Ed,plot_plot_bar:()=>Md,plot_plot_easy:()=>wd,plot_plot_scatter:()=>Cd,plot_plot_xy:()=>Rd,plot_savefig:()=>Pd,plot_show:()=>vd,plot_subplot:()=>Fd,plot_text:()=>Bd,plot_ticks:()=>Dd,plot_title:()=>Ad,series_create:()=>q_,series_create_from_index:()=>z_,series_create_from_text:()=>Q_,series_get_num:()=>td,series_index_value:()=>Z_});var P={};n.r(P),n.d(P,{inout_input:()=>Vd,inout_print:()=>Ud,inout_print_end:()=>jd,inout_print_inline:()=>Yd,inout_print_many:()=>Xd,inout_type_input:()=>Gd});var B={};n.r(B),n.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>sf,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>of,IOT_EMQX_PING:()=>af,IOT_FORMATTING:()=>ef,IOT_FORMAT_STRING:()=>nf,IOT_MIXIO_PUBLISH:()=>qd,IOT_MIXIO_SUBSCRIBE:()=>zd,IOT_MIXIO_UNSUBSCRIBE:()=>Wd,iot_mixio_check:()=>Qd,iot_mixio_connect:()=>Hd,iot_mixio_connect_only:()=>Kd,iot_mixio_disconnect:()=>Jd,iot_mixio_format_msg:()=>tf,iot_mixio_format_topic:()=>Zd,iot_mixly_key:()=>rf,iot_mixly_key_py:()=>lf});var V={};n.r(V),n.d(V,{controls_end_program:()=>cf,controls_millis:()=>uf,time_localtime:()=>pf});var U={};n.r(U),n.d(U,{turtle_bgcolor:()=>Cf,turtle_bgcolor_hex:()=>Lf,turtle_bgcolor_hex_new:()=>Pf,turtle_circle:()=>If,turtle_circle_advanced:()=>Of,turtle_clear:()=>yf,turtle_clone:()=>Nf,turtle_color:()=>Yf,turtle_color_hex:()=>Uf,turtle_color_seclet:()=>Jf,turtle_create:()=>hf,turtle_done:()=>_f,turtle_exitonclick:()=>df,turtle_fill:()=>vf,turtle_fillcolor:()=>xf,turtle_fillcolor_hex:()=>Ff,turtle_fillcolor_hex_new:()=>Vf,turtle_getscreen:()=>Kf,turtle_goto:()=>Sf,turtle_listen:()=>em,turtle_move:()=>ff,turtle_numinput:()=>Hf,turtle_onclick:()=>Zf,turtle_onkey:()=>Qf,turtle_ontimer:()=>tm,turtle_pencolor:()=>Rf,turtle_pencolor_hex:()=>Df,turtle_pencolor_hex_new:()=>Bf,turtle_penup:()=>Tf,turtle_pos_shape:()=>kf,turtle_rotate:()=>mf,turtle_screen_delay:()=>bf,turtle_screen_savefig:()=>nm,turtle_setheading:()=>gf,turtle_setxy:()=>Af,turtle_shape:()=>jf,turtle_shapesize:()=>Gf,turtle_size:()=>wf,turtle_size_speed:()=>$f,turtle_speed:()=>Ef,turtle_textinput:()=>Xf,turtle_visible:()=>Mf,turtle_write:()=>qf,turtle_write_format:()=>zf,turtle_write_format_skulpt:()=>Wf});const Y=Blockly,j=Mixly,G={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&&(o+=i)):n=o}else n="i";return n}},X=G,H={};H.NAME_TYPE=Y.PROCEDURE_CATEGORY_NAME,H.allProcedures=function(t){for(var e=t.getAllBlocks(!1),n=[],i=[],s=0;s{var t={23:()=>{Sk.builtinFiles={files:{"src/builtin/this.py":'s = """Gur Mra bs Clguba, ol Gvz Crgref\n\nOrnhgvshy vf orggre guna htyl.\nRkcyvpvg vf orggre guna vzcyvpvg.\nFvzcyr vf orggre guna pbzcyrk.\nPbzcyrk vf orggre guna pbzcyvpngrq.\nSyng vf orggre guna arfgrq.\nFcnefr vf orggre guna qrafr.\nErnqnovyvgl pbhagf.\nFcrpvny pnfrf nera\'g fcrpvny rabhtu gb oernx gur ehyrf.\nNygubhtu cenpgvpnyvgl orngf chevgl.\nReebef fubhyq arire cnff fvyragyl.\nHayrff rkcyvpvgyl fvyraprq.\nVa gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.\nGurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.\nNygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh\'er Qhgpu.\nAbj vf orggre guna arire.\nNygubhtu arire vf bsgra orggre guna *evtug* abj.\nVs gur vzcyrzragngvba vf uneq gb rkcynva, vg\'f n onq vqrn.\nVs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.\nAnzrfcnprf ner bar ubaxvat terng vqrn -- yrg\'f qb zber bs gubfr!"""\n\nd = {}\nfor c in (65, 97):\n for i in range(26):\n d[chr(i+c)] = chr((i+13) % 26 + c)\n\nprint("".join([d.get(c, c) for c in s]))\n',"src/lib/abc.py":'import _sk_fail; _sk_fail._("abc")\n',"src/lib/aifc.py":'import _sk_fail; _sk_fail._("aifc")\n',"src/lib/antigravity.py":'import webbrowser\n\nwebbrowser.open("https://xkcd.com/353/")\n',"src/lib/anydbm.py":'import _sk_fail; _sk_fail._("anydbm")\n',"src/lib/ast.py":'import _sk_fail; _sk_fail._("ast")\n',"src/lib/asynchat.py":'import _sk_fail; _sk_fail._("asynchat")\n',"src/lib/asyncore.py":'import _sk_fail; _sk_fail._("asyncore")\n',"src/lib/atexit.py":'import _sk_fail; _sk_fail._("atexit")\n',"src/lib/audiodev.py":'import _sk_fail; _sk_fail._("audiodev")\n',"src/lib/base64.py":'import _sk_fail; _sk_fail._("base64")\n',"src/lib/BaseHTTPServer.py":'import _sk_fail; _sk_fail._("BaseHTTPServer")\n',"src/lib/Bastion.py":'import _sk_fail; _sk_fail._("Bastion")\n',"src/lib/bdb.py":'import _sk_fail; _sk_fail._("bdb")\n',"src/lib/binhex.py":'import _sk_fail; _sk_fail._("binhex")\n',"src/lib/bisect.py":'"""Bisection algorithms."""\n\ndef insort_right(a, x, lo=0, hi=None):\n """Insert item x in list a, and keep it sorted assuming a is sorted.\n\n If x is already in a, insert it to the right of the rightmost x.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if x < a[mid]: hi = mid\n else: lo = mid+1\n a.insert(lo, x)\n\ndef bisect_right(a, x, lo=0, hi=None):\n """Return the index where to insert item x in list a, assuming a is sorted.\n\n The return value i is such that all e in a[:i] have e <= x, and all e in\n a[i:] have e > x. So if x already appears in the list, a.insert(x) will\n insert just after the rightmost x already there.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if x < a[mid]: hi = mid\n else: lo = mid+1\n return lo\n\ndef insort_left(a, x, lo=0, hi=None):\n """Insert item x in list a, and keep it sorted assuming a is sorted.\n\n If x is already in a, insert it to the left of the leftmost x.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if a[mid] < x: lo = mid+1\n else: hi = mid\n a.insert(lo, x)\n\n\ndef bisect_left(a, x, lo=0, hi=None):\n """Return the index where to insert item x in list a, assuming a is sorted.\n\n The return value i is such that all e in a[:i] have e < x, and all e in\n a[i:] have e >= x. So if x already appears in the list, a.insert(x) will\n insert just before the leftmost x already there.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if a[mid] < x: lo = mid+1\n else: hi = mid\n return lo\n\n# Overwrite above definitions with a fast C implementation\ntry:\n from _bisect import *\nexcept ImportError:\n pass\n\n# Create aliases\nbisect = bisect_right\ninsort = insort_right\n',"src/lib/bsddb/__init__.py":'import _sk_fail; _sk_fail._("bsddb")\n',"src/lib/cgi.py":'import _sk_fail; _sk_fail._("cgi")\n',"src/lib/CGIHTTPServer.py":'import _sk_fail; _sk_fail._("CGIHTTPServer")\n',"src/lib/cgitb.py":'import _sk_fail; _sk_fail._("cgitb")\n',"src/lib/chunk.py":'import _sk_fail; _sk_fail._("chunk")\n',"src/lib/cmd.py":'import _sk_fail; _sk_fail._("cmd")\n',"src/lib/code.py":'import _sk_fail; _sk_fail._("code")\n',"src/lib/codecs.py":'import _sk_fail; _sk_fail._("codecs")\n',"src/lib/codeop.py":'import _sk_fail; _sk_fail._("codeop")\n',"src/lib/colorsys.py":'import _sk_fail; _sk_fail._("colorsys")\n',"src/lib/commands.py":'import _sk_fail; _sk_fail._("commands")\n',"src/lib/compileall.py":'import _sk_fail; _sk_fail._("compileall")\n',"src/lib/compiler/__init__.py":'import _sk_fail; _sk_fail._("compiler")\n',"src/lib/config/__init__.py":'import _sk_fail; _sk_fail._("config")\n',"src/lib/ConfigParser.py":'import _sk_fail; _sk_fail._("ConfigParser")\n',"src/lib/contextlib.py":'import _sk_fail; _sk_fail._("contextlib")\n',"src/lib/Cookie.py":'import _sk_fail; _sk_fail._("Cookie")\n',"src/lib/cookielib.py":'import _sk_fail; _sk_fail._("cookielib")\n',"src/lib/copy.py":'"""\nThis file was modified from CPython.\nCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved\n"""\nimport types\nclass Error(Exception):\n pass\nerror = Error \nclass _EmptyClass:\n pass\ntry:\n long\nexcept NameError:\n long = int\ntry:\n bytes\nexcept NameError:\n bytes = str\n\ndef check_notimplemented_state(x):\n getstate = getattr(x, "__getstate__", None)\n setstate = getattr(x, "__setstate__", None)\n initargs = getattr(x, "__getinitargs__", None)\n if getstate or setstate or initargs:\n raise NotImplementedError("Skulpt does not yet support copying with user-defined __getstate__, __setstate__ or __getinitargs__()")\n\n\ndef copy(x):\n cls = type(x)\n if callable(x):\n return x\n copier = getattr(cls, "__copy__", None)\n if copier:\n return copier(x)\n if cls in (type(None), int, float, bool, str, bytes, tuple, type, frozenset, long):\n return x\n if (cls == list) or (cls == dict) or (cls == set) or (cls == slice):\n return cls(x)\n reductor = getattr(x, "__reduce_ex__", None)\n if reductor:\n rv = reductor(4)\n else:\n reductor = getattr(x, "__reduce__", None)\n if reductor:\n rv = reductor()\n elif str(cls)[1:6] == "class":\n check_notimplemented_state(x)\n copier = _copy_inst\n return copier(x)\n else:\n raise Error("un(shallow)copyable object of type %s" % cls)\n if isinstance(rv, str):\n return x\n return _reconstruct(x, rv, 0)\n\ndef _copy_inst(x):\n if hasattr(x, \'__copy__\'):\n return x.__copy__()\n if hasattr(x, \'__getinitargs__\'):\n args = x.__getinitargs__()\n y = x.__class__(*args)\n else:\n y = _EmptyClass()\n y.__class__ = x.__class__\n if hasattr(x, \'__getstate__\'):\n state = x.__getstate__()\n else:\n state = x.__dict__\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n y.__dict__.update(state)\n return y\n\nd = _deepcopy_dispatch = {}\n\ndef deepcopy(x, memo=None, _nil=[]):\n """Deep copy operation on arbitrary Python objects.\n See the module\'s __doc__ string for more info.\n """\n if memo is None:\n memo = {}\n idx = id(x)\n y = memo.get(idx, _nil)\n if y is not _nil:\n return y\n cls = type(x)\n copier = _deepcopy_dispatch.get(cls)\n if copier:\n y = copier(x, memo)\n else:\n try:\n issc = issubclass(cls, type)\n except TypeError: # cls is not a class (old Boost; see SF #502085)\n issc = 0\n if issc:\n y = _deepcopy_atomic(x, memo)\n else:\n copier = getattr(x, "__deepcopy__", None)\n if copier:\n y = copier(memo)\n else:\n reductor = getattr(x, "__reduce_ex__", None)\n if reductor:\n rv = reductor(2)\n else:\n rv = None\n reductor = getattr(x, "__reduce__", None)\n if reductor:\n rv = reductor()\n elif str(cls)[1:6] == "class":\n check_notimplemented_state(x)\n copier = _deepcopy_dispatch["InstanceType"]\n y = copier(x, memo)\n else:\n raise Error(\n "un(deep)copyable object of type %s" % cls)\n if rv is not None:\n y = _reconstruct(x, rv, 1, memo)\n memo[idx] = y\n _keep_alive(x, memo) # Make sure x lives at least as long as d\n return y\n\ndef _deepcopy_atomic(x, memo):\n return x\nd[type(None)] = _deepcopy_atomic\n# d[type(Ellipsis)] = _deepcopy_atomic\nd[type(NotImplemented)] = _deepcopy_atomic\nd[int] = _deepcopy_atomic\nd[float] = _deepcopy_atomic\nd[bool] = _deepcopy_atomic\nd[complex] = _deepcopy_atomic\nd[bytes] = _deepcopy_atomic\nd[str] = _deepcopy_atomic\n# try:\n# d[types.CodeType] = _deepcopy_atomic\n# except AttributeError:\n# pass\nd[type] = _deepcopy_atomic\n# d[types.BuiltinFunctionType] = _deepcopy_atomic\nd[types.FunctionType] = _deepcopy_atomic\n# d[weakref.ref] = _deepcopy_atomic\n\ndef _deepcopy_list(x, memo):\n y = []\n memo[id(x)] = y\n for a in x:\n y.append(deepcopy(a, memo))\n return y\nd[list] = _deepcopy_list\n\ndef _deepcopy_set(x, memo):\n result = set([]) # make empty set\n memo[id(x)] = result # register this set in the memo for loop checking\n for a in x: # go through elements of set\n result.add(deepcopy(a, memo)) # add the copied elements into the new set\n return result # return the new set\nd[set] = _deepcopy_set\n\ndef _deepcopy_frozenset(x, memo):\n result = frozenset(_deepcopy_set(x,memo)) \n memo[id(x)] = result \n return result\nd[frozenset] = _deepcopy_frozenset\n\ndef _deepcopy_tuple(x, memo):\n y = [deepcopy(a, memo) for a in x]\n # We\'re not going to put the tuple in the memo, but it\'s still important we\n # check for it, in case the tuple contains recursive mutable structures.\n try:\n return memo[id(x)]\n except KeyError:\n pass\n for k, j in zip(x, y):\n if k is not j:\n y = tuple(y)\n break\n else:\n y = x\n return y\nd[tuple] = _deepcopy_tuple\n\ndef _deepcopy_dict(x, memo):\n y = {}\n memo[id(x)] = y\n for key, value in x.items():\n y[deepcopy(key, memo)] = deepcopy(value, memo)\n return y\nd[dict] = _deepcopy_dict\n\n# def _deepcopy_method(x, memo): # Copy instance methods\n# y = type(x)(x.im_func, deepcopy(x.im_self, memo), x.im_class);\n# return y\nd[types.MethodType] = _deepcopy_atomic\n\ndef _deepcopy_inst(x, memo):\n if hasattr(x, \'__deepcopy__\'):\n return x.__deepcopy__(memo)\n if hasattr(x, \'__getinitargs__\'):\n args = x.__getinitargs__()\n args = deepcopy(args, memo)\n y = x.__class__(*args)\n else:\n y = _EmptyClass()\n y.__class__ = x.__class__\n memo[id(x)] = y\n if hasattr(x, \'__getstate__\'):\n state = x.__getstate__()\n else:\n state = x.__dict__\n state = deepcopy(state, memo)\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n y.__dict__.update(state)\n return y\nd["InstanceType"] = _deepcopy_inst\n\ndef _keep_alive(x, memo):\n """Keeps a reference to the object x in the memo.\n Because we remember objects by their id, we have\n to assure that possibly temporary objects are kept\n alive by referencing them.\n We store a reference at the id of the memo, which should\n normally not be used unless someone tries to deepcopy\n the memo itself...\n """\n try:\n memo[id(memo)].append(x)\n except KeyError:\n # aha, this is the first one :-)\n memo[id(memo)]=[x]\n\ndef _reconstruct(x, info, deep, memo=None):\n if isinstance(info, str):\n return x\n assert isinstance(info, tuple)\n if memo is None:\n memo = {}\n n = len(info)\n assert n in (2, 3, 4, 5)\n callable, args = info[:2]\n if n > 2:\n state = info[2]\n else:\n state = None\n if n > 3:\n listiter = info[3]\n else:\n listiter = None\n if n > 4:\n dictiter = info[4]\n else:\n dictiter = None\n if deep:\n args = deepcopy(args, memo)\n y = callable(*args)\n memo[id(x)] = y\n\n if state is not None:\n if deep:\n state = deepcopy(state, memo)\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n if isinstance(state, tuple) and len(state) == 2:\n state, slotstate = state\n else:\n slotstate = None\n if state is not None:\n y.__dict__.update(state)\n if slotstate is not None:\n for key, value in slotstate.items():\n setattr(y, key, value)\n\n if listiter is not None:\n for item in listiter:\n if deep:\n item = deepcopy(item, memo)\n y.append(item)\n if dictiter is not None:\n for key, value in dictiter:\n if deep:\n key = deepcopy(key, memo)\n value = deepcopy(value, memo)\n y[key] = value\n return y\n\ndel d\n\ndel types\n\n# Helper for instance creation without calling __init__\nclass _EmptyClass:\n pass',"src/lib/copy_reg.py":'import _sk_fail; _sk_fail._("copy_reg")\n',"src/lib/cProfile.py":'import _sk_fail; _sk_fail._("cProfile")\n',"src/lib/csv.py":'import _sk_fail; _sk_fail._("csv")\n',"src/lib/ctypes/macholib/__init__.py":'import _sk_fail; _sk_fail._("macholib")\n',"src/lib/ctypes/__init__.py":'import _sk_fail; _sk_fail._("ctypes")\n',"src/lib/curses/__init__.py":'import _sk_fail; _sk_fail._("curses")\n',"src/lib/dbhash.py":'import _sk_fail; _sk_fail._("dbhash")\n',"src/lib/decimal.py":'import _sk_fail; _sk_fail._("decimal")\n',"src/lib/difflib.py":'import _sk_fail; _sk_fail._("difflib")\n',"src/lib/dircache.py":'import _sk_fail; _sk_fail._("dircache")\n',"src/lib/dis.py":'import _sk_fail; _sk_fail._("dis")\n',"src/lib/distutils/command/__init__.py":'import _sk_fail; _sk_fail._("command")\n',"src/lib/distutils/tests/__init__.py":'import _sk_fail; _sk_fail._("tests")\n',"src/lib/distutils/__init__.py":'import _sk_fail; _sk_fail._("distutils")\n',"src/lib/doctest.py":'import _sk_fail; _sk_fail._("doctest")\n',"src/lib/DocXMLRPCServer.py":'import _sk_fail; _sk_fail._("DocXMLRPCServer")\n',"src/lib/dumbdbm.py":'import _sk_fail; _sk_fail._("dumbdbm")\n',"src/lib/dummy_thread.py":'import _sk_fail; _sk_fail._("dummy_thread")\n',"src/lib/dummy_threading.py":'import _sk_fail; _sk_fail._("dummy_threading")\n',"src/lib/email/mime/__init__.py":'import _sk_fail; _sk_fail._("mime")\n',"src/lib/email/test/data/__init__.py":'import _sk_fail; _sk_fail._("data")\n',"src/lib/email/__init__.py":'import _sk_fail; _sk_fail._("email")\n',"src/lib/encodings/__init__.py":'import _sk_fail; _sk_fail._("encodings")\n',"src/lib/filecmp.py":'import _sk_fail; _sk_fail._("filecmp")\n',"src/lib/fileinput.py":'import _sk_fail; _sk_fail._("fileinput")\n',"src/lib/fnmatch.py":'import _sk_fail; _sk_fail._("fnmatch")\n',"src/lib/formatter.py":'import _sk_fail; _sk_fail._("formatter")\n',"src/lib/fpformat.py":'import _sk_fail; _sk_fail._("fpformat")\n',"src/lib/fractions.py":'import _sk_fail; _sk_fail._("fractions")\n',"src/lib/ftplib.py":'import _sk_fail; _sk_fail._("ftplib")\n',"src/lib/genericpath.py":'import _sk_fail; _sk_fail._("genericpath")\n',"src/lib/getopt.py":'import _sk_fail; _sk_fail._("getopt")\n',"src/lib/getpass.py":'import _sk_fail; _sk_fail._("getpass")\n',"src/lib/gettext.py":'import _sk_fail; _sk_fail._("gettext")\n',"src/lib/glob.py":'import _sk_fail; _sk_fail._("glob")\n',"src/lib/gzip.py":'import _sk_fail; _sk_fail._("gzip")\n',"src/lib/hashlib.py":'import _sk_fail; _sk_fail._("hashlib")\n',"src/lib/heapq.py":'import _sk_fail; _sk_fail._("heapq")\n',"src/lib/hmac.py":'import _sk_fail; _sk_fail._("hmac")\n',"src/lib/hotshot/__init__.py":'import _sk_fail; _sk_fail._("hotshot")\n',"src/lib/htmlentitydefs.py":'import _sk_fail; _sk_fail._("htmlentitydefs")\n',"src/lib/htmllib.py":'import _sk_fail; _sk_fail._("htmllib")\n',"src/lib/HTMLParser.py":'import _sk_fail; _sk_fail._("HTMLParser")\n',"src/lib/httplib.py":'import _sk_fail; _sk_fail._("httplib")\n',"src/lib/idlelib/Icons/__init__.py":'import _sk_fail; _sk_fail._("Icons")\n',"src/lib/idlelib/__init__.py":'import _sk_fail; _sk_fail._("idlelib")\n',"src/lib/ihooks.py":'import _sk_fail; _sk_fail._("ihooks")\n',"src/lib/imaplib.py":'import _sk_fail; _sk_fail._("imaplib")\n',"src/lib/imghdr.py":'import _sk_fail; _sk_fail._("imghdr")\n',"src/lib/imputil.py":'import _sk_fail; _sk_fail._("imputil")\n',"src/lib/io.py":'import _sk_fail; _sk_fail._("io")\n',"src/lib/lib-dynload/__init__.py":'import _sk_fail; _sk_fail._("lib-dynload")\n',"src/lib/lib-tk/__init__.py":'import _sk_fail; _sk_fail._("lib-tk")\n',"src/lib/lib2to3/fixes/__init__.py":'import _sk_fail; _sk_fail._("fixes")\n',"src/lib/lib2to3/pgen2/__init__.py":'import _sk_fail; _sk_fail._("pgen2")\n',"src/lib/lib2to3/tests/__init__.py":'import _sk_fail; _sk_fail._("tests")\n',"src/lib/lib2to3/__init__.py":'import _sk_fail; _sk_fail._("lib2to3")\n',"src/lib/linecache.py":'import _sk_fail; _sk_fail._("linecache")\n',"src/lib/locale.py":'import _sk_fail; _sk_fail._("locale")\n',"src/lib/logging/__init__.py":'import _sk_fail; _sk_fail._("logging")\n',"src/lib/macpath.py":'import _sk_fail; _sk_fail._("macpath")\n',"src/lib/macurl2path.py":'import _sk_fail; _sk_fail._("macurl2path")\n',"src/lib/mailbox.py":'import _sk_fail; _sk_fail._("mailbox")\n',"src/lib/mailcap.py":'import _sk_fail; _sk_fail._("mailcap")\n',"src/lib/markupbase.py":'import _sk_fail; _sk_fail._("markupbase")\n',"src/lib/md5.py":'import _sk_fail; _sk_fail._("md5")\n',"src/lib/mhlib.py":'import _sk_fail; _sk_fail._("mhlib")\n',"src/lib/mimetools.py":'import _sk_fail; _sk_fail._("mimetools")\n',"src/lib/mimetypes.py":'import _sk_fail; _sk_fail._("mimetypes")\n',"src/lib/MimeWriter.py":'import _sk_fail; _sk_fail._("MimeWriter")\n',"src/lib/mimify.py":'import _sk_fail; _sk_fail._("mimify")\n',"src/lib/modulefinder.py":'import _sk_fail; _sk_fail._("modulefinder")\n',"src/lib/multifile.py":'import _sk_fail; _sk_fail._("multifile")\n',"src/lib/multiprocessing/dummy/__init__.py":'import _sk_fail; _sk_fail._("dummy")\n',"src/lib/multiprocessing/__init__.py":'import _sk_fail; _sk_fail._("multiprocessing")\n',"src/lib/mutex.py":'import _sk_fail; _sk_fail._("mutex")\n',"src/lib/netrc.py":'import _sk_fail; _sk_fail._("netrc")\n',"src/lib/new.py":'import _sk_fail; _sk_fail._("new")\n',"src/lib/nntplib.py":'import _sk_fail; _sk_fail._("nntplib")\n',"src/lib/ntpath.py":'import _sk_fail; _sk_fail._("ntpath")\n',"src/lib/nturl2path.py":'import _sk_fail; _sk_fail._("nturl2path")\n',"src/lib/numbers.py":"Number = (int, float, complex)\nIntegral = int\nComplex = complex\n","src/lib/opcode.py":'import _sk_fail; _sk_fail._("opcode")\n',"src/lib/optparse.py":'import _sk_fail; _sk_fail._("optparse")\n',"src/lib/os.py":'import _sk_fail; _sk_fail._("os")\n',"src/lib/os2emxpath.py":'import _sk_fail; _sk_fail._("os2emxpath")\n',"src/lib/pdb.py":'import _sk_fail; _sk_fail._("pdb")\n',"src/lib/pickle.py":'import _sk_fail; _sk_fail._("pickle")\n',"src/lib/pickletools.py":'import _sk_fail; _sk_fail._("pickletools")\n',"src/lib/pipes.py":'import _sk_fail; _sk_fail._("pipes")\n',"src/lib/pkgutil.py":'import _sk_fail; _sk_fail._("pkgutil")\n',"src/lib/platform.py":'import _sk_fail; _sk_fail._("platform")\n',"src/lib/plistlib.py":'import _sk_fail; _sk_fail._("plistlib")\n',"src/lib/popen2.py":'import _sk_fail; _sk_fail._("popen2")\n',"src/lib/poplib.py":'import _sk_fail; _sk_fail._("poplib")\n',"src/lib/posixfile.py":'import _sk_fail; _sk_fail._("posixfile")\n',"src/lib/posixpath.py":'import _sk_fail; _sk_fail._("posixpath")\n',"src/lib/pprint.py":'import _sk_fail; _sk_fail._("pprint")\n',"src/lib/profile.py":'import _sk_fail; _sk_fail._("profile")\n',"src/lib/pstats.py":'import _sk_fail; _sk_fail._("pstats")\n',"src/lib/pty.py":'import _sk_fail; _sk_fail._("pty")\n',"src/lib/pyclbr.py":'import _sk_fail; _sk_fail._("pyclbr")\n',"src/lib/pydoc.py":'import _sk_fail; _sk_fail._("pydoc")\n',"src/lib/pydoc_topics.py":'import _sk_fail; _sk_fail._("pydoc_topics")\n',"src/lib/pythonds/basic/deque.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#deque.py\n\n\nclass Deque:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def addFront(self, item):\n self.items.append(item)\n\n def addRear(self, item):\n self.items.insert(0,item)\n\n def removeFront(self):\n return self.items.pop()\n\n def removeRear(self):\n return self.items.pop(0)\n\n def size(self):\n return len(self.items)\n","src/lib/pythonds/basic/queue.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#queue.py\n\nclass Queue:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def enqueue(self, item):\n self.items.insert(0,item)\n\n def dequeue(self):\n return self.items.pop()\n\n def size(self):\n return len(self.items)\n","src/lib/pythonds/basic/stack.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#stack.py\n\nclass Stack:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def push(self, item):\n self.items.append(item)\n\n def pop(self):\n return self.items.pop()\n\n def peek(self):\n return self.items[len(self.items)-1]\n\n def size(self):\n return len(self.items)\n\n","src/lib/pythonds/basic/__init__.py":'\n#__all__ = ["stack"]\n\n\n#from .stack import Stack\n#from .queue import Queue\n\n\n\n',"src/lib/pythonds/graphs/adjGraph.py":'#\n# adjGraph\n#\n# Created by Brad Miller on 2005-02-24.\n# Copyright (c) 2005 Brad Miller, David Ranum, Luther College. All rights reserved.\n#\n\nimport sys\nimport os\nimport unittest\n\nclass Graph:\n def __init__(self):\n self.vertices = {}\n self.numVertices = 0\n \n def addVertex(self,key):\n self.numVertices = self.numVertices + 1\n newVertex = Vertex(key)\n self.vertices[key] = newVertex\n return newVertex\n \n def getVertex(self,n):\n if n in self.vertices:\n return self.vertices[n]\n else:\n return None\n\n def __contains__(self,n):\n return n in self.vertices\n \n def addEdge(self,f,t,cost=0):\n if f not in self.vertices:\n nv = self.addVertex(f)\n if t not in self.vertices:\n nv = self.addVertex(t)\n self.vertices[f].addNeighbor(self.vertices[t],cost)\n \n def getVertices(self):\n return list(self.vertices.keys())\n \n def __iter__(self):\n return iter(self.vertices.values())\n \nclass Vertex:\n def __init__(self,num):\n self.id = num\n self.connectedTo = {}\n self.color = \'white\'\n self.dist = sys.maxsize\n self.pred = None\n self.disc = 0\n self.fin = 0\n\n # def __lt__(self,o):\n # return self.id < o.id\n \n def addNeighbor(self,nbr,weight=0):\n self.connectedTo[nbr] = weight\n \n def setColor(self,color):\n self.color = color\n \n def setDistance(self,d):\n self.dist = d\n\n def setPred(self,p):\n self.pred = p\n\n def setDiscovery(self,dtime):\n self.disc = dtime\n \n def setFinish(self,ftime):\n self.fin = ftime\n \n def getFinish(self):\n return self.fin\n \n def getDiscovery(self):\n return self.disc\n \n def getPred(self):\n return self.pred\n \n def getDistance(self):\n return self.dist\n \n def getColor(self):\n return self.color\n \n def getConnections(self):\n return self.connectedTo.keys()\n \n def getWeight(self,nbr):\n return self.connectedTo[nbr]\n \n def __str__(self):\n return str(self.id) + ":color " + self.color + ":disc " + str(self.disc) + ":fin " + str(self.fin) + ":dist " + str(self.dist) + ":pred \\n\\t[" + str(self.pred)+ "]\\n"\n \n def getId(self):\n return self.id\n\nclass adjGraphTests(unittest.TestCase):\n def setUp(self):\n self.tGraph = Graph()\n \n def testMakeGraph(self):\n gFile = open("test.dat")\n for line in gFile:\n fVertex, tVertex = line.split(\'|\')\n fVertex = int(fVertex)\n tVertex = int(tVertex)\n self.tGraph.addEdge(fVertex,tVertex)\n for i in self.tGraph:\n adj = i.getAdj()\n for k in adj:\n print(i, k)\n\n \nif __name__ == \'__main__\':\n unittest.main()\n \n',"src/lib/pythonds/graphs/priorityQueue.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \nimport unittest\n\n# this implementation of binary heap takes key value pairs,\n# we will assume that the keys are all comparable\n\nclass PriorityQueue:\n def __init__(self):\n self.heapArray = [(0,0)]\n self.currentSize = 0\n\n def buildHeap(self,alist):\n self.currentSize = len(alist)\n self.heapArray = [(0,0)]\n for i in alist:\n self.heapArray.append(i)\n i = len(alist) // 2 \n while (i > 0):\n self.percDown(i)\n i = i - 1\n \n def percDown(self,i):\n while (i * 2) <= self.currentSize:\n mc = self.minChild(i)\n if self.heapArray[i][0] > self.heapArray[mc][0]:\n tmp = self.heapArray[i]\n self.heapArray[i] = self.heapArray[mc]\n self.heapArray[mc] = tmp\n i = mc\n \n def minChild(self,i):\n if i*2 > self.currentSize:\n return -1\n else:\n if i*2 + 1 > self.currentSize:\n return i*2\n else:\n if self.heapArray[i*2][0] < self.heapArray[i*2+1][0]:\n return i*2\n else:\n return i*2+1\n\n def percUp(self,i):\n while i // 2 > 0:\n if self.heapArray[i][0] < self.heapArray[i//2][0]:\n tmp = self.heapArray[i//2]\n self.heapArray[i//2] = self.heapArray[i]\n self.heapArray[i] = tmp\n i = i//2\n \n def add(self,k):\n self.heapArray.append(k)\n self.currentSize = self.currentSize + 1\n self.percUp(self.currentSize)\n\n def delMin(self):\n retval = self.heapArray[1][1]\n self.heapArray[1] = self.heapArray[self.currentSize]\n self.currentSize = self.currentSize - 1\n self.heapArray.pop()\n self.percDown(1)\n return retval\n \n def isEmpty(self):\n if self.currentSize == 0:\n return True\n else:\n return False\n\n def decreaseKey(self,val,amt):\n # this is a little wierd, but we need to find the heap thing to decrease by\n # looking at its value\n done = False\n i = 1\n myKey = 0\n while not done and i <= self.currentSize:\n if self.heapArray[i][1] == val:\n done = True\n myKey = i\n else:\n i = i + 1\n if myKey > 0:\n self.heapArray[myKey] = (amt,self.heapArray[myKey][1])\n self.percUp(myKey)\n \n def __contains__(self,vtx):\n for pair in self.heapArray:\n if pair[1] == vtx:\n return True\n return False\n \nclass TestBinHeap(unittest.TestCase):\n def setUp(self):\n self.theHeap = PriorityQueue()\n self.theHeap.add((2,'x'))\n self.theHeap.add((3,'y'))\n self.theHeap.add((5,'z'))\n self.theHeap.add((6,'a'))\n self.theHeap.add((4,'d'))\n\n\n def testInsert(self):\n assert self.theHeap.currentSize == 5\n\n def testDelmin(self):\n assert self.theHeap.delMin() == 'x'\n assert self.theHeap.delMin() == 'y'\n \n def testDecKey(self):\n self.theHeap.decreaseKey('d',1)\n assert self.theHeap.delMin() == 'd'\n \nif __name__ == '__main__':\n unittest.main()\n","src/lib/pythonds/graphs/__init__.py":"\n\nfrom .adjGraph import Graph\nfrom .adjGraph import Vertex\nfrom .priorityQueue import PriorityQueue\n","src/lib/pythonds/trees/balance.py":"#!/bin/env python3.1\n# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005, 2010\n# \n\nfrom .bst import BinarySearchTree, TreeNode\n\nclass AVLTree(BinarySearchTree):\n '''\n Author: Brad Miller\n Date: 1/15/2005\n Description: Imlement a binary search tree with the following interface\n functions: \n __contains__(y) <==> y in x\n __getitem__(y) <==> x[y]\n __init__()\n __len__() <==> len(x)\n __setitem__(k,v) <==> x[k] = v\n clear()\n get(k)\n has_key(k)\n items() \n keys() \n values()\n put(k,v)\n '''\n\n\n def _put(self,key,val,currentNode):\n if key < currentNode.key:\n if currentNode.hasLeftChild():\n self._put(key,val,currentNode.leftChild)\n else:\n currentNode.leftChild = TreeNode(key,val,parent=currentNode)\n self.updateBalance(currentNode.leftChild)\n else:\n if currentNode.hasRightChild():\n self._put(key,val,currentNode.rightChild)\n else:\n currentNode.rightChild = TreeNode(key,val,parent=currentNode)\n self.updateBalance(currentNode.rightChild) \n\n def updateBalance(self,node):\n if node.balanceFactor > 1 or node.balanceFactor < -1:\n self.rebalance(node)\n return\n if node.parent != None:\n if node.isLeftChild():\n node.parent.balanceFactor += 1\n elif node.isRightChild():\n node.parent.balanceFactor -= 1\n\n if node.parent.balanceFactor != 0:\n self.updateBalance(node.parent)\n\n def rebalance(self,node):\n if node.balanceFactor < 0:\n if node.rightChild.balanceFactor > 0:\n # Do an LR Rotation\n self.rotateRight(node.rightChild)\n self.rotateLeft(node)\n else:\n # single left\n self.rotateLeft(node)\n elif node.balanceFactor > 0:\n if node.leftChild.balanceFactor < 0:\n # Do an RL Rotation\n self.rotateLeft(node.leftChild)\n self.rotateRight(node)\n else:\n # single right\n self.rotateRight(node)\n\n def rotateLeft(self,rotRoot):\n newRoot = rotRoot.rightChild\n rotRoot.rightChild = newRoot.leftChild\n if newRoot.leftChild != None:\n newRoot.leftChild.parent = rotRoot\n newRoot.parent = rotRoot.parent\n if rotRoot.isRoot():\n self.root = newRoot\n else:\n if rotRoot.isLeftChild():\n rotRoot.parent.leftChild = newRoot\n else:\n rotRoot.parent.rightChild = newRoot\n newRoot.leftChild = rotRoot\n rotRoot.parent = newRoot\n rotRoot.balanceFactor = rotRoot.balanceFactor + 1 - min(newRoot.balanceFactor, 0)\n newRoot.balanceFactor = newRoot.balanceFactor + 1 + max(rotRoot.balanceFactor, 0)\n\n\n def rotateRight(self,rotRoot):\n newRoot = rotRoot.leftChild\n rotRoot.leftChild = newRoot.rightChild\n if newRoot.rightChild != None:\n newRoot.rightChild.parent = rotRoot\n newRoot.parent = rotRoot.parent\n if rotRoot.isRoot():\n self.root = newRoot\n else:\n if rotRoot.isRightChild():\n rotRoot.parent.rightChild = newRoot\n else:\n rotRoot.parent.leftChild = newRoot\n newRoot.rightChild = rotRoot\n rotRoot.parent = newRoot\n rotRoot.balanceFactor = rotRoot.balanceFactor - 1 - max(newRoot.balanceFactor, 0)\n newRoot.balanceFactor = newRoot.balanceFactor - 1 + min(rotRoot.balanceFactor, 0)\n \n","src/lib/pythonds/trees/binaryTree.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n\nclass BinaryTree:\n \"\"\"\n A recursive implementation of Binary Tree\n Using links and Nodes approach.\n \"\"\" \n def __init__(self,rootObj):\n self.key = rootObj\n self.leftChild = None\n self.rightChild = None\n\n def insertLeft(self,newNode):\n if self.leftChild == None:\n self.leftChild = BinaryTree(newNode)\n else:\n t = BinaryTree(newNode)\n t.left = self.leftChild\n self.leftChild = t\n \n def insertRight(self,newNode):\n if self.rightChild == None:\n self.rightChild = BinaryTree(newNode)\n else:\n t = BinaryTree(newNode)\n t.right = self.rightChild\n self.rightChild = t\n\n def isLeaf(self):\n return ((not self.leftChild) and (not self.rightChild))\n\n def getRightChild(self):\n return self.rightChild\n\n def getLeftChild(self):\n return self.leftChild\n\n def setRootVal(self,obj):\n self.key = obj\n\n def getRootVal(self,):\n return self.key\n\n def inorder(self):\n if self.leftChild:\n self.leftChild.inorder()\n print(self.key)\n if self.rightChild:\n self.rightChild.inorder()\n\n def postorder(self):\n if self.leftChild:\n self.leftChild.postorder()\n if self.rightChild:\n self.rightChild.postorder()\n print(self.key)\n\n\n def preorder(self):\n print(self.key)\n if self.leftChild:\n self.leftChild.preorder()\n if self.rightChild:\n self.rightChild.preorder()\n\n def printexp(self):\n if self.leftChild:\n print('(')\n self.leftChild.printexp()\n print(self.key)\n if self.rightChild:\n self.rightChild.printexp()\n print(')')\n\n def postordereval(self):\n opers = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}\n res1 = None\n res2 = None\n if self.leftChild:\n res1 = self.leftChild.postordereval() #// \\label{peleft}\n if self.rightChild:\n res2 = self.rightChild.postordereval() #// \\label{peright}\n if res1 and res2:\n return opers[self.key](res1,res2) #// \\label{peeval}\n else:\n return self.key\n\ndef inorder(tree):\n if tree != None:\n inorder(tree.getLeftChild())\n print(tree.getRootVal())\n inorder(tree.getRightChild())\n\ndef printexp(tree):\n if tree.leftChild:\n print('(')\n printexp(tree.getLeftChild())\n print(tree.getRootVal())\n if tree.rightChild:\n printexp(tree.getRightChild())\n print(')') \n\ndef printexp(tree):\n sVal = \"\"\n if tree:\n sVal = '(' + printexp(tree.getLeftChild())\n sVal = sVal + str(tree.getRootVal())\n sVal = sVal + printexp(tree.getRightChild()) + ')'\n return sVal\n\ndef postordereval(tree):\n opers = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}\n res1 = None\n res2 = None\n if tree:\n res1 = postordereval(tree.getLeftChild()) #// \\label{peleft}\n res2 = postordereval(tree.getRightChild()) #// \\label{peright}\n if res1 and res2:\n return opers[tree.getRootVal()](res1,res2) #// \\label{peeval}\n else:\n return tree.getRootVal()\n\ndef height(tree):\n if tree == None:\n return -1\n else:\n return 1 + max(height(tree.leftChild),height(tree.rightChild))\n\n# t = BinaryTree(7)\n# t.insertLeft(3)\n# t.insertRight(9)\n# inorder(t)\n# import operator\n# x = BinaryTree('*')\n# x.insertLeft('+')\n# l = x.getLeftChild()\n# l.insertLeft(4)\n# l.insertRight(5)\n# x.insertRight(7)\n# print(printexp(x))\n# print(postordereval(x))\n# print(height(x))\n","src/lib/pythonds/trees/binheap.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n\n# this heap takes key value pairs, we will assume that the keys are integers\nclass BinHeap:\n def __init__(self):\n self.heapList = [0]\n self.currentSize = 0\n\n\n def buildHeap(self,alist):\n i = len(alist) // 2\n self.currentSize = len(alist)\n self.heapList = [0] + alist[:]\n print(len(self.heapList), i)\n while (i > 0):\n print(self.heapList, i)\n self.percDown(i)\n i = i - 1\n print(self.heapList,i)\n \n def percDown(self,i):\n while (i * 2) <= self.currentSize:\n mc = self.minChild(i)\n if self.heapList[i] > self.heapList[mc]:\n tmp = self.heapList[i]\n self.heapList[i] = self.heapList[mc]\n self.heapList[mc] = tmp\n i = mc\n \n def minChild(self,i):\n if i * 2 + 1 > self.currentSize:\n return i * 2\n else:\n if self.heapList[i * 2] < self.heapList[i * 2 + 1]:\n return i * 2\n else:\n return i * 2 + 1\n\n def percUp(self,i):\n while i // 2 > 0:\n if self.heapList[i] < self.heapList[i//2]:\n tmp = self.heapList[i // 2]\n self.heapList[i // 2] = self.heapList[i]\n self.heapList[i] = tmp\n i = i // 2\n \n def insert(self,k):\n self.heapList.append(k)\n self.currentSize = self.currentSize + 1\n self.percUp(self.currentSize)\n\n def delMin(self):\n retval = self.heapList[1]\n self.heapList[1] = self.heapList[self.currentSize]\n self.currentSize = self.currentSize - 1\n self.heapList.pop()\n self.percDown(1)\n return retval\n \n def isEmpty(self):\n if currentSize == 0:\n return True\n else:\n return False\n","src/lib/pythonds/trees/bst.py":"#!/bin/env python3.1\n# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005, 2010\n# \n\nclass BinarySearchTree:\n '''\n Author: Brad Miller\n Date: 1/15/2005\n Description: Imlement a binary search tree with the following interface\n functions: \n __contains__(y) <==> y in x\n __getitem__(y) <==> x[y]\n __init__()\n __len__() <==> len(x)\n __setitem__(k,v) <==> x[k] = v\n clear()\n get(k)\n items() \n keys() \n values()\n put(k,v)\n in\n del <==> \n '''\n\n def __init__(self):\n self.root = None\n self.size = 0\n \n def put(self,key,val):\n if self.root:\n self._put(key,val,self.root)\n else:\n self.root = TreeNode(key,val)\n self.size = self.size + 1\n\n def _put(self,key,val,currentNode):\n if key < currentNode.key:\n if currentNode.hasLeftChild():\n self._put(key,val,currentNode.leftChild)\n else:\n currentNode.leftChild = TreeNode(key,val,parent=currentNode)\n else:\n if currentNode.hasRightChild():\n self._put(key,val,currentNode.rightChild)\n else:\n currentNode.rightChild = TreeNode(key,val,parent=currentNode)\n \n def __setitem__(self,k,v):\n self.put(k,v)\n\n def get(self,key):\n if self.root:\n res = self._get(key,self.root)\n if res:\n return res.payload\n else:\n return None\n else:\n return None\n \n def _get(self,key,currentNode):\n if not currentNode:\n return None\n elif currentNode.key == key:\n return currentNode\n elif key < currentNode.key:\n return self._get(key,currentNode.leftChild)\n else:\n return self._get(key,currentNode.rightChild)\n \n \n def __getitem__(self,key):\n res = self.get(key)\n if res:\n return res\n else:\n raise KeyError('Error, key not in tree')\n \n\n def __contains__(self,key):\n if self._get(key,self.root):\n return True\n else:\n return False\n \n def length(self):\n return self.size\n\n def __len__(self):\n return self.size\n\n def __iter__(self):\n return self.root.__iter__()\n \n def delete(self,key):\n if self.size > 1:\n nodeToRemove = self._get(key,self.root)\n if nodeToRemove:\n self.remove(nodeToRemove)\n self.size = self.size-1\n else:\n raise KeyError('Error, key not in tree')\n elif self.size == 1 and self.root.key == key:\n self.root = None\n self.size = self.size - 1\n else:\n raise KeyError('Error, key not in tree')\n\n def __delitem__(self,key):\n self.delete(key)\n \n def remove(self,currentNode):\n if currentNode.isLeaf(): #leaf\n if currentNode == currentNode.parent.leftChild:\n currentNode.parent.leftChild = None\n else:\n currentNode.parent.rightChild = None\n elif currentNode.hasBothChildren(): #interior\n succ = currentNode.findSuccessor()\n succ.spliceOut()\n currentNode.key = succ.key\n currentNode.payload = succ.payload\n else: # this node has one child\n if currentNode.hasLeftChild():\n if currentNode.isLeftChild():\n currentNode.leftChild.parent = currentNode.parent\n currentNode.parent.leftChild = currentNode.leftChild\n elif currentNode.isRightChild():\n currentNode.leftChild.parent = currentNode.parent\n currentNode.parent.rightChild = currentNode.leftChild\n else:\n currentNode.replaceNodeData(currentNode.leftChild.key,\n currentNode.leftChild.payload,\n currentNode.leftChild.leftChild,\n currentNode.leftChild.rightChild)\n else:\n if currentNode.isLeftChild():\n currentNode.rightChild.parent = currentNode.parent\n currentNode.parent.leftChild = currentNode.rightChild\n elif currentNode.isRightChild():\n currentNode.rightChild.parent = currentNode.parent\n currentNode.parent.rightChild = currentNode.rightChild\n else:\n currentNode.replaceNodeData(currentNode.rightChild.key,\n currentNode.rightChild.payload,\n currentNode.rightChild.leftChild,\n currentNode.rightChild.rightChild)\n\n def inorder(self):\n self._inorder(self.root)\n\n def _inorder(self,tree):\n if tree != None:\n self._inorder(tree.leftChild)\n print(tree.key)\n self._inorder(tree.rightChild)\n\n def postorder(self):\n self._postorder(self.root)\n\n def _postorder(self, tree):\n if tree:\n self._postorder(tree.rightChild)\n self._postorder(tree.leftChild)\n print(tree.key) \n\n def preorder(self):\n self._preorder(self,self.root)\n\n def _preorder(self,tree):\n if tree:\n print(tree.key) \n self._preorder(tree.leftChild)\n self._preorder(tree.rightChild)\n\n \nclass TreeNode:\n def __init__(self,key,val,left=None,right=None,parent=None):\n self.key = key\n self.payload = val\n self.leftChild = left\n self.rightChild = right\n self.parent = parent\n self.balanceFactor = 0\n \n def hasLeftChild(self):\n return self.leftChild\n\n def hasRightChild(self):\n return self.rightChild\n \n def isLeftChild(self):\n return self.parent and self.parent.leftChild == self\n\n def isRightChild(self):\n return self.parent and self.parent.rightChild == self\n\n def isRoot(self):\n return not self.parent\n\n def isLeaf(self):\n return not (self.rightChild or self.leftChild)\n\n def hasAnyChildren(self):\n return self.rightChild or self.leftChild\n\n def hasBothChildren(self):\n return self.rightChild and self.leftChild\n \n def replaceNodeData(self,key,value,lc,rc):\n self.key = key\n self.payload = value\n self.leftChild = lc\n self.rightChild = rc\n if self.hasLeftChild():\n self.leftChild.parent = self\n if self.hasRightChild():\n self.rightChild.parent = self\n \n def findSuccessor(self):\n succ = None\n if self.hasRightChild():\n succ = self.rightChild.findMin()\n else:\n if self.parent:\n if self.isLeftChild():\n succ = self.parent\n else:\n self.parent.rightChild = None\n succ = self.parent.findSuccessor()\n self.parent.rightChild = self\n return succ\n\n\n def spliceOut(self):\n if self.isLeaf():\n if self.isLeftChild():\n self.parent.leftChild = None\n else:\n self.parent.rightChild = None\n elif self.hasAnyChildren():\n if self.hasLeftChild():\n if self.isLeftChild():\n self.parent.leftChild = self.leftChild\n else:\n self.parent.rightChild = self.leftChild\n self.leftChild.parent = self.parent\n else:\n if self.isLeftChild():\n self.parent.leftChild = self.rightChild\n else:\n self.parent.rightChild = self.rightChild\n self.rightChild.parent = self.parent\n\n def findMin(self):\n current = self\n while current.hasLeftChild():\n current = current.leftChild\n return current\n\n def __iter__(self):\n \"\"\"The standard inorder traversal of a binary tree.\"\"\"\n if self:\n if self.hasLeftChild():\n for elem in self.leftChild:\n yield elem\n yield self.key\n if self.hasRightChild():\n for elem in self.rightChild:\n yield elem\n\n \n","src/lib/pythonds/trees/__init__.py":"\n# from .binaryTree import BinaryTree\n# from .balance import AVLTree\n# from .bst import BinarySearchTree\n# from .binheap import BinHeap\n\n\n","src/lib/pythonds/__init__.py":"","src/lib/py_compile.py":'import _sk_fail; _sk_fail._("py_compile")\n',"src/lib/Queue.py":'import _sk_fail; _sk_fail._("Queue")\n',"src/lib/quopri.py":'import _sk_fail; _sk_fail._("quopri")\n',"src/lib/repr.py":'import _sk_fail; _sk_fail._("repr")\n',"src/lib/rexec.py":'import _sk_fail; _sk_fail._("rexec")\n',"src/lib/rfc822.py":'import _sk_fail; _sk_fail._("rfc822")\n',"src/lib/rlcompleter.py":'import _sk_fail; _sk_fail._("rlcompleter")\n',"src/lib/robotparser.py":'import _sk_fail; _sk_fail._("robotparser")\n',"src/lib/runpy.py":'import _sk_fail; _sk_fail._("runpy")\n',"src/lib/sched.py":'import _sk_fail; _sk_fail._("sched")\n',"src/lib/sets.py":'import _sk_fail; _sk_fail._("sets")\n',"src/lib/sgmllib.py":'import _sk_fail; _sk_fail._("sgmllib")\n',"src/lib/sha.py":'import _sk_fail; _sk_fail._("sha")\n',"src/lib/shelve.py":'import _sk_fail; _sk_fail._("shelve")\n',"src/lib/shlex.py":'import _sk_fail; _sk_fail._("shlex")\n',"src/lib/shutil.py":'import _sk_fail; _sk_fail._("shutil")\n',"src/lib/SimpleHTTPServer.py":'import _sk_fail; _sk_fail._("SimpleHTTPServer")\n',"src/lib/SimpleXMLRPCServer.py":'import _sk_fail; _sk_fail._("SimpleXMLRPCServer")\n',"src/lib/site.py":'import _sk_fail; _sk_fail._("site")\n',"src/lib/smtpd.py":'import _sk_fail; _sk_fail._("smtpd")\n',"src/lib/smtplib.py":'import _sk_fail; _sk_fail._("smtplib")\n',"src/lib/sndhdr.py":'import _sk_fail; _sk_fail._("sndhdr")\n',"src/lib/socket.py":'import _sk_fail; _sk_fail._("socket")\n',"src/lib/SocketServer.py":'import _sk_fail; _sk_fail._("SocketServer")\n',"src/lib/sqlite3/__init__.py":'import _sk_fail; _sk_fail._("sqlite3")\n',"src/lib/sre.py":'import _sk_fail; _sk_fail._("sre")\n',"src/lib/sre_compile.py":'import _sk_fail; _sk_fail._("sre_compile")\n',"src/lib/sre_constants.py":'import _sk_fail; _sk_fail._("sre_constants")\n',"src/lib/sre_parse.py":'import _sk_fail; _sk_fail._("sre_parse")\n',"src/lib/ssl.py":'import _sk_fail; _sk_fail._("ssl")\n',"src/lib/stat.py":'import _sk_fail; _sk_fail._("stat")\n',"src/lib/statvfs.py":'import _sk_fail; _sk_fail._("statvfs")\n',"src/lib/StringIO.py":'r"""File-like objects that read from or write to a string buffer.\n\nThis implements (nearly) all stdio methods.\n\nf = StringIO() # ready for writing\nf = StringIO(buf) # ready for reading\nf.close() # explicitly release resources held\nflag = f.isatty() # always false\npos = f.tell() # get current position\nf.seek(pos) # set current position\nf.seek(pos, mode) # mode 0: absolute; 1: relative; 2: relative to EOF\nbuf = f.read() # read until EOF\nbuf = f.read(n) # read up to n bytes\nbuf = f.readline() # read until end of line (\'\\n\') or EOF\nlist = f.readlines()# list of f.readline() results until EOF\nf.truncate([size]) # truncate file at to at most size (default: current pos)\nf.write(buf) # write at current position\nf.writelines(list) # for line in list: f.write(line)\nf.getvalue() # return whole file\'s contents as a string\n\nNotes:\n- Using a real file is often faster (but less convenient).\n- There\'s also a much faster implementation in C, called cStringIO, but\n it\'s not subclassable.\n- fileno() is left unimplemented so that code which uses it triggers\n an exception early.\n- Seeking far beyond EOF and then writing will insert real null\n bytes that occupy space in the buffer.\n- There\'s a simple test set (see end of this file).\n"""\n\n__all__ = ["StringIO"]\n\ndef _complain_ifclosed(closed):\n if closed:\n raise ValueError("I/O operation on closed file")\n\nclass StringIO:\n """class StringIO([buffer])\n\n When a StringIO object is created, it can be initialized to an existing\n string by passing the string to the constructor. If no string is given,\n the StringIO will start empty.\n\n The StringIO object can accept either Unicode or 8-bit strings, but\n mixing the two may take some care. If both are used, 8-bit strings that\n cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause\n a UnicodeError to be raised when getvalue() is called.\n """\n def __init__(self, buf = \'\'):\n # Force self.buf to be a string or unicode\n if not isinstance(buf, str):\n buf = str(buf)\n self.buf = buf\n self.len = len(buf)\n self.buflist = []\n self.pos = 0\n self.closed = False\n self.softspace = 0\n\n def __iter__(self):\n return self\n\n def next(self):\n """A file object is its own iterator, for example iter(f) returns f\n (unless f is closed). When a file is used as an iterator, typically\n in a for loop (for example, for line in f: print line), the next()\n method is called repeatedly. This method returns the next input line,\n or raises StopIteration when EOF is hit.\n """\n _complain_ifclosed(self.closed)\n r = self.readline()\n if not r:\n raise StopIteration\n return r\n\n def close(self):\n """Free the memory buffer.\n """\n if not self.closed:\n self.closed = True\n self.buf = None\n self.pos = None\n\n def isatty(self):\n """Returns False because StringIO objects are not connected to a\n tty-like device.\n """\n _complain_ifclosed(self.closed)\n return False\n\n def seek(self, pos, mode = 0):\n """Set the file\'s current position.\n\n The mode argument is optional and defaults to 0 (absolute file\n positioning); other values are 1 (seek relative to the current\n position) and 2 (seek relative to the file\'s end).\n\n There is no return value.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n if mode == 1:\n pos += self.pos\n elif mode == 2:\n pos += self.len\n self.pos = max(0, pos)\n\n def tell(self):\n """Return the file\'s current position."""\n _complain_ifclosed(self.closed)\n return self.pos\n\n def read(self, n = -1):\n """Read at most size bytes from the file\n (less if the read hits EOF before obtaining size bytes).\n\n If the size argument is negative or omitted, read all data until EOF\n is reached. The bytes are returned as a string object. An empty\n string is returned when EOF is encountered immediately.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n if n is None or n < 0:\n newpos = self.len\n else:\n newpos = min(self.pos+n, self.len)\n r = self.buf[self.pos:newpos]\n self.pos = newpos\n return r\n\n def readline(self, length=None):\n r"""Read one entire line from the file.\n\n A trailing newline character is kept in the string (but may be absent\n when a file ends with an incomplete line). If the size argument is\n present and non-negative, it is a maximum byte count (including the\n trailing newline) and an incomplete line may be returned.\n\n An empty string is returned only when EOF is encountered immediately.\n\n Note: Unlike stdio\'s fgets(), the returned string contains null\n characters (\'\\0\') if they occurred in the input.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n i = self.buf.find(\'\\n\', self.pos)\n if i < 0:\n newpos = self.len\n else:\n newpos = i+1\n if length is not None and length >= 0:\n if self.pos + length < newpos:\n newpos = self.pos + length\n r = self.buf[self.pos:newpos]\n self.pos = newpos\n return r\n\n def readlines(self, sizehint = 0):\n """Read until EOF using readline() and return a list containing the\n lines thus read.\n\n If the optional sizehint argument is present, instead of reading up\n to EOF, whole lines totalling approximately sizehint bytes (or more\n to accommodate a final whole line).\n """\n total = 0\n lines = []\n line = self.readline()\n while line:\n lines.append(line)\n total += len(line)\n if 0 < sizehint <= total:\n break\n line = self.readline()\n return lines\n\n def truncate(self, size=None):\n """Truncate the file\'s size.\n\n If the optional size argument is present, the file is truncated to\n (at most) that size. The size defaults to the current position.\n The current file position is not changed unless the position\n is beyond the new file size.\n\n If the specified size exceeds the file\'s current size, the\n file remains unchanged.\n """\n _complain_ifclosed(self.closed)\n if size is None:\n size = self.pos\n elif size < 0:\n raise IOError(22, "Negative size not allowed")\n elif size < self.pos:\n self.pos = size\n self.buf = self.getvalue()[:size]\n self.len = size\n\n def write(self, s):\n """Write a string to the file.\n\n There is no return value.\n """\n _complain_ifclosed(self.closed)\n if not s: return\n # Force s to be a string or unicode\n if not isinstance(s, str):\n s = str(s)\n spos = self.pos\n slen = self.len\n if spos == slen:\n self.buflist.append(s)\n self.len = self.pos = spos + len(s)\n return\n if spos > slen:\n self.buflist.append(\'\\0\'*(spos - slen))\n slen = spos\n newpos = spos + len(s)\n if spos < slen:\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = [self.buf[:spos], s, self.buf[newpos:]]\n self.buf = \'\'\n if newpos > slen:\n slen = newpos\n else:\n self.buflist.append(s)\n slen = newpos\n self.len = slen\n self.pos = newpos\n\n def writelines(self, iterable):\n """Write a sequence of strings to the file. The sequence can be any\n iterable object producing strings, typically a list of strings. There\n is no return value.\n\n (The name is intended to match readlines(); writelines() does not add\n line separators.)\n """\n write = self.write\n for line in iterable:\n write(line)\n\n def flush(self):\n """Flush the internal buffer\n """\n _complain_ifclosed(self.closed)\n\n def getvalue(self):\n """\n Retrieve the entire contents of the "file" at any time before\n the StringIO object\'s close() method is called.\n\n The StringIO object can accept either Unicode or 8-bit strings,\n but mixing the two may take some care. If both are used, 8-bit\n strings that cannot be interpreted as 7-bit ASCII (that use the\n 8th bit) will cause a UnicodeError to be raised when getvalue()\n is called.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n return self.buf\n',"src/lib/stringold.py":'import _sk_fail; _sk_fail._("stringold")\n',"src/lib/stringprep.py":'import _sk_fail; _sk_fail._("stringprep")\n',"src/lib/struct.py":'import _sk_fail; _sk_fail._("struct")\n',"src/lib/subprocess.py":'import _sk_fail; _sk_fail._("subprocess")\n',"src/lib/sunau.py":'import _sk_fail; _sk_fail._("sunau")\n',"src/lib/sunaudio.py":'import _sk_fail; _sk_fail._("sunaudio")\n',"src/lib/symbol.py":'import _sk_fail; _sk_fail._("symbol")\n',"src/lib/symtable.py":'import _sk_fail; _sk_fail._("symtable")\n',"src/lib/tabnanny.py":'import _sk_fail; _sk_fail._("tabnanny")\n',"src/lib/tarfile.py":'import _sk_fail; _sk_fail._("tarfile")\n',"src/lib/telnetlib.py":'import _sk_fail; _sk_fail._("telnetlib")\n',"src/lib/tempfile.py":'import _sk_fail; _sk_fail._("tempfile")\n',"src/lib/test/ann_module.py":"\n\n\"\"\"\nThe module for testing variable annotations.\nEmpty lines above are for good reason (testing for correct line numbers)\n\"\"\"\n\n# from typing import Optional\n# from functools import wraps\n\n__annotations__[1] = 2\n\nclass C:\n\n x = 5; #y: Optional['C'] = None\n\n# from typing import Tuple\nx: int = 5; y: str = x;# f: Tuple[int, int]\n\nclass M(type):\n\n __annotations__['123'] = 123\n o: type = object\n\n(pars): bool = True\n\nclass D(C):\n j: str = 'hi'; k: str= 'bye'\n\n# from types import new_class\n# h_class = new_class('H', (C,))\n# j_class = new_class('J')\n\nclass F():\n z: int = 5\n def __init__(self, x):\n pass\n\nclass Y(F):\n def __init__(self):\n super(F, self).__init__(123)\n\nclass Meta(type):\n def __new__(meta, name, bases, namespace):\n return super().__new__(meta, name, bases, namespace)\n\nclass S(metaclass = Meta):\n x: str = 'something'\n y: str = 'something else'\n\n# def foo(x: int = 10):\n# def bar(y: List[str]):\n# x: str = 'yes'\n# bar()\n\n# def dec(func):\n# @wraps(func)\n# def wrapper(*args, **kwargs):\n# return func(*args, **kwargs)\n# return wrapper\n","src/lib/test/ann_module2.py":'"""\nSome correct syntax for variable annotation here.\nMore examples are in test_grammar and test_parser.\n"""\n\n# from typing import no_type_check, ClassVar\n\ni: int = 1\nj: int\nx: float = i/10\n\ndef f():\n # class C: ...\n class C: pass\n return C()\n\nf().new_attr: object = object()\n\nclass C:\n def __init__(self, x: int) -> None:\n self.x = x\n\nc = C(5)\nc.new_attr: int = 10\n\n__annotations__ = {}\n\n\n# @no_type_check\n# class NTC:\n# def meth(self, param: complex) -> None:\n# ...\n\n# class CV:\n# var: ClassVar[\'CV\']\n\n# CV.var = CV()\n',"src/lib/test/ann_module3.py":'"""\nCorrect syntax for variable annotation that should fail at runtime\nin a certain manner. More examples are in test_grammar and test_parser.\n"""\n\ndef f_bad_ann():\n __annotations__[1] = 2\n\nclass C_OK:\n def __init__(self, x: int) -> None:\n self.x: no_such_name = x # This one is OK as proposed by Guido\n\nclass D_bad_ann:\n def __init__(self, x: int) -> None:\n sfel.y: int = 0\n\ndef g_bad_ann():\n no_such_name.attr: int = 0\n',"src/lib/test/bad_getattr.py":'x = 1\n\n__getattr__ = "Surprise!"\n__dir__ = "Surprise again!"\n',"src/lib/test/bad_getattr2.py":'def __getattr__():\n "Bad one"\n\nx = 1\n\ndef __dir__(bad_sig):\n return []\n',"src/lib/test/bad_getattr3.py":"def __getattr__(name):\n global __getattr__\n if name != 'delgetattr':\n raise AttributeError\n del __getattr__\n raise AttributeError\n","src/lib/test/decimaltestdata/__init__.py":'import _sk_fail; _sk_fail._("decimaltestdata")\n',"src/lib/test/good_getattr.py":"x = 1\n\ndef __dir__():\n return ['a', 'b', 'c']\n\ndef __getattr__(name):\n if name == \"yolo\":\n raise AttributeError(\"Deprecated, use whatever instead\")\n return f\"There is {name}\"\n\ny = 2\n","src/lib/test/test_support.py":'"""Supporting definitions for the Python regression tests."""\n\nif __name__ != \'test.test_support\':\n raise ImportError(\'test_support must be imported from the test package\')\n\nimport unittest\n\n\n# def run_unittest(*classes):\n# """Run tests from unittest.TestCase-derived classes."""\n# valid_types = (unittest.TestSuite, unittest.TestCase)\n# suite = unittest.TestSuite()\n# for cls in classes:\n# if isinstance(cls, str):\n# if cls in sys.modules:\n# suite.addTest(unittest.findTestCases(sys.modules[cls]))\n# else:\n# raise ValueError("str arguments must be keys in sys.modules")\n# elif isinstance(cls, valid_types):\n# suite.addTest(cls)\n# else:\n# suite.addTest(unittest.makeSuite(cls))\n# _run_suite(suite)\n\ndef run_unittest(*classes):\n """Run tests from unittest.TestCase-derived classes."""\n for cls in classes:\n print cls\n if issubclass(cls, unittest.TestCase):\n cls().main()\n else:\n print "Don\'t know what to do with ", cls\n',"src/lib/test/__init__.py":"__author__ = 'bmiller'\n\ndef testEqual(actual, expected):\n if type(expected) == type(1):\n if actual == expected:\n print('Pass')\n return True\n elif type(expected) == type(1.11):\n if abs(actual-expected) < 0.00001:\n print('Pass')\n return True\n else:\n if actual == expected:\n print('Pass')\n return True\n print('Test Failed: expected ' + str(expected) + ' but got ' + str(actual))\n return False\n\ndef testNotEqual(actual, expected):\n pass\n\n","src/lib/textwrap.py":"\"\"\"Text wrapping and filling.\n\"\"\"\n\n# Copyright (C) 1999-2001 Gregory P. Ward.\n# Copyright (C) 2002, 2003 Python Software Foundation.\n# Written by Greg Ward \n\nimport re, string\n\n__all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten']\n\n# Hardcode the recognized whitespace characters to the US-ASCII\n# whitespace characters. The main reason for doing this is that\n# some Unicode spaces (like \\u00a0) are non-breaking whitespaces.\n_whitespace = '\\t\\n\\x0b\\x0c\\r '\n\nclass TextWrapper:\n \"\"\"\n Object for wrapping/filling text. The public interface consists of\n the wrap() and fill() methods; the other methods are just there for\n subclasses to override in order to tweak the default behaviour.\n If you want to completely replace the main wrapping algorithm,\n you'll probably have to override _wrap_chunks().\n Several instance attributes control various aspects of wrapping:\n width (default: 70)\n the maximum width of wrapped lines (unless break_long_words\n is false)\n initial_indent (default: \"\")\n string that will be prepended to the first line of wrapped\n output. Counts towards the line's width.\n subsequent_indent (default: \"\")\n string that will be prepended to all lines save the first\n of wrapped output; also counts towards each line's width.\n expand_tabs (default: true)\n Expand tabs in input text to spaces before further processing.\n Each tab will become 0 .. 'tabsize' spaces, depending on its position\n in its line. If false, each tab is treated as a single character.\n tabsize (default: 8)\n Expand tabs in input text to 0 .. 'tabsize' spaces, unless\n 'expand_tabs' is false.\n replace_whitespace (default: true)\n Replace all whitespace characters in the input text by spaces\n after tab expansion. Note that if expand_tabs is false and\n replace_whitespace is true, every tab will be converted to a\n single space!\n fix_sentence_endings (default: false)\n Ensure that sentence-ending punctuation is always followed\n by two spaces. Off by default because the algorithm is\n (unavoidably) imperfect.\n break_long_words (default: true)\n Break words longer than 'width'. If false, those words will not\n be broken, and some lines might be longer than 'width'.\n break_on_hyphens (default: true)\n Allow breaking hyphenated words. If true, wrapping will occur\n preferably on whitespaces and right after hyphens part of\n compound words.\n drop_whitespace (default: true)\n Drop leading and trailing whitespace from lines.\n max_lines (default: None)\n Truncate wrapped lines.\n placeholder (default: ' [...]')\n Append to the last line of truncated text.\n \"\"\"\n\n unicode_whitespace_trans = {}\n # uspace = ord(' ')\n uspace = ' '\n for x in _whitespace:\n # unicode_whitespace_trans[ord(x)] = uspace\n unicode_whitespace_trans[x] = uspace\n\n # This funky little regex is just the trick for splitting\n # text up into word-wrappable chunks. E.g.\n # \"Hello there -- you goof-ball, use the -b option!\"\n # splits into\n # Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option!\n # (after stripping out empty strings).\n wordsep_re = re.compile(\n r'(\\s+|' # any whitespace\n r'[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W]))') # hyphenated words\n em_dash = re.compile(r'(\\s+|' # any whitespace\n r'[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W])|' # hyphenated words\n r'(?!^)-{2,}(?=\\w))') # em-dash\n\n \n # This less funky little regex just split on recognized spaces. E.g.\n # \"Hello there -- you goof-ball, use the -b option!\"\n # splits into\n # Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/\n wordsep_simple_re = re.compile(r'(\\s+)')\n\n\n # XXX this is not locale- or charset-aware -- string.lowercase\n # is US-ASCII only (and therefore English-only)\n sentence_end_re = re.compile(r'[a-z]' # lowercase letter\n r'[\\.\\!\\?]' # sentence-ending punct.\n r'[\\\"\\']?' # optional end-of-quote\n r'\\Z') # end of chunk\n sentence_end_re = r'[a-z][\\.\\!\\?][\\\"\\']?'\n\n def __init__(self,\n width=70,\n initial_indent=\"\",\n subsequent_indent=\"\",\n expand_tabs=True,\n replace_whitespace=True,\n fix_sentence_endings=False,\n break_long_words=True,\n drop_whitespace=True,\n break_on_hyphens=True,\n tabsize=8,\n max_lines=None,\n placeholder=' [...]'):\n self.width = width\n self.initial_indent = initial_indent\n self.subsequent_indent = subsequent_indent\n self.expand_tabs = expand_tabs\n self.replace_whitespace = replace_whitespace\n self.fix_sentence_endings = fix_sentence_endings\n self.break_long_words = break_long_words\n self.drop_whitespace = drop_whitespace\n self.break_on_hyphens = break_on_hyphens\n self.tabsize = tabsize\n self.max_lines = max_lines\n self.placeholder = placeholder\n\n\n # -- Private methods -----------------------------------------------\n # (possibly useful for subclasses to override)\n\n def _munge_whitespace(self, text):\n \"\"\"_munge_whitespace(text : string) -> string\n Munge whitespace in text: expand tabs and convert all other\n whitespace characters to spaces. Eg. \" foo\\\\tbar\\\\n\\\\nbaz\"\n becomes \" foo bar baz\".\n \"\"\"\n if self.expand_tabs:\n text = text.expandtabs(self.tabsize)\n if self.replace_whitespace:\n for key, val in self.unicode_whitespace_trans.items():\n text = text.replace(key, val)\n return text\n\n\n def _split(self, text):\n \"\"\"_split(text : string) -> [string]\n Split the text to wrap into indivisible chunks. Chunks are\n not quite the same as words; see _wrap_chunks() for full\n details. As an example, the text\n Look, goof-ball -- use the -b option!\n breaks into the following chunks:\n 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',\n 'use', ' ', 'the', ' ', '-b', ' ', 'option!'\n if break_on_hyphens is True, or in:\n 'Look,', ' ', 'goof-ball', ' ', '--', ' ',\n 'use', ' ', 'the', ' ', '-b', ' ', option!'\n otherwise.\n \"\"\"\n if self.break_on_hyphens is True:\n chunks = self.wordsep_re.split(text)\n if \"--\" in text:\n chunks = [item \n for sublist in [self.em_dash.split(chunk) for chunk in chunks] \n for item in sublist]\n else:\n chunks = self.wordsep_simple_re.split(text)\n chunks = [c for c in chunks if c]\n return chunks\n\n def _fix_sentence_endings(self, chunks):\n \"\"\"_fix_sentence_endings(chunks : [string])\n Correct for sentence endings buried in 'chunks'. Eg. when the\n original text contains \"... foo.\\\\nBar ...\", munge_whitespace()\n and split() will convert that to [..., \"foo.\", \" \", \"Bar\", ...]\n which has one too few spaces; this method simply changes the one\n space to two.\n \"\"\"\n i = 0\n # patsearch = self.sentence_end_re.search\n while i < len(chunks)-1:\n if chunks[i+1] == \" \" and re.search(self.sentence_end_re, chunks[i]) and chunks[i][-1] in \".!?\\\"\\'\":\n chunks[i+1] = \" \"\n i += 2\n else:\n i += 1\n\n def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width):\n \"\"\"_handle_long_word(chunks : [string],\n cur_line : [string],\n cur_len : int, width : int)\n Handle a chunk of text (most likely a word, not whitespace) that\n is too long to fit in any line.\n \"\"\"\n # Figure out when indent is larger than the specified width, and make\n # sure at least one character is stripped off on every pass\n if width < 1:\n space_left = 1\n else:\n space_left = width - cur_len\n\n # If we're allowed to break long words, then do so: put as much\n # of the next chunk onto the current line as will fit.\n if self.break_long_words:\n cur_line.append(reversed_chunks[-1][:space_left])\n reversed_chunks[-1] = reversed_chunks[-1][space_left:]\n\n # Otherwise, we have to preserve the long word intact. Only add\n # it to the current line if there's nothing already there --\n # that minimizes how much we violate the width constraint.\n elif not cur_line:\n cur_line.append(reversed_chunks.pop())\n\n # If we're not allowed to break long words, and there's already\n # text on the current line, do nothing. Next time through the\n # main loop of _wrap_chunks(), we'll wind up here again, but\n # cur_len will be zero, so the next line will be entirely\n # devoted to the long word that we can't handle right now.\n\n def _wrap_chunks(self, chunks):\n \"\"\"_wrap_chunks(chunks : [string]) -> [string]\n Wrap a sequence of text chunks and return a list of lines of\n length 'self.width' or less. (If 'break_long_words' is false,\n some lines may be longer than this.) Chunks correspond roughly\n to words and the whitespace between them: each chunk is\n indivisible (modulo 'break_long_words'), but a line break can\n come between any two chunks. Chunks should not have internal\n whitespace; ie. a chunk is either all whitespace or a \"word\".\n Whitespace chunks will be removed from the beginning and end of\n lines, but apart from that whitespace is preserved.\n \"\"\"\n lines = []\n if self.width <= 0:\n raise ValueError(\"invalid width %r (must be > 0)\" % self.width)\n if self.max_lines is not None:\n if self.max_lines > 1:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n if len(indent) + len(self.placeholder.lstrip()) > self.width:\n raise ValueError(\"placeholder too large for max width\")\n\n # Arrange in reverse order so items can be efficiently popped\n # from a stack of chucks.\n chunks.reverse()\n\n while chunks:\n\n # Start the list of chunks that will make up the current line.\n # cur_len is just the length of all the chunks in cur_line.\n cur_line = []\n cur_len = 0\n\n # Figure out which static string will prefix this line.\n if lines:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n\n # Maximum width for this line.\n width = self.width - len(indent)\n\n # First chunk on line is whitespace -- drop it, unless this\n # is the very beginning of the text (ie. no lines started yet).\n if self.drop_whitespace and chunks[-1].strip() == '' and lines:\n del chunks[-1]\n\n while chunks:\n l = len(chunks[-1])\n\n # Can at least squeeze this chunk onto the current line.\n if cur_len + l <= width:\n cur_line.append(chunks.pop())\n cur_len += l\n\n # Nope, this line is full.\n else:\n break\n\n # The current line is full, and the next chunk is too big to\n # fit on *any* line (not just this one).\n if chunks and len(chunks[-1]) > width:\n self._handle_long_word(chunks, cur_line, cur_len, width)\n cur_len = sum(map(len, cur_line))\n\n # If the last chunk on this line is all whitespace, drop it.\n if self.drop_whitespace and cur_line and cur_line[-1].strip() == '':\n cur_len -= len(cur_line[-1])\n del cur_line[-1]\n\n if cur_line:\n if (self.max_lines is None or\n len(lines) + 1 < self.max_lines or\n (not chunks or\n self.drop_whitespace and\n len(chunks) == 1 and\n not chunks[0].strip()) and cur_len <= width):\n # Convert current line back to a string and store it in\n # list of all lines (return value).\n lines.append(indent + ''.join(cur_line))\n else:\n while cur_line:\n if (cur_line[-1].strip() and\n cur_len + len(self.placeholder) <= width):\n cur_line.append(self.placeholder)\n lines.append(indent + ''.join(cur_line))\n break\n cur_len -= len(cur_line[-1])\n del cur_line[-1]\n else:\n if lines:\n prev_line = lines[-1].rstrip()\n if (len(prev_line) + len(self.placeholder) <=\n self.width):\n lines[-1] = prev_line + self.placeholder\n break\n lines.append(indent + self.placeholder.lstrip())\n break\n\n return lines\n\n def _split_chunks(self, text):\n text = self._munge_whitespace(text)\n return self._split(text)\n\n # -- Public interface ----------------------------------------------\n\n def wrap(self, text):\n \"\"\"wrap(text : string) -> [string]\n Reformat the single paragraph in 'text' so it fits in lines of\n no more than 'self.width' columns, and return a list of wrapped\n lines. Tabs in 'text' are expanded with string.expandtabs(),\n and all other whitespace characters (including newline) are\n converted to space.\n \"\"\"\n chunks = self._split_chunks(text)\n if self.fix_sentence_endings:\n self._fix_sentence_endings(chunks)\n return self._wrap_chunks(chunks)\n\n def fill(self, text):\n \"\"\"fill(text : string) -> string\n Reformat the single paragraph in 'text' to fit in lines of no\n more than 'self.width' columns, and return a new string\n containing the entire wrapped paragraph.\n \"\"\"\n return \"\\n\".join(self.wrap(text))\n\n\n# -- Convenience interface ---------------------------------------------\n\ndef wrap(text, width=70, **kwargs):\n \"\"\"Wrap a single paragraph of text, returning a list of wrapped lines.\n Reformat the single paragraph in 'text' so it fits in lines of no\n more than 'width' columns, and return a list of wrapped lines. By\n default, tabs in 'text' are expanded with string.expandtabs(), and\n all other whitespace characters (including newline) are converted to\n space. See TextWrapper class for available keyword args to customize\n wrapping behaviour.\n \"\"\"\n w = TextWrapper(width=width, **kwargs)\n return w.wrap(text)\n\ndef fill(text, width=70, **kwargs):\n \"\"\"Fill a single paragraph of text, returning a new string.\n Reformat the single paragraph in 'text' to fit in lines of no more\n than 'width' columns, and return a new string containing the entire\n wrapped paragraph. As with wrap(), tabs are expanded and other\n whitespace characters converted to space. See TextWrapper class for\n available keyword args to customize wrapping behaviour.\n \"\"\"\n w = TextWrapper(width=width, **kwargs)\n return w.fill(text)\n\ndef shorten(text, width, **kwargs):\n \"\"\"Collapse and truncate the given text to fit in the given width.\n The text first has its whitespace collapsed. If it then fits in\n the *width*, it is returned as is. Otherwise, as many words\n as possible are joined and then the placeholder is appended::\n >>> textwrap.shorten(\"Hello world!\", width=12)\n 'Hello world!'\n >>> textwrap.shorten(\"Hello world!\", width=11)\n 'Hello [...]'\n \"\"\"\n w = TextWrapper(width=width, max_lines=1, **kwargs)\n return w.fill(' '.join(text.strip().split()))\n\n\n# -- Loosely related functionality -------------------------------------\n\n# _whitespace_only_re = re.compile('^[ \\t]+$', re.MULTILINE)\n# _leading_whitespace_re = re.compile('(^[ \\t]*)(?:[^ \\t\\n])', re.MULTILINE)\n\ndef dedent(text):\n \"\"\"Remove any common leading whitespace from every line in `text`.\n This can be used to make triple-quoted strings line up with the left\n edge of the display, while still presenting them in the source code\n in indented form.\n Note that tabs and spaces are both treated as whitespace, but they\n are not equal: the lines \" hello\" and \"\\\\thello\" are\n considered to have no common leading whitespace.\n Entirely blank lines are normalized to a newline character.\n \"\"\"\n # Look for the longest leading string of spaces and tabs common to\n # all lines.\n margin = None\n\n indents = re.findall(r'(^[ \\t]*)(?:[^ \\t\\n])',text, re.MULTILINE)\n for indent in indents:\n if margin is None:\n margin = indent\n\n # Current line more deeply indented than previous winner:\n # no change (previous winner is still on top).\n elif indent.startswith(margin):\n pass\n\n # Current line consistent with and no deeper than previous winner:\n # it's the new winner.\n elif margin.startswith(indent):\n margin = indent\n\n # Find the largest common whitespace between current line and previous\n # winner.\n else:\n for i, (x, y) in enumerate(zip(margin, indent)):\n if x != y:\n margin = margin[:i]\n break\n # sanity check (testing/debugging only)\n if 0 and margin:\n for line in text.split(\"\\n\"):\n assert not line or line.startswith(margin), \\\n \"line = %r, margin = %r\" % (line, margin)\n\n if margin:\n lines = [line[len(margin):] \n if line.strip()\n else line.strip() \n for line in text.split(\"\\n\")]\n text = \"\\n\".join(lines)\n return text\n\n\ndef indent(text, prefix, predicate=None):\n \"\"\"Adds 'prefix' to the beginning of selected lines in 'text'.\n If 'predicate' is provided, 'prefix' will only be added to the lines\n where 'predicate(line)' is True. If 'predicate' is not provided,\n it will default to adding 'prefix' to all non-empty lines that do not\n consist solely of whitespace characters.\n \"\"\"\n if predicate is None:\n def predicate(line):\n return line.strip()\n\n def prefixed_lines():\n for line in text.splitlines(True):\n yield (prefix + line if predicate(line) else line)\n return ''.join(prefixed_lines())\n\n\nif __name__ == \"__main__\":\n #print dedent(\"\\tfoo\\n\\tbar\")\n #print dedent(\" \\thello there\\n \\t how are you?\")\n print(dedent(\"Hello there.\\n This is indented.\"))","src/lib/this.py":'import _sk_fail; _sk_fail._("this")\n',"src/lib/threading.py":'import _sk_fail; _sk_fail._("threading")\n',"src/lib/timeit.py":'import _sk_fail; _sk_fail._("timeit")\n',"src/lib/toaiff.py":'import _sk_fail; _sk_fail._("toaiff")\n',"src/lib/trace.py":'import _sk_fail; _sk_fail._("trace")\n',"src/lib/traceback.py":'import _sk_fail; _sk_fail._("traceback")\n',"src/lib/tty.py":'import _sk_fail; _sk_fail._("tty")\n',"src/lib/types.py":'"""\nThis file was modified from CPython.\nCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved\n"""\n"""Define names for all type symbols known in the standard interpreter.\nTypes that are part of optional modules (e.g. array) are not listed.\n"""\nimport sys\n\n# Iterators in Python aren\'t a matter of type but of protocol. A large\n# and changing number of builtin types implement *some* flavor of\n# iterator. Don\'t check the type! Use hasattr to check for both\n# "__iter__" and "next" attributes instead.\nMappingProxyType = type(type.__dict__)\nWrapperDescriptorType = type(object.__init__)\nMethodWrapperType = type(object().__str__)\nMethodDescriptorType = type(str.join)\nClassMethodDescriptorType = type(dict.__dict__[\'fromkeys\'])\n\nNoneType = type(None)\nTypeType = type\nObjectType = object\nIntType = int\ntry:\n LongType = long\nexcept: pass\nFloatType = float\nBooleanType = bool\ntry:\n ComplexType = complex\nexcept NameError:\n pass\nStringType = str\n\n# StringTypes is already outdated. Instead of writing "type(x) in\n# types.StringTypes", you should use "isinstance(x, basestring)". But\n# we keep around for compatibility with Python 2.2.\ntry:\n UnicodeType = unicode\n StringTypes = (StringType, UnicodeType)\nexcept NameError:\n StringTypes = (StringType,)\n\nBufferType = buffer\n\nTupleType = tuple\nListType = list\nDictType = DictionaryType = dict\n\ndef _f(): pass\nFunctionType = type(_f)\nLambdaType = type(lambda: None) # Same as FunctionType\n#CodeType = type(_f.func_code)\n\ndef _g():\n yield 1\nGeneratorType = type(_g())\n\nclass _C:\n def _m(self): pass\nClassType = type(_C)\nUnboundMethodType = type(_C._m) # Same as MethodType\n_x = _C()\nInstanceType = type(_x)\nMethodType = type(_x._m)\nBuiltinFunctionType = type(len)\nBuiltinMethodType = type([].append) # Same as BuiltinFunctionType\n\nModuleType = type(sys)\nFileType = file\ntry:\n XRangeType = xrange\nexcept NameError:\n pass\n\n# try:\n# raise TypeError\n# except TypeError:\n# tb = sys.exc_info()[2]\n# TracebackType = type(tb)\n# FrameType = type(tb.tb_frame)\n# del tb\n\nSliceType = slice\nEllipsisType = type(Ellipsis)\n\n# DictProxyType = type(TypeType.__dict__)\nNotImplementedType = type(NotImplemented)\n\n# For Jython, the following two types are identical\n# GetSetDescriptorType = type(FunctionType.func_code)\n# MemberDescriptorType = type(FunctionType.func_globals)\n\ndel sys, _f, _g, _C, _x # Not for export\n__all__ = list(n for n in globals() if n[:1] != \'_\')\n\nGenericAlias = type(type[int])',"src/lib/unittest/gui.py":"import document\nfrom unittest import TestCase\n\nclass TestCaseGui(TestCase):\n def __init__(self):\n TestCase.__init__(self)\n self.divid = document.currentDiv()\n self.mydiv = document.getElementById(self.divid)\n res = document.getElementById(self.divid+'_unit_results')\n if res:\n self.resdiv = res\n res.innerHTML = ''\n else:\n self.resdiv = document.createElement('div')\n self.resdiv.setAttribute('id',self.divid+'_unit_results')\n self.resdiv.setAttribute('class','unittest-results')\n self.mydiv.appendChild(self.resdiv)\n\n\n def main(self):\n t = document.createElement('table')\n self.resTable = t\n self.resdiv.appendChild(self.resTable)\n\n headers = ['Result','Actual Value','Expected Value','Notes']\n row = document.createElement('tr')\n for item in headers:\n head = document.createElement('th')\n head.setAttribute('class','ac-feedback')\n head.innerHTML = item\n head.setCSS('text-align','center')\n row.appendChild(head)\n self.resTable.appendChild(row)\n\n for func in self.tlist:\n try:\n self.setUp()\n func()\n self.tearDown()\n except Exception as e:\n self.appendResult('Error', None, None, e)\n self.numFailed += 1\n self.showSummary()\n\n def appendResult(self,res,actual,expected,param):\n trimActual = False\n if len(str(actual)) > 15:\n trimActual = True\n actualType = type(actual)\n trimExpected = False\n if len(str(expected)) > 15:\n trimExpected = True\n expectedType = type(expected)\n row = document.createElement('tr')\n err = False\n if res == 'Error':\n err = True\n msg = 'Error: %s' % param\n errorData = document.createElement('td')\n errorData.setAttribute('class','ac-feedback')\n errorData.innerHTML = 'ERROR'\n errorData.setCSS('background-color','#de8e96')\n errorData.setCSS('text-align','center')\n row.appendChild(errorData)\n elif res:\n passed = document.createElement('td')\n passed.setAttribute('class','ac-feedback')\n passed.innerHTML = 'Pass'\n passed.setCSS('background-color','#83d382')\n passed.setCSS('text-align','center')\n row.appendChild(passed)\n self.numPassed += 1\n else:\n fail = document.createElement('td')\n fail.setAttribute('class','ac-feedback')\n fail.innerHTML = 'Fail'\n fail.setCSS('background-color','#de8e96')\n fail.setCSS('text-align','center')\n row.appendChild(fail)\n self.numFailed += 1\n\n\n act = document.createElement('td')\n act.setAttribute('class','ac-feedback')\n if trimActual:\n actHTML = str(actual)[:5] + \"...\" + str(actual)[-5:]\n if actualType == str:\n actHTML = repr(actHTML)\n act.innerHTML = actHTML\n else:\n act.innerHTML = repr(actual)\n act.setCSS('text-align','center')\n row.appendChild(act)\n\n expect = document.createElement('td')\n expect.setAttribute('class','ac-feedback')\n\n if trimExpected:\n expectedHTML = str(expected)[:5] + \"...\" + str(expected)[-5:]\n if expectedType == str:\n expectedHTML = repr(expectedHTML)\n expect.innerHTML = expectedHTML\n else:\n expect.innerHTML = repr(expected)\n expect.setCSS('text-align','center')\n row.appendChild(expect)\n inp = document.createElement('td')\n inp.setAttribute('class','ac-feedback')\n\n if err:\n inp.innerHTML = msg\n else:\n inp.innerHTML = param\n inp.setCSS('text-align','center')\n row.appendChild(inp)\n self.resTable.appendChild(row)\n\n\n def showSummary(self):\n pct = self.numPassed / (self.numPassed+self.numFailed) * 100\n pTag = document.createElement('p')\n pTag.innerHTML = \"You passed: \" + str(pct) + \"% of the tests\"\n self.resdiv.appendChild(pTag)\n","src/lib/unittest/__init__.py":'__author__ = \'bmiller\'\n\'\'\'\nThis is the start of something that behaves like\nthe unittest module from cpython.\n\n\'\'\'\nimport re\n\nclass _AssertRaisesContext(object):\n """A context manager used to implement TestCase.assertRaises* methods."""\n def __init__(self, expected, test_case):\n self.test_case = test_case\n self.expected = expected\n self.exception = None\n\n def _is_subtype(self, expected, basetype):\n if isinstance(expected, tuple):\n return all(self._is_subtype(e, basetype) for e in expected)\n return isinstance(expected, type) and issubclass(expected, basetype)\n\n def handle(self, args, kwargs):\n """\n If args is empty, assertRaises is being used as a\n context manager, so return self.\n If args is not empty, call a callable passing positional and keyword\n arguments.\n """\n try:\n if not self._is_subtype(self.expected, BaseException):\n raise TypeError(\'assertRaises() arg 1 must be an exception type or tuple of exception types\')\n if not args:\n return self\n\n callable_obj = args[0]\n args = args[1:]\n with self:\n callable_obj(*args, **kwargs) \n\n finally:\n # bpo-23890: manually break a reference cycle\n self = None\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, tb):\n res = True\n feedback = ""\n self.exception = exc_value\n try:\n act_exc = exc_type.__name__\n except AttributeError:\n act_exc = str(exc_type)\n try:\n exp_exc = self.expected.__name__\n except AttributeError:\n exp_exc = str(self.expected)\n\n if exc_type is None:\n res = False\n feedback = "{} not raised".format(exp_exc)\n elif not issubclass(exc_type, self.expected):\n res = False\n feedback = "Expected {} but got {}".format(exp_exc, act_exc)\n\n self.test_case.appendResult(res, act_exc, exp_exc, feedback)\n return True\n\n\nclass TestCase(object):\n def __init__(self):\n self.numPassed = 0\n self.numFailed = 0\n self.assertPassed = 0\n self.assertFailed = 0\n self.verbosity = 1\n self.tlist = []\n testNames = {}\n for name in dir(self):\n if name[:4] == \'test\' and name not in testNames:\n self.tlist.append(getattr(self,name))\n testNames[name]=True\n\n def setUp(self):\n pass\n\n def tearDown(self):\n pass\n \n def cleanName(self,funcName):\n return funcName.__func__.__name__\n\n def main(self):\n\n for func in self.tlist:\n if self.verbosity > 1:\n print(\'Running %s\' % self.cleanName(func))\n try:\n self.setUp()\n self.assertPassed = 0\n self.assertFailed = 0\n func()\n self.tearDown()\n if self.assertFailed == 0:\n self.numPassed += 1\n else:\n self.numFailed += 1\n print(\'Tests failed in %s \' % self.cleanName(func))\n except Exception as e:\n self.assertFailed += 1\n self.numFailed += 1\n print(\'Test threw exception in %s (%s)\' % (self.cleanName(func), e))\n self.showSummary()\n\n def assertEqual(self, actual, expected, feedback=""):\n res = actual==expected\n if not res and feedback == "":\n feedback = "Expected %s to equal %s" % (str(actual),str(expected))\n self.appendResult(res, actual ,expected, feedback)\n\n def assertNotEqual(self, actual, expected, feedback=""):\n res = actual != expected\n if not res and feedback == "":\n feedback = "Expected %s to not equal %s" % (str(actual),str(expected))\n self.appendResult(res, actual, expected, feedback)\n\n def assertTrue(self,x, feedback=""):\n res = bool(x) is True\n if not res and feedback == "":\n feedback = "Expected %s to be True" % (str(x))\n self.appendResult(res, x, True, feedback)\n\n def assertFalse(self,x, feedback=""):\n res = not bool(x)\n if not res and feedback == "":\n feedback = "Expected %s to be False" % (str(x))\n self.appendResult(res, x, False, feedback)\n\n def assertIs(self,a,b, feedback=""):\n res = a is b\n if not res and feedback == "":\n feedback = "Expected %s to be the same object as %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsNot(self,a,b, feedback=""):\n res = a is not b\n if not res and feedback == "":\n feedback = "Expected %s to not be the same object as %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsNone(self,x, feedback=""):\n res = x is None\n if not res and feedback == "":\n feedback = "Expected %s to be None" % (str(x))\n self.appendResult(res, x, None, feedback)\n\n def assertIsNotNone(self,x, feedback=""):\n res = x is not None\n if not res and feedback == "":\n feedback = "Expected %s to not be None" % (str(x))\n self.appendResult(res, x, None, feedback)\n\n def assertIn(self, a, b, feedback=""):\n res = a in b\n if not res and feedback == "":\n feedback = "Expected %s to be in %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotIn(self, a, b, feedback=""):\n res = a not in b\n if not res and feedback == "":\n feedback = "Expected %s to not be in %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsInstance(self,a,b, feedback=""):\n res = isinstance(a,b)\n if not res and feedback == "":\n feedback = "Expected %s to be an instance of %s" % (str(a), str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotIsInstance(self,a,b, feedback=""):\n res = not isinstance(a,b)\n if not res and feedback == "":\n feedback = "Expected %s to not be an instance of %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertRegex(self, text, expected_regex, feedback=""):\n """Fail the test unless the text matches the regular expression."""\n if isinstance(expected_regex, (str, )): #bytes\n assert expected_regex, "expected_regex must not be empty."\n expected_regex = re.compile(expected_regex)\n if not expected_regex.search(text):\n res = False\n if feedback == "":\n feedback = "Regex didn\'t match: %r not found in %r" % (\n repr(expected_regex), text)\n else:\n res = True\n self.appendResult(res, text, expected_regex, feedback)\n\n def assertNotRegex(self, text, unexpected_regex, feedback=""):\n """Fail the test if the text matches the regular expression."""\n if isinstance(unexpected_regex, (str, )): # bytes\n unexpected_regex = re.compile(unexpected_regex)\n match = unexpected_regex.search(text)\n if match:\n feedback = \'Regex matched: %r matches %r in %r\' % (\n text[match.start() : match.end()],\n repr(unexpected_regex),\n text)\n # _formatMessage ensures the longMessage option is respected\n self.appendResult(not bool(match), text, unexpected_regex, feedback)\n\n def assertAlmostEqual(self, a, b, places=7, feedback="", delta=None):\n\n if delta is not None:\n res = abs(a-b) <= delta\n else:\n if places is None:\n places = 7\n res = round(a-b, places) == 0\n \n if not res and feedback == "":\n feedback = "Expected %s to equal %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotAlmostEqual(self, a, b, places=7, feedback="", delta=None):\n\n if delta is not None:\n res = not (a == b) and abs(a - b) > delta\n else:\n if places is None:\n places = 7\n\n res = round(a-b, places) != 0\n\n if not res and feedback == "":\n feedback = "Expected %s to not equal %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertGreater(self,a,b, feedback=""):\n res = a > b\n if not res and feedback == "":\n feedback = "Expected %s to be greater than %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertGreaterEqual(self,a,b, feedback=""):\n res = a >= b\n if not res and feedback == "":\n feedback = "Expected %s to be >= %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertLess(self, a, b, feedback=""):\n res = a < b\n if not res and feedback == "":\n feedback = "Expected %s to be less than %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertLessEqual(self,a,b, feedback=""):\n res = a <= b\n if not res and feedback == "":\n feedback = "Expected %s to be <= %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def appendResult(self,res,actual,expected,feedback):\n if res:\n msg = \'Pass\'\n self.assertPassed += 1\n else:\n msg = \'Fail: \' + feedback\n print(msg)\n self.assertFailed += 1\n\n def assertRaises(self, expected_exception, *args, **kwargs):\n context = _AssertRaisesContext(expected_exception, self)\n try:\n return context.handle(args, kwargs)\n finally:\n # bpo-23890: manually break a reference cycle\n context = None\n\n def fail(self, msg=None):\n if msg is None:\n msg = \'Fail\'\n else:\n msg = \'Fail: \' + msg\n print(msg)\n self.assertFailed += 1\n\n def showSummary(self):\n # don\'t divde by zero\n # pct = self.numPassed / (self.numPassed+self.numFailed) * 100\n print("Ran %d tests, passed: %d failed: %d\\n" % (self.numPassed+self.numFailed,\n self.numPassed, self.numFailed))\n\n\n\ndef main(verbosity=1):\n glob = globals() # globals() still needs work\n for name in glob:\n if type(glob[name]) == type and issubclass(glob[name], TestCase):\n try:\n tc = glob[name]()\n tc.verbosity = verbosity\n tc.main()\n except:\n print("Uncaught Error in: ", name)\n',"src/lib/urllib2.py":'import _sk_fail; _sk_fail._("urllib2")\n',"src/lib/urlparse.py":'import _sk_fail; _sk_fail._("urlparse")\n',"src/lib/user.py":'import _sk_fail; _sk_fail._("user")\n',"src/lib/UserDict.py":'import _sk_fail; _sk_fail._("UserDict")\n',"src/lib/UserList.py":'import _sk_fail; _sk_fail._("UserList")\n',"src/lib/UserString.py":'import _sk_fail; _sk_fail._("UserString")\n',"src/lib/uu.py":'import _sk_fail; _sk_fail._("uu")\n',"src/lib/warnings.py":'import _sk_fail; _sk_fail._("warnings")\n',"src/lib/wave.py":'import _sk_fail; _sk_fail._("wave")\n',"src/lib/weakref.py":'import _sk_fail; _sk_fail._("weakref")\n',"src/lib/whichdb.py":'import _sk_fail; _sk_fail._("whichdb")\n',"src/lib/wsgiref/__init__.py":'import _sk_fail; _sk_fail._("wsgiref")\n',"src/lib/xdrlib.py":'import _sk_fail; _sk_fail._("xdrlib")\n',"src/lib/xml/dom/__init__.py":'import _sk_fail; _sk_fail._("dom")\n',"src/lib/xml/etree/__init__.py":'import _sk_fail; _sk_fail._("etree")\n',"src/lib/xml/parsers/__init__.py":'import _sk_fail; _sk_fail._("parsers")\n',"src/lib/xml/sax/__init__.py":'import _sk_fail; _sk_fail._("sax")\n',"src/lib/xml/__init__.py":'import _sk_fail; _sk_fail._("xml")\n',"src/lib/xmllib.py":'import _sk_fail; _sk_fail._("xmllib")\n',"src/lib/xmlrpclib.py":'import _sk_fail; _sk_fail._("xmlrpclib")\n',"src/lib/zipfile.py":'import _sk_fail; _sk_fail._("zipfile")\n',"src/lib/_abcoll.py":'import _sk_fail; _sk_fail._("_abcoll")\n',"src/lib/_LWPCookieJar.py":'import _sk_fail; _sk_fail._("_LWPCookieJar")\n',"src/lib/_MozillaCookieJar.py":'import _sk_fail; _sk_fail._("_MozillaCookieJar")\n',"src/lib/_sk_fail.py":'class NotImplementedImportError(ImportError, NotImplementedError): pass\n\ndef _(name):\n msg = "{} is not yet implemented in Skulpt".format(name)\n raise NotImplementedImportError(msg, name=name)\n',"src/lib/_threading_local.py":'import _sk_fail; _sk_fail._("_threading_local")\n',"src/lib/__future__.py":'import _sk_fail;_sk_fail._("__future__")\n',"src/lib/__phello__.foo.py":'import _sk_fail; _sk_fail._("__phello__.foo")\n',"src/builtin/sys.js":'var $builtinmodule=function(i){var t,n={},e=[],u=Sk.getSysArgv();for(t=0;tnew Sk.builtin.str("utf-8"))),n.getExecutionLimit=new Sk.builtin.func((function(){return null===Sk.execLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.execLimit)})),n.setExecutionLimit=new Sk.builtin.func((function(i){if(null===Sk.execLimit)throw new Sk.builtin.NotImplementedError("Execution limiting is not enabled");void 0!==i&&(Sk.execLimit=Sk.builtin.asnum$(i))})),n.resetTimeout=new Sk.builtin.func((function(){Sk.execStart=new Date})),n.getYieldLimit=new Sk.builtin.func((function(){return null===Sk.yieldLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.yieldLimit)})),n.setYieldLimit=new Sk.builtin.func((function(i){if(null===Sk.yieldLimit)throw new Sk.builtin.NotImplementedError("Yielding is not enabled");void 0!==i&&(Sk.yieldLimit=Sk.builtin.asnum$(i))})),n.debug=new Sk.builtin.func((function(){return Sk.builtin.none.none$}));const o=Sk.builtin.make_structseq("sys","float_info",{max:"DBL_MAX -- maximum representable finite float",max_exp:"DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable",max_10_exp:"DBL_MAX_10_EXP -- maximum int e such that 10**e is representable",min:"DBL_MIN -- Minimum positive normalized float",min_exp:"DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a normalized float",min_10_exp:"DBL_MIN_10_EXP -- minimum int e such that 10**e is a normalized",dig:"DBL_DIG -- digits",mant_dig:"DBL_MANT_DIG -- mantissa digits",epsilon:"DBL_EPSILON -- Difference between 1 and the next representable float",radix:"FLT_RADIX -- radix of exponent",rounds:"FLT_ROUNDS -- rounding mode"});n.float_info=new o([Number.MAX_VALUE,Math.floor(Math.log2(Number.MAX_VALUE)),Math.floor(Math.log10(Number.MAX_VALUE)),Number.MIN_VALUE,Math.ceil(Math.log2(Number.MIN_VALUE)),Math.ceil(Math.log10(Number.MIN_VALUE)),15,Math.log2(Number.MAX_SAFE_INTEGER),Number.EPSILON,2,1].map((i=>Sk.ffi.remapToPy(i))));const s=Sk.builtin.make_structseq("sys","int_info",{bits_per_digit:"size of a digit in bits",sizeof_digit:"size in bytes of the C type used to represent a digit"});n.int_info=new s([30,4].map((i=>Sk.ffi.remapToPy(i))));const l=Sk.builtin.make_structseq("sys","hash_info",{width:"width of the type used for hashing, in bits",modulus:"prime number giving the modulus on which the hash function is based",inf:"value to be used for hash of a positive infinity",nan:"value to be used for hash of a nan",imag:"multiplier used for the imaginary part of a complex number",algorithm:"name of the algorithm for hashing of str, bytes and memoryviews",hash_bits:"internal output size of hash algorithm",seed_bits:"seed size of hash algorithm",cutoff:"small string optimization cutoff"});return n.hash_info=new l([32,536870911,314159,0,1000003,"siphash24",32,128,0].map((i=>Sk.ffi.remapToPy(i)))),n.__stdout__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdout"),new Sk.builtin.str("w")),n.__stdin__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdin"),new Sk.builtin.str("r")),n.stdout=n.__stdout__,n.stdin=n.__stdin__,n};',"src/lib/array.js":'function $builtinmodule(e){var n={},t=["c","b","B","u","h","H","i","I","l","L","f","d"];return n.__name__=new Sk.builtin.str("array"),n.array=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e,n,i){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,3),-1==t.indexOf(Sk.ffi.remapToJs(n)))throw new Sk.builtin.ValueError("bad typecode (must be c, b, B, u, h, H, i, I, l, L, f or d)");if(i&&!Sk.builtin.checkIterable(i))throw new Sk.builtin.TypeError("iteration over non-sequence");if(e.$d.mp$ass_subscript(new Sk.builtin.str("typecode"),n),e.$d.mp$ass_subscript(new Sk.builtin.str("__module__"),new Sk.builtin.str("array")),e.typecode=n,void 0===i)e.internalIterable=new Sk.builtin.list;else if(i instanceof Sk.builtin.list)e.internalIterable=i;else{e.internalIterable=new Sk.builtin.list;for(let n=Sk.abstr.iter(i),t=n.tp$iternext();void 0!==t;t=n.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,t])}})),n.__repr__=new Sk.builtin.func((function(e){var n=Sk.ffi.remapToJs(e.typecode),t="";return Sk.ffi.remapToJs(e.internalIterable).length&&(t="c"==Sk.ffi.remapToJs(e.typecode)?", \'"+Sk.ffi.remapToJs(e.internalIterable).join("")+"\'":", "+Sk.ffi.remapToJs(Sk.misceval.callsimArray(e.internalIterable.__repr__,[e.internalIterable]))),new Sk.builtin.str("array(\'"+n+"\'"+t+")")})),n.__str__=n.__repr__,n.__getattribute__=new Sk.builtin.func((function(e,n){return e.tp$getattr(n)})),n.append=new Sk.builtin.func((function(e,n){return Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,n]),Sk.builtin.none.none$})),n.extend=new Sk.builtin.func((function(e,n){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2),!Sk.builtin.checkIterable(n))throw new Sk.builtin.TypeError("iteration over non-sequence");for(let t=Sk.abstr.iter(n),i=t.tp$iternext();void 0!==i;i=t.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,i])}))}),"array",[]),n}',"src/lib/calendar.js":'function $builtinmodule(e){const t={},{misceval:{chain:n},importModule:r}=Sk,importOrSuspend=e=>r(e,!1,!0);return n(importOrSuspend("datetime"),(e=>(t.datetime=e,importOrSuspend("itertools"))),(e=>(t.iterRepeat=e.$d.repeat,t.iterChain=e.$d.chain,calendarModule(t))))}function calendarModule(e){const{abstr:{setUpModuleMethods:t,numberBinOp:n,iter:r,objectGetItem:o},builtin:{bool:s,bool:{true$:m,false$:d},func:l,int_:i,list:c,none:{none$:f},str:h,slice:w,tuple:y,range:u,max:_,min:g,property:k,print:p,enumerate:$,ValueError:b},ffi:{remapToPy:M},misceval:{isTrue:T,iterator:C,arrayFromIterable:O,buildClass:L,richCompareBool:x,asIndexOrThrow:F,objectRepr:I,callsimArray:A},global:v,global:{strftime:E}}=Sk,S=new i(0),H=new i(1),D=new i(2),N=new i(3),R=new i(6),j=new i(7),J=new i(9),P=new i(12),Y=new i(13),U=new i(24),z=new i(60),le=(e,t)=>x(e,t,"LtE"),eq=(e,t)=>x(e,t,"Eq"),mod=(e,t)=>n(e,t,"Mod"),add=(e,t)=>n(e,t,"Add"),sub=(e,t)=>n(e,t,"Sub"),mul=(e,t)=>n(e,t,"Mult"),inc=e=>add(e,H),dec=e=>sub(e,H),mod7=e=>mod(e,j),getA=(e,t)=>e.tp$getattr(new h(t)),callA=(e,t,...n)=>A(e.tp$getattr(new h(t)),n);function*iterJs(e){const t=r(e);let n;for(;n=t.tp$iternext();)yield n}function iterFn(e,t){return e=r(e),new C((()=>{const n=e.tp$iternext();return n&&t(n)}),!0)}function makePyMethod(e,t,{args:n,name:r,doc:o,defaults:s}){t.co_varnames=["self",...n||[]],t.co_docstring=o?new h(o):f,s&&(t.$defaults=s),t.co_name=new h(r),t.co_qualname=new h(e+"."+r);const m=new l(t);return m.$module=Q.__name__,m}const{datetime:B,iterRepeat:W,iterChain:q}=e;let{MINYEAR:G,MAXYEAR:X,date:V}=B.$d;const K=getA(h,"center"),pyCenter=(e,t)=>A(K,[e,t]),pyRStrip=e=>new h(e.toString().trimRight());G=G.valueOf(),X=X.valueOf();const Q={__name__:new h("calendar"),__all__:M(["IllegalMonthError","IllegalWeekdayError","setfirstweekday","firstweekday","isleap","leapdays","weekday","monthrange","monthcalendar","prmonth","month","prcal","calendar","timegm","month_name","month_abbr","day_name","day_abbr","Calendar","TextCalendar","HTMLCalendar","LocaleTextCalendar","LocaleHTMLCalendar","weekheader"])};function makeErr(e,t){return L(Q,((e,n)=>{n.__init__=new l((function __init__(e,t){e.$attr=t})),n.__str__=new l((function __str__(e){return new h(t.replace("$",I(e.$attr)))}))}),e,[b])}const Z=makeErr("IllegalMonthError","bad month $; must be 1-12"),ee=makeErr("IllegalWeekdayError","bad weekday number $; must be 0 (Monday) to 6 (Sunday)"),te=1,ae=2,ne=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mkLocalizedCls(e,t){t.__init__=new l((function __init__(e,t){e.format=t})),t.__getitem__=new l((function __getitem__(t,n){const r=o(e,n);if(n instanceof w){const e=[];for(const n of r.valueOf())e.push(A(n,[t.format]));return new c(e)}return A(r,[t.format])}));const n=new i(e.valueOf().length);t.__len__=new l((function __len__(e){return n}))}const re=new h("strftime"),oe=L(Q,((e,t)=>{let n=[new l((e=>h.$empty))];for(let r=0;r<12;r++){const e=new V(2001,r+1,1);n.push(e.tp$getattr(re))}n=new c(n),t._months=n,mkLocalizedCls(n,t)}),"_localized_month"),se=L(Q,((e,t)=>{let n=[];for(let r=0;r<7;r++){const e=new V(2001,1,r+1);n.push(e.tp$getattr(re))}n=new c(n),t._days=n,mkLocalizedCls(n,t)}),"_localized_day"),me=A(se,[new h("%A")]),de=A(se,[new h("%a")]),ie=A(oe,[new h("%B")]),ce=A(oe,[new h("%b")]),[fe,he,we,ye,ue,_e,ge]=[0,1,2,3,4,5,6];function isleap(e){return(e=F(e))%4==0&&(e%100!=0||e%400==0)}function weekday(e,t,n){e=F(e),G<=e&&e<=X||(e=2e3+e%400);const r=A(V,[new i(e),t,n]);return callA(V,"weekday",r)}function monthrange(e,t){if(!le(H,t)||!le(t,P))throw A(Z,[t]);const n=weekday(e,t,H);t=F(t);const r=ne[t]+Number(t===ae&&isleap(e));return[n,new i(r)]}function iterweekdays(e){return iterFn(A(u,[e.fwd,add(e.fwd,j)]),mod7)}function itermonthdates(e,t,n){return iterFn(itermonthdays3(e,t,n),(e=>A(V,e.valueOf())))}function itermonthdays(e,t,n){const[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=A(W,[S,s]),d=A(u,[H,inc(o)]),l=mod7(sub(e.fwd,add(r,o))),i=A(W,[S,l]);return A(q,[m,d,i])}function itermonthdays2(e,t,n){return iterFn(A($,[itermonthdays(e,t,n),e.fwd]),(e=>{const[t,n]=e.valueOf();return new y([n,mod7(t)])}))}function itermonthdays3(e,t,n){const ymdIter=(e,t,n)=>iterFn(n,(n=>new y([e,t,n]))),[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=mod7(sub(e.fwd,add(r,o))),[d,l]=function _prevmonth(e,t){return eq(t,H)?[dec(e),P]:[e,dec(t)]}(t,n),c=inc(function _monthlen(e,t){return t=F(t),new i(ne[t]+Number(t===ae&&isleap(e)))}(d,l)),f=A(u,[sub(c,s),c]),h=A(u,[H,inc(o)]),[w,_]=function _nextmonth(e,t){return eq(t,P)?[inc(e),H]:[e,inc(t)]}(t,n),g=A(u,[H,inc(m)]);return A(q,[ymdIter(d,l,f),ymdIter(t,n,h),ymdIter(w,_,g)])}function itermonthdays4(e,t,n){const r=itermonthdays3(e,t,n);let o=0;return iterFn(r,(t=>new y([...t.valueOf(),mod7(add(e.fwd,new i(o++)))])))}function _monthIter(e,t,n,r){const o=O(e(t,n,r)),s=[];for(let m=0;m{const n=makePyMethod.bind(null,"Calendar"),r=["firstweekday"],o=["year","month"],s=["year","width"],m={__init__:n((function __init__(e,t){return Object.defineProperty(e,"fwd",{get(){return mod7(this._fwd)},set(e){return this._fwd=e,!0}}),e.fwd=t,f}),{name:"__init__",args:r,defaults:[S]}),getfirstweekday:n((function getfirstweekday(e){return e.fwd}),{name:"getfirstweekday"}),setfirstweekday:n((function setfirstweekday(e,t){return e.fwd=t,f}),{name:"setfirstweekday",args:r}),iterweekdays:n(iterweekdays,{name:"iterweekdays"}),itermonthdates:n(itermonthdates,{name:"itermonthdates",args:o}),itermonthdays:n(itermonthdays,{name:"itermonthdays",args:o}),itermonthdays2:n(itermonthdays2,{name:"itermonthdays2",args:o}),itermonthdays3:n(itermonthdays3,{name:"itermonthdays3",args:o}),itermonthdays4:n(itermonthdays4,{name:"itermonthdays4",args:o}),monthdatescalendar:n(monthdatescalendar,{name:"monthdatescalendar",args:o}),monthdays2calendar:n(monthdays2calendar,{name:"monthdays2calendar",args:o}),monthdayscalendar:n(monthdayscalendar,{name:"monthdayscalendar",args:o}),yeardatescalendar:n(yeardatescalendar,{name:"yeardatescalendar",args:s,defaults:[N]}),yeardays2calendar:n(yeardays2calendar,{name:"yeardays2calendar",args:s,defaults:[N]}),yeardayscalendar:n(yeardayscalendar,{name:"yeardayscalendar",args:s,defaults:[N]})};m.firstweekday=new k(m.getfirstweekday,m.setfirstweekday),Object.assign(t,m)}),"Calendar");function doTextFormatweekday(e,t,n){let r;return r=x(n,J,"GtE")?me:de,pyCenter(o(o(r,t),new w(f,n)),n)}function doTextFormatmonthname(e,t,n,r,s=!0){let m=o(ie,n);return T(s)&&(m=mod(new h("%s %r"),new y([m,t]))),pyCenter(m,r)}const pe=L(Q,((e,t)=>{const txtPrint=e=>p([e],["end",h.$empty]);const n=doTextFormatweekday;function formatweekheader(e,t){const n=[];for(const r of iterJs(iterweekdays(e)))n.push(callA(e,"formatweekday",r,t).toString());return new h(n.join(" "))}const r=doTextFormatmonthname;const o=makePyMethod.bind(null,"TextCalendar"),s={prweek:o((function prweek(e,t,n){txtPrint(callA(e,"formatweek",t,n))}),{name:"prweek",args:["theweek","width"]}),formatday:o((function formatday(e,t,n,r){let o;return o=eq(t,S)?h.$empty:mod(new h("%2i"),t),pyCenter(o,r)}),{name:"formatday",args:["day","weekday","width"]}),formatweek:o((function formatweek(e,t,n){const r=[];for(const o of iterJs(t)){const[t,s]=o.valueOf();r.push(callA(e,"formatday",t,s,n).toString())}return new h(r.join(" "))}),{name:"formatweek",args:["theweek","width"]}),formatweekday:o(n,{name:"formatweekday",args:["day","width"]}),formatweekheader:o(formatweekheader,{name:"formatweekheader",args:["width"]}),formatmonthname:o(r,{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]}),prmonth:o((function prmonth(e,t,n,r,o){txtPrint(callA(e,"formatmonth",t,n,r,o))}),{name:"prmonth",args:["theyear","themonth","w","l"],defaults:[S,S]}),formatmonth:o((function formatmonth(e,t,n,r,o){const addNewLines=e=>new h(e+"\\n".repeat(o.valueOf()));r=_([D,r]),o=_([H,o]);let s=callA(e,"formatmonthname",t,n,dec(mul(j,inc(r))),!0);s=pyRStrip(s),s=addNewLines(s),s=add(s,pyRStrip(callA(e,"formatweekheader",r))),s=addNewLines(s);for(const m of iterJs(monthdays2calendar(e,t,n)))s=add(s,pyRStrip(callA(e,"formatweek",m,r))),s=addNewLines(s);return s}),{name:"formatmonth",args:["thyear","themonth","w","l"],defaults:[S,S]}),formatyear:o((function formatyear(e,t,n,r,o,s){n=_([D,n]),r=_([H,r]),o=_([D,o]);const m=dec(mul(inc(n),j));let d="";const a=e=>d+=e;a(pyRStrip(pyCenter(t.$r(),add(mul(m,s),mul(o,dec(s)))))),a("\\n".repeat(r));const l=formatweekheader(e,n);let f=0;for(const w of iterJs(yeardays2calendar(e,t,s))){const d=new i(f),y=inc(mul(s,d)),_=g([inc(mul(s,inc(d))),Y]),k=A(u,[y,_]);a("\\n".repeat(r));const p=iterFn(k,(n=>callA(e,"formatmonthname",t,n,m,!1)));a(pyRStrip(formatstring(p,m,o))),a("\\n".repeat(r));const $=iterFn(k,(e=>l));a(pyRStrip(formatstring($,m,o))),a("\\n".repeat(r));const b=Math.max(...w.valueOf().map((e=>e.valueOf().length)));for(let t=0;t=r.length?s.push(h.$empty):s.push(callA(e,"formatweek",r[t],n));a(pyRStrip(formatstring(new c(s),m,o))),a("\\n".repeat(r))}f++}return new h(d)}),{name:"formatyear",args:["theyear","w","l","c","m"],defaults:[D,H,R,N]}),pryear:o((function pryear(e,t,n,r,o,s){txtPrint(callA(e,"formatyear",t,n,r,o,s))}),{name:"pryear",args:["theyear","w","l","c","m"],defaults:[S,S,R,N]})};Object.assign(t,s)}),"TextCalendar",[ke]);function doHtmlFormatweekday(e,t){return new h(`${o(de,t)}`)}function doHtmlFormatmonthname(e,t,n,r=!0){let s=""+o(ie,n);return T(r)&&(s+=" "+t),new h(`${s}`)}const $e=L(Q,((e,t)=>{const n=M(["mon","tue","wed","thu","fri","sat","sun"]),r=n,s=new h("noday"),d=new h("month"),l=d,c=new h("year"),w=c,u=new h(\' \'),g=new h(\'%d\');const k=doHtmlFormatweekday;function formatweekheader(e){let t="";for(const n of iterJs(iterweekdays(e)))t+=callA(e,"formatweekday",n);return new h(`${t}`)}const p=doHtmlFormatmonthname;const $=makePyMethod.bind(null,"HTMLCalendar"),b={formatday:$((function formatday(e,t,n){return eq(t,S)?mod(u,getA(e,"cssclass_noday")):mod(g,new y([o(getA(e,"cssclasses"),n),t]))}),{name:"formatday",args:["day","weekday"]}),formatweek:$((function formatweek(e,t){let n="";for(const r of iterJs(t)){const[t,o]=r.valueOf();n+=callA(e,"formatday",t,o)}return new h(`${n}`)}),{name:"formatweek",args:["theweek"]}),formatweekday:$(k,{name:"formatweekday",args:["day"]}),formatweekheader:$(formatweekheader,{name:"formatweekheader"}),formatmonthname:$(p,{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]}),formatmonth:$((function formatmonth(e,t,n,r=!0){let o="";const a=e=>o+=e+"\\n";a(``),a(callA(e,"formatmonthname",t,n,r)),a(formatweekheader(e));for(const s of iterJs(monthdays2calendar(e,t,n)))a(callA(e,"formatweek",s));return a("
"),new h(o)}),{name:"formatmonth",args:["thyear","themonth","withyear"],defaults:[m]}),formatyear:$((function formatyear(e,t,n){let r="";const a=e=>r+=e;n=_([n,H]).valueOf(),a(``),a("\\n"),a(``);for(let o=te;o");const r=Math.min(o+n,13);for(let n=o;n"),a(callA(e,"formatmonth",t,new i(n),!1)),a("");a("")}return a("
${t}
"),new h(r)}),{name:"formatyear",args:["theyear","width"],defaults:[N]}),formatyearpage:$((function formatyearpage(e,t,n=3,r="calendar.css",o=null){null!==o&&o!==f||(o=new h("utf-8"));let s="";const a=e=>s+=e;return a(`\\n`),a(\'\\n\'),a("\\n"),a("\\n"),a(`\\n`),r!==f&&a(`\\n`),a(`Calendar for ${t}\\n`),a("\\n"),a("\\n"),a(callA(e,"formatyear",t,n)),a("\\n"),a("\\n"),callA(h,"encode",new h(s),o,new h("ignore"))}),{name:"formatyearpage",args:["theyear","width","css","encoding"],defaults:[N,new h("calendar.css"),new h("utf-8")]}),cssclasses:n,cssclasses_weekday_head:r,cssclass_noday:s,cssclass_month_head:d,cssclass_month:l,cssclass_year_head:c,cssclass_year:w};Object.assign(t,b)}),"HTMLCalendar",[ke]);function withLocale(e,t){const n=E.localizeByIdentifier(e.toString());v.strftime=n;try{return t()}finally{v.strftime=E}}function localInit(e,t){T(t)||(t=new h("en_US")),e.locale=t}const be=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleTextCalendar"),r={__init__:n((function __init__(e,t,n){return callA(pe,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t,n){return withLocale(e.locale,(()=>doTextFormatweekday(0,t,n)))}),{name:"formatweekday",args:["day","width"]}),formatmonthname:n((function formatmonthname(e,t,n,r,o){return withLocale(e.locale,(()=>doTextFormatmonthname(0,t,n,r,o)))}),{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleTextCalendar",[pe]),Me=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleHTMLCalendar"),r={__init__:n((function __init__(e,t,n){return callA($e,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t){return withLocale(e.locale,(()=>doHtmlFormatweekday(e,t)))}),{name:"formatweekday",args:["day"]}),formatmonthname:n((function formatmonthname(e,t,n,r){return withLocale(e.locale,(()=>doHtmlFormatmonthname(e,t,n,r)))}),{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleHTMLCalendar",[$e]),Te=A(pe,[]);Object.assign(Q,{IllegalMonthError:Z,IllegalWeekdayError:ee,day_name:me,month_name:ie,day_abbr:de,month_abbr:ce,January:new i(te),February:new i(ae),mdays:M(ne),MONDAY:new i(fe),TUESDAY:new i(he),WEDNESDAY:new i(we),THURSDAY:new i(ye),FRIDAY:new i(ue),SATURDAY:new i(_e),SUNDAY:new i(ge),Calendar:ke,TextCalendar:pe,HTMLCalendar:$e,LocaleTextCalendar:be,LocaleHTMLCalendar:Me,c:Te,firstweekday:getA(Te,"getfirstweekday"),monthcalendar:getA(Te,"monthdayscalendar"),prweek:getA(Te,"prweek"),week:getA(Te,"formatweek"),weekheader:getA(Te,"formatweekheader"),prmonth:getA(Te,"prmonth"),month:getA(Te,"formatmonth"),calendar:getA(Te,"formatyear"),prcal:getA(Te,"pryear")});const Ce=new i(20),Oe=R;function formatstring(e,t,n){t||(t=Ce),n||(n=Oe),n=mul(n,new h(" "));const r=[];for(const o of iterJs(e))r.push(pyCenter(o,t).toString());return new h(r.join(n.toString()))}const Le=getA(V,"toordinal"),xe=A(Le,[new V(1970,1,1)]);return t("calendar",Q,{isleap:{$meth:e=>s(isleap(e)),$flags:{NamedArgs:["year"]},$doc:"Return True for leap years, False for non-leap years"},leapdays:{$meth(e,t){e=F(e)-1,t=F(t)-1;const n=Math.floor;return new i(n(t/4)-n(e/4)-(n(t/100)-n(e/100))+(n(t/400)-n(e/400)))},$flags:{MinArgs:2,MaxArgs:2}},weekday:{$meth:weekday,$flags:{NamedArgs:["year","month","day"]},$doc:"Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31)."},monthrange:{$meth:(e,t)=>new y(monthrange(e,t)),$flags:{NamedArgs:["year","month"]},$doc:"Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month."},setfirstweekday:{$meth(e){const t=F(e);if(!(fe<=t&&t<=ge))throw A(ee,[e]);Te.fwd=e},$flags:{NamedArgs:["firstweekday"]}},format:{$meth:function format(e,t,n){return p([formatstring(e,t,n)]),f},$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Ce,Oe]}},formatstring:{$meth:formatstring,$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Ce,Oe]}},timegm:{$meth(e){const[t,n,r,o,s,m]=e.valueOf(),d=A(V,[t,n,H]),l=A(Le,[d]),i=add(sub(l,xe),dec(r)),c=add(mul(i,U),o),f=add(mul(c,z),s);return add(mul(f,z),m)},$flags:{OneArg:!0}}}),Q}',"src/lib/collections.js":'function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("keyword",!1,!0),(t=>(e._iskeyword=t.$d.iskeyword,Sk.importModule("itertools",!1,!0))),(t=>(e._chain=t.$d.chain,e._starmap=t.$d.starmap,e._repeat=t.$d.repeat,Sk.importModule("operator",!1,!0))),(t=>{e._itemgetter=t.$d.itemgetter}),(()=>collections_mod(e)))}function collections_mod(t){function counterNumberSlot(e){return function(i){if(void 0!==i&&!(i instanceof t.Counter))return Sk.builtin.NotImplemented.NotImplemented$;const s=new t.Counter;return e.call(this,s,i),s}}function counterInplaceSlot(t,e){return function(i){if(!(i instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("Counter "+t+"= "+Sk.abstr.typeName(i)+" is not supported");return e.call(this,i),this.keep$positive()}}t.__all__=new Sk.builtin.list(["deque","defaultdict","namedtuple","Counter","OrderedDict"].map((t=>new Sk.builtin.str(t)))),t.defaultdict=Sk.abstr.buildNativeClass("collections.defaultdict",{constructor:function defaultdict(t,e){this.default_factory=t,Sk.builtin.dict.call(this,e)},base:Sk.builtin.dict,methods:{copy:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__copy__:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__missing__:{$meth(t){if(Sk.builtin.checkNone(this.default_factory))throw new Sk.builtin.KeyError(Sk.misceval.objectRepr(t));{const e=Sk.misceval.callsimArray(this.default_factory,[]);return this.mp$ass_subscript(t,e),e}},$flags:{OneArg:!0}}},getsets:{default_factory:{$get(){return this.default_factory},$set(t){t=t||Sk.builtin.none.none$,this.default_factory=t}}},slots:{tp$doc:"defaultdict(default_factory[, ...]) --\\x3e dict with default factory\\n\\nThe default factory is called without arguments to produce\\na new value when a key is not present, in __getitem__ only.\\nA defaultdict compares equal to a dict with the same items.\\nAll remaining arguments are treated the same as if they were\\npassed to the dict constructor, including keyword arguments.\\n",tp$init(t,e){const i=t.shift();if(void 0===i)this.default_factory=Sk.builtin.none.none$;else{if(!Sk.builtin.checkCallable(i)&&!Sk.builtin.checkNone(i))throw new Sk.builtin.TypeError("first argument must be callable");this.default_factory=i}return Sk.builtin.dict.prototype.tp$init.call(this,t,e)},$r(){const t=Sk.misceval.objectRepr(this.default_factory),e=Sk.builtin.dict.prototype.$r.call(this).v;return new Sk.builtin.str("defaultdict("+t+", "+e+")")}},proto:{$copy(){const e=[];return Sk.misceval.iterFor(Sk.abstr.iter(this),(t=>{e.push(t),e.push(this.mp$subscript(t))})),new t.defaultdict(this.default_factory,e)}}}),t.Counter=Sk.abstr.buildNativeClass("Counter",{constructor:function Counter(){this.$d=new Sk.builtin.dict,Sk.builtin.dict.apply(this)},base:Sk.builtin.dict,methods:{elements:{$flags:{NoArgs:!0},$meth(){const e=t._chain.tp$getattr(new Sk.builtin.str("from_iterable")),i=t._starmap,s=t._repeat,n=Sk.misceval.callsimArray;return n(e,[n(i,[s,n(this.tp$getattr(this.str$items))])])}},most_common:{$flags:{NamedArgs:["n"],Defaults:[Sk.builtin.none.none$]},$meth(t){const e=this.sq$length();t=Sk.builtin.checkNone(t)||(t=Sk.misceval.asIndexOrThrow(t))>e?e:t<0?0:t;const i=this.$items().sort(((t,e)=>Sk.misceval.richCompareBool(t[1],e[1],"Lt")?1:Sk.misceval.richCompareBool(t[1],e[1],"Gt")?-1:0));return new Sk.builtin.list(i.slice(0,t).map((t=>new Sk.builtin.tuple(t))))}},update:{$flags:{FastCall:!0},$meth(t,e){return Sk.abstr.checkArgsLen("update",t,0,1),this.counter$update(t,e)}},subtract:{$flags:{FastCall:!0},$meth(t,e){Sk.abstr.checkArgsLen("subtract",t,0,1);const i=t[0];if(void 0!==i)if(i instanceof Sk.builtin.dict)for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Sub"))}else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Sub"))}e=e||[];for(let s=0;s>> c = Counter(\'abcdeabcdabcaba\') # count elements from a string\\n\\n >>> c.most_common(3) # three most common elements\\n [(\'a\', 5), (\'b\', 4), (\'c\', 3)]\\n >>> sorted(c) # list all unique elements\\n [\'a\', \'b\', \'c\', \'d\', \'e\']\\n >>> \'\'.join(sorted(c.elements())) # list elements with repetitions\\n \'aaaaabbbbcccdde\'\\n >>> sum(c.values()) # total of all counts\\n 15\\n\\n >>> c[\'a\'] # count of letter \'a\'\\n 5\\n >>> for elem in \'shazam\': # update counts from an iterable\\n ... c[elem] += 1 # by adding 1 to each element\'s count\\n >>> c[\'a\'] # now there are seven \'a\'\\n 7\\n >>> del c[\'b\'] # remove all \'b\'\\n >>> c[\'b\'] # now there are zero \'b\'\\n 0\\n\\n >>> d = Counter(\'simsalabim\') # make another counter\\n >>> c.update(d) # add in the second counter\\n >>> c[\'a\'] # now there are nine \'a\'\\n 9\\n\\n >>> c.clear() # empty the counter\\n >>> c\\n Counter()\\n\\n Note: If a count is set to zero or reduced to zero, it will remain\\n in the counter until the entry is deleted or the counter is cleared:\\n\\n >>> c = Counter(\'aaabbc\')\\n >>> c[\'b\'] -= 2 # reduce the count of \'b\' by two\\n >>> c.most_common() # \'b\' is still in, but its count is zero\\n [(\'a\', 3), (\'c\', 1), (\'b\', 0)]\\n\\n",tp$init(t,e){return Sk.abstr.checkArgsLen(this.tpjs_name,t,0,1),this.counter$update(t,e)},$r(){const t=this.size>0?Sk.builtin.dict.prototype.$r.call(this).v:"";return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$as_sequence_or_mapping:!0,mp$ass_subscript(t,e){return void 0===e?this.mp$lookup(t)&&Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e):Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e)},tp$as_number:!0,nb$positive:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$negative:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$subtract:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Sub");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$add:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Add");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$inplace_add:counterInplaceSlot("+",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Add");this.mp$ass_subscript(t,i)}))})),nb$inplace_subtract:counterInplaceSlot("-",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Sub");this.mp$ass_subscript(t,i)}))})),nb$or:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?n:s;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$and:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?s:n;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)}))})),nb$inplace_and:counterInplaceSlot("&",(function(t){this.$items().forEach((([e,i])=>{const s=t.mp$subscript(e);Sk.misceval.richCompareBool(s,i,"Lt")&&this.mp$ass_subscript(e,s)}))})),nb$inplace_or:counterInplaceSlot("|",(function(t){t.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.mp$subscript(t),"Gt")&&this.mp$ass_subscript(t,e)}))})),nb$reflected_and:null,nb$reflected_or:null,nb$reflected_add:null,nb$reflected_subtract:null},proto:{keep$positive(){return this.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.$zero,"LtE")&&this.mp$ass_subscript(t)})),this},$zero:new Sk.builtin.int_(0),$one:new Sk.builtin.int_(1),str$items:new Sk.builtin.str("items"),counter$update(t,e){const i=t[0];if(void 0!==i)if(Sk.builtin.checkMapping(i))if(this.sq$length())for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Add"))}else this.update$common(t,void 0,"update");else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Add"))}if(e&&e.length)if(this.sq$length())for(let s=0;s`(${Sk.misceval.objectRepr(t)}, ${Sk.misceval.objectRepr(e)})`));return t=0===t.length?"":"["+t.join(", ")+"]",this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$richcompare(e,i){if("Eq"!==i&&"Ne"!==i)return Sk.builtin.NotImplemented.NotImplemented$;if(!(e instanceof t.OrderedDict))return Sk.builtin.dict.prototype.tp$richcompare.call(this,e,i);const s="Eq"==i,n=this.size;if(n!==e.size)return!s;const r=e.$items(),a=this.$items();for(let t=0;t=r||l>=a)switch(i){case"Lt":return ra;case"GtE":return r>=a}return"Eq"!==i&&("NotEq"===i||Sk.misceval.richCompareBool(n[this.head+l&this.mask],e[s.head+l&s.mask],i))},tp$iter(){return new e(this)},$r(){const t=[],e=this.tail-this.head&this.mask;if(this.$entered_repr)return new Sk.builtin.str("[...]");this.$entered_repr=!0;for(let s=0;s=e||t<-e)throw new Sk.builtin.IndexError("deque index out of range");const i=(t>=0?this.head:this.tail)+t&this.mask;return this.v[i]},mp$ass_subscript(t,e){t=Sk.misceval.asIndexOrThrow(t);const i=this.tail-this.head&this.mask;if(t>=i||t<-i)throw new Sk.builtin.IndexError("deque index out of range");void 0===e?this.del$item(t):this.set$item(t,e)},nb$inplace_add(t){this.maxlen=void 0;for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i);return this},nb$inplace_multiply(t){(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"can\'t multiply sequence by non-int of type \'{tp$name}\'"))<=0&&this.$clear();const e=this.$copy(),i=this.tail-this.head&this.mask;for(let s=1;s integer -- return number of occurrences of value"},extend:{$meth(t){return this.$extend(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the right side of the deque with elements from the iterable"},extendleft:{$meth(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$pushLeft(i);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the left side of the deque with elements from the iterable"},index:{$meth(t,e,i){const s=this.$index(t,e,i);if(void 0!==s)return new Sk.builtin.int_(s);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque")},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"D.index(value, [start, [stop]]) -> integer -- return first index of value.\\nRaises ValueError if the value is not present."},insert:{$meth(t,e){t=Sk.misceval.asIndexOrThrow(t,"integer argument expected, got {tp$name}");const i=this.tail-this.head&this.mask;if(void 0!==this.maxlen&&i>=this.maxlen)throw new Sk.builtin.IndexError("deque already at its maximum size");t>i&&(t=i),t<=-i&&(t=0);const s=(t>=0?this.head:this.tail)+t&this.mask;let n=this.tail;for(this.tail=this.tail+1&this.mask;n!==s;){const t=n-1&this.mask;this.v[n]=this.v[t],n=t}return this.v[s]=e,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1),Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"D.insert(index, object) -- insert object before index"},pop:{$meth(){return this.$pop()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the rightmost element."},popleft:{$meth(){return this.$popLeft()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the leftmost element."},remove:{$meth(t){const e=this.$index(t);if(void 0===e)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque");let i=this.head+e&this.mask;for(;i!==this.tail;){const t=i+1&this.mask;this.v[i]=this.v[t],i=t}this.tail=this.tail-1&this.mask;var s=this.tail-this.head&this.mask;s>>1&&this.$resize(s,this.v.length>>>1)},$flags:{OneArg:!0},$textsig:null,$doc:"D.remove(value) -- remove first occurrence of value."},__reversed__:{$meth(){return new i(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.__reversed__() -- return a reverse iterator over the deque"},reverse:{$meth(){const t=this.head,e=this.tail,i=this.mask,s=this.tail-this.head&this.mask;for(let n=0;n<~~(s/2);n++){const s=e-n-1&i,r=t+n&i,a=this.v[s];this.v[s]=this.v[r],this.v[r]=a}return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.reverse() -- reverse *IN PLACE*"},rotate:{$meth(t){t=void 0===t?1:Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const e=this.head,i=this.tail;if(0===t||e===i)return this;if(this.head=e-t&this.mask,this.tail=i-t&this.mask,t>0)for(let s=1;s<=t;s++){const t=e-s&this.mask,n=i-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}else for(let s=0;s>t;s--){const t=i-s&this.mask,n=e-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}return Sk.builtin.none.none$},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rotate the deque n steps to the right (default n=1). If n is negative, rotates left."}},classmethods:Sk.generic.classGetItem,getsets:{maxlen:{$get(){return void 0===this.maxlen?Sk.builtin.none.none$:new Sk.builtin.int_(this.maxlen)},$doc:"maximum size of a deque or None if unbounded"}},proto:{$clear(){this.head=0,this.tail=0,this.mask=1,this.v=new Array(2)},$copy(){return new t.deque(this.v.slice(0),this.maxlen,this.head,this.tail,this.mask)},$extend(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i)},set$item(t,e){const i=(t>=0?this.head:this.tail)+t&this.mask;this.v[i]=e},del$item(t){let e=(t>=0?this.head:this.tail)+t&this.mask;for(;e!==this.tail;){const t=e+1&this.mask;this.v[e]=this.v[t],e=t}const i=this.tail-this.head&this.mask;this.tail=this.tail-1&this.mask,i>>1&&this.$resize(i,this.v.length>>>1)},$push(t){this.v[this.tail]=t,this.tail=this.tail+1&this.mask,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$popLeft(),this},$pushLeft(t){this.head=this.head-1&this.mask,this.v[this.head]=t,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$pop(),this},$pop(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");this.tail=this.tail-1&this.mask;const t=this.v[this.tail];this.v[this.tail]=void 0;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$popLeft(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");const t=this.v[this.head];this.v[this.head]=void 0,this.head=this.head+1&this.mask;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$resize(t,e){const i=this.head,s=this.mask;if(this.head=0,this.tail=t,this.mask=e-1,0===i)return void(this.v.length=e);const n=new Array(e);for(let r=0;r=0?i:i<-s?0:s+i;for(let o=e>=0?e:e<-s?0:s+e;o=this.$length)return;const t=(this.$index>=0?this.$head:this.$tail)+this.$index&this.$mask;return this.$index++,this.dq[t]},methods:{__length_hint__:{$meth:function __length_hint__(){return new Sk.builtin.int_(this.$length-this.$index)},$flags:{NoArgs:!0}}}}),i=Sk.abstr.buildIteratorClass("_collections._deque_reverse_iterator",{constructor:function _deque_reverse_iterator(t){this.$index=(t.tail-t.head&t.mask)-1,this.dq=t.v,this.$head=t.head,this.$mask=t.mask},iternext(){if(this.$index<0)return;const t=this.$head+this.$index&this.$mask;return this.$index--,this.dq[t]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef}}),s=new RegExp(/^[0-9].*/),n=new RegExp(/^[0-9_].*/),r=new RegExp(/^\\w*$/),a=/,/g,o=/\\s+/;function namedtuple(e,i,l,h,c){if(e=e.tp$str(),Sk.misceval.isTrue(Sk.misceval.callsimArray(t._iskeyword,[e])))throw new Sk.builtin.ValueError("Type names and field names cannot be a keyword: \'"+Sk.misceval.objectRepr(e)+"\'");const u=e.$jsstr();if(s.test(u)||!r.test(u)||!u)throw new Sk.builtin.ValueError("Type names and field names must be valid identifiers: \'"+u+"\'");let m,d;if(Sk.builtin.checkString(i))m=i.$jsstr().replace(a," ").split(o),1==m.length&&""===m[0]&&(m=[]),d=m.map((t=>new Sk.builtin.str(t)));else{m=[],d=[];for(let t=Sk.abstr.iter(i),e=t.tp$iternext();void 0!==e;e=t.tp$iternext())e=e.tp$str(),d.push(e),m.push(e.$jsstr())}let p=new Set;if(Sk.misceval.isTrue(l))for(let s=0;sm.length)throw new Sk.builtin.TypeError("Got more default values than field names");for(let t=0,e=d.length-b.length;e"\'"+t.$jsstr()+"\'"))+"]")}return r}_make.co_varnames=["_cls","iterable"],_asdict.co_varnames=["self"],_replace.co_kwargs=1,_replace.co_varnames=["_self"];const S={};for(let s=0;sm[e]+"="+Sk.misceval.objectRepr(t)));return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t.join(", ")+")")}},flags:{sk$klass:!0},proto:Object.assign({__module__:Sk.builtin.checkNone(c)?Sk.globals.__name__:c,__slots__:new Sk.builtin.tuple,_fields:$,_field_defaults:f,_make:new Sk.builtin.classmethod(new Sk.builtin.func(_make)),_asdict:new Sk.builtin.func(_asdict),_replace:new Sk.builtin.func(_replace)},S)})}return namedtuple.co_argcount=2,namedtuple.co_kwonlyargcount=3,namedtuple.$kwdefs=[Sk.builtin.bool.false$,Sk.builtin.none.none$,Sk.builtin.none.none$],namedtuple.co_varnames=["typename","field_names","rename","defaults","module"],t.namedtuple=new Sk.builtin.func(namedtuple),t}',"src/lib/datetime.js":'function $builtinmodule(){const{isTrue:t,richCompareBool:e,asIndexOrThrow:n,asIndexSized:i,objectRepr:s,opAllowsEquality:o,callsimArray:r,callsimOrSuspendArray:a}=Sk.misceval,{numberBinOp:$,typeName:c,buildNativeClass:h,checkArgsLen:m,objectHash:u,copyKeywordsToNamedArgs:l}=Sk.abstr,{int_:f,float_:d,str:w,bytes:_,tuple:p,bool:{true$:g},none:{none$:y},NotImplemented:{NotImplemented$:b},TypeError:z,ValueError:v,OverflowError:M,ZeroDivisionError:A,NotImplementedError:x,checkNumber:N,checkFloat:S,checkString:k,checkInt:O,asnum$:I,round:E,getattr:T}=Sk.builtin,{remapToPy:D,remapToJs:R}=Sk.ffi,intRound=t=>E(t).nb$int(),q=$,C=new w("auto"),U=new w("utcoffset"),Y=new w("tzname"),j=new w("as_integer_ratio"),F=new w("dst"),H=new w("isoformat"),J=new w("replace"),B=new w("fromtimestamp"),G=new w("fromordinal"),L=new w("utcfromtimestamp"),X=new w("strftime"),P=new w("fromutc"),W=new f(0),Z=new d(0),K=new f(7),V=new f(60),Q=new f(3600),tt=new f(1e3),et=new f(1e6),nt=new d(1e6),it=new f(86400),st=new d(86400);let ot=null;function pyDivMod(t,e){return q(t,e,"DivMod").v}function $divMod(t,e){if("number"!=typeof t||"number"!=typeof e)return t=JSBI.BigInt(t),e=JSBI.BigInt(e),[JSBI.toNumber(JSBI.divide(t,e)),JSBI.toNumber(JSBI.remainder(t,e))];if(0===e)throw new A("integer division or modulo by zero");return[Math.floor(t/e),t-Math.floor(t/e)*e]}function modf(t){const e=(t=I(t))<0?-1:1;return t=Math.abs(t),[new d(e*(t-Math.floor(t))),new d(e*Math.floor(t))]}function _d(t,e="0",n=2){return t.toString().padStart(n,e)}const rt=/^[0-9]+$/;function _as_integer(t){if(!rt.test(t))throw new Error;return parseInt(t)}function _as_int_ratio(t){let e=r(t.tp$getattr(j));if(!(e instanceof p))throw new z("unexpected return type from as_integer_ratio(): expected tuple, got \'"+c(e)+"\'");if(e=e.v,2!==e.length)throw new v("as_integer_ratio() must return a 2-tuple");return e}return Sk.misceval.chain(Sk.importModule("time",!1,!0),(a=>{const $=a.$d,E={__name__:new w("datetime"),__all__:new Sk.builtin.list(["date","datetime","time","timedelta","timezone","tzinfo","MINYEAR","MAXYEAR"].map((t=>new w(t))))};function _cmp(t,e){for(let n=0;ne[n]?1:-1;return 0}function _do_compare(t,e,n){const i=t.$cmp(e,n);switch(n){case"Lt":return i<0;case"LtE":return i<=0;case"Eq":return 0===i;case"NotEq":return 0!==i;case"Gt":return i>0;case"GtE":return i>=0}}const j=9999;E.MINYEAR=new f(1),E.MAXYEAR=new f(j);const rt=3652059,at=[-1,31,28,31,30,31,30,31,31,30,31,30,31],$t=[-1];let ct=0;function _is_leap(t){return t%4==0&&(t%100!=0||t%400==0)}function _days_before_year(t){const e=t-1;return 365*e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)}function _days_before_month(t,e){return $t[e]+(e>2&&_is_leap(t))}function _ymd2ord(t,e,n){return _days_before_year(t)+_days_before_month(t,e)+n}at.slice(1).forEach((t=>{$t.push(ct),ct+=t}));const ht=_days_before_year(401),mt=_days_before_year(101),ut=_days_before_year(5);function _ord2ymd(t){if((t=n(t))>Number.MAX_SAFE_INTEGER)throw new M("Python int too large to convert to js number");if(t<1)throw new v("ordinal must be >= 1");let e,i,s,o;t-=1,[e,t]=$divMod(t,ht);let r=400*e+1;if([i,t]=$divMod(t,mt),[s,t]=$divMod(t,ut),[o,t]=$divMod(t,365),r+=100*i+4*s+o,4===o||4===i)return[r-1,12,31].map((t=>new f(t)));const a=3===o&&(24!==s||3===i);let $=t+50>>5,c=$t[$]+($>2&&a);return c>t&&($-=1,c-=at[$]+(2===$&&a)),[r,$,(t-=c)+1].map((t=>new f(t)))}const lt=[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=[null,"Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _build_struct_time(t,e,n,i,s,o,r){const a=(_ymd2ord(t,e,n)+6)%7,c=_days_before_month(t,e)+n;return $.struct_time.tp$call([new p([t,e,n,i,s,o,a,c,r].map((t=>new f(t))))])}const dt={hours:t=>_d(t),minutes:(t,e)=>_d(t)+":"+_d(e),seconds:(t,e,n)=>_d(t)+":"+_d(e)+":"+_d(n),milliseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",3),microseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",6)};function _format_time(t,e,n,i,s="auto"){if("string"!=typeof s&&!k(s))throw new z("must be str, not "+c(s));"auto"===(s=s.toString())?s=i?"microseconds":"seconds":"milliseconds"===s&&(i=Math.floor(i/1e3));let o=dt[s];if(void 0===o)throw new v("Unknown timespec value");return o(t,e,n,i)}function _format_offset(t){let e,n="";if(t!==y){let i,s,o;return t.$days<0?(e="-",t=new wt(-t.$days,-t.$secs,-t.$micro)):e="+",[i,s]=pyDivMod(t,pt),[s,o]=pyDivMod(s,gt),n+=e+`${_d(i)}:${_d(s)}`,(o.$secs||o.$micro)&&(n+=":"+_d(o.$secs,"0",2),o.$micro&&(n+="."+_d(o.$micro,"0",6))),n}}function _wrap_strftime(t,e,n){let i=null,s=null,o=null,a=[],c=0;const h=e.length;for(;cnew f(t)))}function _parse_hh_mm_ss_ff(t){const e=t.length,n=[0,0,0,0];let i=0;for(let s=0;s<3;s++){if(e-i<2)throw new v("Incomplete time component");n[s]=_as_integer(t.slice(i,i+2)),i+=2;const o=t.substr(i,1);if(!o||s>=2)break;if(":"!==o)throw new v("Invalid time separator: "+o);i+=1}if(i0?t.slice(0,e-1):t),s=y;if(e>0){if(n=t.slice(e),![5,8,15].includes(n.length))throw new v("Malformed time zone string");const i=_parse_hh_mm_ss_ff(n);if(i.every((t=>0===t)))s=St.prototype.utc;else{const n="-"===t[e-1]?-1:1,o=new wt(0,n*(3600*i[0]+60*i[1]+i[2]),n*i[3]);s=new St(o)}}return i=i.map((t=>new f(t))),i.push(s),i}function _check_tzname(t){if(t!==y&&!k(t))throw new z("tzinfo.tzname() must return None or string, not \'"+c(t)+"\'")}function _check_utc_offset(t,n){if(n!==y){if(!(n instanceof wt))throw new z(`tzinfo.${t}() must return None or timedelta, not \'${c(n)}\'`);if(!e(zt,n,"Lt")||!e(n,_t,"Lt"))throw new v(`${t}()=${n.toString()}, must be strictly between -timedelta(hours=24) and timedelta(hours=24)`)}}function _check_date_fields(t,e=null,i=null){if(null===e||null===i){throw new z(`function missing required argument \'${null===i?"day":"month"}\' (pos ${null===i?"3":"2"})`)}if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v("year must be in 1.."+j,new f(t));if(!(1<=e&&e<=12))throw new v("month must be in 1..12",new f(e));const s=function _days_in_month(t,e){return 2===e&&_is_leap(t)?29:at[e]}(t,e);if(!(1<=i&&i<=s))throw new v("day must be in 1.."+s,new f(i));return[t,e,i]}function _check_time_fields(t,e,i,s,o){if(t=n(t),e=n(e),i=n(i),s=n(s),o=n(o),!(0<=t&&t<=23))throw new v("hour must be in 0..23",new f(t));if(!(0<=e&&e<=59))throw new v("minute must be in 0..59",new f(e));if(!(0<=i&&i<=59))throw new v("second must be in 0..59",new f(i));if(!(0<=s&&s<=999999))throw new v("microsecond must be in 0..999999",new f(s));if(0!==o&&1!==o)throw new v("fold must be either 0 or 1",new f(o));return[t,e,i,s,o]}function _check_tzinfo_arg(t){if(t!==y&&!(t instanceof Mt))throw new z("tzinfo argument must be None or of a tzinfo subclass")}function _divide_and_round(t,e){let[n,i]=$divMod(t,e);return i*=2,((e>0?i>e:i999999999)throw new M(`days=${t}; must have magnitude <= 999999999`)},slots:{tp$new(t,e){let i,s,o,r,a,$,c,[h,m,u,d,w,_,p]=l("timedelta",["days","seconds","microseconds","milliseconds","minutes","hours","weeks"],t,e,new Array(7).fill(W));i=s=o=W,h=q(h,q(p,K,"Mult"),"Add"),m=q(m,q(q(w,V,"Mult"),q(_,Q,"Mult"),"Add"),"Add"),u=q(u,q(d,tt,"Mult"),"Add"),S(h)?([r,h]=modf(h),[a,$]=modf(q(r,st,"Mult")),s=new f($),i=new f(h)):(a=Z,i=h),S(m)?([c,m]=modf(m),m=new f(m),c=q(c,a,"Add")):c=a,[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,new f(m),"Add");const g=q(c,nt,"Mult");if(S(u)?(u=intRound(q(u,g,"Add")),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add")):(u=new f(u),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add"),u=intRound(q(u,g,"Add"))),[m,o]=pyDivMod(u,et),s=q(s,m,"Add"),[h,s]=pyDivMod(s,it),i=q(i,h,"Add"),i=n(i),s=n(s),o=n(o),Math.abs(i)>999999999)throw new M("timedelta # of days is too large: "+h.toString());if(this===wt.prototype)return new wt(i,s,o);{const t=new this.constructor;return wt.call(t,i,s,o),t}},$r(){const t=[];return this.$days&&t.push(`days=${this.$days}`),this.$secs&&t.push(`seconds=${this.$secs}`),this.$micro&&t.push(`microseconds=${this.$micro}`),t.length||t.push("0"),new w(`${this.tp$name}(${t.join(", ")})`)},tp$str(){const t=this.$secs%60;let e=Math.floor(this.$secs/60);const n=Math.floor(e/60);e%=60;let i=`${n}:${_d(e)}:${_d(t)}`;if(this.$days){i=`${this.$days} day${function plural(t){return 1!==Math.abs(t)?"s":""}(this.$days)}, `+i}return this.$micro&&(i+=`.${_d(this.$micro,"0",6)}`),new w(i)},tp$as_number:!0,nb$add(t){return t instanceof wt?new wt(this.$days+t.$days,this.$secs+t.$secs,this.$micro+t.$micro):b},nb$subtract(t){return t instanceof wt?new wt(this.$days-t.$days,this.$secs-t.$secs,this.$micro-t.$micro):b},nb$positive(){return this},nb$negative(){return new wt(-this.$days,-this.$secs,-this.$micro)},nb$abs(){return this.$days<0?this.nb$negative():this},nb$multiply(t){if(O(t))return t=i(t,M),new wt(this.$days*t,this.$secs*t,this.$micro*t);if(S(t)){const e=this.$toMicrosecs();let[s,o]=_as_int_ratio(t);return s=i(s,M),o=n(o),new wt(0,0,_divide_and_round(e*s,o))}return b},nb$floor_divide(t){const e=this.$toMicrosecs();if(t instanceof wt){const n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");return new f(Math.floor(e/n))}if(O(t)){if(0===(t=i(t,M)))throw new A("integer division or modulo by zero");return new wt(0,0,Math.floor(e/t))}return b},nb$divide(t){const e=this.$toMicrosecs();if(t instanceof wt){if(0===t.$toMicrosecs())throw new A("integer division or modulo by zero");return new d(e/t.$toMicrosecs())}if(O(t))return t=n(t),new wt(0,0,_divide_and_round(e,t));if(S(t)){let[s,o]=_as_int_ratio(t);return s=n(s),o=i(o,M),new wt(0,0,_divide_and_round(o*e,s))}return b},nb$remainder(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");const i=e-Math.floor(e/n)*n;return new wt(0,0,i)},nb$divmod(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs(),[i,s]=$divMod(e,n);return new p([new f(i),new wt(0,0,s)])},tp$richcompare(t,e){return t instanceof wt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(new p(this.$getState().map((t=>new f(t)))))),this.$hashcode},nb$bool(){return 0!==this.$days||0!==this.$secs||0!==this.$micro}},methods:{total_seconds:{$meth(){return new d(((86400*this.$days+this.$secs)*10**6+this.$micro)/10**6)},$flags:{NoArgs:!0},$doc:"Total seconds in the duration."},__reduce__:{$meth(){return new p([this.ob$type,new p(this.$getState().map((t=>D(t))))])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{days:{$get(){return new f(this.$days)},$doc:"Number of days."},seconds:{$get(){return new f(this.$secs)},$doc:"Number of seconds (>= 0 and less than 1 day)."},microseconds:{$get(){return new f(this.$micro)},$doc:"Number of microseconds (>= 0 and less than 1 second)."}},proto:{$toMicrosecs(){return 1e6*(86400*this.$days+this.$secs)+this.$micro},$cmp(t){return _cmp(this.$getState(),t.$getState())},$getState(){return[this.$days,this.$secs,this.$micro]}}});wt.prototype.min=new wt(-999999999),wt.prototype.max=new wt(999999999,86399,999999),wt.prototype.resolution=new wt(0,0,1);const _t=new wt(1),pt=new wt(0,3600),gt=new wt(0,60),yt=new wt(0,1),bt=new wt(0),zt=new wt(-1),vt=E.date=h("datetime.date",{constructor:function date(t,e,n){this.$year=t,this.$month=e,this.$day=n,this.$hashcode=-1},slots:{tp$new(t,e){let n,[i,s,o]=l("date",["year","month","day"],t,e,[null,null]);if(null===s&&i instanceof _&&4===(n=i.valueOf()).length&&1<=n[2]&&n[2]<=12){const t=new this.constructor;return t.$setState(n),t}if([i,s,o]=_check_date_fields(i,s,o),this===vt.prototype)return new vt(i,s,o);{const t=new this.constructor;return vt.call(t,i,s,o),t}},$r(){return new w(`${this.tp$name}(${this.$year}, ${this.$month}, ${this.$day})`)},tp$str(){return this.tp$getattr(H).tp$call([])},tp$richcompare(t,e){return t instanceof vt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(this.$getState())),this.$hashcode},tp$as_number:!0,nb$add(t){if(t instanceof wt){const e=this.$toOrdinal()+t.$days;if(0 local date from a POSIX timestamp (like time.time())."},fromordinal:{$meth:function fromordinal(t){return this.tp$call(_ord2ymd(t))},$flags:{OneArg:!0},$textsig:null,$doc:"int -> date corresponding to a proleptic Gregorian ordinal."},fromisocalendar:{$meth:function fromisocalendar(t,e,i){if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v(`Year is out of range: ${t}`);let s,o;if(!(0 date corresponding to a proleptic Gregorian ordinal."},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{if(10!==t.length)throw new Error;return this.tp$call(_parse_isoformat_date(t))}catch(e){throw new v("Invalid isoformat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"str -> Construct a date from the output of date.isoformat()"},today:{$meth:function today(){const t=$.time.tp$call([]);return this.tp$getattr(B).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Current date or datetime: same as self.__class__.fromtimestamp(time.time())."}},methods:{ctime:{$meth:function ctime(){const t=this.$toOrdinal()%7||7,e=ft[t],n=lt[this.$month];return new w(`${e} ${n} ${_d(this.$day," ",2)} 00:00:00 ${_d(this.$year,"0",4)}`)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return ctime() style string."},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),this.$timetuple())},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},timetuple:{$meth:function timetuple(){return this.$timetuple()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return time tuple, compatible with time.localtime()."},isocalendar:{$meth:function isocalendar(){let t=this.$year,e=_isoweek1monday(t);const n=_ymd2ord(this.$year,this.$month,this.$day);let[i,s]=$divMod(n-e,7);return i<0?(t-=1,e=_isoweek1monday(t),[i,s]=$divMod(n-e,7)):i>=52&&n>=_isoweek1monday(t+1)&&(t+=1,i=0),new At(new f(t),new f(i+1),new f(s+1))},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a 3-tuple containing ISO year, week number, and weekday."},isoformat:{$meth:function isoformat(){return this.$isoformat()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return string in ISO 8601 format, YYYY-MM-DD."},isoweekday:{$meth:function isoweekday(){return new f(this.$toOrdinal()%7||7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 1 ... Sunday == 7"},toordinal:{$meth:function toordinal(){return new f(this.$toOrdinal())},$flags:{NoArgs:!0},$textsig:null,$doc:"Return proleptic Gregorian ordinal. January 1 of year 1 is day 1."},weekday:{$meth:function weekday(){return new f((this.$toOrdinal()+6)%7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 0 ... Sunday == 6"},replace:{$meth:function replace(t,e,n){return t===y&&(t=new f(this.$year)),e===y&&(e=new f(this.$month)),n===y&&(n=new f(this.$day)),this.ob$type.tp$call([t,e,n])},$flags:{NamedArgs:["year","month","day"],Defaults:[y,y,y]},$textsig:null,$doc:"Return date with new specified fields."},__reduce__:{$meth(){return new p([this.ob$type,new p([this.$getState()])])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{year:{$get(){return new f(this.$year)},$doc:"year (1-9999)"},month:{$get(){return new f(this.$month)},$doc:"month (1-12)"},day:{$get(){return new f(this.$day)},$doc:"day (1-31)"}},proto:{$cmp(t){return _cmp([this.$year,this.$month,this.$day],[t.$year,t.$month,t.$day])},$getState(){const[t,e]=$divMod(this.$year,256);return new _([t,e,this.$month,this.$day])},$setState(t){const[e,n,i,s]=t,o=256*e+n;this.$year=o,this.$month=i,this.$day=s},$toOrdinal(){return _ymd2ord(this.$year,this.$month,this.$day)},$isoformat(){return new w(`${_d(this.$year,"0",4)}-${_d(this.$month,"0",2)}-${_d(this.$day,"0",2)}`)},$timetuple(){return _build_struct_time(this.$year,this.$month,this.$day,this.$hour||0,this.$min||0,this.$sec||0,-1)},$strftime(t=""){return _wrap_strftime(this,t.toString(),this.$timetuple())}}});vt.prototype.min=new vt(1,1,1),vt.prototype.max=new vt(9999,12,31),vt.prototype.resolution=new wt(1);const Mt=E.tzinfo=h("datetime.tzinfo",{constructor:function tzinfo(){},methods:{tzname:{$meth:function tzname(t){throw new x("tzinfo subclass must override tzname()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> string name of time zone."},utcoffset:{$meth:function utcoffset(t){throw new x("tzinfo subclass must override utcoffset()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> timedelta showing offset from UTC, negative values indicating West of UTC"},dst:{$meth:function dst(t){throw new x("tzinfo subclass must override dst()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> DST offset as timedelta positive east of UTC."},fromutc:{$meth:function fromutc(e){if(!(e instanceof Nt))throw new z("fromutc() requires a datetime argument");if(e.$tzinfo!==this)throw new v("dt.tzinfo is not self");const n=r(e.tp$getattr(U));if(n===y)throw new v("fromutc() requires a non-None utcoffset() result");let i=r(e.tp$getattr(F));if(i===y)throw new v("fromutc() requires a non-None dst() result");const s=q(n,i,"Sub");if(t(s)&&(e=q(e,s,"Add"),i=r(e.tp$getattr(F)),i===y))throw new v("fromutc(): dt.dst gave inconsistent results; cannot convert");return q(e,i,"Add")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__reduce__:{$meth(){let e,n;const i=T(this,new w("__getinitargs__"),y);e=i!==y?r(i,[]):new p;const s=T(this,new w("__getstate__"),y);return s!==y?n=r(s,[]):(n=T(this,new w("__dict__"),y),n=t(n)?n:y),new p(n===y?[this.ob$type,e]:[this.ob$type,e,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"-> (cls, state)"}}}),At=h("datetime.IsoCalendarDate",{base:p,constructor:function IsoCalendarDate(t,e,n){this.y=t,this.w=e,this.wd=n,p.call(this,[t,e,n])},slots:{tp$new(t,e){const[n,i,s]=l("IsoCalendarDate",["year","week","weekday"],t,e);return new this.constructor(n,i,s)},$r(){return new w(`${this.tp$name}(year=${this.y}, week=${this.w}, weekday=${this.wd})`)}},getsets:{year:{$get(){return this.y}},week:{$get(){return this.w}},weekday:{$get(){return this.wd}}}}),xt=E.time=h("datetime.time",{constructor:function time(t=0,e=0,n=0,i=0,s=null,o=0){this.$hour=t,this.$min=e,this.$sec=n,this.$micro=i,this.$tzinfo=s||y,this.$fold=o,this.$hashcode=-1},slots:{tp$new(t,e){m("time",t,0,5);let n,[i,s,o,r,a,$]=l("time",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[W,W,W,W,y,W]);if(i instanceof _&&6===(n=i.valueOf()).length&&(127&n[0])<24){const t=new this.constructor;return t.$setState(n,s===W?y:s),t}if([i,s,o,r,$]=_check_time_fields(i,s,o,r,$),_check_tzinfo_arg(a),this===xt.prototype)return new xt(i,s,o,r,a,$);{const t=new this.constructor;return xt.call(t,i,s,o,r,a,$),t}},tp$richcompare(t,e){return t instanceof xt?_do_compare(this,t,e):b},tp$hash(){if(-1===this.$hashcode){const e=this.$fold?r(this.tp$getattr(J),[],["fold",W]):this,n=r(e.tp$getattr(U));if(t(n)){let[t,e]=pyDivMod(new wt(0,3600*this.$hour+60*this.$min).nb$subtract(n),pt);e=e.nb$floor_divide(gt),0<=t&&t<=24?(t=I(t),e=I(e),this.$hashcode=u(new xt(t,e,this.$sec,this.$micro))):this.$hashcode=u(new p([t,e,new f(this.$sec),new f(this.$micro)]))}else this.$hashcode=u(e.$getState()[0])}return this.$hashcode},$r(){let t;return t=0!==this.$micro?`, ${this.$sec}, ${this.$micro}`:0!==this.$sec?`, ${this.$sec}`:"",t=`${this.tp$name}(${this.$hour}, ${this.$min}${t})`,this.$tzinfo!==y&&(t=t.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(t=t.slice(0,-1)+", fold=1)"),new w(t)},tp$str(){return this.tp$getattr(H).tp$call([])}},methods:{isoformat:{$meth:function isoformat(t){let e=_format_time(this.$hour,this.$min,this.$sec,this.$micro,t);const n=this.$tzstr();return n&&(e+=n),new w(e)},$flags:{NamedArgs:["timespec"],Defaults:[C]},$textsig:null,$doc:"Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\n\\ntimespec specifies what components of the time to include.\\n"},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),new p([1900,1,1,this.$hour,this.$min,this.$sec,0,1,-1].map((t=>new f(t)))))},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[y]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[y]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[y]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,5);let[n,i,s,o,r,a]=l("replace",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,g,y]);return n===y&&(n=new f(this.$hour)),i===y&&(i=new f(this.$min)),s===y&&(s=new f(this.$sec)),o===y&&(o=new f(this.$micro)),r===g&&(r=this.$tzinfo),a===y&&(a=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r],["fold",a])},$flags:{FastCall:!0},$textsig:null,$doc:"Return time with new specified fields."},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{return this.tp$call(_parse_isoformat_time(t))}catch{throw new v("Invalid isofrmat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"string -> time from time.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(t,n){const s=this.$tzinfo,o=t.$tzinfo;let a,$,c;if(a=$=y,s===o?c=!0:(a=r(this.tp$getattr(U)),$=r(t.tp$getattr(U)),c=e(a,$,"Eq")),c)return _cmp([this.$hour,this.$min,this.$sec,this.$micro],[t.$hour,t.$min,t.$sec,t.$micro]);if(a===y||$===y){if("Eq"===n||"NotEq"===n)return 2;throw new z("cannot compare naive and aware times")}const h=60*this.$hour+this.$min-i(a.nb$floor_divide(gt)),m=60*t.$hour+t.$min-i($.nb$floor_divide(gt));return _cmp([h,this.$sec,this.$micro],[m,t.$sec,t.$micro])},$tzstr(){return _format_offset(r(this.tp$getattr(U)))},$getState(t=3){let[e,n]=$divMod(this.$micro,256),[i,s]=$divMod(e,256),o=this.$hour;this.$fold&&t>3&&(o+=128);const r=new _([o,this.$min,this.$sec,i,s,n]);return this.$tzinfo===y?[r]:[r,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a]=t;n>127?(this.$fold=1,this.$hour=n-128):(this.$fold=0,this.$hour=n),this.$min=i,this.$sec=s,this.$micro=(o<<8|r)<<8|a,this.$tzinfo=e}}});xt.prototype.min=new xt(0,0,0),xt.prototype.max=new xt(23,59,59,999999),xt.prototype.resolution=new wt;const Nt=E.datetime=h("datetime.datetime",{base:vt,constructor:function datetime(t,e,n,i=0,s=0,o=0,r=0,a=null,$=0){this.$year=t,this.$month=e,this.$day=n,this.$hour=i,this.$min=s,this.$sec=o,this.$micro=r,this.$tzinfo=a||y,this.$fold=$,this.$hashcode=-1},slots:{tp$new(t,e){m("datetime",t,0,9);let n,[i,s,o,r,a,$,c,h,u]=l("time",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[null,null,W,W,W,W,y,W]);if(i instanceof _&&10===(n=i.valueOf()).length&&(127&n[2])<=12){const t=new this.constructor;return t.$setState(n,null===s?y:s),t}if([i,s,o]=_check_date_fields(i,s,o),[r,a,$,c,u]=_check_time_fields(r,a,$,c,u),_check_tzinfo_arg(h),this===Nt.prototype)return new Nt(i,s,o,r,a,$,c,h,u);{const t=new this.constructor;return Nt.call(t,i,s,o,r,a,$,c,h,u),t}},$r(){const t=[this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro];0===t[t.length-1]&&t.pop(),0===t[t.length-1]&&t.pop();let e=`${this.tp$name}(${t.join(", ")})`;return this.$tzinfo!==y&&(e=e.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(e=e.slice(0,-1)+", fold=1)"),new w(e)},tp$str(){return this.tp$getattr(H).tp$call([],["sep",new w(" ")])},tp$richcompare(t,e){if(t instanceof Nt)return _do_compare(this,t,e);if(!(t instanceof vt))return b;if("Eq"===e||"NotEq"===e)return"NotEq"===e;throw new z(`can\'t compare \'${c(this)}\' to \'${c(t)}\'`)},tp$as_number:!0,nb$add(t){if(!(t instanceof wt))return b;let e=new wt(this.$toOrdinal(),3600*this.$hour+60*this.$min+this.$sec,this.$micro);e=q(e,t,"Add");let[n,i]=$divMod(e.$secs,3600),[s,o]=$divMod(i,60);if(0 string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\nsep is used to separate the year from the time, and defaults to \'T\'.\\ntimespec specifies what components of the time to include (allowed values are \'auto\', \'hours\', \'minutes\', \'seconds\', \'milliseconds\', and \'microseconds\').\\n"},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[this]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[this]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[this]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,8);let[n,i,s,o,r,a,$,c,h]=l("replace",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,y,y,y,g,y]);return n===y&&(n=new f(this.$year)),i===y&&(i=new f(this.$month)),s===y&&(s=new f(this.$day)),o===y&&(o=new f(this.$hour)),r===y&&(r=new f(this.$min)),a===y&&(a=new f(this.$sec)),$===y&&($=new f(this.$micro)),c===g&&(c=this.$tzinfo),h===y&&(h=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r,a,$,c],["fold",h])},$flags:{FastCall:!0},$textsig:null,$doc:"Return datetime with new specified fields."},astimezone:{$meth:function astimezone(t){if(t===y)t=this.$localTimezone();else if(!(t instanceof Mt))throw new z("tz argument must be an instance of tzinfo");let e,n=this.$tzinfo;if(n===y?(n=this.$localTimezone(),e=r(n.tp$getattr(U),[this])):(e=r(n.tp$getattr(U),[this]),e===y&&(n=r(this.tp$getattr(J),[],["tzinfo",y]).$localTimezone(),e=r(n.tp$getattr(U),[this]))),t===n)return this;const i=r(this.nb$subtract(e).tp$getattr(J),[],["tzinfo",t]);return t.tp$getattr(P).tp$call([i])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:null,$doc:"tz -> convert to local time in new timezone tz\\n"},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{now:{$meth:function now(t){const e=$.time.tp$call([]);return this.tp$getattr(B).tp$call([e,t])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:"($type, /, tz=None)",$doc:"Returns new datetime object representing current time local to tz.\\n\\n tz\\n Timezone object.\\n\\nIf no tz is specified, uses local timezone."},utcnow:{$meth:function utcnow(){const t=$.time.tp$call([]);return this.tp$getattr(L).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a new datetime representing UTC day and time."},fromtimestamp:{$meth:function fromtimestamp(t,e){return _check_tzinfo_arg(e),this.prototype.$fromtimestamp.call(this,t,e!==y,e)},$flags:{NamedArgs:["timestamp","tz"],Defaults:[y]},$textsig:null,$doc:"timestamp[, tz] -> tz\'s local time from POSIX timestamp."},utcfromtimestamp:{$meth:function utcfromtimestamp(t){return this.prototype.$fromtimestamp.call(this,t,!0,y)},$flags:{OneArg:!0},$textsig:null,$doc:"Construct a naive UTC datetime from a POSIX timestamp."},strptime:{$meth:function strptime(t,e){return null===ot?Sk.misceval.chain(Sk.importModule("_strptime",!1,!0),(n=>(ot=n.tp$getattr(new w("_strptime_datetime")),ot.tp$call([this,t,e])))):ot.tp$call([this,t,e])},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"string, format -> new datetime parsed from a string (like time.strptime())."},combine:{$meth:function combine(t,e,n){if(!(t instanceof vt))throw new z("date argument must be a date instance");if(!(e instanceof xt))throw new z("time argument must be a time instance");n===g&&(n=e.$tzinfo);const i=[t.$year,t.$month,t.$day,e.$hour,e.$min,e.$sec,e.$micro].map((t=>new f(t)));return i.push(n),this.tp$call(i,["fold",new f(e.$fold)])},$flags:{NamedArgs:["date","time","tzinfo"],Defaults:[g]},$textsig:null,$doc:"date, time -> datetime with same date and time fields"},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");const e=(t=t.toString()).slice(0,10),n=t.slice(11);let i,s;try{i=_parse_isoformat_date(e)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}if(n)try{s=_parse_isoformat_time(n)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}else s=[W,W,W,W,y];return this.tp$call(i.concat(s))},$flags:{OneArg:!0},$textsig:null,$doc:"string -> datetime from datetime.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(n,i){const s=this.$tzinfo,o=n.$tzinfo;let a,$,c;if(a=$=y,s===o)c=!0;else{if(a=r(this.tp$getattr(U)),$=r(n.tp$getattr(U)),"Eq"===i||"NotEq"===i){const t=r(this.tp$getattr(J),[],["fold",new f(Number(!this.$fold))]);if(e(a,r(t.tp$getattr(U)),"NotEq"))return 2;const i=r(n.tp$getattr(J),[],["fold",new f(Number(!n.$fold))]);if(e($,r(i.tp$getattr(U)),"NotEq"))return 2}c=e(a,$,"Eq")}if(c)return _cmp([this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro],[n.$year,n.$month,n.$day,n.$hour,n.$min,n.$sec,n.$micro]);if(a===y||$===y){if("Eq"===i||"NotEq"===i)return 2;throw new z("cannot compare naive and aware datetimes")}const h=this.nb$subtract(n);return h.$days<0?-1:t(h)?1:0},$mkTime(){const t=new Nt(1970,1,1),e=this.nb$subtract(t).nb$floor_divide(yt);function local(e){const[n,i,s,o,r,a]=$.localtime.tp$call([e]).v;return Nt.tp$call([n,i,s,o,r,a]).nb$subtract(t).nb$floor_divide(yt)}let n,i,s=local(e).nb$subtract(e),o=e.nb$subtract(s),r=local(o);if(r.ob$eq(e)){if(n=o.nb$add([new f(-86400),new f(86400)][this.$fold]),i=local(n).nb$subtract(n),s.ob$eq(i))return o}else i=r.nb$subtract(o);n=e.nb$subtract(i);if(local(n).ob$eq(e))return n;if(r.ob$eq(e))return o;const a=o.ob$ge(n)?o:n;return[a,o===a?n:o][this.$fold]},$fromtimestamp(t,n,s){let o;if(!N(t))throw new z("a number is required, (got \'"+c(t)+"\'");[o,t]=modf(t);let a=intRound(q(o,nt,"Mult"));a=a.v,t=t.v,a>=1e6?(t+=1,a-=1e6):a<0&&(t-=1,a+=1e6),t=new f(t),Number.isInteger(a)||(a=Math.trunc(a)),a=new f(a);const h=n?$.gmtime:$.localtime;function converter(t){return h.tp$call([t]).v}let[m,u,l,d,_,p]=converter(t);p=new f(Math.min(i(p),59));let g=r(this,[m,u,l,d,_,p,a,s]);if(s===y){const n=86400;[m,u,l,d,_,p]=converter(q(t,new f(n),"Sub"));const i=r(this,[m,u,l,d,_,p,a,s]),o=q(q(g,i,"Sub"),new wt(0,n),"Sub");if(o.$days<0){[m,u,l,d,_,p]=converter(q(t,q(o,yt,"FloorDiv"),"Add"));const n=r(this,[m,u,l,d,_,p,a,s]);e(n,g,"Eq")&&(g.$fold=1)}}else g=r(s.tp$getattr(new w("fromutc")),[g]);return g},$localTimezone(){let t;t=this.$tzinfo===y?this.$mkTime():this.nb$subtract(kt).nb$floor_divide(yt);const e=$.localtime.tp$call([t]),n=(Nt.tp$call(e.v.slice(0,6)),e.tp$getattr(new w("tm_gmtoff"))),i=e.tp$getattr(new w("tm_zone"));return new St(wt.tp$call([W,n]),i)},$getState(t=3){let[e,n]=$divMod(this.$year,256),[i,s]=$divMod(this.$micro,256),[o,r]=$divMod(i,256),a=this.$month;this.$fold&&t>3&&(a+=128);const $=new _([e,n,a,this.$day,this.$hour,this.$min,this.$sec,o,r,s]);return this.$tzinfo===y?[$]:[$,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a,$,c,h,m]=t;s>127?(this.$fold=1,this.$month=s-128):(this.$fold=0,this.$month=s),this.$year=256*n+i,this.$day=o,this.$hour=r,this.$min=a,this.$sec=$,this.$micro=(c<<8|h)<<8|m,this.$tzinfo=e}}});function _isoweek1monday(t){const e=_ymd2ord(t,1,1),n=(e+6)%7;let i=e-n;return n>3&&(i+=7),i}Nt.prototype.min=new Nt(1,1,1),Nt.prototype.max=new Nt(9999,12,31,23,59,59,999999),Nt.prototype.resolution=new wt(0,0,1);const St=E.timezone=h("datetime.timezone",{base:Mt,constructor:function timezone(t,n){if(this.$offset=t,this.$name=n||y,!e(this.$minoffset,t,"LtE")||!e(this.$maxoffset,t,"GtE"))throw new v("offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24).")},slots:{tp$new(e,n){let[i,s]=l("timezone",["offset","name"],e,n,[null]);if(!(i instanceof wt))throw new z("offset must be a timedelta");if(null===s){if(!t(i))return this.utc;s=y}else if(!k(s))throw new z("name must be a string");if(this===St.prototype)return new St(i,s);{const t=new this.constructor;return St.call(t,i,s),t}},tp$richcompare(t,n){if(!(t instanceof St))return b;const i=e(this.$offset,t.$offset,"Eq");return"NotEq"===n?!i:"Eq"===n||i&&o(n)?i:b},$r(){return this===this.utc?new w("datetime.timezone.utc"):this.$name===y?new w(`${this.tp$name}(${s(this.$offset)})`):new w(`${this.tp$name}(${s(this.$offset)}, ${s(this.$name)})`)},tp$str(){return this.tp$getattr(Y).tp$call([y])},tp$hash(){return u(this.$offset)}},methods:{tzname:{$meth:function tzname(t){if(t instanceof Nt||t===y)return this.$name===y?this.$nameFromOff(this.$offset):this.$name;throw new z("tzname() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"If name is specified when timezone is created, returns the name. Otherwise returns offset as \'UTC(+|-)HH:MM\'."},utcoffset:{$meth:function utcoffset(t){if(t instanceof Nt||t===y)return this.$offset;throw new z("utcoffset() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return fixed offset."},dst:{$meth:function dst(t){if(t instanceof Nt||t===y)return y;throw new z("dst() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return None."},fromutc:{$meth:function fromutc(t){if(t instanceof Nt){if(t.$tzinfo!==this)throw new v("fromutc: dt.tzinfo is not self");return q(t,this.$offset,"Add")}throw new z("fromutc() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__getinitargs__:{$meth(){return this.$name===y?new p([this.$offset]):new p([this.$offset,this.$name])},$flags:{NoArgs:!0}}},proto:{$maxoffset:new wt(0,86399,999999),$minoffset:new wt(-1,0,1),$nameFromOff(n){if(!t(n))return new w("UTC");let i,s,o,r,a,$;return e(n,bt,"Lt")?(i="-",n=n.nb$negative()):i="+",[s,o]=pyDivMod(n,pt),[r,o]=pyDivMod(o,gt),a=o.$secs,$=o.$micro,new w($?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}.${_d($,"0",6)}`:a?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}`:`UTC${i}${_d(s)}:${_d(r)}`)}}});St.prototype.utc=new St(new wt(0)),St.prototype.min=new St(new wt(0,-86340,0)),St.prototype.max=new St(new wt(0,86340,0));const kt=new Nt(1970,1,1,0,0,0,0,St.prototype.utc);return E}))}',"src/lib/document.js":'function $builtinmodule(){const{builtin:{str:t},misceval:{callsimArray:e},ffi:{toPy:r},abstr:{gattr:a}}=Sk,n={__name__:new t("document")},_=r(Sk.global.document);return Sk.abstr.setUpModuleMethods("document",n,{__getattr__:{$meth:t=>a(_,t,!0),$flags:{OneArg:!0}},__dir__:{$meth:()=>e(_.tp$getattr(t.$dir)),$flags:{NoArgs:!0}}}),n}',"src/lib/fractions.js":'function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("math",!1,!0),(t=>(e.math=t,Sk.importModule("sys",!1,!0))),(t=>(e.sys=t,fractionsMod(e))))}function fractionsMod({math:t,sys:e}){const{builtin:{int_:n,bool:{true$:i,false$:r},none:{none$:s},NotImplemented:{NotImplemented$:o},tuple:a,float_:$,complex:u,str:h,isinstance:l,TypeError:m,ZeroDivisionError:d,ValueError:f,NotImplementedError:c,abs:_,round:b,pow:p},ffi:{remapToPy:g},abstr:{buildNativeClass:w,copyKeywordsToNamedArgs:v,numberBinOp:y,typeName:k,lookupSpecial:E,checkArgsLen:N},misceval:{isTrue:F,richCompareBool:A,callsimArray:S,objectRepr:M}}=Sk,O={__name__:new h("fractions"),__all__:g(["Fraction"])},D=/^\\s*(?[-+]?)(?=\\d|\\.\\d)(?\\d*)(?:(?:\\/(?\\d+))?|(?:\\.(?\\d*))?(?:E(?[-+]?\\d+))?)\\s*$/i,q=new n(0),x=new n(1),z=new n(2),I=new n(10),T=new h("numerator"),R=new h("denominator"),B=new h("as_integer_ratio"),C=new h("from_float"),getNumer=t=>t.tp$getattr(T),getDenom=t=>t.tp$getattr(R),mul=(t,e)=>y(t,e,"Mult"),div=(t,e)=>y(t,e,"Div"),pow=(t,e)=>y(t,e,"Pow"),add=(t,e)=>y(t,e,"Add"),sub=(t,e)=>y(t,e,"Sub"),floorDiv=(t,e)=>y(t,e,"FloorDiv"),divmod=(t,e)=>y(t,e,"DivMod"),mod=(t,e)=>y(t,e,"Mod"),K=t.tp$getattr(new h("gcd")),eq=(t,e)=>A(t,e,"Eq"),lt=(t,e)=>A(t,e,"Lt"),ge=(t,e)=>A(t,e,"GtE"),L={NoArgs:!0},P={OneArg:!0},j=e.tp$getattr(new h("hash_info")),G=j.tp$getattr(new h("modulus")),V=j.tp$getattr(new h("inf"));function _operator_fallbacks(t,e){return[function(n){return isRational(n)?t(this,n):n instanceof $?e(this.nb$float(),n):n instanceof u?e(S(u,[this]),n):o},function(n){return isRational(n)?t(n,this):n instanceof $?e(n,this.nb$float()):n instanceof u?e(n,S(u,[this])):o}]}const[Z,H]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[add(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),add),[J,Q]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[sub(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),sub),[U,W]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getNumer(e)),mul(getDenom(t),getDenom(e))])),mul),[X,Y]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e))])),div),[tt,et]=_operator_fallbacks(((t,e)=>floorDiv(mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e)))),floorDiv),[nt,it]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),[r,s]=divmod(mul(getNumer(t),i),mul(n,getNumer(e))).valueOf();return new a([r,S(ot,[s,mul(n,i)])])}),divmod),[rt,st]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),r=mod(mul(getNumer(t),i),mul(getNumer(e),n));return S(ot,[r,mul(n,i)])}),mod),ot=O.Fraction=w("fractions.Fraction",{constructor:function(t,e){this.$num=t||q,this.$den=e||x},slots:{tp$new(t,e){N("Fraction",t,0,2);let[r,o,a]=v("Fraction",["numerator","denominator","_normalize"],t,e,[q,s,i]);const u=new this.constructor;if(o===s){if(r.ob$type===n)return u.$num=r,u.$den=x,u;if(isRational(r))return u.$num=getNumer(r),u.$den=getDenom(r),u;if(r instanceof $)return[u.$num,u.$den]=S(r.tp$getattr(B)).valueOf(),u;if(!(r instanceof h))throw new m("argument should be a string or a Rational instance");{const t=r.toString().match(D);if(null===t)throw new f("Invalid literal for Fraction: "+M(r));r=new n(t.groups.num||"0");const e=t.groups.denom;if(e)o=new n(e);else{o=x;const e=t.groups.decimal;if(e){const t=new n(""+10**e.length);r=add(mul(r,t),new n(e)),o=mul(o,t)}let i=t.groups.exp;i&&(i=new n(i),lt(i,q)?o=mul(o,pow(I,i.nb$negative())):r=mul(r,pow(I,i)))}"-"==t.groups.sign&&(r=r.nb$negative())}}else if(r.ob$type===n&&o.ob$type===n);else{if(!isRational(r)||!isRational(o))throw new m("both arguments should be Rational instances");[r,o]=[mul(getNumer(r),getDenom(o)),mul(getNumer(o),getDenom(r))]}if(eq(o,q))throw new d(`Fraction(${r}, 0)`);if(F(a)){let t=S(K,[r,o]);lt(o,q)&&(t=t.nb$negative()),r=floorDiv(r,t),o=floorDiv(o,t)}return u.$num=r,u.$den=o,u},$r(){const t=E(this.ob$type,h.$name);return new h(`${t}(${this.$num}, ${this.$den})`)},tp$str(){return eq(this.$den,x)?new h(this.$num):new h(`${this.$num}/${this.$den}`)},tp$hash(){const t=p(this.$den,sub(G,z),G);let e;e=F(t)?mod(mul(_(this.$num),t),G):V;let n=ge(this,q)?e:e.nb$negative();return n=n.tp$hash(),-1===n?-2:n},tp$richcompare(t,e){const op=(t,n)=>A(t,n,e);if("Eq"===e||"NotEq"==e){if(t.ob$type===n){const n=eq(this.$num,t)&&eq(this.$den,x);return"Eq"===e?n:!n}if(t instanceof ot||t instanceof n){const n=eq(this.$num,getNumer(t))&&eq(this.$den,getDenom(t));return"Eq"===e?n:!n}t instanceof u&&eq(t.tp$getattr(new h("imag")),q)&&(t=t.tp$getattr(new h("real")))}return isRational(t)?op(mul(getNumer(this),getDenom(t)),mul(getDenom(this),getNumer(t))):t instanceof $?Number.isFinite(t.valueOf())?op(this,S(this.tp$getattr(C),[t])):op(new $(0),t):o},tp$as_number:!0,nb$add:Z,nb$reflected_add:H,nb$subtract:J,nb$reflected_subtract:Q,nb$multiply:U,nb$reflected_multiply:W,nb$divide:X,nb$reflected_divide:Y,nb$floor_divide:tt,nb$reflected_floor_divide:et,nb$divmod:nt,nb$reflected_divmod:it,nb$remainder:rt,nb$reflected_remainder:st,nb$power(t){if(isRational(t)){if(eq(getDenom(t),x)){let e=getNumer(t);return ge(e,q)?S(ot,[pow(this.$num,e),pow(this.$den,e)],["_normalize",r]):ge(this.$num,q)?(e=e.nb$negative(),S(ot,[pow(this.$den,e),pow(this.$num,e)],["_normalize",r])):(e=e.nb$negative(),S(ot,[pow(this.$den.nb$negative(),e),pow(this.$num.nb$negative(),e)],["_normalize",r]))}return pow(this.nb$float(),S($,[t]))}return pow(this.nb$float(),t)},nb$reflected_power(t){return eq(this.$den,x)&&ge(this.$num,q)?pow(t,this.$num):isRational(t)?pow(new ot(getNumer(t),getDenom(t)),this):eq(this.$den,x)?pow(t,this.$num):pow(t,this.nb$float())},nb$positive(){return new ot(this.$num,this.$den)},nb$negative(){return new ot(this.$num.nb$negative(),this.$den)},nb$abs(){return new ot(this.$num.nb$abs(),this.$den)},nb$bool(){return this.$num.nb$bool()},nb$float(){return div(this.$num,this.$den)}},methods:{as_integer_ratio:{$meth(){return new a([this.$num,this.$den])},$flags:L},limit_denominator:{$meth(t){if(lt(t,x))throw new f("max_denominator should be at least 1");if(ge(t,this.$den))return S(ot,[this]);let[e,n,i,r]=[q,x,x,q],s=this.$num,o=this.$den;for(;;){const a=floorDiv(s,o),$=add(n,mul(a,r));if(lt(t,$))break;[e,n,i,r]=[i,r,add(e,mul(a,i)),$],[s,o]=[o,sub(s,mul(a,o))]}const a=floorDiv(sub(t,n),r),$=S(ot,[add(e,mul(a,i)),add(n,mul(a,r))]),u=S(ot,[i,r]);return ge(_(sub($,this)),_(sub(u,this)))?u:$},$flags:{NamedArgs:["max_denominator"],Defaults:[new n(1e6)]}},__trunc__:{$meth(){return lt(this.$num,q)?floorDiv(this.$num.nb$negative(),this.$den).nb$negative():floorDiv(this.$num,this.$den)},$flags:L},__floor__:{$meth(){return floorDiv(this.$num,this.$den)},$flags:L},__ceil__:{$meth(){return floorDiv(this.$num.nb$negative(),this.$den).nb$negative()},$flags:L},__round__:{$meth(t){if(t===s){const[t,e]=divmod(this.$num,this.$den).valueOf(),n=mul(e,z);return lt(n,this.$den)?t:lt(this.$den,n)?add(t,x):eq(mod(t,z),q)?t:add(t,x)}const e=pow(I,_(t));return lt(q,t)?S(ot,[b(mul(this,e)),e]):S(ot,[mul(b(div(this,e)),e)])},$flags:{NamedArgs:["ndigits"],Defaults:[s]}},__reduce__:{$meth(){return new a([this.ob$type,new a([new h(this)])])},$flags:L},__copy__:{$meth(){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:L},__deepcopy__:{$meth(t){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:P}},classmethods:{from_float:{$meth(t){if(t instanceof n)return S(this,[t]);if(t instanceof $){const[e,n]=S(t.tp$getattr(B)).valueOf();return S(this,[e,n])}throw new m(`${k(this)}.from_float() only takes floats, not ${M(t)}, (${k(t)})`)},$flags:P},from_decimal:{$meth(){throw c("from_decimal not yet implemented in SKulpt")},$flags:P}},getsets:{numerator:{$get(){return this.$num}},denominator:{$get(){return this.$den}},_numerator:{$get(){return this.$num},$set(t){this.$num=t}},_denominator:{$get(){return this.$den},$set(t){this.$den=t}}}}),at=new a([n,ot]),isRational=t=>F(l(t,at));return O}',"src/lib/functools.js":'function $builtinmodule(){const t={};return Sk.misceval.chain(Sk.importModule("collections",!1,!0),(e=>(t._namedtuple=e.$d.namedtuple,functools_mod(t))))}function functools_mod(t){const{object:e,int_:n,str:r,list:s,tuple:a,dict:i,none:{none$:o},bool:{false$:c},NotImplemented:{NotImplemented$:_},bool:l,func:p,method:u,TypeError:h,RuntimeError:d,ValueError:f,NotImplementedError:m,AttributeErrror:w,OverflowError:g,checkNone:$,checkBool:y,checkCallable:k,checkClass:b}=Sk.builtin,{callsimArray:x,callsimOrSuspendArray:A,iterFor:S,chain:E,isIndex:v,asIndexSized:N,isTrue:P,richCompareBool:j,objectRepr:R}=Sk.misceval,{remapToPy:z}=Sk.ffi,{buildNativeClass:q,setUpModuleMethods:T,keywordArrayFromPyDict:I,keywordArrayToPyDict:D,objectHash:C,lookupSpecial:M,copyKeywordsToNamedArgs:W,typeName:F,iter:U,gattr:O}=Sk.abstr,{getSetDict:G,getAttr:B,setAttr:K}=Sk.generic;function proxyFail(t){return new p((()=>{throw new m(t+" is not yet implemented in skulpt")}))}Object.assign(t,{__name__:new r("functools"),__doc__:new r("Tools for working with functions and callable objects"),__all__:new s(["update_wrapper","wraps","WRAPPER_ASSIGNMENTS","WRAPPER_UPDATES","total_ordering","cmp_to_key","cache","lru_cache","reduce","partial","partialmethod","singledispatch","singledispatchmethod","cached_property"].map((t=>new r(t)))),WRAPPER_ASSIGNMENTS:new a(["__module__","__name__","__qualname__","__doc__","__annotations__"].map((t=>new r(t)))),WRAPPER_UPDATES:new a([new r("__dict__")]),singledispatch:proxyFail("singledispatch"),singledispatchmethod:proxyFail("singledispatchmethod"),cached_property:proxyFail("cached_property")});const L=new r("cache_parameters");function _lru_cache(e,n){if(n||(n=c),v(e))(e=N(e,g))<0&&(e=0);else{if(k(e)&&y(n)){const r=e,s=new V(r,e=128,n);return s.tp$setattr(L,new p((()=>z({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}if(!$(e))throw new h("Expected first argument to be an integer, a callable, or None")}return new p((r=>{const s=new V(r,e,n);return s.tp$setattr(L,new p((()=>z({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}))}const H=t._CacheInfo=x(t._namedtuple,["CacheInfo",["hits","misses","maxsize","currsize"]].map((t=>z(t))),["module",new r("functools")]),V=q("functools._lru_cache_wrapper",{constructor:function _lru_cache_wrapper(t,e,n,r){if(!k(t))throw new h("the first argument must be callable");let s;if($(e))s=infinite_lru_cache_wrapper,e=-1;else{if(!v(e))throw new h("maxsize should be integer or None");(e=N(e,g))<0&&(e=0),s=0===e?uncached_lru_cache_wrapper:bounded_lru_cache_wrapper}this.root={},this.root.prev=this.root.next=this.root,this.wrapper=s,this.maxsize=e,this.typed=n,this.cache=new i([]),this.func=t,this.misses=this.hits=0,this.$d=new i([])},slots:{tp$new(t,e){const[n,r,s,a]=W("_lru_cache_wrapper",["user_function","maxsize","typed","cache_info_type"],t,e);return new V(n,r,s,a)},tp$call(t,e){return this.wrapper(t,e)},tp$descr_get(t,e){return null===t?this:new u(this,t)},tp$doc:"Create a cached callable that wraps another function.\\n\\nuser_function: the function being cached\\n\\nmaxsize: 0 for no caching\\n None for unlimited cache size\\n n for a bounded cache\\n\\ntyped: False cache f(3) and f(3.0) as identical calls\\n True cache f(3) and f(3.0) as distinct calls\\n\\ncache_info_type: namedtuple class with the fields:\\n hits misses currsize maxsize\\n"},methods:{cache_info:{$meth(){return A(H,[this.hits,this.misses,-1===this.maxsize?o:this.maxsize,this.cache.get$size()].map((t=>z(t))))},$flags:{NoArgs:!0},$doc:"Report cache statistics"},cache_clear:{$meth(){return this.hits=this.misses=0,this.root={},this.root.next=this.root.prev=this.root,A(this.cache.tp$getattr(new r("clear"),!0))},$flags:{NoArgs:!0},$doc:"Clear the cache and cache statistics"},__deepcopy__:{$meth(t){return this},$flags:{OneArg:!0}},__copy__:{$meth(){return this},$flags:{NoArgs:!0}}},getsets:{__dict__:G}});function infinite_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);return void 0!==r?(this.hits++,r):(this.misses++,E(A(this.func,t,e),(t=>(this.cache.mp$ass_subscript(n,t),t))))}function uncached_lru_cache_wrapper(t,e){return this.misses++,A(this.func,t,e)}function bounded_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);if(void 0!==r){const{result:t}=r;return lru_cache_extract_link(r),lru_cache_append_link(this,r),this.hits++,t}return this.misses++,E(A(this.func,t,e),(t=>{if(void 0!==this.cache.mp$lookup(n))return t;if(this.cache.get$size()t.ob$type)),...i.map((t=>t.ob$type)));else if(1===s.length&&X.has(s[0].ob$type))return s[0];return new J(s)}function partial_adjust_args_kwargs(t,e){if(t=this.arg_arr.concat(t),e){e=D(e);const t=this.kwdict.dict$copy();t.dict$merge(e),e=I(t)}else e=I(this.kwdict);return{args:t,kwargs:e}}function partial_new(t,e){if(t.length<1)throw new h("type \'partial\' takes at least 1 argument");let n,r,s=t.shift();if(s instanceof this.sk$builtinBase){const t=s;s=t.fn,n=t.arg_arr,r=t.kwdict}this.check$func(s),n&&(t=n.concat(t));let a=D(e=e||[]);if(r){const t=r.dict$copy();t.dict$merge(a),a=t}if(this.sk$builtinBase===this.constructor)return new this.constructor(s,t,a);{const e=new this.constructor;return this.sk$builtinBase.call(e,s,t,a),e}}function partial_repr(){if(this.in$repr)return new r("...");this.in$repr=!0;const t=[R(this.fn)];return this.arg_arr.forEach((e=>{t.push(R(e))})),this.kwdict.$items().forEach((([e,n])=>{t.push(e.toString()+"="+R(n))})),this.in$repr=!1,new r(this.tp$name+"("+t.join(", ")+")")}t.partial=q("functools.partial",{constructor:function partial(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n,this.in$repr=!1,this.$d=new i([])},slots:{tp$new:partial_new,tp$call(t,e){return({args:t,kwargs:e}=this.adj$args_kws(t,e)),this.fn.tp$call(t,e)},tp$doc:"partial(func, *args, **keywords) - new function with partial application\\n of the given arguments and keywords.\\n",$r:partial_repr,tp$getattr:B,tp$setattr:K},getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:G},methods:{},classmethods:Sk.generic.classGetItem,proto:{adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t))throw new h("the first argument must be callable")}}}),t.partialmethod=q("functools.partialmethod",{constructor:function partialmethod(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n},slots:{tp$new:partial_new,tp$doc:"Method descriptor with partial application of the given arguments\\n and keywords.\\n\\n Supports wrapping existing descriptors and handles non-descriptor\\n callables as instance methods.\\n ",$r:partial_repr,tp$descr_get(e,n){let r;if(this.fn.tp$descr_get){const s=this.fn.tp$descr_get(e,n);if(s!==this.fn){if(!k(s))throw new h("type \'partial\' requires a callable");r=new t.partial(s,this.arg_arr.slice(0),this.kwdict.dict$copy());const e=M(s,this.str$self);void 0!==e&&r.tp$setattr(this.str$self,e)}}return void 0===r&&(r=this.make$unbound().tp$descr_get(e,n)),r}},methods:{_make_unbound_method:{$meth(){return this.make$unbound()},$flags:{NoArgs:!0}}},classmethods:Sk.generic.classGetItem,getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:G},proto:{str$self:new r("__self__"),make$unbound(){const t=this;function _method(e,n){const r=e.shift();return({args:e,kwargs:n}=t.adj$args_kws(e,n)),e.unshift(r),A(t.fn,e,n)}return _method.co_fastcall=!0,new p(_method)},adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t)&&void 0===t.tp$descr_get)throw new h(R(t)+" is not callable or a descriptor")}}});const Y={__lt__:r.$lt,__le__:r.$le,__gt__:r.$gt,__ge__:r.$ge};function from_slot(t,e){const n=Y[t];function compare_slot(t,r){let s=x(t.tp$getattr(n),[r]);return s===_?s:(s=P(s),new l(e(s,t,r)))}return compare_slot.co_name=n,compare_slot}const Z=from_slot("__lt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),tt=from_slot("__lt__",((t,e,n)=>t||j(e,n,"Eq"))),et=from_slot("__lt__",(t=>!t)),nt=from_slot("__le__",((t,e,n)=>!t||j(e,n,"Eq"))),rt=from_slot("__le__",((t,e,n)=>t&&j(e,n,"NotEq"))),st=from_slot("__le__",(t=>!t)),at=from_slot("__gt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),it=from_slot("__gt__",((t,e,n)=>t||j(e,n,"Eq"))),ot=from_slot("__gt__",(t=>!t)),ct=from_slot("__ge__",((t,e,n)=>!t||j(e,n,"Eq"))),_t=from_slot("__ge__",((t,e,n)=>t&&j(e,n,"NotEq"))),lt=from_slot("__ge__",(t=>!t)),pt={__lt__:{__gt__:new p(Z),__le__:new p(tt),__ge__:new p(et)},__le__:{__ge__:new p(nt),__lt__:new p(rt),__gt__:new p(st)},__gt__:{__lt__:new p(at),__ge__:new p(it),__le__:new p(ot)},__ge__:{__le__:new p(ct),__gt__:new p(_t),__lt__:new p(lt)}},ut={__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge"};const ht=new n(0),dt=q("functools.KeyWrapper",{constructor:function(t,e){this.cmp=t,this.obj=e},slots:{tp$call(t,e){const[n]=W("K",["obj"],t,e,[]);return new dt(this.cmp,n)},tp$richcompare(t,e){if(!(t instanceof dt))throw new h("other argument must be K instance");const n=this.obj,r=t.obj;if(!n||!r)throw new w("object");const s=A(this.cmp,[n,r]);return E(s,(t=>j(t,ht,e)))},tp$getattr:B,tp$hash:o},getsets:{obj:{$get(){return this.obj||o},$set(t){this.obj=t},$doc:"Value wrapped by a key function."}}}),ft=new r("update"),mt=new r("__wrapped__");return T("functools",t,{cache:{$meth:function cache(t){return A(_lru_cache(o),[t])},$flags:{OneArg:!0},$doc:\'Simple lightweight unbounded cache. Sometimes called "memoize".\',$textsig:"($module, user_function, /)"},lru_cache:{$meth:_lru_cache,$flags:{NamedArgs:["maxsize","typed"],Defaults:[new n(128),c]},$doc:"Least-recently-used cache decorator.\\n\\nIf *maxsize* is set to None, the LRU features are disabled and the cache\\ncan grow without bound.\\n\\nIf *typed* is True, arguments of different types will be cached separately.\\nFor example, f(3.0) and f(3) will be treated as distinct calls with\\ndistinct results.\\n\\nArguments to the cached function must be hashable.\\n\\nView the cache statistics named tuple (hits, misses, maxsize, currsize)\\nwith f.cache_info(). Clear the cache and statistics with f.cache_clear().\\nAccess the underlying function with f.__wrapped__.\\n\\nSee: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)"},cmp_to_key:{$meth:function cmp_to_key(t){return new dt(t)},$flags:{NamedArgs:["mycmp"],Defaults:[]},$doc:"Convert a cmp= function into a key= function.",$textsig:"($module, cmp, /)"},reduce:{$meth:function reduce(t,e,n){const r=U(e);let s;return n=n||r.tp$iternext(!0),E(n,(e=>{if(void 0===e)throw new h("reduce() of empty sequence with no initial value");return s=e,S(r,(e=>E(A(t,[s,e]),(t=>{s=t}))))}),(()=>s))},$flags:{MinArgs:2,MaxArgs:3},$doc:"reduce(function, sequence[, initial]) -> value\\n\\nApply a function of two arguments cumulatively to the items of a sequence,\\nfrom left to right, so as to reduce the sequence to a single value.\\nFor example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates\\n((((1+2)+3)+4)+5). If initial is present, it is placed before the items\\nof the sequence in the calculation, and serves as a default when the\\nsequence is empty.",$textsig:"($module, function, sequence[, initial], /)"},total_ordering:{$meth:function total_ordering(t){const n=[];if(!b(t))throw new h("total ordering only supported for type objects not \'"+F(t)+"\'");if(Object.keys(pt).forEach((r=>{const s=ut[r];t.prototype[s]!==e.prototype[s]&&n.push(r)})),!n.length)throw new f("must define atleast one ordering operation: <, >, <=, >=");const r=n[0];return Object.entries(pt[r]).forEach((([e,r])=>{n.includes(e)||t.tp$setattr(Y[e],r)})),t},$flags:{OneArg:!0},$doc:"Class decorator that fills in missing ordering methods"},update_wrapper:{$meth:function update_wrapper(t,e,n,r){let s,a=U(n);for(let i=a.tp$iternext();void 0!==i;i=a.tp$iternext())void 0!==(s=e.tp$getattr(i))&&t.tp$setattr(i,s);a=U(r);for(let o=a.tp$iternext();void 0!==o;o=a.tp$iternext()){s=e.tp$getattr(o)||new i([]);const n=O(t,o),r=O(n,ft);x(r,[s])}return t.tp$setattr(mt,e),t},$flags:{NamedArgs:["wrapper","wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Update a wrapper function to look like the wrapped function\\n\\n wrapper is the function to be updated\\n wrapped is the original function\\n assigned is a tuple naming the attributes assigned directly\\n from the wrapped function to the wrapper function (defaults to\\n functools.WRAPPER_ASSIGNMENTS)\\n updated is a tuple naming the attributes of the wrapper that\\n are updated with the corresponding attribute from the wrapped\\n function (defaults to functools.WRAPPER_UPDATES)\\n ",$textsig:"($module, /, wrapper, wrapped, assigned=(\'__module__\', \'__name__\', \'__qualname__\', \'__doc__\', \'__annotations__\'), updated=(\'__dict__\',))"},wraps:{$meth:function wraps(e,n,r){const s=["wrapped",e,"assigned",n,"updated",r];return A(t.partial,[t.update_wrapper],s)},$flags:{NamedArgs:["wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Decorator factory to apply update_wrapper() to a wrapper function\\n\\n Returns a decorator that invokes update_wrapper() with the decorated\\n function as the wrapper argument and the arguments to wraps() as the\\n remaining arguments. Default arguments are as for update_wrapper().\\n This is a convenience function to simplify applying partial() to\\n update_wrapper().\\n ",$textsig:"($module, /, wrapped, assigned=(\'__module__\', \'__name__\', \'__qualname__\', \'__doc__\', \'__annotations__\'), updated=(\'__dict__\',))"}}),t}',"src/lib/image.js":'var ImageMod,$builtinmodule;ImageMod||((ImageMod={}).canvasLib=[]),$builtinmodule=function(e){var n,t,i,a,u,l,r,s={__name__:new Sk.builtin.str("image")};return s.Image=Sk.misceval.buildClass(s,(function(e,n){u=function(e){e.width=e.image.width,e.height=e.image.height,e.delay=0,e.updateCount=0,e.updateInterval=1,e.lastx=0,e.lasty=0,e.canvas=document.createElement("canvas"),e.canvas.height=e.height,e.canvas.width=e.width,e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,0,0),e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)},n.__init__=new Sk.builtin.func((function(e,n){var t;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2);try{e.image=document.getElementById(Sk.ffi.remapToJs(n)),u(e)}catch(i){e.image=null}if(null==e.image)return(t=new Sk.misceval.Suspension).resume=function(){if(t.data.error)throw new Sk.builtin.IOError(t.data.error.message)},t.data={type:"Sk.promise",promise:new Promise((function(t,i){var a=new Image;a.crossOrigin="",a.onerror=function(){i(Error("Failed to load URL: "+a.src))},a.onload=function(){e.image=this,u(e),t()},a.src=r(n)}))},t})),r=function(e){var n,t,i="function"==typeof Sk.imageProxy?Sk.imageProxy:function(e){return(n=document.createElement("a")).href=t,window.location.host!==n.host?Sk.imageProxy+"/"+e:e};return t=i(t=Sk.ffi.remapToJs(e))},l=function(e,n,t){if(n<0||t<0||n>=e.width||t>=e.height)throw new Sk.builtin.ValueError("Pixel index out of range.")};var setdelay=function(e,n,t){var i;Sk.builtin.pyCheckArgsLen("setdelay",arguments.length,2,3),e.delay=Sk.ffi.remapToJs(n),i=Sk.builtin.asnum$(t),e.updateInterval=i||1};n.set_delay=new Sk.builtin.func(setdelay),n.setDelay=new Sk.builtin.func(setdelay);var getpixels=function(e){var n,t=[];for(Sk.builtin.pyCheckArgsLen("getpixels",arguments.length,1,1),n=0;n=e.width?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,0,e.lasty,e.width,2):e.lasty+e.updateInterval>=e.height?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,e.lastx,0,2,e.height):e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,Math.min(n,e.lastx),Math.min(t,e.lasty),Math.max(Math.abs(n-e.lastx),1),Math.max(Math.abs(t-e.lasty),1)),e.lastx=n,e.lasty=t,e.delay>0?window.setTimeout(i,e.delay):i()):i()}))},i};var setpixel=function(e,n,t,i){var u;return Sk.builtin.pyCheckArgsLen("setpixel",arguments.length,4,4),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),l(e,n,t),u=4*t*e.width+4*n,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getRed,[i])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getGreen,[i])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getBlue,[i])),e.imagedata.data[u+3]=255,a(e,n,t)};n.set_pixel=new Sk.builtin.func(setpixel),n.setPixel=new Sk.builtin.func(setpixel);var setpixelat=function(e,n,t){var i,u,r;return Sk.builtin.pyCheckArgsLen("setpixelat",arguments.length,3,3),i=(n=Sk.builtin.asnum$(n))%e.image.width,u=Math.floor(n/e.image.width),l(e,i,u),r=4*u*e.width+4*i,e.imagedata.data[r]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getRed,[t])),e.imagedata.data[r+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getGreen,[t])),e.imagedata.data[r+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getBlue,[t])),e.imagedata.data[r+3]=255,a(e,i,u)};n.set_pixel_at=new Sk.builtin.func(setpixelat),n.setPixelAt=new Sk.builtin.func(setpixelat);var updatepixel=function(e,n){var t,i,u;return Sk.builtin.pyCheckArgsLen("updatepixel",arguments.length,2,2),t=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getX,[n])),i=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getY,[n])),l(e,t,i),u=4*i*e.width+4*t,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getRed,[n])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getGreen,[n])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getBlue,[n])),e.imagedata.data[u+3]=255,a(e,t,i)};n.update_pixel=new Sk.builtin.func(updatepixel),n.updatePixel=new Sk.builtin.func(updatepixel);var getheight=function(e){return Sk.builtin.pyCheckArgsLen("getheight",arguments.length,1,1),new Sk.builtin.int_(e.height)};n.get_height=new Sk.builtin.func(getheight),n.getHeight=new Sk.builtin.func(getheight);var getwidth=function(e,n){return Sk.builtin.pyCheckArgsLen("getwidth",arguments.length,1,1),new Sk.builtin.int_(e.width)};n.get_width=new Sk.builtin.func(getwidth),n.getWidth=new Sk.builtin.func(getwidth),n.__getattr__=new Sk.builtin.func((function(e,n){return"height"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.height):"width"===n?Sk.builtin.assk$(e.width):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){throw"height"===(n=Sk.ffi.remapToJs(n))||"width"===n?new Sk.builtin.Exception("Cannot change height or width they can only be set on creation"):new Sk.builtin.Exception("Unknown attribute: "+n)})),n.draw=new Sk.builtin.func((function(e,n,t,i){var a;return Sk.builtin.pyCheckArgsLen("draw",arguments.length,2,4),(a=new Sk.misceval.Suspension).resume=function(){return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:new Promise((function(a,u){var l;n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),l=Sk.misceval.callsimArray(n.getWin,[n]).getContext("2d"),void 0===t&&(t=0,i=0),e.lastUlx=t,e.lastUly=i,e.lastCtx=l,l.putImageData(e.imagedata,t,i),e.delay>0?window.setTimeout(a,e.delay):window.setTimeout(a,200)}))},a}))}),"Image",[]),i=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,3,3),e.width=Sk.builtin.asnum$(n),e.height=Sk.builtin.asnum$(t),e.canvas=document.createElement("canvas"),e.ctx=e.canvas.getContext("2d"),e.canvas.height=e.height,e.canvas.width=e.width,e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)}))},s.EmptyImage=Sk.misceval.buildClass(s,i,"EmptyImage",[s.Image]),t=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t,i,a,u){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,4,6),e.red=Sk.builtin.asnum$(n),e.green=Sk.builtin.asnum$(t),e.blue=Sk.builtin.asnum$(i),e.x=Sk.builtin.asnum$(a),e.y=Sk.builtin.asnum$(u)}));var getred=function(e){return Sk.builtin.pyCheckArgsLen("getred",arguments.length,1,1),Sk.builtin.assk$(e.red)};n.get_red=new Sk.builtin.func(getred),n.getRed=new Sk.builtin.func(getred);var getgreen=function(e){return Sk.builtin.pyCheckArgsLen("getgreen",arguments.length,1,1),Sk.builtin.assk$(e.green)};n.get_green=new Sk.builtin.func(getgreen),n.getGreen=new Sk.builtin.func(getgreen);var getblue=function(e){return Sk.builtin.pyCheckArgsLen("getblue",arguments.length,1,1),Sk.builtin.assk$(e.blue)};n.get_blue=new Sk.builtin.func(getblue),n.getBlue=new Sk.builtin.func(getblue);var getx=function(e){return Sk.builtin.pyCheckArgsLen("getx",arguments.length,1,1),Sk.builtin.assk$(e.x)};n.get_x=new Sk.builtin.func(getx),n.getX=new Sk.builtin.func(getx);var gety=function(e){return Sk.builtin.pyCheckArgsLen("gety",arguments.length,1,1),Sk.builtin.assk$(e.y)};n.get_y=new Sk.builtin.func(gety),n.getY=new Sk.builtin.func(gety);var setred=function(e,n){Sk.builtin.pyCheckArgsLen("setred",arguments.length,2,2),e.red=Sk.builtin.asnum$(n)};n.set_red=new Sk.builtin.func(setred),n.setRed=new Sk.builtin.func(setred);var setgreen=function(e,n){Sk.builtin.pyCheckArgsLen("setgreen",arguments.length,2,2),e.green=Sk.builtin.asnum$(n)};n.set_green=new Sk.builtin.func(setgreen),n.setGreen=new Sk.builtin.func(setgreen);var setblue=function(e,n){Sk.builtin.pyCheckArgsLen("setblue",arguments.length,2,2),e.blue=Sk.builtin.asnum$(n)};n.set_blue=new Sk.builtin.func(setblue),n.setBlue=new Sk.builtin.func(setblue),n.__getattr__=new Sk.builtin.func((function(e,n){return"red"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.red):"green"===n?Sk.builtin.assk$(e.green):"blue"===n?Sk.builtin.assk$(e.blue):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){"red"!==(n=Sk.ffi.remapToJs(n))&&"green"!==n&&"blue"!==n||(e[n]=Sk.builtin.asnum$(t))}));var setx=function(e,n){Sk.builtin.pyCheckArgsLen("setx",arguments.length,2,2),e.x=Sk.builtin.asnum$(n)};n.set_x=new Sk.builtin.func(setx),n.setX=new Sk.builtin.func(setx);var sety=function(e,n){Sk.builtin.pyCheckArgsLen("sety",arguments.length,2,2),e.y=Sk.builtin.asnum$(n)};n.set_y=new Sk.builtin.func(sety),n.setY=new Sk.builtin.func(sety),n.__getitem__=new Sk.builtin.func((function(e,n){return 0===(n=Sk.builtin.asnum$(n))?e.red:1==n?e.green:2==n?e.blue:void 0})),n.__str__=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy("["+e.red+","+e.green+","+e.blue+"]")})),n.getColorTuple=new Sk.builtin.func((function(e,n,t){})),n.setRange=new Sk.builtin.func((function(e,n){e.max=Sk.builtin.asnum$(n)}))},s.Pixel=Sk.misceval.buildClass(s,t,"Pixel",[]),n=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){var i,a,u;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,1,3),void 0===(i=ImageMod.canvasLib[Sk.canvas])?(a=document.createElement("canvas"),u=document.getElementById(Sk.canvas),e.theScreen=a,u.appendChild(a),ImageMod.canvasLib[Sk.canvas]=a,ImageMod.canvasLib[Sk.canvas]=e.theScreen):(e.theScreen=i,e.theScreen.height=e.theScreen.height),void 0!==n?(e.theScreen.height=t.v,e.theScreen.width=n.v):(Sk.availableHeight&&(e.theScreen.height=Sk.availableHeight),Sk.availableWidth&&(e.theScreen.width=Sk.availableWidth)),e.theScreen.style.display="block"})),n.getWin=new Sk.builtin.func((function(e){return e.theScreen})),n.exitonclick=new Sk.builtin.func((function(e){var n=e.theScreen.id;e.theScreen.onclick=function(){document.getElementById(n).style.display="none",document.getElementById(n).onclick=null,delete ImageMod.canvasLib[n]}}))},s.ImageWin=Sk.misceval.buildClass(s,n,"ImageWin",[]),s};',"src/lib/itertools.js":'var $builtinmodule=function(t){var e={};function combinationsNew(t,e,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs(t.tp$name,["iterable","r"],e,i,[]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===t)return new t.constructor(n,s);{const e=new this.constructor;return t.constructor.call(e,n,s),e}}return e.accumulate=Sk.abstr.buildIteratorClass("itertools.accumulate",{constructor:function accumulate(t,e,i){this.iter=t,this.func=e,this.total=i,this.tp$iternext=()=>(this.total=Sk.builtin.checkNone(this.total)?this.iter.tp$iternext():this.total,this.tp$iternext=this.constructor.prototype.tp$iternext,this.total)},iternext(t){let e=this.iter.tp$iternext();if(void 0!==e)return this.total=Sk.misceval.callsimArray(this.func,[this.total,e]),this.total},slots:{tp$doc:"accumulate(iterable[, func, initial]) --\\x3e accumulate object\\n\\nReturn series of accumulated sums (or other binary function results).",tp$new(t,i){Sk.abstr.checkArgsLen("accumulate",t,0,2);let[r,s,n]=Sk.abstr.copyKeywordsToNamedArgs("accumulate",["iterable","func","initial"],t,i,[Sk.builtin.none.none$,Sk.builtin.none.none$]);if(r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func(((t,e)=>Sk.abstr.numberBinOp(t,e,"Add"))):s,this===e.accumulate.prototype)return new e.accumulate(r,s,n);{const t=new this.constructor;return e.accumulate.call(t,r,s,n),t}}}}),e.chain=Sk.abstr.buildIteratorClass("itertools.chain",{constructor:function chain(t){this.iterables=t,this.current_it=null,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,this.current_it=this.iterables.tp$iternext(),void 0!==this.current_it)return this.current_it=Sk.abstr.iter(this.current_it),this.tp$iternext();this.tp$iternext=()=>{}}},iternext(t){let e;for(;void 0===e;){if(e=this.current_it.tp$iternext(),void 0!==e)return e;if(this.current_it=this.iterables.tp$iternext(),void 0===this.current_it)return void(this.tp$iternext=()=>{});this.current_it=Sk.abstr.iter(this.current_it)}},slots:{tp$doc:"chain(*iterables) --\\x3e chain object\\n\\nReturn a chain object whose .__next__() method returns elements from the\\nfirst iterable until it is exhausted, then elements from the next\\niterable, until all of the iterables are exhausted.",tp$new(t,i){if(Sk.abstr.checkNoKwargs("chain",i),t=new Sk.builtin.tuple(t.slice(0)).tp$iter(),this===e.chain.prototype)return new e.chain(t);{const i=new this.constructor;return e.chain.call(i,t),i}}},classmethods:Object.assign({from_iterable:{$meth(t){const i=Sk.abstr.iter(t);return new e.chain(i)},$flags:{OneArg:!0},$doc:"chain.from_iterable(iterable) --\\x3e chain object\\n\\nAlternate chain() constructor taking a single iterable argument\\nthat evaluates lazily.",$textsig:null}},Sk.generic.classGetItem)}),e.combinations=Sk.abstr.buildIteratorClass("itertools.combinations",{constructor:function combinations(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill().map(((t,e)=>e)),this.n=t.length,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=e+this.n-this.r){i=!0;break}if(!i)return void(this.r=0);this.indices[e]++;for(let s=e+1;sthis.pool[t]));return new Sk.builtin.tuple(r)},slots:{tp$doc:"combinations(iterable, r) --\\x3e combinations object\\n\\nReturn successive r-length combinations of elements in the iterable.\\n\\ncombinations(range(4), 3) --\\x3e (0,1,2), (0,1,3), (0,2,3), (1,2,3)",tp$new(t,i){return combinationsNew.call(this,e.combinations.prototype,t,i)}}}),e.combinations_with_replacement=Sk.abstr.buildIteratorClass("itertools.combinations_with_replacement",{constructor:function combinations_with_replacement(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill(0),this.n=t.length,this.tp$iternext=()=>{if(this.r&&!this.n)return;this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map((t=>this.pool[t]));return new Sk.builtin.tuple(t)}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=this.n-1){i=!0;break}if(!i)return void(this.r=0);const r=this.indices[e]+1;for(let n=e;nthis.pool[t]));return new Sk.builtin.tuple(s)},slots:{tp$doc:"combinations_with_replacement(iterable, r) --\\x3e combinations_with_replacement object\\n\\nReturn successive r-length combinations of elements in the iterable\\nallowing individual elements to have successive repeats.\\ncombinations_with_replacement(\'ABC\', 2) --\\x3e AA AB AC BB BC CC",tp$new(t,i){return combinationsNew.call(this,e.combinations_with_replacement.prototype,t,i)}}}),e.compress=Sk.abstr.buildIteratorClass("itertools.compress",{constructor:function compress(t,e){this.data=t,this.selectors=e},iternext(){let t=this.data.tp$iternext(),e=this.selectors.tp$iternext();for(;void 0!==t&&void 0!==e;){if(Sk.misceval.isTrue(e))return t;t=this.data.tp$iternext(),e=this.selectors.tp$iternext()}},slots:{tp$doc:"compress(data, selectors) --\\x3e iterator over selected data\\n\\nReturn data elements corresponding to true selector elements.\\nForms a shorter iterator from selected data elements using the\\nselectors to choose the data elements.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("compress",["data","selectors"],t,i,[]),r=Sk.abstr.iter(r),s=Sk.abstr.iter(s),this===e.count.prototype)return new e.compress(r,s);{const t=new this.constructor;return e.compress.call(t,r,s),t}}}}),e.count=Sk.abstr.buildIteratorClass("itertools.count",{constructor:function count(t,e){this.start=t,this.step=e},iternext(){const t=this.start;return this.start=Sk.abstr.numberBinOp(this.start,this.step,"Add"),t},slots:{tp$doc:"count(start=0, step=1) --\\x3e count object\\n\\nReturn a count object whose .__next__() method returns consecutive values.\\nEquivalent to:\\n\\n def count(firstval=0, step=1):\\n x = firstval\\n while 1:\\n yield x\\n x += step\\n",tp$new(t,i){const[r,s]=Sk.abstr.copyKeywordsToNamedArgs("count",["start","step"],t,i,[new Sk.builtin.int_(0),new Sk.builtin.int_(1)]);if(!Sk.builtin.checkNumber(r)&&!Sk.builtin.checkComplex(r))throw new Sk.builtin.TypeError("a number is required");if(!Sk.builtin.checkNumber(s)&&!Sk.builtin.checkComplex(s))throw new Sk.builtin.TypeError("a number is required");if(this===e.count.prototype)return new e.count(r,s);{const t=new this.constructor;return e.count.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.start);let e=Sk.misceval.objectRepr(this.step);return e="1"===e?"":", "+e,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}}}),e.cycle=Sk.abstr.buildIteratorClass("itertools.cycle",{constructor:function cycle(t){this.iter=t,this.saved=[],this.consumed=!1,this.i=0,this.length},iternext(){let t;if(!this.consumed){if(t=this.iter.tp$iternext(),void 0!==t)return this.saved.push(t),t;if(this.consumed=!0,this.length=this.saved.length,!this.length)return}return t=this.saved[this.i],this.i=(this.i+1)%this.length,t},slots:{tp$doc:"cycle(iterable) --\\x3e cycle object\\n\\nReturn elements from the iterable until it is exhausted.\\nThen repeat the sequence indefinitely.",tp$new(t,i){Sk.abstr.checkOneArg("cycle",t,i);const r=Sk.abstr.iter(t[0]);if(this===e.cycle.prototype)return new e.cycle(r);{const t=new this.constructor;return e.cycle.call(t,r),t}}}}),e.dropwhile=Sk.abstr.buildIteratorClass("itertools.dropwhile",{constructor:function dropwhile(t,e){this.predicate=t,this.iter=e,this.passed},iternext(){let t=this.iter.tp$iternext();for(;void 0===this.passed&&void 0!==t;){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(!Sk.misceval.isTrue(e))return this.passed=!0,t;t=this.iter.tp$iternext()}return t},slots:{tp$doc:"dropwhile(predicate, iterable) --\\x3e dropwhile object\\n\\nDrop items from the iterable while predicate(item) is true.\\nAfterwards, return every element until the iterable is exhausted.",tp$new(t,i){Sk.abstr.checkNoKwargs("dropwhile",i),Sk.abstr.checkArgsLen("dropwhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.dropwhile.prototype)return new e.dropwhile(r,s);{const t=new this.constructor;return e.dropwhile.call(t,r,s),t}}}}),e.filterfalse=Sk.abstr.buildIteratorClass("itertools.filterfalse",{constructor:function filterfalse(t,e){this.predicate=t,this.iter=e},iternext(t){let e=this.iter.tp$iternext();if(void 0===e)return;let i=Sk.misceval.callsimArray(this.predicate,[e]);for(;Sk.misceval.isTrue(i);){if(e=this.iter.tp$iternext(),void 0===e)return;i=Sk.misceval.callsimArray(this.predicate,[e])}return e},slots:{tp$doc:"filterfalse(function or None, sequence) --\\x3e filterfalse object\\n\\nReturn those items of sequence for which function(item) is false.\\nIf function is None, return the items that are false.",tp$new(t,i){Sk.abstr.checkNoKwargs("filterfalse",i),Sk.abstr.checkArgsLen("filterfalse",t,2,2);const r=Sk.builtin.checkNone(t[0])?Sk.builtin.bool:t[0],s=Sk.abstr.iter(t[1]);if(this===e.filterfalse.prototype)return new e.filterfalse(r,s);{const t=new this.constructor;return e.filterfalse.call(t,r,s),t}}}}),e._grouper=Sk.abstr.buildIteratorClass("itertools._grouper",{constructor:function _grouper(t,e){this.groupby=t,this.tgtkey=t.tgtkey,this.id=t.id},iternext(t){const e=Sk.misceval.richCompareBool(this.groupby.currkey,this.tgtkey,"Eq");if(this.groupby.id===this.id&&e){let t=this.groupby.currval;return this.groupby.currval=this.groupby.iter.tp$iternext(),void 0!==this.groupby.currval&&(this.groupby.currkey=Sk.misceval.callsimArray(this.groupby.keyf,[this.groupby.currval])),t}}}),e.groupby=Sk.abstr.buildIteratorClass("itertools.groupby",{constructor:function groupby(t,e){this.iter=t,this.keyf=e,this.currval,this.currkey=this.tgtkey=new Sk.builtin.object,this.id},iternext(t){this.id=new Object;let i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq");for(;i;){if(this.currval=this.iter.tp$iternext(),void 0===this.currval)return;this.currkey=Sk.misceval.callsimArray(this.keyf,[this.currval]),i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq")}this.tgtkey=this.currkey;const r=new e._grouper(this);return new Sk.builtin.tuple([this.currkey,r])},slots:{tp$doc:"groupby(iterable, key=None) -> make an iterator that returns consecutive\\nkeys and groups from the iterable. If the key function is not specified or\\nis None, the element itself is used for grouping.\\n",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("groupby",["iterable","key"],t,i,[Sk.builtin.none.none$]),r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func((t=>t)):s,this===e.groupby.prototype)return new e.groupby(r,s);{const t=new this.constructor;return e.groupby.call(t,r,s),t}}}}),e.islice=Sk.abstr.buildIteratorClass("itertools.islice",{constructor:function islice(t,e,i,r){this.iter=t,this.previt=e,this.stop=i,this.step=r,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,!(this.previt>=this.stop)){for(let t=0;t=this.stop)){for(let t=this.previt+1;tNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Stop for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(s)&&!Sk.misceval.isIndex(s))throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(s=Sk.builtin.checkNone(s)?0:Sk.misceval.asIndexSized(s),s<0||s>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(o)&&!Sk.misceval.isIndex(o))throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None");if(o=Sk.builtin.checkNone(o)?1:Sk.misceval.asIndexSized(o),o<=0||o>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None.");if(this===e.islice.prototype)return new e.islice(r,s,n,o);{const t=new this.constructor;return e.islice.call(t,r,s,n,o),t}}}}),e.permutations=Sk.abstr.buildIteratorClass("itertools.permutations",{constructor:function permutations(t,e){this.pool=t,this.r=e;const i=t.length;this.indices=new Array(i).fill().map(((t,e)=>e)),this.cycles=new Array(e).fill().map(((t,e)=>i-e)),this.n=i,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){for(let e=this.r-1;e>=0;e--){if(this.cycles[e]--,0!=this.cycles[e]){const t=this.cycles[e];[this.indices[e],this.indices[this.n-t]]=[this.indices[this.n-t],this.indices[e]];const i=this.indices.map((t=>this.pool[t])).slice(0,this.r);return new Sk.builtin.tuple(i)}this.indices.push(this.indices.splice(e,1)[0]),this.cycles[e]=this.n-e}this.r=0},slots:{tp$doc:"permutations(iterable[, r]) --\\x3e permutations object\\n\\nReturn successive r-length permutations of elements in the iterable.\\n\\npermutations(range(3), 2) --\\x3e (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)",tp$new(t,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs("permutations",["iterable","r"],t,i,[Sk.builtin.none.none$]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.builtin.checkNone(s)?n.length:Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===e.permutations.prototype)return new e.permutations(n,s);{const t=new this.constructor;return e.permutations.call(t,n,s),t}}}}),e.product=Sk.abstr.buildIteratorClass("itertools.product",{constructor:function product(t){this.pools=t,this.n=t.length,this.indices=Array(t.length).fill(0),this.pool_sizes=t.map((t=>t.length)),this.tp$iternext=()=>{this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));if(!t.some((t=>void 0===t)))return new Sk.builtin.tuple(t);this.n=0}},iternext(t){let e=this.n-1;for(;e>=0&&e=this.pool_sizes[e]?(this.indices[e]=-1,e--):e++;if(this.n&&!this.indices.every((t=>-1===t))){const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));return new Sk.builtin.tuple(t)}this.n=0},slots:{tp$doc:"product(*iterables, repeat=1) --\\x3e product object\\n\\nCartesian product of input iterables. Equivalent to nested for-loops.\\n\\nFor example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\\nThe leftmost iterators are in the outermost for-loop, so the output tuples\\ncycle in a manner similar to an odometer (with the rightmost element changing\\non every iteration).\\n\\nTo compute the product of an iterable with itself, specify the number\\nof repetitions with the optional repeat keyword argument. For example,\\nproduct(A, repeat=4) means the same as product(A, A, A, A).\\n\\nproduct(\'ab\', range(3)) --\\x3e (\'a\',0) (\'a\',1) (\'a\',2) (\'b\',0) (\'b\',1) (\'b\',2)\\nproduct((0,1), (0,1), (0,1)) --\\x3e (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...",tp$new(t,i){let[r]=Sk.abstr.copyKeywordsToNamedArgs("product",["repeat"],[],i,[new Sk.builtin.int_(1)]);if(r=Sk.misceval.asIndexSized(r,Sk.builtin.OverFlowError),r<0)throw new Sk.builtin.ValueError("repeat argument cannot be negative");const s=[];for(let e=0;ethis.object)},iternext(t){return this.times-- >0?this.object:void 0},slots:{tp$doc:"repeat(object [,times]) -> create an iterator which returns the object\\nfor the specified number of times. If not specified, returns the object\\nendlessly.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("repeat",["object","times"],t,i,[null]),s=null!==s?Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError):void 0,this===e.repeat.prototype)return new e.repeat(r,s);{const t=new this.constructor;return e.repeat.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.object),e=void 0===this.times?"":", "+(this.times>=0?this.times:0);return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}},methods:{__lenght_hint__:{$meth(){if(void 0===this.times)throw new Sk.builtin.TypeError("len() of unsized object");return new Sk.builtin.int_(this.times)},$flags:{NoArgs:!0},$textsig:null}}}),e.starmap=Sk.abstr.buildIteratorClass("itertools.starmap",{constructor:function starmap(t,e){this.func=t,this.iter=e},iternext(t){const e=this.iter.tp$iternext();if(void 0===e)return;const i=Sk.misceval.arrayFromIterable(e);return Sk.misceval.callsimArray(this.func,i)},slots:{tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("starmap",["func","iterable"],t,i,[]),s=Sk.abstr.iter(s),r=Sk.builtin.checkNone(r)?Sk.builtin.bool:r,this===e.starmap.prototype)return new e.starmap(r,s);{const t=new this.constructor;return e.starmap.call(t,r,s),t}}}}),e.takewhile=Sk.abstr.buildIteratorClass("itertools.takewhile",{constructor:function takewhile(t,e){this.predicate=t,this.iter=e},iternext(){const t=this.iter.tp$iternext();if(void 0!==t){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(Sk.misceval.isTrue(e))return t;this.tp$iternext=()=>{}}},slots:{tp$doc:"takewhile(predicate, iterable) --\\x3e takewhile object\\n\\nReturn successive entries from an iterable as long as the \\npredicate evaluates to true for each entry.",tp$new(t,i){Sk.abstr.checkNoKwargs("takewhile",i),Sk.abstr.checkArgsLen("takewhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.takewhile.prototype)return new e.takewhile(r,s);{const t=new this.constructor;return e.takewhile.call(t,r,s),t}}}}),e.tee=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("tee is not yet implemented in Skulpt")})),e.zip_longest=Sk.abstr.buildIteratorClass("itertools.zip_longest",{constructor:function zip_longest(t,e){this.iters=t,this.fillvalue=e,this.active=this.iters.length},iternext(t){if(!this.active)return;let i;const r=[];for(let s=0;s{throw new a(e+" is not yet implemented in skulpt")}))}const j=E.JSONDecodeError=N("json.JSONDecodeError",{base:l,constructor:function JSONDecodeError(e,t,n){const r=t.slice(0,n),o=r.split("\\n").length,s=n-r.lastIndexOf("\\n"),i=`${e}: line ${o} column ${s} (char ${n})`;l.call(this,i),this.$msg=e,this.$doc=t,this.$pos=n,this.$lineno=o,this.$colno=s},getsets:Object.fromEntries(["msg","doc","pos","lineno","colno"].map((e=>[e,{$get(){return g(this["$"+e])}}])))});class JSONEncoder{constructor(e,t,n,r,o,s,i,l){this.skipkeys=e,this.ensure_ascii=t,this.check_circular=n,this.allow_nan=r,this.indent=o,this.separators=s,this.sort_keys=l,this.item_separator=", ",this.key_separator=": ",null!==this.separators?[this.item_separator,this.key_separator]=this.separators:null!==this.indent&&(this.item_separator=","),null!==i&&(this.default=i),this.encoder=this.make_encoder()}default(e){throw new i(`Object of type ${y(e)} is not JSON serializable`)}encode(t){return new e(this.encoder(t))}make_encoder(){let e,t;e=this.check_circular?new Set:null,t=(this.ensure_ascii,JSON.stringify);return function _make_iterencode(e,t,n,r,s,a,u,h,d){null!==r&&"string"!=typeof r&&(r=" ".repeat(r));let f,p,g,w;null!==e?(f=t=>{if(e.has(t))throw new l("Circular reference detected");e.add(t)},p=t=>e.delete(t)):(f=e=>{},p=e=>{});null!==r?(g=(e,t)=>{t+=1;const n="\\n"+r.repeat(t);return[e+=n,t,u+n]},w=(e,t,n)=>(n-=1,e+="\\n"+r.repeat(n)+t)):(g=(e,t)=>[e,t,u],w=(e,t,n)=>e+t);const _unhandled=(e,n)=>{f(e);const r=_iterencode(t(e),n);return p(e),r},_iterencode_list=(e,t)=>{if(!e.length)return"[]";let n,r;f(e),[n,t,r]=g("[",t);let o=!0;for(let s of e)o?o=!1:n+=r,n+=_iterencode(s,t);return p(e),w(n,"]",t)},_iterencode_dict=(e,t)=>{if(!e.sq$length())return"{}";let r,l;f(e),[r,t,l]=g("{",t);let u=!0;if(h){const t=$(e.tp$getattr(v)),n=c(t);e=$(o,[n])}for(let[o,c]of e.$items()){const e=o.valueOf(),h=typeof e;if("string"===h)o=e;else if("number"===h)o=s(o);else if("boolean"===h||null===e)o=String(e);else{if(!JSBI.__isBigInt(e)){if(d)continue;throw new i("keys must be str, int, float, bool or None, not "+y(o))}o=e.toString()}u?u=!1:r+=l,r+=n(o),r+=a,r+=_iterencode(c,t)}return p(e),w(r,"}",t)},_iterencode=(e,t=0)=>String(m(e,{stringHook:e=>n(e),numberHook:(e,t)=>s(t),bigintHook:e=>e.toString(),dictHook:e=>_iterencode_dict(e,t),arrayHook:e=>_iterencode_list(e,t),setHook:e=>_unhandled(e,t),funcHook:(e,n)=>_unhandled(n,t),objecthook:(e,n)=>_unhandled(n,t),unhandledHook:e=>_unhandled(e,t)}));return _iterencode}(e,this.default,t,this.indent,((e,t=this.allow_nan)=>{const n=e.valueOf();let r;if(Number.isFinite(n))return J(e);if(r=n.toString(),!t)throw new l("Out of range float values are not JSON compliant: "+J(e));return r}),this.key_separator,this.item_separator,this.sort_keys,this.skipkeys)}}const v=new e("items");const x=[!1,!0,!0,!0,null,null,null,!1],D=new JSONEncoder(...x),F=/(-?(?:0|[1-9]\\d*))(\\.\\d+)?([eE][-+]?\\d+)?/;const I=/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"/m;function scanstring(t,n){const r=t.substring(n-1).match(I);if(null===r)throw new j("Unterminated string starting at",t,n-1);try{return[new e(JSON.parse(r[0])),n+r[0].length-1]}catch(o){let e=o.message.match(/(?:column|position) (\\d+)/);e=e&&Number(e[1]);n=n+(e||0)-(void 0===o.columnNumber?1:2);const r=o.message.replace("JSON.parse: ","").replace(/ at line \\d+ column \\d+ of the JSON data/,"").replace(/ in JSON at position \\d+$/,"");throw new j(r,t,n)}}const A=/[ \\t\\n\\r]*/;function JSONArray(e,t,r){const o=[];let s=e[t];const adjust_white_space=()=>{if(" "===s||"\\t"===s||"\\n"===s||"\\r"===s){const n=e.substring(t).match(A);t+=n[0].length,s=e[t]}};if(adjust_white_space(),"]"===s)return[new n([]),t+1];for(;;){let n;if([n,t]=r(e,t),void 0===n)throw new j("Expecting value",e,t);if(o.push(n),s=e[t],adjust_white_space(),t++,"]"===s)break;if(","!==s)throw new j("Expecting \',\' delimiter",e,t-1);s=e[t],adjust_white_space()}return[new n(o),t]}function JSONObject(e,t,s,i,l){let a=[],c=e[t];const adjust_white_space=()=>{if(" "===c||"\\t"===c||"\\n"===c||"\\r"===c){const n=e.substring(t).match(A);t+=n[0].length,c=e[t]}};if(\'"\'!==c){if(adjust_white_space(),"}"===c){if(null!==l){return[l(new n([])),t+1]}return a=new o([]),null!==i&&(a=i(a)),[a,t+1]}if(\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t)}let u,h;for(t+=1;;){if([u,t]=scanstring(e,t),":"!==(c=e[t])&&(adjust_white_space(),":"!==e[t]))throw new j("Expecting \':\' delimiter",e,t);if(c=e[++t],adjust_white_space(),[h,t]=s(e,t),void 0===h)throw new j("Expecting value",e,t);if(c=e[t],a.push([u,h]),adjust_white_space(),t++,"}"===c)break;if(","!==c)throw new j("Expecting \',\' delimiter",e,t-1);if(c=e[t],adjust_white_space(),t++,\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t-1)}if(null!==l){return[l(new n(a.map((e=>new r(e))))),t]}return a=new o(a.flat()),null!==i&&(a=i(a)),[a,t]}const H={NaN:new t(NaN),Infinity:new t(1/0),"-Infinity":new t(-1/0)};class JSONDecoder{constructor(e,t,n,r,o){this.object_hook=e,this.parse_float=t||w,this.parse_int=n||_,this.parse_constant=r||(e=>H[e]),this.object_pairs_hook=o,this.parse_object=JSONObject,this.parse_array=JSONArray,this.parse_string=scanstring,this.scan_once=function make_scanner(e){const{parse_object:t,parse_array:n,parse_string:r,parse_float:o,parse_int:s,parse_constant:i,object_hook:l,object_pairs_hook:a}=e,scan_once=(e,c)=>{const f=e[c];if(void 0===f)return[f,c];if(\'"\'===f)return r(e,c+1);if("{"===f)return t(e,c+1,scan_once,l,a);if("["===f)return n(e,c+1,scan_once);if("n"===f&&"null"===e.substring(c,c+4))return[u,c+4];if("t"===f&&"true"===e.substring(c,c+4))return[h,c+4];if("f"===f&&"false"===e.substring(c,c+5))return[d,c+5];const p=e.substring(c).match(F);if(null!==p){let e;const[t,n,r,i]=p;return e=r||i?o(n+(r||"")+(i||"")):s(n),[e,c+t.length]}return"N"===f&&"NaN"===e.substring(c,c+3)?[i("NaN"),c+3]:"I"==f&&"Infinity"===e.substring(c,c+8)?[i("Infinity"),c+8]:"-"==f&&"-Infinity"===e.substring(c,c+9)?[i("-Infinity"),c+9]:[void 0,c]};return scan_once}(this)}white(e,t){const n=(0===t?e:e.substring(t)).match(A);return null!==n&&(t+=n[0].length),t}decode(e){e=e.toString();let[t,n]=this.scan_once(e,this.white(e,0));if(void 0===t)throw new j("Expecting value",e,n);if(n=this.white(e,n),n!==e.length)throw new j("Extra data",e,n);return t}}const T=Array(5).fill(null),C=new JSONDecoder(...T);function convertToNullOrFunc(e){return null===e||e===u?null:t=>$(e,[g(t)])}return k("json",E,{loads:{$meth(e,t){O("dumps",e);let n=e[0];if(f(n));else{if(!p(n))throw new i(`the JSON object must be str or bytes, not ${y(n)}`);n=(new TextDecoder).decode(n.valueOf())}const r=S("dumps",["object_hook","parse_float","parse_int","parse_constant","object_pairs_hook"],[],t,T).map(convertToNullOrFunc);return r.every((e=>null===e))?C.decode(n):new JSONDecoder(...r).decode(n)},$doc:"Deserialize ``s`` (a ``str`` or ``bytes`` instance containing a JSON document) to a Python object.",$flags:{FastCall:!0}},dumps:{$meth(e,t){O("dumps",e);const n=e[0];let[r,o,s,l,a,c,u,h]=S("loads",["skipkeys","ensure_ascii","check_circular","allow_nan","indent","separators","default","sort_keys"],[],t,x);if(r=b(r),o=b(o),s=b(s),l=b(l),a=m(a),c=m(c),u=convertToNullOrFunc(u),h=b(h),!r&&o&&s&&l&&null===a&&null===c&&null===u&&!h)return D.encode(n);if(null===c);else if(!Array.isArray(c)||2!==c.length||"string"!=typeof c[0]||"string"!=typeof c[1])throw new i("separators shuld be a list or tuple of strings of length 2");return new JSONEncoder(r,o,s,l,a,c,u,h).encode(n)},$doc:"Serialize ``obj`` to a JSON formatted ``str``",$flags:{FastCall:!0}}}),E}',"src/lib/keyword.js":'function $builtinmodule(){const{ffi:{remapToPy:t},builtin:{frozenset:e,str:s}}=Sk,i=new s("keyword"),n=t(["iskeyword","issoftkeyword","kwlist","softkwlist"]),o=t(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]),a=t(["_","case","match"]);return{__name__:i,__all__:n,kwlist:o,softkwlist:a,iskeyword:new e(o).tp$getattr(s.$contains),issoftkeyword:new e(a).tp$getattr(s.$contains)}}',"src/lib/math.js":'const $builtinmodule=function(e){const{builtin:{str:t,int_:n,float_:i,TypeError:r,pyCheckType:u,checkNumber:l},abstr:{lookupSpecial:o},misceval:{callsimOrSuspendArray:a}}=Sk,s={pi:new Sk.builtin.float_(Math.PI),e:new Sk.builtin.float_(Math.E),tau:new Sk.builtin.float_(2*Math.PI),nan:new Sk.builtin.float_(NaN),inf:new Sk.builtin.float_(1/0)},b=new t("__ceil__");const get_sign=function(e){return e=e?e<0?-1:1:1/e<0?-1:1};const c=18;function factorial(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=Sk.builtin.asnum$(e);if((e=Math.floor(t))!=t)throw new Sk.builtin.ValueError("factorial() only accepts integral values");if(e<0)throw new Sk.builtin.ValueError("factorial() not defined for negative numbers");let n=1;for(let i=2;i<=e&&i<=c;i++)n*=i;if(e<=c)return new Sk.builtin.int_(n);n=JSBI.BigInt(n);for(let i=c+1;i<=e;i++)n=JSBI.multiply(n,JSBI.BigInt(i));return new Sk.builtin.int_(n)}const m=new t("__floor__");function _gcd_internal(e,t){let n;return"number"==typeof e&&"number"==typeof t?(n=function _gcd(e,t){return 0==t?e:_gcd(t,e%t)}(e=Math.abs(e),t=Math.abs(t)),n=n<0?-n:n):(n=function _biggcd(e,t){return JSBI.equal(t,JSBI.__ZERO)?e:_biggcd(t,JSBI.remainder(e,t))}(e=JSBI.BigInt(e),t=JSBI.BigInt(t)),JSBI.lessThan(n,JSBI.__ZERO)&&(n=JSBI.multiply(n,JSBI.BigInt(-1)))),n}return Sk.abstr.setUpModuleMethods("math",s,{acos:{$meth:function acos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.acos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc cosine (measured in radians) of x."},acosh:{$meth:function acosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e-1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic cosine of x."},asin:{$meth:function asin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.asin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc sine (measured in radians) of x."},asinh:{$meth:function asinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e+1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic sine of x."},atan:{$meth:function atan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.atan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc tangent (measured in radians) of x."},atan2:{$meth:function atan2(e,t){return Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(t)),new Sk.builtin.float_(Math.atan2(Sk.builtin.asnum$(e),Sk.builtin.asnum$(t)))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, y, x, /)",$doc:"Return the arc tangent (measured in radians) of y/x.\\n\\nUnlike atan(y/x), the signs of both x and y are considered."},atanh:{$meth:function atanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(1+(e=Sk.builtin.asnum$(e)))/(1-e);return new Sk.builtin.float_(Math.log(t)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic tangent of x."},ceil:{$meth:function ceil(e){let t;if(e.ob$type!==i){const n=o(e,b);if(void 0!==n)return a(n);u("","real number",l(e)),t=Sk.builtin.asnum$(e)}else t=e.v;return new n(Math.ceil(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the ceiling of x as an Integral.\\n\\nThis is the smallest integer >= x."},comb:{$meth:function comb(e,t){let n=Sk.misceval.asIndexOrThrow(e),i=Sk.misceval.asIndexOrThrow(t);if(n<0)throw new Sk.builtin.ValueError("n must be an non-negative integer");if(i<0)throw new Sk.builtin.ValueError("k must be a non-negative integer");if(i>e)return new Sk.builtin.int_(0);e=new Sk.builtin.int_(n),t=new Sk.builtin.int_(i);let r=Sk.ffi.remapToJs(e.nb$subtract(t));if(rNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("min(n - k, k) must not exceed "+Number.MAX_SAFE_INTEGER);const u=new Sk.builtin.int_(1);let l=e;for(let o=1;o n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative."},copysign:{$meth:function copysign(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));const n=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(e),r=get_sign(i)*get_sign(n);return new Sk.builtin.float_(i*r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return a float with the magnitude (absolute value) of x but the sign of y.\\n\\nOn platforms that support signed zeros, copysign(1.0, -0.0)\\nreturns -1.0.\\n"},cos:{$meth:function cos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.cos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the cosine of x (measured in radians)."},cosh:{$meth:function cosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n+1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic cosine of x."},degrees:{$meth:function degrees(e){Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e));const t=180/Math.PI*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from radians to degrees."},erf:{$meth:function erf(e){throw new Sk.builtin.NotImplementedError("math.erf() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Error function at x."},erfc:{$meth:function erfc(e){throw new Sk.builtin.NotImplementedError("math.erfc() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Complementary error function at x."},exp:{$meth:function exp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;if("number"!=typeof t&&(t=e.nb$float().v),t==1/0||t==-1/0||isNaN(t))return new Sk.builtin.float_(Math.exp(t));const n=Math.exp(t);if(!isFinite(n))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return e raised to the power of x."},expm1:{$meth:function expm1(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(Math.abs(t)<.7){const e=Math.exp(t);if(1==e)return new Sk.builtin.float_(t);{const n=(e-1)*t/Math.log(e);return new Sk.builtin.float_(n)}}{const e=Math.exp(t)-1;return new Sk.builtin.float_(e)}},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return exp(x)-1.\\n\\nThis function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x."},fabs:{$meth:function fabs(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;return JSBI.__isBigInt(t)&&(t=e.nb$float().v),t=Math.abs(t),new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the float x."},factorial:{$meth:factorial,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Find x!.\\n\\nRaise a ValueError if x is negative or non-integral."},floor:{$meth:function floor(e){let t;if(e.ob$type===i)t=e.v;else{const n=o(e,m);if(void 0!==n)return a(n);u("x","number",l(e)),t=Sk.builtin.asnum$(e)}return new n(Math.floor(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the floor of x as an Integral.\\n\\nThis is the largest integer <= x."},fmod:{$meth:function fmod(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),(i==1/0||i==-1/0)&&isFinite(n))return new Sk.builtin.float_(n);const r=n%i;if(isNaN(r)&&!isNaN(n)&&!isNaN(i))throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return fmod(x, y), according to platform C.\\n\\nx % y may differ."},frexp:{$meth:function frexp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e),n=[t,0];if(0!==t&&Number.isFinite(t)){const e=Math.abs(t);let i=Math.max(-1023,Math.floor(Math.log2(e))+1),r=e*Math.pow(2,-i);for(;r<.5;)r*=2,i--;for(;r>=1;)r*=.5,i++;t<0&&(r=-r),n[0]=r,n[1]=i}return n[0]=new Sk.builtin.float_(n[0]),n[1]=new Sk.builtin.int_(n[1]),new Sk.builtin.tuple(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the mantissa and exponent of x, as pair (m, e).\\n\\nm is a float and e is an int, such that x = m * 2.**e.\\nIf x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."},fsum:{$meth:function fsum(e){if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("\'"+Sk.abstr.typeName(e)+"\' object is not iterable");let t,n,i,r=[];for(let l=(e=Sk.abstr.iter(e)).tp$iternext();void 0!==l;l=e.tp$iternext()){Sk.builtin.pyCheckType("","real number",Sk.builtin.checkNumber(l)),t=0;let e=l.v;"number"!=typeof e&&(e=l.nb$float().v),l=e;for(let u=0,o=r.length;u0;){n--;let t=a;a=JSBI.signedRightShift(u,JSBI.BigInt(n));const r=JSBI.subtract(JSBI.subtract(a,t),i),s=JSBI.leftShift(o,r),b=JSBI.add(JSBI.subtract(JSBI.subtract(l,t),a),i),c=JSBI.signedRightShift(e,b);o=JSBI.add(s,JSBI.divide(c,o))}let s=o;return JSBI.greaterThan(JSBI.multiply(s,s),e)&&(s=JSBI.subtract(s,i)),JSBI.lessThanOrEqual(s,JSBI.BigInt(Number.MAX_SAFE_INTEGER))&&(s=Number(s)),new Sk.builtin.int_(s)}(t)},$flags:{OneArg:!0},$textsig:"($module, n, /)",$doc:"Return the integer part of the square root of the input."},lcm:{$meth:function lcm(...e){function abs(e){return"number"==typeof e?new Sk.builtin.int_(Math.abs(e)):JSBI.lessThan(e,JSBI.__ZERO)?new Sk.builtin.int_(JSBI.unaryMinus(e)):new Sk.builtin.int_(e)}const t=e.length;if(0===t)return new Sk.builtin.int_(1);let n;for(n=0;nNumber.MAX_SAFE_INTEGER?JSBI.BigInt(r):e}else r=JSBI.BigInt(r);"number"!=typeof r&&(i=JSBI.BigInt(i),r=JSBI.multiply(JSBI.divide(r,_gcd_internal(r,i)),i))}return abs(r)},$flags:{MinArgs:0},$textsig:"($module, *integers, /)",$doc:"Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is 0. lcm() without arguments returns 1."},ldexp:{$meth:function ldexp(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("i","integer",Sk.builtin.checkInt(t));let n=e.v;"number"!=typeof n&&(n=e.nb$float().v);const i=Sk.builtin.asnum$(t);if(n==1/0||n==-1/0||0==n||isNaN(n))return new Sk.builtin.float_(n);const r=n*Math.pow(2,i);if(!isFinite(r))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, i, /)",$doc:"Return x * (2**i).\\n\\nThis is essentially the inverse of frexp()."},lgamma:{$meth:function lgamma(e){throw new Sk.builtin.NotImplementedError("math.lgamma() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Natural logarithm of absolute value of Gamma function at x."},log:{$meth:function log(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let n,i,r=Sk.builtin.asnum$(e);if(r<=0)throw new Sk.builtin.ValueError("math domain error");if(void 0===t?n=Math.E:(Sk.builtin.pyCheckType("base","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(t)),n<=0)throw new Sk.builtin.ValueError("math domain error");if(Sk.builtin.checkFloat(e)||re)return new Sk.builtin.int_(0);if(0===t)return new Sk.builtin.int_(1);if(t>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("k must not exceed "+Number.MAX_SAFE_INTEGER);const n=new Sk.builtin.int_(1);let i=e=new Sk.builtin.int_(e);for(let r=1;r n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative.\'"},prod:{$meth:function prod(e,t){Sk.abstr.checkArgsLen("prod",e,1,1),e=Sk.abstr.copyKeywordsToNamedArgs("prod",[null,"start"],e,t,[new Sk.builtin.int_(1)]);const n=Sk.abstr.iter(e[0]);let i,r=e[1];return i=r.constructor===Sk.builtin.int_?function fastProdInt(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.int_)return e.constructor===Sk.builtin.float_?(r=r.nb$float().nb$multiply(e),new Sk.misceval.Break("float")):(r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow"));r=r.nb$multiply(e)}))}():r.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(i,(e=>"float"===e?function fastProdFloat(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.float_&&e.constructor!==Sk.builtin.int_)return r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow");r=r.nb$multiply(e)}))}():e),(e=>{if("slow"===e)return function slowProd(){return Sk.misceval.iterFor(n,(e=>{r=Sk.abstr.numberBinOp(r,e,"Mult")}))}()}),(()=>r))},$flags:{FastCall:!0},$textsig:"($module, iterable, /, *, start=1)",$doc:"Calculate the product of all the elements in the input iterable. The default start value for the product is 1.\\n\\nWhen the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types."},pow:{$meth:function pow(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),0==n&&i<0)throw new Sk.builtin.ValueError("math domain error");if(1==n)return new Sk.builtin.float_(1);if(Number.isFinite(n)&&Number.isFinite(i)&&n<0&&!Number.isInteger(i))throw new Sk.builtin.ValueError("math domain error");if(-1==n&&(i==-1/0||i==1/0))return new Sk.builtin.float_(1);const r=Math.pow(n,i);if(!Number.isFinite(n)||!Number.isFinite(i))return new Sk.builtin.float_(r);if(r==1/0||r==-1/0)throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return x**y (x to the power of y)."},radians:{$meth:function radians(e){Sk.builtin.pyCheckType("deg","number",Sk.builtin.checkNumber(e));const t=Math.PI/180*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from degrees to radians."},remainder:{$meth:function remainder(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),isFinite(n)&&isFinite(i)){let e,t,r,u,l;if(0==i)throw new Sk.builtin.ValueError("math domain error");if(e=Math.abs(n),t=Math.abs(i),u=e%t,r=t-u,ur)l=-r;else{if(u!=r)throw new Sk.builtin.AssertionError;l=u-.5*(e-u)%t*2}return new Sk.builtin.float_(get_sign(n)*l)}if(isNaN(n))return e;if(isNaN(i))return t;if(n==1/0||n==-1/0)throw new Sk.builtin.ValueError("math domain error");if(i!=1/0&&i!=-1/0)throw new Sk.builtin.AssertionError;return new Sk.builtin.float_(n)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Difference between x and the closest integer multiple of y.\\n\\nReturn x - n*y where n*y is the closest integer multiple of y.\\nIn the case where x is exactly halfway between two multiples of\\ny, the nearest even value of n is used. The result is always exact."},sin:{$meth:function sin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.sin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the sine of x (measured in radians)."},sinh:{$meth:function sinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n-1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic sine of x."},sqrt:{$meth:function sqrt(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(t<0)throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(Math.sqrt(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the square root of x."},tan:{$meth:function tan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.tan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the tangent of x (measured in radians)."},tanh:{$meth:function tanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(0===t)return new Sk.builtin.float_(t);const n=Math.E,i=Math.pow(n,t),r=1/i,u=(i-r)/2/((i+r)/2);return new Sk.builtin.float_(u)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic tangent of x."},trunc:{$meth:function trunc(e){if(e.ob$type===i)return e.nb$int();const n=o(e,t.$trunc);if(void 0===n)throw new r(`type ${e.tp$name} doesn\'t define __trunc__ method`);return a(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Truncates the Real x to the nearest Integral toward 0.\\n\\nUses the __trunc__ magic method."}}),s};',"src/lib/mixiot/__init__.js":'var $builtinmodule=function(i){var n={__name__:new Sk.builtin.str("mixiot")};n.MixIO=Sk.misceval.buildClass(n,(function(i,n){n.__init__=new Sk.builtin.func((function(i,n,e,o,t,c,f){n=Sk.ffi.remapToJs(n),e=Sk.ffi.remapToJs(e),o=Sk.ffi.remapToJs(o),t=Sk.ffi.remapToJs(t),c=Sk.ffi.remapToJs(c),f=Sk.ffi.remapToJs(f),mixio_client=new MixIO(n,e,o,t,c,f)})),n.publish=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n),t=Sk.ffi.remapToJs(e);mixio_client.publish(o,t)})),n.subscribe=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n);if(!(e instanceof Sk.builtin.func))throw new Sk.builtin.TypeError("Callback given is not a function");var t=function pythonToJavascriptFunction(i,n){return function(){var e=Array.prototype.slice.call(arguments).map((function(i){return Sk.ffi.remapToPy(i)}));return"undefined"!=typeof n&&e.unshift(n),Sk.misceval.applyAsync(void 0,i,void 0,void 0,void 0,e).catch(Sk.uncaughtException)}}(e);mixio_client.subscribeAndSetCallback(o,t)})),n.unsubscribe=new Sk.builtin.func((function(i,n){var e=Sk.ffi.remapToJs(n);mixio_client.unsubscribe(e)})),n.disconnect=new Sk.builtin.func((function(i){mixio_client.disconnect()}))}),"MixIO",[]);n.MixIO_init_by_mixly_key=Sk.misceval.buildClass(n,(function(i,n){n.__init__=new Sk.builtin.func((function(i,n,e,o,t){n=Sk.ffi.remapToJs(n),e=Sk.ffi.remapToJs(e),mixiomixlyKey=Sk.ffi.remapToJs(o),t=Sk.ffi.remapToJs(t),mixio_client=MixIO.fromMixlyKey(n,e,o,t)})),n.publish=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n),t=Sk.ffi.remapToJs(e);mixio_client.publish(o,t)})),n.subscribe=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n);if(!(e instanceof Sk.builtin.func))throw new Sk.builtin.TypeError("Callback given is not a function");var t=function pythonToJavascriptFunction(i,n){return function(){var e=Array.prototype.slice.call(arguments).map((function(i){return Sk.ffi.remapToPy(i)}));return"undefined"!=typeof n&&e.unshift(n),Sk.misceval.applyAsync(void 0,i,void 0,void 0,void 0,e).catch(Sk.uncaughtException)}}(e);mixio_client.subscribeAndSetCallback(o,t)})),n.unsubscribe=new Sk.builtin.func((function(i,n){var e=Sk.ffi.remapToJs(n);mixio_client.unsubscribe(e)})),n.disconnect=new Sk.builtin.func((function(i){mixio_client.disconnect()}))}),"MixIO_init_by_mixly_key",[]);return n.MixIO_init_by_share_key=Sk.misceval.buildClass(n,(function(i,n){n.__init__=new Sk.builtin.func((function(i,n,e,o,t){n=Sk.ffi.remapToJs(n),e=Sk.ffi.remapToJs(e),mixiomixlyKey=Sk.ffi.remapToJs(o),t=Sk.ffi.remapToJs(t),mixio_client=MixIO.fromShareKey(n,e,o,t).then((i=>{console.log(i),mixio_client_sharekey=i})).catch((i=>{console.error("Failed to create MixIO from share key: ",i),sleep(1)}))})),n.publish=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n),t=Sk.ffi.remapToJs(e);mixio_client_sharekey.publish(o,t)})),n.subscribe=new Sk.builtin.func((function(i,n,e){var o=Sk.ffi.remapToJs(n);if(!(e instanceof Sk.builtin.func))throw new Sk.builtin.TypeError("Callback given is not a function");var t=function pythonToJavascriptFunction(i,n){return function(){var e=Array.prototype.slice.call(arguments).map((function(i){return Sk.ffi.remapToPy(i)}));return"undefined"!=typeof n&&e.unshift(n),Sk.misceval.applyAsync(void 0,i,void 0,void 0,void 0,e).catch(Sk.uncaughtException)}}(e);mixio_client_sharekey.subscribeAndSetCallback(o,t)})),n.unsubscribe=new Sk.builtin.func((function(i,n){var e=Sk.ffi.remapToJs(n);mixio_client_sharekey.unsubscribe(e)})),n.disconnect=new Sk.builtin.func((function(i){mixio_client_sharekey.disconnect()}))}),"MixIO_init_by_share_key",[]),n};',"src/lib/operator.js":'function $builtinmodule(e){const{builtin:{str:t,tuple:a,list:r,int_:o,bool:n,TypeError:s,ValueError:i,none:{none$:m},NotImplemented:{NotImplemented$:d},abs:l,len:h,checkString:u,checkInt:c},abstr:{buildNativeClass:M,checkNoKwargs:b,checkArgsLen:g,checkOneArg:f,numberUnaryOp:p,numberBinOp:A,numberInplaceBinOp:k,objectGetItem:$,objectDelItem:_,objectSetItem:w,sequenceConcat:v,sequenceContains:x,sequenceGetCountOf:j,sequenceGetIndexOf:O,sequenceInPlaceConcat:I,typeName:S,lookupSpecial:y,gattr:q,setUpModuleMethods:R},misceval:{richCompareBool:B,asIndexOrThrow:N,chain:E,callsimArray:T,callsimOrSuspendArray:C,objectRepr:D},generic:{getAttr:G}}=Sk,L=["abs","add","and_","concat","contains","delitem","eq","floordiv","ge","getitem","gt","iadd","iand","iconcat","ifloordiv","ilshift","imatmul","imod","imul","index","inv","invert","ior","ipow","irshift","isub","itruediv","ixor","le","lshift","lt","matmul","mod","mul","ne","neg","not_","or_","pos","pow","rshift","setitem","sub","truediv","xor"],F=["attrgetter","countOf","indexOf","is_","is_not","itemgetter","length_hint","methodcaller","truth",...L].sort(),P={__name__:new t("operator"),__doc__:new t("Operator interface.\\n\\nThis module exports a set of functions implemented in javascript corresponding\\nto the intrinsic operators of Python. For example, operator.add(x, y)\\nis equivalent to the expression x+y. The function names are those\\nused for special methods; variants without leading and trailing\\n\'__\' are also provided for convenience."),__all__:new r(F.map((e=>new t(e))))};P.itemgetter=M("operator.itemgetter",{constructor:function itemgetter(e){this.items=e,this.oneitem=1===e.length,this.item=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new:(e,t)=>(b("itemgetter",t),g("itemgetter",e,1),new P.itemgetter(e)),tp$call(e,t){f("itemgetter",e,t);const r=e[0];return this.oneitem?$(r,this.item,!0):new a(this.items.map((e=>$(r,e))))},tp$doc:"Return a callable object that fetches the given item(s) from its operand.\\n After f = itemgetter(2), the call f(r) returns r[2].\\n After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.attrgetter=M("operator.attrgetter",{constructor:function attrgetter(e){this.attrs=e,this.oneattr=1===e.length,this.attr=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,a){b("attrgetter",a),g("attrgetter",e,1);const r=[];for(let o=0;onew t(e)))):r.push([a])}return new P.attrgetter(r)},tp$call(e,t){f("attrgetter",e,t);const r=e[0];if(this.oneattr)return this.attr.reduce(((e,t)=>q(e,t)),r);const o=this.attrs.map((e=>e.reduce(((e,t)=>q(e,t)),r)));return new a(o)},tp$doc:"attrgetter(attr, ...) --\\x3e attrgetter object\\n\\nReturn a callable object that fetches the given attribute(s) from its operand.\\nAfter f = attrgetter(\'name\'), the call f(r) returns r.name.\\nAfter g = attrgetter(\'name\', \'date\'), the call g(r) returns (r.name, r.date).\\nAfter h = attrgetter(\'name.first\', \'name.last\'), the call h(r) returns\\n(r.name.first, r.name.last).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.methodcaller=M("operator.methodcaller",{constructor:function methodcaller(e,t,a){this.$name=e,this.args=t,this.kwargs=a||[],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,t){g("methodcaller",e,1);const a=e[0];if(!u(a))throw new s("method name must be a string");return new P.methodcaller(a,e.slice(1),t)},tp$call(e,t){f("methodcaller",e,t);const a=e[0];return E(q(a,this.$name,!0),(e=>C(e,this.args,this.kwargs)))},tp$doc:"methodcaller(name, ...) --\\x3e methodcaller object\\n\\nReturn a callable object that calls the given method on its operand.\\nAfter f = methodcaller(\'name\'), the call f(r) returns r.name().\\nAfter g = methodcaller(\'name\', \'date\', foo=1), the call g(r) returns\\nr.name(\'date\', foo=1).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;let e=[D(this.$name)];e.push(...this.args.map((e=>D(e))));for(let t=0;tn(B(e,t,"Lt"))),sameAs("a < b")),le:makeModuleMethod(((e,t)=>n(B(e,t,"LtE"))),sameAs("a <= b")),eq:makeModuleMethod(((e,t)=>n(B(e,t,"Eq"))),sameAs("a == b")),ne:makeModuleMethod(((e,t)=>n(B(e,t,"NotEq"))),sameAs("a != b")),ge:makeModuleMethod(((e,t)=>n(B(e,t,"GtE"))),sameAs("a >= b")),gt:makeModuleMethod(((e,t)=>n(B(e,t,"Gt"))),sameAs("a > b")),not_:makeModuleMethod((e=>p(e,"Not")),sameAs("not a")),truth:makeModuleMethod((e=>n(e)),"Return True if a is true, False otherwise."),is_:makeModuleMethod(((e,t)=>n(B(e,t,"Is"))),sameAs("a is b")),is_not:makeModuleMethod(((e,t)=>n(B(e,t,"IsNot"))),sameAs("a is not b")),abs:makeModuleMethod((e=>l(e)),sameAs("abs(a)")),add:makeModuleMethod(((e,t)=>A(e,t,"Add")),sameAs("a + b")),and_:makeModuleMethod(((e,t)=>A(e,t,"BitAnd")),sameAs("a & b")),floordiv:makeModuleMethod(((e,t)=>A(e,t,"FloorDiv")),sameAs("a // b")),index:makeModuleMethod((e=>new o(N(e))),sameAs("a.__index__()")),inv:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),invert:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),lshift:makeModuleMethod(((e,t)=>A(e,t,"LShift")),sameAs("a << b")),mod:makeModuleMethod(((e,t)=>A(e,t,"Mod")),sameAs("a % b")),mul:makeModuleMethod(((e,t)=>A(e,t,"Mult")),sameAs("a * b")),matmul:makeModuleMethod(((e,t)=>A(e,t,"MatMult")),sameAs("a @ b")),neg:makeModuleMethod((e=>p(e,"USub")),sameAs("-a")),or_:makeModuleMethod(((e,t)=>A(e,t,"BitOr")),sameAs("a | b")),pos:makeModuleMethod((e=>p(e,"UAdd")),sameAs("+a")),pow:makeModuleMethod(((e,t)=>A(e,t,"Pow")),sameAs("a ** b")),rshift:makeModuleMethod(((e,t)=>A(e,t,"RShift")),sameAs("a >> b")),sub:makeModuleMethod(((e,t)=>A(e,t,"Sub")),sameAs("a - b")),truediv:makeModuleMethod(((e,t)=>A(e,t,"Div")),sameAs("a / b")),xor:makeModuleMethod(((e,t)=>A(e,t,"BitXor")),sameAs("a ^ b")),concat:makeModuleMethod(((e,t)=>v(e,t)),sameAs("a + b, for a and b sequences")),contains:makeModuleMethod(((e,t)=>E(x(e,t),n)),sameAs("b in a (note reversed operands)")),countOf:makeModuleMethod(((e,t)=>j(e,t)),"Return thenumber of times b occurs in a."),delitem:makeModuleMethod(((e,t)=>E(_(e,t,!0),(()=>m))),sameAs("del a[b]")),getitem:makeModuleMethod(((e,t)=>$(e,t,!0)),sameAs("a[b]")),indexOf:makeModuleMethod(((e,t)=>O(e,t)),"Return the first index of b in a"),setitem:makeModuleMethod(((e,t,a)=>E(w(e,t,a,!0),(()=>m))),sameAs("a[b] = c")),length_hint:{$meth:function length_hint(e,a){if(void 0===a)a=new o(0);else if(!c(a))throw new s("\'"+S(a)+"\' object cannot be interpreted as an integer");try{return h(e)}catch(m){if(!(m instanceof s))throw m}const r=y(e,t.$length_hint);if(void 0===r)return a;let n;try{n=T(r,[])}catch(m){if(!(m instanceof s))throw m;return a}if(n===d)return a;if(!c(n))throw new s("__length_hint__ must be an integer, not "+S(n));if(n.nb$isnegative())throw new i("__length_hint__() should return >= 0");return n},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, obj, default=0, /)",$doc:"Return an estimate of the number of items in obj.\\n\\nThis is useful for presizing containers when building from an iterable.\\n\\nIf the object supports len(), the result will be exact.\\nOtherwise, it may over- or under-estimate by an arbitrary amount.\\nThe result will be an integer >= 0."},iadd:makeModuleMethod(((e,t)=>k(e,t,"Add")),sameAs("a += b")),iand:makeModuleMethod(((e,t)=>k(e,t,"BitAnd")),sameAs("a &= b")),iconcat:makeModuleMethod(((e,t)=>I(e,t)),sameAs("a += b, for a and b sequences")),ifloordiv:makeModuleMethod(((e,t)=>k(e,t,"FloorDiv")),sameAs("a //= b")),ilshift:makeModuleMethod(((e,t)=>k(e,t,"LShift")),sameAs("a <<= b")),imod:makeModuleMethod(((e,t)=>k(e,t,"Mod")),sameAs("a %= b")),imul:makeModuleMethod(((e,t)=>k(e,t,"Mult")),sameAs("a *= b")),imatmul:makeModuleMethod(((e,t)=>k(e,t,"MatMult")),sameAs("a @= b")),ior:makeModuleMethod(((e,t)=>k(e,t,"BitOr")),sameAs("a |= b")),ipow:makeModuleMethod(((e,t)=>k(e,t,"Pow")),sameAs("a **= b")),irshift:makeModuleMethod(((e,t)=>k(e,t,"RShift")),sameAs("a >>= b")),isub:makeModuleMethod(((e,t)=>k(e,t,"Sub")),sameAs("a -= b")),itruediv:makeModuleMethod(((e,t)=>k(e,t,"Div")),sameAs("a /= b")),ixor:makeModuleMethod(((e,t)=>k(e,t,"BitXor")),sameAs("a ^= b"))}),L.forEach((e=>{P[`__${e.replace("_","")}__`]=P[e]})),P.div=P.truediv,P.__div__=P.div,P}',"src/lib/platform.js":'var $builtinmodule=function(n){var e={},i="undefined"!=typeof window&&"undefined"!=typeof window.navigator;return e.python_implementation=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("python_implementation",arguments.length,0,0),new Sk.builtin.str("Skulpt")})),e.node=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("node",arguments.length,0,0),new Sk.builtin.str("")})),e.version=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("version",arguments.length,0,0),new Sk.builtin.str("")})),e.python_version=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("python_version",arguments.length,0,0),n=Sk.__future__.python_version?"3.2.0":"2.7.0",new Sk.builtin.str(n)})),e.system=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("system",arguments.length,0,0),n=i?window.navigator.appCodeName:"",new Sk.builtin.str(n)})),e.machine=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("machine",arguments.length,0,0),n=i?window.navigator.platform:"",new Sk.builtin.str(n)})),e.release=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("release",arguments.length,0,0),n=i?window.navigator.appVersion:"",new Sk.builtin.str(n)})),e.architecture=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("architecture",arguments.length,0,0),new Sk.builtin.tuple([new Sk.builtin.str("64bit"),new Sk.builtin.str("")])})),e.processor=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("processor",arguments.length,0,0),new Sk.builtin.str("")})),e};',"src/lib/processing.js":'var $builtinmodule=function(n){var i,e,t,u,o,s,l,c={__name__:new Sk.builtin.str("processing")},r=[],v=!0,f=null;c.processing=null,c.p=null,c.X=new Sk.builtin.int_(0),c.Y=new Sk.builtin.int_(1),c.Z=new Sk.builtin.int_(2),c.R=new Sk.builtin.int_(3),c.G=new Sk.builtin.int_(4),c.B=new Sk.builtin.int_(5),c.A=new Sk.builtin.int_(6),c.U=new Sk.builtin.int_(7),c.V=new Sk.builtin.int_(8),c.NX=new Sk.builtin.int_(9),c.NY=new Sk.builtin.int_(10),c.NZ=new Sk.builtin.int_(11),c.EDGE=new Sk.builtin.int_(12),c.SR=new Sk.builtin.int_(13),c.SG=new Sk.builtin.int_(14),c.SB=new Sk.builtin.int_(15),c.SA=new Sk.builtin.int_(16),c.SW=new Sk.builtin.int_(17),c.TX=new Sk.builtin.int_(18),c.TY=new Sk.builtin.int_(19),c.TZ=new Sk.builtin.int_(20),c.VX=new Sk.builtin.int_(21),c.VY=new Sk.builtin.int_(22),c.VZ=new Sk.builtin.int_(23),c.VW=new Sk.builtin.int_(24),c.AR=new Sk.builtin.int_(25),c.AG=new Sk.builtin.int_(26),c.AB=new Sk.builtin.int_(27),c.DR=new Sk.builtin.int_(3),c.DG=new Sk.builtin.int_(4),c.DB=new Sk.builtin.int_(5),c.DA=new Sk.builtin.int_(6),c.SPR=new Sk.builtin.int_(28),c.SPG=new Sk.builtin.int_(29),c.SPB=new Sk.builtin.int_(30),c.SHINE=new Sk.builtin.int_(31),c.ER=new Sk.builtin.int_(32),c.EG=new Sk.builtin.int_(33),c.EB=new Sk.builtin.int_(34),c.BEEN_LIT=new Sk.builtin.int_(35),c.VERTEX_FIELD_COUNT=new Sk.builtin.int_(36),c.CENTER=new Sk.builtin.int_(3),c.RADIUS=new Sk.builtin.int_(2),c.CORNERS=new Sk.builtin.int_(1),c.CORNER=new Sk.builtin.int_(0),c.DIAMETER=new Sk.builtin.int_(3),c.BASELINE=new Sk.builtin.int_(0),c.TOP=new Sk.builtin.int_(101),c.BOTTOM=new Sk.builtin.int_(102),c.NORMAL=new Sk.builtin.int_(1),c.NORMALIZED=new Sk.builtin.int_(1),c.IMAGE=new Sk.builtin.int_(2),c.MODEL=new Sk.builtin.int_(4),c.SHAPE=new Sk.builtin.int_(5),c.AMBIENT=new Sk.builtin.int_(0),c.DIRECTIONAL=new Sk.builtin.int_(1),c.SPOT=new Sk.builtin.int_(3),c.RGB=new Sk.builtin.int_(1),c.ARGB=new Sk.builtin.int_(2),c.HSB=new Sk.builtin.int_(3),c.ALPHA=new Sk.builtin.int_(4),c.CMYK=new Sk.builtin.int_(5),c.TIFF=new Sk.builtin.int_(0),c.TARGA=new Sk.builtin.int_(1),c.JPEG=new Sk.builtin.int_(2),c.GIF=new Sk.builtin.int_(3),c.MITER=new Sk.builtin.str("miter"),c.BEVEL=new Sk.builtin.str("bevel"),c.ROUND=new Sk.builtin.str("round"),c.SQUARE=new Sk.builtin.str("butt"),c.PROJECT=new Sk.builtin.str("square"),c.P2D=new Sk.builtin.int_(1),c.JAVA2D=new Sk.builtin.int_(1),c.WEBGL=new Sk.builtin.int_(2),c.P3D=new Sk.builtin.int_(2),c.OPENGL=new Sk.builtin.int_(2),c.PDF=new Sk.builtin.int_(0),c.DXF=new Sk.builtin.int_(0),c.OTHER=new Sk.builtin.int_(0),c.WINDOWS=new Sk.builtin.int_(1),c.MAXOSX=new Sk.builtin.int_(2),c.LINUX=new Sk.builtin.int_(3),c.EPSILON=new Sk.builtin.float_(1e-4),c.MAX_FLOAT=new Sk.builtin.float_(34028235e31),c.MIN_FLOAT=new Sk.builtin.float_(-34028235e31),c.MAX_INT=new Sk.builtin.int_(2147483647),c.MIN_INT=new Sk.builtin.int_(-2147483648),c.HALF_PI=new Sk.builtin.float_(Math.PI/2),c.THIRD_PI=new Sk.builtin.float_(Math.PI/3),c.PI=new Sk.builtin.float_(Math.PI),c.TWO_PI=new Sk.builtin.float_(2*Math.PI),c.TAU=new Sk.builtin.float_(2*Math.PI),c.QUARTER_PI=new Sk.builtin.float_(Math.PI/4),c.DEG_TO_RAD=new Sk.builtin.float_(Math.PI/180),c.RAD_TO_DEG=new Sk.builtin.float_(180/Math.PI),c.WHITESPACE=new Sk.builtin.str(" \\t\\n\\r\\f "),c.POINT=new Sk.builtin.int_(2),c.POINTS=new Sk.builtin.int_(2),c.LINE=new Sk.builtin.int_(4),c.LINES=new Sk.builtin.int_(4),c.TRIANGLE=new Sk.builtin.int_(8),c.TRIANGLES=new Sk.builtin.int_(9),c.TRIANGLE_FAN=new Sk.builtin.int_(11),c.TRIANGLE_STRIP=new Sk.builtin.int_(10),c.QUAD=new Sk.builtin.int_(16),c.QUADS=new Sk.builtin.int_(16),c.QUAD_STRIP=new Sk.builtin.int_(17),c.POLYGON=new Sk.builtin.int_(20),c.PATH=new Sk.builtin.int_(21),c.RECT=new Sk.builtin.int_(30),c.ELLIPSE=new Sk.builtin.int_(31),c.ARC=new Sk.builtin.int_(32),c.SPHERE=new Sk.builtin.int_(40),c.BOX=new Sk.builtin.int_(41),c.GROUP=new Sk.builtin.int_(0),c.PRIMITIVE=new Sk.builtin.int_(1),c.GEOMETRY=new Sk.builtin.int_(3),c.VERTEX=new Sk.builtin.int_(0),c.BEZIER_VERTEX=new Sk.builtin.int_(1),c.CURVE_VERTEX=new Sk.builtin.int_(2),c.BREAK=new Sk.builtin.int_(3),c.CLOSESHAPE=new Sk.builtin.int_(4),c.REPLACE=new Sk.builtin.int_(0),c.BLEND=new Sk.builtin.int_(1),c.ADD=new Sk.builtin.int_(2),c.SUBTRACT=new Sk.builtin.int_(4),c.LIGHTEST=new Sk.builtin.int_(8),c.DARKEST=new Sk.builtin.int_(16),c.DIFFERENCE=new Sk.builtin.int_(32),c.EXCLUSION=new Sk.builtin.int_(64),c.MULTIPLY=new Sk.builtin.int_(128),c.SCREEN=new Sk.builtin.int_(256),c.OVERLAY=new Sk.builtin.int_(512),c.HARD_LIGHT=new Sk.builtin.int_(1024),c.SOFT_LIGHT=new Sk.builtin.int_(2048),c.DODGE=new Sk.builtin.int_(4096),c.BURN=new Sk.builtin.int_(8192),c.ALPHA_MASK=new Sk.builtin.int_(4278190080),c.RED_MASK=new Sk.builtin.int_(16711680),c.GREEN_MASK=new Sk.builtin.int_(65280),c.BLUE_MASK=new Sk.builtin.int_(255),c.CUSTOM=new Sk.builtin.int_(0),c.ORTHOGRAPHIC=new Sk.builtin.int_(2),c.PERSPECTIVE=new Sk.builtin.int_(3),c.ARROW=new Sk.builtin.str("default"),c.CROSS=new Sk.builtin.str("crosshair"),c.HAND=new Sk.builtin.str("pointer"),c.MOVE=new Sk.builtin.str("move"),c.TEXT=new Sk.builtin.str("text"),c.WAIT=new Sk.builtin.str("wait"),c.NOCURSOR=Sk.builtin.assk$("url(\'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\'), auto"),c.DISABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(1),c.ENABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(-1),c.ENABLE_OPENGL_4X_SMOOTH=new Sk.builtin.int_(2),c.ENABLE_NATIVE_FONTS=new Sk.builtin.int_(3),c.DISABLE_DEPTH_TEST=new Sk.builtin.int_(4),c.ENABLE_DEPTH_TEST=new Sk.builtin.int_(-4),c.ENABLE_DEPTH_SORT=new Sk.builtin.int_(5),c.DISABLE_DEPTH_SORT=new Sk.builtin.int_(-5),c.DISABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(6),c.ENABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(-6),c.ENABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(7),c.DISABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(-7),c.HINT_COUNT=new Sk.builtin.int_(10),c.OPEN=new Sk.builtin.int_(1),c.CLOSE=new Sk.builtin.int_(2),c.BLUR=new Sk.builtin.int_(11),c.GRAY=new Sk.builtin.int_(12),c.INVERT=new Sk.builtin.int_(13),c.OPAQUE=new Sk.builtin.int_(14),c.POSTERIZE=new Sk.builtin.int_(15),c.THRESHOLD=new Sk.builtin.int_(16),c.ERODE=new Sk.builtin.int_(17),c.DILATE=new Sk.builtin.int_(18),c.BACKSPACE=new Sk.builtin.int_(8),c.TAB=new Sk.builtin.int_(9),c.ENTER=new Sk.builtin.int_(10),c.RETURN=new Sk.builtin.int_(13),c.ESC=new Sk.builtin.int_(27),c.DELETE=new Sk.builtin.int_(127),c.CODED=new Sk.builtin.int_(65535),c.SHIFT=new Sk.builtin.int_(16),c.CONTROL=new Sk.builtin.int_(17),c.ALT=new Sk.builtin.int_(18),c.CAPSLK=new Sk.builtin.int_(20),c.PGUP=new Sk.builtin.int_(33),c.PGDN=new Sk.builtin.int_(34),c.END=new Sk.builtin.int_(35),c.HOME=new Sk.builtin.int_(36),c.LEFT=new Sk.builtin.int_(37),c.UP=new Sk.builtin.int_(38),c.RIGHT=new Sk.builtin.int_(39),c.DOWN=new Sk.builtin.int_(40),c.F1=new Sk.builtin.int_(112),c.F2=new Sk.builtin.int_(113),c.F3=new Sk.builtin.int_(114),c.F4=new Sk.builtin.int_(115),c.F5=new Sk.builtin.int_(116),c.F6=new Sk.builtin.int_(117),c.F7=new Sk.builtin.int_(118),c.F8=new Sk.builtin.int_(119),c.F9=new Sk.builtin.int_(120),c.F10=new Sk.builtin.int_(121),c.F11=new Sk.builtin.int_(122),c.F12=new Sk.builtin.int_(123),c.NUMLK=new Sk.builtin.int_(144),c.META=new Sk.builtin.int_(157),c.INSERT=new Sk.builtin.int_(155),c.SINCOS_LENGTH=new Sk.builtin.int_(720),c.PRECISIONB=new Sk.builtin.int_(15),c.PRECISIONF=new Sk.builtin.int_(32768),c.PREC_MAXVAL=new Sk.builtin.int_(32767),c.PREC_ALPHA_SHIFT=new Sk.builtin.int_(9),c.PREC_RED_SHIFT=new Sk.builtin.int_(1),c.NORMAL_MODE_AUTO=new Sk.builtin.int_(0),c.NORMAL_MODE_SHAPE=new Sk.builtin.int_(1),c.NORMAL_MODE_VERTEX=new Sk.builtin.int_(2),c.MAX_LIGHTS=new Sk.builtin.int_(8),c.line=new Sk.builtin.func((function(n,i,e,t){c.processing.line(n.v,i.v,e.v,t.v)})),c.ellipse=new Sk.builtin.func((function(n,i,e,t){c.processing.ellipse(n.v,i.v,e.v,t.v)})),c.circle=new Sk.builtin.func((function(n,i,e){c.processing.ellipse(n.v,i.v,e.v,e.v)})),c.text=new Sk.builtin.func((function(n,i,e){c.processing.text(n.v,i.v,e.v)})),c.point=new Sk.builtin.func((function(n,i){c.processing.point(n.v,i.v)})),c.arc=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.arc(n.v,i.v,e.v,t.v,u.v,o.v)})),c.quad=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.quad(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.rect=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof u?c.processing.rect(n.v,i.v,e.v,t.v):c.processing.rect(n.v,i.v,e.v,t.v,u.v)})),c.triangle=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.triangle(n.v,i.v,e.v,t.v,u.v,o.v)})),c.bezier=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.alpha=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.alpha(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.alpha(n.v,i.v)):new Sk.builtin.float_(c.processing.alpha(n.v,i.v,e.v))})),c.ambient=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.ambient(n.v):"undefined"==typeof e?c.processing.ambient(n.v,i.v):c.processing.ambient(n.v,i.v,e.v)})),c.ambientLight=new Sk.builtin.func((function(n,i,e,t,u,o){"undefined"==typeof t?c.processing.ambientLight(n.v,i.v,e.v):"undefined"==typeof u?c.processing.ambientLight(n.v,i.v,e.v,t.v):"undefined"==typeof o?c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v):c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.beginCamera=new Sk.builtin.func((function(){c.processing.beginCamera()})),c.beginShape=new Sk.builtin.func((function(n){"undefined"==typeof n&&(n=c.POLYGON),c.processing.beginShape(n.v)})),c.bezierDetail=new Sk.builtin.func((function(n){n="undefined"!=typeof n?n.v:20,c.processing.bezierDetail(n)})),c.bezierPoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierPoint(n.v,i.v,e.v,t.v,u.v)})),c.bezierTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierTangent(n.v,i.v,e.v,t.v,u.v)})),c.bezierVertex=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof s?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v):"undefined"==typeof l?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v):"undefined"==typeof r?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.blend=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v)})),c.blendColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.blendColor(n.v,i.v,e.v),t})),c.brightness=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.brightness(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.brightness(n.v,i.v)):new Sk.builtin.float_(c.processing.brightness(n.v,i.v,e.v))})),c.camera=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof n?c.processing.camera():c.processing.camera(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.constrain=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.constrain(n.v,i.v,e.v))})),c.copy=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.createFont=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PFont);return u.v="undefined"==typeof e?c.processing.createFont(n.v,i.v):"undefined"==typeof t?c.processing.createFont(n.v,i.v,e.v):c.processing.createFont(n.v,i.v,e.v,t.v),u})),c.createGraphics=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PGraphics);return u.v="undefined"==typeof t?c.processing.createGraphics(n.v,i.v,e.v):c.processing.createGraphics(n.v,i.v,e.v,t.v),u})),c.createImage=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.PImage);return t.v=c.processing.createImage(n.v,i.v,e.v),t})),c.cursor=new Sk.builtin.func((function(n,i,e){"undefined"==typeof n?c.processing.cursor():"undefined"==typeof i?c.processing.cursor(n.v):"undefined"==typeof e?c.processing.cursor(n.v,i.v):c.processing.cursor(n.v,i.v,e.v)})),c.curve=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):"undefined"==typeof v?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):"undefined"==typeof f?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v):"undefined"==typeof S?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v):c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.curveDetail=new Sk.builtin.func((function(n){c.processing.curveDetail(n.v)})),c.curvePoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curvePoint(n.v,i.v,e.v,t.v,u.v)})),c.curveTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curveTangent(n.v,i.v,e.v,t.v,u.v)})),c.curveTightness=new Sk.builtin.func((function(n){c.processing.curveTightness(n.v)})),c.curveVertex=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e?c.processing.curveVertex(n.v,i.v):c.processing.curveVertex(n.v,i.v,e.v)})),c.day=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.day())})),c.degrees=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.degrees(n.v))})),c.directionalLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.directionalLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.dist=new Sk.builtin.func((function(n,i,e,t,u,o){return"undefined"==typeof u?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v)):"undefined"==typeof o?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v)):new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v,o.v))})),c.emissive=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.emissive(n.v):"undefined"==typeof e?c.processing.emissive(n.v,i.v):c.processing.emissive(n.v,i.v,e.v)})),c.endCamera=new Sk.builtin.func((function(){c.processing.endCamera()})),c.endShape=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.endShape():c.processing.endShape(n.v)})),c.filter=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.filter(n.v):c.processing.filter(n.v,i.v)})),c.frustum=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.frustum(n,i,e,t,u,o)})),c.hint=new Sk.builtin.func((function(n){c.processing.hint(n)})),c.hour=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.hour())})),c.hue=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.hue(n.v))})),c.imageMode=new Sk.builtin.func((function(n){c.processing.imageMode(n.v)})),c.lerp=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.lerp(n.v,i.v,e.v))})),c.lerpColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.lerpColor(n.v,i.v,e.v),t})),c.lightFalloff=new Sk.builtin.func((function(n,i,e){c.processing.lightFalloff(n.v,i.v,e.v)})),c.lights=new Sk.builtin.func((function(){c.processing.lights()})),c.lightSpecular=new Sk.builtin.func((function(n,i,e){c.processing.lightSpecular(n.v,i.v,e.v)})),c.loadBytes=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadBytes(n.v))})),c.loadFont=new Sk.builtin.func((function(n){var i=Sk.misceval.callsimArray(c.PFont);return i.v=c.processing.loadFont(n.v),i})),c.loadShape=new Sk.builtin.func((function(n){return Sk.misceval.callsimArray(c.PShapeSVG,[new Sk.builtin.str("string"),n])})),c.loadStrings=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadStrings(n.v))})),c.mag=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof e?new Sk.builtin.float_(c.processing.mag(n.v,i.v)):new Sk.builtin.float_(c.processing.mag(n.v,i.v,e.v))})),c.map=new Sk.builtin.func((function(n,i,e,t,u){return new Sk.builtin.float_(c.processing.map(n.v,i.v,e.v,t.v,u.v))})),c.millis=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.millis())})),c.minute=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.minute())})),c.modelX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelX(n.v,i.v,e.v))})),c.modelY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelY(n.v,i.v,e.v))})),c.modelZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelZ(n.v,i.v,e.v))})),c.month=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.month())})),c.noCursor=new Sk.builtin.func((function(){c.processing.noCursor()})),c.noise=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.noise(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.noise(n.v,i.v)):new Sk.builtin.float_(c.processing.noise(n.v,i.v,e.v))})),c.noiseDetail=new Sk.builtin.func((function(n,i){c.processing.noiseDetail(n.v,i.v)})),c.noiseSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.noiseSeed(n.v))})),c.noLights=new Sk.builtin.func((function(){c.processing.noLights()})),c.norm=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.norm(n.v,i.v,e.v))})),c.normal=new Sk.builtin.func((function(n,i,e){c.processing.normal(n.v,i.v,e.v)})),c.noTint=new Sk.builtin.func((function(){c.processing.noTint()})),c.ortho=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.ortho(n.v,i.v,e.v,t.v,u.v,o.v)})),c.perspective=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof n?c.processing.perspective():"undefined"==typeof i?c.processing.perspective(n.v):"undefined"==typeof e?c.processing.perspective(n.v,i.v):"undefined"==typeof t?c.processing.perspective(n.v,i.v,e.v):c.processing.perspective(n.v,i.v,e.v,t.v)})),c.pointLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.pointLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.printCamera=new Sk.builtin.func((function(){c.processing.printCamera()})),c.println=new Sk.builtin.func((function(n){c.processing.println(n.v)})),c.printProjection=new Sk.builtin.func((function(){c.processing.printProjection()})),c.radians=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.radians(n.v))})),c.randomSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.randomSeed(n.v))})),c.random=new Sk.builtin.func((function(n,i){return"undefined"==typeof n?new Sk.builtin.float_(c.processing.random()):"undefined"==typeof i?new Sk.builtin.float_(c.processing.random(n.v)):new Sk.builtin.float_(c.processing.random(n.v,i.v))})),c.requestImage=new Sk.builtin.func((function(n,i){var e=Sk.misceval.callsimArray(c.PImage);return e.v="undefined"==typeof i?c.processing.requestImage(n.v):c.processing.requestImage(n.v,i.v),e})),c.saturation=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.saturation(n.v))})),c.save=new Sk.builtin.func((function(n){c.processing.save(n.v)})),c.saveFrame=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.saveFrame():c.processing.saveFrame(n.v)})),c.saveStrings=new Sk.builtin.func((function(n,i){c.processing.saveStrings(n.v,i.v)})),c.screenX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenX(n.v,i.v,e.v))})),c.screenY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenY(n.v,i.v,e.v))})),c.screenZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenZ(n.v,i.v,e.v))})),c.second=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.second())})),c.shape=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof i?c.processing.shape(n.v):"undefined"==typeof e?c.processing.shape(n.v,i.v):"undefined"==typeof t?c.processing.shape(n.v,i.v,e.v):"undefined"==typeof u?c.processing.shape(n.v,i.v,e.v,t.v):c.processing.shape(n.v,i.v,e.v,t.v,u.v)})),c.shapeMode=new Sk.builtin.func((function(n){c.processing.shapeMode(n.v)})),c.shininess=new Sk.builtin.func((function(n){c.processing.shininess(n.v)})),c.specular=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.specular(n.v):"undefined"==typeof e?c.processing.specular(n.v,i.v):c.processing.specular(n.v,i.v,e.v)})),c.spotLight=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.spotLight(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.sq=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.sq(n))})),c.status=new Sk.builtin.func((function(n){c.processing.status(n.v)})),c.textAlign=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textAlign(n.v):c.processing.textAlign(n.v,i.v)})),c.textAscent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textAscent())})),c.textDescent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textDescent())})),c.textFont=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textFont(n.v):c.processing.textFont(n.v,i.v)})),c.textLeading=new Sk.builtin.func((function(n){c.processing.textLeading(n.v)})),c.textMode=new Sk.builtin.func((function(n){c.processing.textMode(n.v)})),c.textSize=new Sk.builtin.func((function(n){c.processing.textSize(n.v)})),c.texture=new Sk.builtin.func((function(n){c.processing.texture(n.v)})),c.textureMode=new Sk.builtin.func((function(n){c.processing.textureMode(n.v)})),c.textWidth=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.textWidth(n.v))})),c.tint=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof i?c.processing.tint(n.v):"undefined"==typeof e?c.processing.tint(n.v,i.v):"undefined"==typeof t?c.processing.tint(n.v,i.v,e.v):c.processing.tint(n.v,i.v,e.v,t.v)})),c.updatePixels=new Sk.builtin.func((function(){c.processing.updatePixels()})),c.vertex=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof e?c.processing.vertex(n.v,i.v):"undefined"==typeof t?c.processing.vertex(n.v,i.v,e.v):"undefined"==typeof u?c.processing.vertex(n.v,i.v,e.v,t.v):c.processing.vertex(n.v,i.v,e.v,t.v,u.v)})),c.year=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.year())})),c.box=new Sk.builtin.func((function(n){c.processing.box(n.v)})),c.sphere=new Sk.builtin.func((function(n){c.processing.sphere(n.v)})),c.sphereDetail=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.sphereDetail(n.v):c.processing.sphereDetail(n.v,i.v)})),c.background=new Sk.builtin.func((function(n,i,e){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),c.processing.background(n.v,i,e)})),c.fill=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.fill(n.v,i,e,t)})),c.stroke=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.stroke(n.v,i,e,t)})),c.noStroke=new Sk.builtin.func((function(){c.processing.noStroke()})),c.colorMode=new Sk.builtin.func((function(n,i,e,t,u){i="undefined"==typeof i?255:i.v,"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),"undefined"!=typeof u&&(u=u.v),c.processing.colorMode(n.v,i,e,t,u)})),c.noFill=new Sk.builtin.func((function(){c.processing.noFill()})),c.loop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("loop() should be called after run()");v=!0,c.processing.loop()})),c.noLoop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("noLoop() should be called after run()");v=!1,c.processing.noLoop()})),c.frameRate=new Sk.builtin.func((function(n){c.processing.frameRate(n.v)})),c.width=new Sk.builtin.int_(0),c.height=new Sk.builtin.int_(0),c.renderMode=c.P2D,c.size=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e&&(e=c.P2D),c.processing.size(n.v,i.v,e.v),c.width=new Sk.builtin.int_(c.processing.width),c.height=new Sk.builtin.int_(c.processing.height),c.renderMode=e})),c.exitp=new Sk.builtin.func((function(){c.processing.exit()})),c.mouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseX)})),c.mouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseY)})),c.pmouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseX)})),c.pmouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseY)})),c.rectMode=new Sk.builtin.func((function(n){c.processing.rectMode(n.v)})),c.strokeWeight=new Sk.builtin.func((function(n){c.processing.strokeWeight(n.v)})),c.smooth=new Sk.builtin.func((function(){c.processing.smooth()})),c.noSmooth=new Sk.builtin.func((function(){c.processing.noSmooth()})),c.ellipseMode=new Sk.builtin.func((function(n){c.processing.ellipseMode(n.v)})),c.strokeCap=new Sk.builtin.func((function(n){c.processing.strokeCap(n.v)})),c.strokeJoin=new Sk.builtin.func((function(n){c.processing.strokeJoin(n.v)})),c.rotate=new Sk.builtin.func((function(n){c.processing.rotate(n.v)})),c.rotateX=new Sk.builtin.func((function(n){c.processing.rotateX(n.v)})),c.rotateY=new Sk.builtin.func((function(n){c.processing.rotateY(n.v)})),c.rotateZ=new Sk.builtin.func((function(n){c.processing.rotateZ(n.v)})),c.scale=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.scale(n.v,i,e)})),c.translate=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.translate(n.v,i,e)})),c.popMatrix=new Sk.builtin.func((function(){c.processing.popMatrix()})),c.pushMatrix=new Sk.builtin.func((function(){c.processing.pushMatrix()})),c.applyMatrix=new Sk.builtin.func((function(){var n,i=Array.prototype.slice.call(arguments,0,16);for(n=0;n>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&n)>>>16)<<16)+1812433253*(65535&n)+this.mti,this.mt[this.mti]>>>=0},MersenneTwister.prototype.init_by_array=function(n,t){var i,e,r;for(this.init_genrand(19650218),i=1,e=0,r=this.N>t?this.N:t;r;r--){var u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1664525*((4294901760&u)>>>16)<<16)+1664525*(65535&u))+n[e]+e,this.mt[i]>>>=0,e++,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),e>=t&&(e=0)}for(r=this.N-1;r;r--){u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1566083941*((4294901760&u)>>>16)<<16)+1566083941*(65535&u))-i,this.mt[i]>>>=0,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},MersenneTwister.prototype.genrand_int32=function(){var n,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&n];for(;i>>1^t[1&n];n=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^n>>>1^t[1&n],this.mti=0}return n=this.mt[this.mti++],n^=n>>>11,n^=n<<7&2636928640,n^=n<<15&4022730752,(n^=n>>>18)>>>0},MersenneTwister.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},MersenneTwister.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},MersenneTwister.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},MersenneTwister.prototype.genrand_res53=function(){return(67108864*(this.genrand_int32()>>>5)+(this.genrand_int32()>>>6))*(1/9007199254740992)};var $builtinmodule=function(n){var t={},i=new MersenneTwister,e=void 0;t.seed=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("seed",arguments.length,0,1),n=Sk.builtin.asnum$(n),i=arguments.length>0?new MersenneTwister(n):new MersenneTwister,Sk.builtin.none.none$})),t.random=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("random",arguments.length,0,0),new Sk.builtin.float_(i.genrand_res53())}));var toInt=function(n){return 0|n},randrange=function(n,t,e){var r,u,s;if(!Sk.builtin.checkInt(n))throw new Sk.builtin.ValueError("non-integer first argument for randrange()");if(void 0===t)return s=toInt(i.genrand_res53()*n),new Sk.builtin.int_(s);if(!Sk.builtin.checkInt(t))throw new Sk.builtin.ValueError("non-integer stop for randrange()");if(void 0===e&&(e=1),r=t-n,1==e&&r>0)return s=n+toInt(i.genrand_res53()*r),new Sk.builtin.int_(s);if(1==e)throw new Sk.builtin.ValueError("empty range for randrange() ("+n+", "+t+", "+r+")");if(!Sk.builtin.checkInt(e))throw new Sk.builtin.ValueError("non-integer step for randrange()");if(e>0)u=toInt((r+e-1)/e);else{if(!(e<0))throw new Sk.builtin.ValueError("zero step for randrange()");u=toInt((r+e+1)/e)}if(u<=0)throw new Sk.builtin.ValueError("empty range for randrange()");return s=n+e*toInt(i.genrand_res53()*u),new Sk.builtin.int_(s)};t.randint=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("randint",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),randrange(n,t+1)})),t.randrange=new Sk.builtin.func((function(n,t,i){return Sk.builtin.pyCheckArgsLen("randrange",arguments.length,1,3),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),randrange(n,t,i)})),t.uniform=new Sk.builtin.func((function(n,t){Sk.builtin.pyCheckArgsLen("uniform",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t);const e=n+i.genrand_res53()*(t-n);return new Sk.builtin.float_(e)})),t.triangular=new Sk.builtin.func((function(n,t,e){var r,u,s;return Sk.builtin.pyCheckArgsLen("triangular",arguments.length,2,3),Sk.builtin.pyCheckType("low","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("high","number",Sk.builtin.checkNumber(t)),(n=Sk.builtin.asnum$(n))>(t=Sk.builtin.asnum$(t))&&(s=n,n=t,t=s),void 0===e||e===Sk.builtin.none.none$?e=(t-n)/2:(Sk.builtin.pyCheckType("mode","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e)),u=(r=i.genrand_res53())<(e-n)/(t-n)?n+Math.sqrt(r*(t-n)*(e-n)):t-Math.sqrt((1-r)*(t-n)*(t-e)),new Sk.builtin.float_(u)}));var normalSample=function(n,t){var r,u,s,h,l;return void 0!==e?(l=e,e=void 0):(r=i.genrand_res53(),u=i.genrand_res53(),s=Math.sqrt(-2*Math.log(r)),h=2*Math.PI*u,l=s*Math.cos(h),e=s*Math.sin(h)),n+t*l};return t.gauss=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("gauss",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(normalSample(n,t))})),t.normalvariate=t.gauss,t.lognormvariate=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("lognormvariate",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(Math.exp(normalSample(n,t)))})),t.expovariate=new Sk.builtin.func((function(n){Sk.builtin.pyCheckArgsLen("expovariate",arguments.length,1,1),Sk.builtin.pyCheckType("lambd","number",Sk.builtin.checkNumber(n)),n=Sk.builtin.asnum$(n);var t=i.genrand_res53();return new Sk.builtin.float_(-Math.log(t)/n)})),t.choice=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("choice",arguments.length,1,1),Sk.builtin.pyCheckType("seq","sequence",Sk.builtin.checkSequence(n)),void 0!==n.sq$length){var t=new Sk.builtin.int_(toInt(i.genrand_res53()*n.sq$length()));return n.mp$subscript(t)}throw new Sk.builtin.TypeError("object has no length")})),t.shuffle=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("shuffle",arguments.length,1,1),Sk.builtin.pyCheckType("x","sequence",Sk.builtin.checkSequence(n)),n.constructor===Sk.builtin.list){const u=n.v;for(var t=u.length-1;t>0;t-=1){var e=u[r=toInt(i.genrand_res53()*(t+1))];u[r]=u[t],u[t]=e}}else{if(void 0===n.sq$length)throw new Sk.builtin.TypeError("object has no length");if(void 0===n.mp$ass_subscript)throw new Sk.builtin.TypeError("object is immutable");for(t=n.sq$length()-1;t>0;t-=1){var r=new Sk.builtin.int_(toInt(i.genrand_res53()*(t+1)));t=new Sk.builtin.int_(t);e=n.mp$subscript(r);n.mp$ass_subscript(r,n.mp$subscript(t)),n.mp$ass_subscript(t,e)}}return Sk.builtin.none.none$})),t.sample=new Sk.builtin.func((function(n,t){var e,r,u,s,h;for(Sk.builtin.pyCheckArgsLen("sample",arguments.length,2,2),Sk.builtin.pyCheckType("population","iterable",Sk.builtin.checkIterable(n)),Sk.builtin.pyCheckType("k","integer",Sk.builtin.checkInt(t)),t=Sk.builtin.asnum$(t),h=[],e=0,s=(u=Sk.abstr.iter(n)).tp$iternext();void 0!==s;e++,s=u.tp$iternext())r=Math.floor(i.genrand_res53()*(e+1)),enew pyStr(e))))},_value2member={},RegexFlagMeta=buildNativeClass("RegexFlagMeta",{constructor:function RegexFlagMeta(){},base:pyType,slots:{tp$iter(){const e=Object.values(_members)[Symbol.iterator]();return new pyIterator((()=>e.next().value))},sq$contains(e){if(!(e instanceof this))throw new TypeError("unsupported operand type(s) for \'in\': \'"+typeName(e)+"\' and \'"+typeName(this)+"\'");return Object.values(_members).includes(e)}}});re.RegexFlag=buildNativeClass("RegexFlag",{meta:RegexFlagMeta,base:pyInt,constructor:function RegexFlag(e){const t=_value2member[e];if(t)return t;this.v=e,_value2member[e]=this},slots:{tp$new(e,t){checkOneArg("RegexFlag",e,t);const r=e[0].valueOf();if(!checkInt(r))throw new ValueError(objectRepr(r)+" is not a valid RegexFlag");return new re.RegexFlag(r)},$r(){let e=this.valueOf();const t=e<0;e=t?~e:e;const r=[];Object.entries(_members).forEach((([t,n])=>{const s=n.valueOf();e&s&&(e&=~s,r.push("re."+t))})),e&&r.push(hex(e).toString());let n=r.join("|");return t&&(n=r.length>1?"~("+n+")":"~"+n),new pyStr(n)},sq$contains(e){if(!(e instanceof re.RegexFlag))throw new TypeError("\'in\' requires a RegexFlag not "+typeName(e));return this.nb$and(e)===e},nb$and:flagBitSlot(((e,t)=>e&t),JSBI.bitwiseAnd),nb$or:flagBitSlot(((e,t)=>e|t),JSBI.bitwiseOr),nb$xor:flagBitSlot(((e,t)=>e^t),JSBI.bitwiseXor),nb$invert:function(){const e=this.v;return"number"==typeof e?new re.RegexFlag(~e):new re.RegexFlag(JSBI.bitwiseNot(e))}},proto:{valueOf(){return this.v}},flags:{sk$acceptable_as_base_class:!1}}),re.TEMPLATE=re.T=new re.RegexFlag(1),re.IGNORECASE=re.I=new re.RegexFlag(2),re.LOCALE=re.L=new re.RegexFlag(4),re.MULTILINE=re.M=new re.RegexFlag(8),re.DOTALL=re.S=new re.RegexFlag(16),re.UNICODE=re.U=new re.RegexFlag(32),re.VERBOSE=re.X=new re.RegexFlag(64),re.DEBUG=new re.RegexFlag(128),re.ASCII=re.A=new re.RegexFlag(256);const _members={ASCII:re.A,IGNORECASE:re.I,LOCALE:re.L,UNICODE:re.U,MULTILINE:re.M,DOTALL:re.S,VERBOSE:re.X,TEMPLATE:re.T,DEBUG:re.DEBUG};function flagBitSlot(e,t){return function(r){if(r instanceof re.RegexFlag||r instanceof pyInt){let n=this.v,s=r.v;if("number"==typeof n&&"number"==typeof s){let t=e(n,s);return t<0&&(t+=4294967296),new re.RegexFlag(t)}return n=JSBI.BigUp(n),s=JSBI.BigUp(s),new re.RegexFlag(JSBI.numberIfSafe(t(n,s)))}return pyNotImplemented}}const jsFlags={i:re.I,m:re.M,s:re.S,u:re.U},jsInlineFlags={i:re.I,a:re.A,s:re.S,L:re.L,m:re.M,u:re.U,x:re.X};RegExp.prototype.hasOwnProperty("sticky")||delete jsFlags.s,RegExp.prototype.hasOwnProperty("unicode")||delete jsFlags.u;const flagFails=Object.entries({"cannot use LOCALE flag with a str pattern":re.L,"ASCII and UNICODE flags are incompatible":new re.RegexFlag(re.A.valueOf()|re.U.valueOf())}),inline_regex=/\\(\\?([isamux]+)\\)/g;function adjustFlags(e,t){let r=e.toString(),n="g",s=0;return r=r.replace(inline_regex,((e,t)=>{for(let r of t){const e=jsInlineFlags[r];s|=e.valueOf()}return""})),flagFails.forEach((([e,t])=>{if((t.valueOf()&s)===t.valueOf())throw new re.error("bad bad inline flags: "+e)})),t=numberBinOp(new re.RegexFlag(s),t,"BitOr"),flagFails.forEach((([e,r])=>{if(numberBinOp(r,t,"BitAnd")===r)throw new ValueError(e)})),numberBinOp(re.A,t,"BitAnd")!==re.A&&(t=numberBinOp(re.U,t,"BitOr")),Object.entries(jsFlags).forEach((([e,r])=>{numberBinOp(r,t,"BitAnd")===r&&(n+=e)})),t=new re.RegexFlag(t.valueOf()),[r,n,t]}let neg_lookbehind_A="(?)(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,py_to_js_unicode_escape=/\\\\[\\t\\r\\n \\v\\f#&~"\'!:,;`<>]|\\\\-(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,quantifierErrors=/Incomplete quantifier|Lone quantifier/g,_compiled_patterns=Object.create(null);function compile_pattern(e,t){let r,n;[r,n,t]=adjustFlags(e,t);const s=_compiled_patterns[e.toString()];if(s&&s.$flags===t)return s;const i={};let o,a;r="_"+r,r=r.replace(initialUnescapedBracket,"$1$2\\\\]$3"),r=r.replace(py_to_js_regex,((t,r,n,s,o,a)=>{switch(n){case"\\\\A":return r+neg_lookbehind_A+"^";case"\\\\Z":return r+"$(?!\\\\n)";case"{,":return r+"{0,";case"$":return r+"(?:(?=\\\\n$)|$)";default:if(n.endsWith(">"))return i[o]=!0,r+"(?<"+o+">";if(!i[s])throw new re.error("unknown group name "+s+" at position "+a+1,e,new pyInt(a+1));return r+"\\\\k<"+s+">"}})),r=r.slice(1);let l=r;n.includes("u")&&(l=r.replace(py_to_js_unicode_escape,(e=>{switch(e){case"\\\\ ":return" ";case"\\\\\\t":return"\\\\t";case"\\\\\\n":return"\\\\n";case"\\\\\\v":return"\\\\v";case"\\\\\\f":return"\\\\f";case"\\\\r":return"\\\\r";default:return e.slice(1)}})));try{o=new RegExp(l,n)}catch(g){if(!quantifierErrors.test(g.message))throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e);try{o=new RegExp(r,n.replace("u",""))}catch(g){throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e)}}const p=new re.Pattern(o,e,t);return _compiled_patterns[e.toString()]=p,p}function _compile(e,t){if(e instanceof re.Pattern){if(t!==zero||t.valueOf())throw new ValueError("cannot process flags argument with compiled pattern");return e}if(!checkString(e))throw new TypeError("first argument must be string or compiled pattern");return compile_pattern(e,t)}re.error=buildNativeClass("re.error",{base:Exception,constructor:function error(e,t,r){this.$pattern=t,this.$msg=e,this.$pos=r||pyNone,Exception.call(this,e)},slots:{tp$doc:"Exception raised for invalid regular expressions.\\n\\n Attributes:\\n\\n msg: The unformatted error message\\n pattern: The regular expression pattern\\n",tp$init(e,t){const[r,n,s]=copyKeywordToNamedArgs("re.error",["msg","pattern","pos"],e,t,[pyNone,pyNone]);this.$pattern=n,this.$pos=s,this.$msg=r}},getsets:{msg:{$get(){return this.$msg}},pattern:{$get(){return this.$pattern}},pos:{$get(){return this.$pos}}}});const zero=new pyInt(0),maxsize=Number.MAX_SAFE_INTEGER;re.Pattern=buildNativeClass("re.Pattern",{constructor:function(e,t,r){this.v=e,this.str=t,this.$flags=r,this.$groups=null,this.$groupindex=null},slots:{$r(){const e=objectRepr(this.str).slice(0,200),t=objectRepr(this.$flags.nb$and(re.U.nb$invert()));return new pyStr("re.compile("+e+(t?", "+t:"")+")")},tp$richcompare(e,t){if("Eq"!==t&&"NotEq"!==t||!(e instanceof re.Pattern))return pyNotImplemented;const r=this.str===e.str&&this.$flags===e.$flags;return"Eq"===t?r:!r},tp$hash(){},tp$doc:"Compiled regular expression object."},methods:{match:{$meth:function match(e,t,r){return this.$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches zero or more characters at the beginning of the string."},fullmatch:{$meth:function fullmatch(e,t,r){return this.full$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches against all of the string."},search:{$meth:function search(e,t,r){return this.$search(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Scan through string looking for a match, and return a corresponding match object instance.\\n\\nReturn None if no position in the string matches."},sub:{$meth:function sub(e,t,r){return this.$sub(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."},subn:{$meth:function(e,t,r){return this.$subn(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."},findall:{$meth:function findall(e,t,r){return this.find$all(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return a list of all non-overlapping matches of pattern in string."},split:{$meth:function split(e,t){return this.$split(e,t)},$flags:{NamedArgs:["string","maxsplit"],Defaults:[zero]},$textsig:"($self, /, string, maxsplit=0)",$doc:"Split string by the occurrences of pattern."},finditer:{$meth:function finditer(e,t,r){return this.find$iter(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return an iterator over all non-overlapping matches for the RE pattern in string.\\n\\nFor each match, the iterator returns a match object."},scanner:{$meth:function scanner(e,t,r){return this.$scanner(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:null},__copy__:{$meth:function copy(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{pattern:{$get(){return this.str},$doc:"The pattern string from which the RE object was compiled."},flags:{$get(){return this.$flags},$doc:"The regex matching flags."},groups:{$get(){if(null===this.$groups){const e=(this.str.v.match(this.group$regex)||[]).length;this.$groups=new pyInt(e)}return this.$groups},$doc:"The number of capturing groups in the pattern."},groupindex:{$get(){if(null===this.$groupindex){const e=this.str.v.matchAll(this.group$regex),t=[];let r=1;for(const n of e)n[1]&&(t.push(new pyStr(n[1])),t.push(new pyInt(r))),r++;this.$groupindex=new pyMappingProxy(new pyDict(t))}return this.$groupindex},$doc:"A dictionary mapping group names to group numbers."}},proto:{group$regex:/\\((?!\\?(?!P<).*)(?:\\?P<([^\\d\\W]\\w*)>)?(?![^\\[]*\\])/g,get$count:e=>(e=asIndexSized(e,OverflowError))||Number.POSITIVE_INFINITY,get$jsstr(e,t,r){if(!checkString(e))throw new TypeError("expected string or bytes-like object");if(t===zero&&r===maxsize||void 0===t&&void 0===r)return{jsstr:e.toString(),pos:zero.valueOf(),endpos:e.sq$length()};const{start:n,end:s}=pySlice.startEnd$wrt(e,t,r);return{jsstr:e.toString().slice(n,s),pos:n,endpos:s}},find$all(e,t,r){let{jsstr:n}=this.get$jsstr(e,t,r);const s=this.v,i=n.matchAll(s),o=[];for(let a of i)o.push(1===a.length?new pyStr(a[0]):2===a.length?new pyStr(a[1]):new pyTuple(a.slice(1).map((e=>new pyStr(e)))));return new pyList(o)},$split(e,t){t=(t=asIndexSized(t))||Number.POSITIVE_INFINITY;let{jsstr:r}=this.get$jsstr(e);const n=this.v,s=[];let i,o=0,a=0;for(;null!==(i=n.exec(r))&&o1&&s.push(...i.slice(1).map((e=>void 0===e?pyNone:new pyStr(e)))),o++,a=n.lastIndex,i.index===n.lastIndex){if(!r)break;r=r.slice(i.index),a=0,n.lastIndex=1}return n.lastIndex=0,s.push(new pyStr(r.slice(a))),new pyList(s)},match$from_repl(e,t,r,n){let s;const i=e[e.length-1];return"object"==typeof i?(s=e.slice(0,e.length-3),Object.assign(s,{groups:i}),s.index=e[e.length-3]):(s=e.slice(0,e.length-2),s.groups=void 0,s.index=e[e.length-2]),new re.Match(s,this.str,t,r,n)},do$sub(e,t,r){const{jsstr:n,pos:s,endpos:i}=this.get$jsstr(t);let o;checkCallable(e)?o=t=>{const r=pyCall(e,[t]);if(!checkString(r))throw new TypeError("expected str instance, "+typeName(r)+" found");return r.toString()}:(e=this.get$jsstr(e).jsstr,o=t=>t.template$repl(e)),r=this.get$count(r);let a=0;const l=n.replace(this.v,((...e)=>{if(a>=r)return e[0];a++;const n=this.match$from_repl(e,t,s,i);return o(n)}));return[new pyStr(l),new pyInt(a)]},$sub(e,t,r){const[n]=this.do$sub(e,t,r);return n},$subn(e,t,r){return new pyTuple(this.do$sub(e,t,r))},do$match(e,t,r,n){let s;({jsstr:s,pos:r,endpos:n}=this.get$jsstr(t,r,n));const i=s.match(e);return null===i?pyNone:new re.Match(i,this,t,r,n)},$search(e,t,r){var n=new RegExp(this.v.source,this.v.flags.replace("g",""));return this.do$match(n,e,t,r)},$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^"+n;var i=new RegExp(n,s);return this.do$match(i,e,t,r)},full$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^(?:"+n+")$";var i=new RegExp(n,s);return this.do$match(i,e,t,r)},find$iter(e,t,r){let n;({jsstr:n,pos:t,endpos:r}=this.get$jsstr(e,t,r));const s=n.matchAll(this.v);return new pyIterator((()=>{const n=s.next().value;if(void 0!==n)return new re.Match(n,this,e,t,r)}))}},flags:{sk$acceptable_as_base_class:!1}}),re.Match=buildNativeClass("re.Match",{constructor:function(e,t,r,n,s){this.v=e,this.$match=new pyStr(this.v[0]),this.str=r,this.$re=t,this.$pos=n,this.$endpos=s,this.$groupdict=null,this.$groups=null,this.$lastindex=null,this.$lastgroup=null,this.$regs=null},slots:{tp$doc:"The result of re.match() and re.search().\\nMatch objects always have a boolean value of True.",$r(){let e="",new pyStr(e)},tp$as_squence_or_mapping:!0,mp$subscript(e){const t=this.get$group(e);return void 0===t?pyNone:new pyStr(t)}},methods:{group:{$meth:function group(...e){let t;return e.length<=1?(t=this.get$group(e[0]),void 0===t?pyNone:new pyStr(t)):(t=[],e.forEach((e=>{e=this.get$group(e),t.push(void 0===e?pyNone:new pyStr(e))})),new pyTuple(t))},$flags:{MinArgs:0},$textsig:null,$doc:"group([group1, ...]) -> str or tuple.\\n Return subgroup(s) of the match by indices or names.\\n For 0 returns the entire match."},start:{$meth:function start(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos))},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the start of the substring matched by group."},end:{$meth:function end(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos)+[...t].length)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the end of the substring matched by group."},span:{$meth:function span(e){return this.$span(e)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"For match object m, return the 2-tuple (m.start(group), m.end(group))."},groups:{$meth:function groups(e){return null!==this.$groups||(this.$groups=Array.from(this.v.slice(1),(t=>void 0===t?e:new pyStr(t))),this.$groups=new pyTuple(this.$groups)),this.$groups},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a tuple containing all the subgroups of the match, from 1.\\n\\n default\\n Is used for groups that did not participate in the match."},groupdict:{$meth:function groupdict(e){if(null!==this.$groupdict)return this.$groupdict;if(void 0===this.v.groups)this.$groupdict=new pyDict;else{const t=[];Object.entries(this.v.groups).forEach((([r,n])=>{t.push(new pyStr(r)),t.push(void 0===n?e:new pyStr(n))})),this.$groupdict=new pyDict(t)}return this.$groupdict},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.\\n\\n default\\n Is used for groups that did not participate in the match."},expand:{$meth:function expand(e){if(!checkString(e))throw new TypeError("expected str instance got "+typeName(e));return e=e.toString(),e=this.template$repl(e),new pyStr(e)},$flags:{OneArg:!0},$textsig:"($self, /, template)",$doc:"Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."},__copy__:{$meth:function __copy__(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function __deepcopy__(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{lastindex:{$get(){if(null!==this.$lastindex)return this.$lastindex;let e,t=0;return this.v.forEach(((r,n)=>{n&&void 0!==r&&e!==r&&(t=n,e=r)})),this.$lastindex=t?new pyInt(t):pyNone,this.$lastindex},$doc:"The integer index of the last matched capturing group."},lastgroup:{$get(){if(null!==this.$lastgroup)return this.$lastgroup;if(void 0===this.v.groups)this.$lastgroup=pyNone;else{let e;Object.entries(this.v.groups).forEach((([t,r])=>{void 0!==r&&(e=t)})),this.$lastgroup=void 0===e?pyNone:new pyStr(e)}return this.$lastgroup},$doc:"The name of the last matched capturing group."},regs:{$get(){if(null!==this.$regs)return this.$regs;const e=[];return this.v.forEach(((t,r)=>{e.push(this.$span(r))})),this.$regs=new pyTuple(e),this.$regs}},string:{$get(){return this.str},$doc:"The string passed to match() or search()."},re:{$get(){return this.$re},$doc:"The regular expression object."},pos:{$get(){return new pyInt(this.$pos)},$doc:"The index into the string at which the RE engine started looking for a match."},endpos:{$get(){return new pyInt(this.$endpos)},$doc:"The index into the string beyond which the RE engine will not go."}},proto:{get$group(e){if(void 0===e)return this.v[0];if(checkString(e)){if(e=e.toString(),this.v.groups&&Object.prototype.hasOwnProperty.call(this.v.groups,e))return this.v.groups[e]}else if(isIndex(e)&&(e=asIndexSized(e))>=0&&e|\\\\g<([^\\d\\W]\\w*)>|\\\\g?/g,template$repl(e){return e.replace(this.template$regex,((e,t,r,n,s,i)=>{let o;if(void 0!==(t=t||r)?o=t{delete _compiled_patterns[e]})),pyNone},$flags:{NoArgs:!0},$textsig:"($module, / )",$doc:"Clear the regular expression caches"},template:{$meth:function template(e,t){return _compile(e,numberBinOp(re.T,t,"BitOr"))},$flags:{NamedArgs:["pattern","flags"],Defaults:[zero]},$textsig:"($module, / , pattern, flags=0)",$doc:"Compile a template pattern, returning a Pattern object"},escape:{$meth:function(e){if(!checkString(e))throw new TypeError("expected a str instances, got "+typeName(e));return e=(e=e.toString()).replace(escape_chrs,"\\\\$&"),new pyStr(e)},$flags:{NamedArgs:["pattern"],Defaults:[]},$textsig:"($module, / , pattern)",$doc:"\\n Escape special characters in a string.\\n "}});const escape_chrs=/[\\&\\~\\#.*+\\-?^${}()|[\\]\\\\\\t\\r\\v\\f\\n ]/g;return re}',"src/lib/requests/__init__.js":'var $builtinmodule=function(e){var n={__name__:new Sk.builtin.str("requests")};n.Response=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e,n){e.data$=n,e.lineList=e.data$.split("\\n"),e.lineList=e.lineList.slice(0,-1);for(var t=0;t")})),n.__repr__=n.__str__,n.__iter__=new Sk.builtin.func((function(e){var n=e.lineList;return Sk.builtin.makeGenerator((function(){if(!(this.$index>=this.$lines.length))return new Sk.builtin.str(this.$lines[this.$index++])}),{$obj:e,$index:0,$lines:n})})),n.read=new Sk.builtin.func((function(e,n){if(e.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var t=e.data$.length;void 0===n&&(n=t);var i=new Sk.builtin.str(e.data$.substr(e.pos$,n));return e.pos$+=n,e.pos$>=t&&(e.pos$=t),i})),n.readline=new Sk.builtin.func((function(e,n){var t="";return e.currentLine{var t="";if(e instanceof String||e instanceof Number||e instanceof Boolean)try{var i=n.toString().replaceAll("=","@");i=i.replaceAll("&","$");var r=e.toString().replaceAll("=","@");r=r.replaceAll("&","$"),t+="&"+i+"="+encodeURIComponent(r)}catch(s){t+="&"+n+"="+encodeURIComponent(e)}else $.each(e,(function(i){t+="&"+jsonToUrl(this,null==n?i:n+(e instanceof Array?"["+i+"]":"."+i))}));return t.substr(1)},requestFunc=function(e,t){e=Sk.ffi.remapToJs(e),t=Sk.ffi.remapToJs(t);const i=["method","url","params","data","headers","cookies","files","auth","timeout","allow_redirects","proxies","hooks","stream","verify","cert","json"];let r={method:"GET",url:"",params:null,data:"",headers:{"Content-type":"application/x-www-form-urlencoded"},cookies:null,files:null,auth:null,timeout:1e3,allow_redirects:null,proxies:null,hooks:null,stream:null,verify:null,cert:null,json:null};for(let n in e)r[i[n]]=e[n];for(let n=0;n=n){r=t.decoder.decode(new Uint8Array(e));break}}else{switch(224&o){case 252:n=6;break;case 248:n=5;break;case 240:n=4;break;case 224:n=3;break;default:n=2}e.push(o)}}return r},t.startReadLine=function(){t.readLineTimer=window.setTimeout((()=>{if(!t.keepReading)return void window.clearTimeout(t.readLineTimer);let e=!1;do{const n=t.readLine();e=n.endWithLF;const{text:r}=n;if(r&&t.output.push((t.output.length?t.output.pop():"")+r),e){t.output.length&&console.log(t.output),t.output.push("")}}while(e);for(;t.output.length>500;)t.output.shift();t.keepReading&&t.startReadLine()}),100)},t.addReadEvent=async function(){for(t.output=[],t.inputBuffer=[],t.outputBuffer=[],t.refreshInputBuffer=!1,t.refreshOutputBuffer=!0,t.startReadLine();t.obj.readable&&t.keepReading;){t.reader=t.obj.readable.getReader();try{for(;;){const{value:e,done:n}=await t.reader.read();if(t.refreshOutputBuffer&&e&&(t.outputBuffer=[...t.outputBuffer,...e]),t.refreshInputBuffer&&e&&(t.inputBuffer=[...t.inputBuffer,...e]),n)break}}catch(e){console.log(e)}finally{t.reader.releaseLock()}}},t.writeString=async function(e){const n=t.encoder.encode(e);await t.writeByteArr(n)},t.writeByteArr=async function(e){const n=t.obj.writable.getWriter();await n.write(new Int8Array(e).buffer),n.releaseLock(),await t.sleep(200)},t.setBaudRate=async function(e){t.keepReading=!1;const n=t.obj;await t.close(),await n.open({baudRate:e-0}),t.obj=n,t.keepReading=!0,t.addReadEvent()},t.setDTR=async function(e){t.dtr=e,await t.obj.setSignals({dataTerminalReady:e})},t.setRTS=async function(e){t.rts=e,await t.obj.setSignals({requestToSend:e})},t.setSignals=async function(e,n){t.dtr=e,t.rts=n,await t.obj.setSignals({dataTerminalReady:e,requestToSend:n})};let n={__name__:new Sk.builtin.str("serial")},r={baudrate:115200,bytesize:8,parity:"N",stopbits:1,timeout:1e3,xonxoff:!1,rtscts:!1,dsrdtr:!1};const serialInitFunc=function(e,n){e=Sk.ffi.remapToJs(e),n=Sk.ffi.remapToJs(n);const o=["baudrate","bytesize","parity","stopbits","timeout","xonxoff","rtscts","dsrdtr"];for(let t in e)e[t]&&(r[o[t]]=e[t]);const i=new Promise(((e,n)=>{t.isConnected()?e(t.obj):navigator.serial.requestPort().then((function(t){e(t)})).catch((function(e){t.obj=null,n(e)}))}));let u,a=new Sk.misceval.Suspension;return a.resume=function(){if(a.data.error)throw a.data.error;return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:i.then((function(e){return t.obj=e,Sk.builtin.none.none$}),(function(e){return console.log("err3",e),u="",Promise.reject(e)}))},a};serialInitFunc.co_fastcall=1;const serialOpenFunc=function(e,n){const o=new Promise(((e,n)=>{t.isConnected()?t.isOpend()?e():t.obj.open({baudRate:r.baudrate}).then((async function(){t.keepReading=!0,t.addReadEvent(),e()})).catch((function(e){t.obj=null,n(e)})):n("No serial found")}));let i=new Sk.misceval.Suspension;return i.resume=function(){if(i.data.error)throw i.data.error;return Sk.builtin.none.none$},i.data={type:"Sk.promise",promise:o.then((function(e){return Sk.builtin.none.none$}),(function(e){return console.log("err3",e),Promise.reject(e)}))},i},serialReadlineFunc=function(e,n){if(!t.isConnected())return new Sk.builtin.str("");if(console.log("length:",t.output.length),!t.isOpend()||t.output.length<2)return new Sk.builtin.str("");let r=t.output.shift();return console.log(r),new Sk.builtin.str(r)};return n.Serial=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func(serialInitFunc),t.__str__=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy("")})),t.open=new Sk.builtin.func(serialOpenFunc),t.readline=new Sk.builtin.func(serialReadlineFunc)}),"Serial",[]),n};',"src/lib/signal.js":'var $builtinmodule=function(n){var i={};return i.SIG_DFL=new Sk.builtin.int_(0),i.SIG_IGN=new Sk.builtin.int_(1),i.CTRL_C_EVENT=new Sk.builtin.int_(0),i.CTRL_BREAK_EVENT=new Sk.builtin.int_(0),i.NSIG=new Sk.builtin.int_(23),i.SIGHUP=new Sk.builtin.int_(1),i.SIGNINT=new Sk.builtin.int_(2),i.SIGILL=new Sk.builtin.int_(4),i.SIGFPE=new Sk.builtin.int_(8),i.SIGKILL=new Sk.builtin.int_(9),i.SIGSEGV=new Sk.builtin.int_(11),i.SIGTERM=new Sk.builtin.int_(15),i.SIGBREAK=new Sk.builtin.int_(21),i.SIGABRT=new Sk.builtin.int_(22),i.pause=new Sk.builtin.func((function(){Sk.builtin.pyCheckArgsLen("pause",arguments.length,0,0);var n=new Sk.misceval.Suspension;return n.resume=function(){return Sk.builtin.none.none$},n.data={type:"Sk.promise",promise:new Promise((function(n,i){if(null!=Sk.signals&&Sk.signals.addEventListener){Sk.signals.addEventListener((function handleSignal(i){Sk.signals.removeEventListener(handleSignal),n()}))}else console.warn("signal.pause() not supported"),Sk.misceval.print_("signal.pause() not supported"),n()}))},n})),i.signal=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("signal.signal is not supported.")})),i};',"src/lib/string.js":'var $builtinmodule=function(i){var t={};return t.ascii_lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.ascii_uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.ascii_letters=new Sk.builtin.str(t.ascii_lowercase.v+t.ascii_uppercase.v),t.lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.letters=new Sk.builtin.str(t.lowercase.v+t.uppercase.v),t.digits=new Sk.builtin.str("0123456789"),t.hexdigits=new Sk.builtin.str("0123456789abcdefABCDEF"),t.octdigits=new Sk.builtin.str("01234567"),t.punctuation=new Sk.builtin.str("!\\"#$%&\'()*+,-./:;<=>?@[\\\\]^_`{|}~"),t.whitespace=new Sk.builtin.str("\\t\\n\\v\\f\\r "),t.printable=new Sk.builtin.str(t.digits.v+t.letters.v+t.punctuation.v+" \\t\\n\\r\\v\\f"),t.split=new Sk.builtin.func((function(...i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.split,i)})),t.capitalize=new Sk.builtin.func((function(i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.capitalize,[i])})),t.join=new Sk.builtin.func((function(i,t){return void 0===t&&(t=new Sk.builtin.str(" ")),Sk.misceval.callsimArray(Sk.builtin.str.prototype.join,[t,i])})),t.capwords=new Sk.builtin.func((function(i,n){if(Sk.builtin.pyCheckArgsLen("capwords",arguments.length,1,2),!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("s must be a string");if(void 0===n&&(n=new Sk.builtin.str(" ")),!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError("sep must be a string");for(var e=Sk.misceval.callsimArray(t.split,[i,n]).v,r=[],l=0;l1&&function isLeapYear(t){return 0==(3&t)&&(t%100!=0||t%400==0)}(e?t.getUTCFullYear():t.getFullYear())&&u++,u}function stdTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.max(t.getTimezoneOffset(),e.getTimezoneOffset())}function dst(t){return t.getTimezoneOffset()1)return n[1];if(void 0===e)return null;try{return(n=t.toLocaleString(e,{timeZoneName:"short"}).split(" "))[n.length-1]}catch(i){return null}}function from_seconds(t,e){var i=new Date;if(t){Sk.builtin.pyCheckType("secs","number",Sk.builtin.checkNumber(t));var u=Sk.builtin.asnum$(t);i.setTime(1e3*u)}return function date_to_struct_time(t,e){let i;if(e=e||!1)i=[new Sk.builtin.str("UTC"),new Sk.builtin.int_(0)];else{var u=-t.getTimezoneOffset()/60,r=(u<0?"-":"+")+(""+Math.abs(u)).padStart(2,"0");i=[new Sk.builtin.str(r),new Sk.builtin.int_(3600*u)]}return new n([Sk.builtin.assk$(e?t.getUTCFullYear():t.getFullYear()),Sk.builtin.assk$((e?t.getUTCMonth():t.getMonth())+1),Sk.builtin.assk$(e?t.getUTCDate():t.getDate()),Sk.builtin.assk$(e?t.getUTCHours():t.getHours()),Sk.builtin.assk$(e?t.getUTCMinutes():t.getMinutes()),Sk.builtin.assk$(e?t.getUTCSeconds():t.getSeconds()),Sk.builtin.assk$(((e?t.getUTCDay():t.getDay())+6)%7),Sk.builtin.assk$(getDayOfYear(t,e)),Sk.builtin.assk$(e?0:dst(t)?1:0)],i)}(i,e)}e.struct_time=n,e.time=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("time",arguments.length,0,0),new Sk.builtin.float_(Date.now()/1e3)})),e.sleep=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("sleep",arguments.length,1,1),Sk.builtin.pyCheckType("delay","float",Sk.builtin.checkNumber(t)),new Sk.misceval.promiseToSuspension(new Promise((function(e){Sk.setTimeout((function(){e(Sk.builtin.none.none$)}),1e3*Sk.ffi.remapToJs(t))})))})),e.localtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("localtime",arguments.length,0,1),from_seconds(t,!1)})),e.gmtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("gmtime",arguments.length,0,1),from_seconds(t,!0)}));var i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function asctime_f(t){if(Sk.builtin.pyCheckArgsLen("asctime",arguments.length,0,1),!t||Sk.builtin.checkNone(t)?t=from_seconds():t instanceof n||(t=new n(t)),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=[];return e.push(u[Sk.builtin.asnum$(t.v[6])]),e.push(i[Sk.builtin.asnum$(t.v[1])-1]),e.push(padLeft(Sk.builtin.asnum$(t.v[2]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[3]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[4]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[5]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[0]).toString(),4,"0")),new Sk.builtin.str(e.join(" "))}}function mktime_f(t){if(Sk.builtin.pyCheckArgsLen("mktime",arguments.length,1,1),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=new Date(Sk.builtin.asnum$(t.v[0]),Sk.builtin.asnum$(t.v[1])-1,Sk.builtin.asnum$(t.v[2]),Sk.builtin.asnum$(t.v[3]),Sk.builtin.asnum$(t.v[4]),Sk.builtin.asnum$(t.v[5]));return Sk.builtin.assk$(e.getTime()/1e3,void 0)}throw new Sk.builtin.TypeError("mktime() requires a struct_time or 9-tuple")}e.asctime=new Sk.builtin.func(asctime_f),e.ctime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("ctime",arguments.length,0,1),asctime_f(from_seconds(t))})),e.mktime=new Sk.builtin.func(mktime_f),e.timezone=new Sk.builtin.int_(60*stdTimezoneOffset()),e.altzone=new Sk.builtin.int_(60*function altTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.min(t.getTimezoneOffset(),e.getTimezoneOffset())}()),e.daylight=new Sk.builtin.int_(function daylight_check(){const t=new Date(2002,0,1),e=new Date(2002,6,1);return t.getTimezoneOffset()!=e.getTimezoneOffset()}()?1:0),e.tzname=new Sk.builtin.tuple(function timeZoneNames(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return dst(t)?[new Sk.builtin.str(timeZoneName(e)),new Sk.builtin.str(timeZoneName(t))]:[new Sk.builtin.str(timeZoneName(t)),new Sk.builtin.str(timeZoneName(e))]}()),e.accept2dyear=Sk.builtin.assk$(1),e.clock=new Sk.builtin.func((function(){var t=0;return t=Sk.global.performance&&Sk.global.performance.now?performance.now()/1e3:(new Date).getTime()/1e3,new Sk.builtin.float_(t)})),e.strftime=new Sk.builtin.func((function strftime_f(t,e){var i;if(Sk.builtin.pyCheckArgsLen("strftime",arguments.length,1,2),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("format must be a string");return e?e instanceof n||(e=new n(e)):e=from_seconds(),function check_struct_time(t){if(!(t instanceof n))throw new Sk.builtin.TypeError("Required argument \'struct_time\' must be of type: \'struct_time\'");var e,i=t.v.length,u=t.v;for(e=0;e(r=e.tp$getattr(new Sk.builtin.str("_strptime_time")),r.tp$call(t)))):r.tp$call(t)})),e};',"src/lib/token.js":'var $builtinmodule=function(n){var e={};e.__file__=new Sk.builtin.str("/src/lib/token.py");const t=[];for(let i in Sk.token.tok_name){const n=Sk.token.tok_name[i].slice(2),k=parseInt(i,10);t.push(Sk.ffi.remapToPy(k)),t.push(Sk.ffi.remapToPy(n)),e[n]=Sk.ffi.remapToPy(k)}return e.tok_name=new Sk.builtin.dict(t),e.ISTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISTERMINAL",arguments.length,1,1),Sk.token.ISTERMINAL(Sk.ffi.remapToJs(n))})),e.ISNONTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISNONTERMINAL",arguments.length,1,1),Sk.token.ISNONTERMINAL(Sk.ffi.remapToJs(n))})),e.ISEOF=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISEOF",arguments.length,1,1),Sk.token.ISEOF(Sk.ffi.remapToJs(n))})),e};',"src/lib/tokenize.js":'var $builtinmodule=function(e){var i={};return i.tokenize=new Sk.builtin.func((function(e){Sk.builtin.pyCheckArgsLen("tokenize",1,1),Sk.builtin.checkFunction(e);const i=[];return Sk._tokenize("",(function jsReadline(){const i=Sk.misceval.callsimArray(e);return Sk.ffi.remapToJs(i)}),"UTF-8",(function receiveToken(e){i.push(new Sk.builtin.tuple([Sk.ffi.remapToPy(e.type),Sk.ffi.remapToPy(e.string),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.start[0]),Sk.ffi.remapToPy(e.start[1])]),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.end[0]),Sk.ffi.remapToPy(e.end[1])]),Sk.ffi.remapToPy(e.line)]))})),new Sk.builtin.list(i)})),i};',"src/lib/turtle.js":'var $builtinmodule=function(e){"use strict";var t=function getConfiguredTarget(){var e,t;for(t="string"==typeof(e=Sk.TurtleGraphics&&Sk.TurtleGraphics.target||"turtle")?document.getElementById(e):e;t.firstChild;)t.removeChild(t.firstChild);return t}();return t.turtleInstance?t.turtleInstance.reset():t.turtleInstance=function generateTurtleModule(e){var t,n,r,i,s,a,o,l,u={__name__:new Sk.builtin.str("turtle")},c=!0,h=1e3/30,d={},f={},_={target:"turtle",width:400,height:400,worldWidth:0,worldHeight:0,animate:!0,bufferSize:0,allowUndo:!0,assets:{}};function getAsset(e){var t=i.assets,n="function"==typeof t?t(e):t[e];return"string"==typeof n?new Promise((function(t,r){var s=new Image;s.onload=function(){i.assets[e]=this,t(s)},s.onerror=function(){r(new Error("Missing asset: "+n))},s.src=n})):new InstantPromise(void 0,n)}function InstantPromise(e,t){this.lastResult=t,this.lastError=e}function FrameManager(){this.reset()}function getFrameManager(){return o||(o=new FrameManager),o}function MouseHandler(){var e=this;for(var t in this._target=getTarget(),this._managers={},this._handlers={mousedown:function(t){e.onEvent("mousedown",t)},mouseup:function(t){e.onEvent("mouseup",t)},mousemove:function(t){e.onEvent("mousemove",t)}},this._handlers)this._target.addEventListener(t,this._handlers[t])}function EventManager(e,t){this._type=e,this._target=t,this._handlers=void 0,function getMouseHandler(){return a||(a=new MouseHandler),a}().addManager(e,this)}function Turtle(e){if(getFrameManager().addTurtle(this),this._screen=getScreen(),this._managers={},this._shape=e.v,!d.hasOwnProperty(this._shape))throw new Sk.builtin.ValueError("Shape:\'"+this._shape+"\' not in default shape, please check shape again!");this.reset()}function Screen(){var e,t;this._frames=1,this._delay=void 0,this._bgcolor="none",this._mode="standard",this._managers={},this._keyLogger={},e=(i.worldWidth||i.width||getWidth())/2,t=(i.worldHeight||i.height||getHeight())/2,this.setUpWorld(-e,-t,e,t)}function ensureAnonymous(){return s||(s=Sk.misceval.callsimArray(u.Turtle)),s.instance}function getTarget(){return e}function getScreen(){return r||(r=new Screen),r}function getWidth(){return 0|(r&&r._width||i.width||getTarget().clientWidth||_.width)}function getHeight(){return 0|(r&&r._height||i.height||getTarget().clientHeight||_.height)}function createLayer(e,t){var n,r=document.createElement("canvas"),i=getWidth(),s=getHeight(),a=getTarget().firstChild?-s+"px":"0";return r.width=i,r.height=s,r.style.position="relative",r.style.display="block",r.style.setProperty("margin-top",a),r.style.setProperty("z-index",e),t&&(r.style.display="none"),getTarget().appendChild(r),(n=r.getContext("2d")).lineCap="round",n.lineJoin="round",applyWorld(getScreen(),n),n}function cancelAnimationFrame(){t&&((window.cancelAnimationFrame||window.mozCancelAnimationFrame)(t),t=void 0),n&&(window.clearTimeout(n),n=void 0)}function applyWorld(e,t){var n=e.llx,r=(e.lly,e.urx,e.ury),i=e.xScale,s=e.yScale;t&&(clearLayer(t),t.restore(),t.save(),t.scale(1/i,1/s),t.translate(-n,-r))}function pushUndo(e){var t,n,r;if(i.allowUndo&&e._bufferSize){for(e._undoBuffer||(e._undoBuffer=[]);e._undoBuffer.length>e._bufferSize;)e._undoBuffer.shift();for(n={},t="x y angle radians color fill down filling shown shape size".split(" "),r=0;r=0;)this._turtles[e].reset();this._turtles=[],this._frames=[],this._frameCount=0,this._buffer=1,this._rate=0,this._animationFrame=animationFrame()},e.addFrame=function(e,t){return t&&(this._frameCount+=1),this.frames().push(e),!i.animate||this._buffer&&this._frameCount===this.frameBuffer()?this.update():new InstantPromise},e.frames=function(){return this._frames},e.frameBuffer=function(e){return"number"==typeof e&&(this._buffer=0|e,e&&e<=this._frameCount)?this.update():this._buffer},e.refreshInterval=function(e){return"number"==typeof e&&(this._rate=0|e,this._animationFrame=animationFrame(e)),this._rate},e.update=function(){return this._frames&&this._frames.length?this.requestAnimationFrame():new InstantPromise},e.requestAnimationFrame=function(){var e,t,n=this._frames,r=this._animationFrame,i=this._turtles,s=getScreen().spriteLayer();return this._frames=[],this._frameCount=0,new Promise((function(a){r((function paint(){for(t=0;t=0;)l[a].test(n,r,i,s)&&l[a].canMove("mousedown"===e);if(o&&o.length)for(computeCoordinates(),a=o.length;--a>=0;)("mousemove"===e&&o[a].canMove()&&o[a].test(n,r,i,s)||"mousedown"===e&&o[a].test(n,r,i,s))&&o[a].trigger([i,s])},l.reset=function(){this._managers={}},l.addManager=function(e,t){this._managers[e]||(this._managers[e]=[]),this._managers[e].push(t)},function(e){e.reset=function(){this._handlers=void 0},e.canMove=function(e){return!(!this._target||!this._target.hitTest)&&(void 0!==e&&(this._target.hitTest.hit=e),this._target.hitTest.hit)},e.test=function(e,t,n,r){return this._target&&this._target.hitTest?this._target.hitTest(e,t,n,r):!!this._target},e.trigger=function(e){var t,n=this._handlers;if(n&&n.length)for(t=0;t.5&&e<10.5?Sk.builtin.asnum$(Sk.builtin.round(Sk.builtin.assk$(e))):0,this._speed=e,this._computed_speed=2*e,this.addUpdate(void 0,!1,{speed:this._computed_speed})},e.$speed.minArgs=0,e.$speed.co_varnames=["speed"],e.$pencolor=function(e,t,n,r){return void 0!==e?(this._color=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{color:this._color})):hexToRGB(this._color)},e.$pencolor.co_varnames=["r","g","b","a"],e.$pencolor.minArgs=0,e.$pencolor.returnType=f.COLOR,e.$fillcolor=function(e,t,n,r){return void 0!==e?(this._fill=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{fill:this._fill})):hexToRGB(this._fill)},e.$fillcolor.co_varnames=["r","g","b","a"],e.$fillcolor.minArgs=0,e.$fillcolor.returnType=f.COLOR,e.$color=function(e,t,n,r){return void 0!==e?(void 0===t||void 0!==n?(this._color=createColor(this._colorMode,e,t,n,r),this._fill=this._color):(this._color=createColor(this._colorMode,e),this._fill=createColor(this._colorMode,t)),this.addUpdate(void 0,this._shown,{color:this._color,fill:this._fill})):[this.$pencolor(),this.$fillcolor()]},e.$color.minArgs=0,e.$color.co_varnames=["color","fill","b","a"],e.$color.returnType=function(e){return new Sk.builtin.tuple([f.COLOR(e[0]),f.COLOR(e[1])])},e.$fill=function(e){if(void 0!==e){if((e=!!e)===this._filling)return;return this._filling=e,e?(pushUndo(this),this.addUpdate(void 0,!1,{filling:!0,fillBuffer:[{x:this._x,y:this._y}]})):(pushUndo(this),this.addUpdate((function(){this.fillBuffer.push(this),drawFill.call(this)}),!0,{filling:!1,fillBuffer:void 0}))}return this._filling},e.$fill.co_varnames=["flag"],e.$fill.minArgs=0,e.$begin_fill=function(){return this.$fill(!0)},e.$end_fill=function(){return this.$fill(!1)},e.$stamp=function(){return pushUndo(this),this.addUpdate((function(){drawTurtle(this,this.context())}),!0)},e.$dot=function(e,t,n,r,i){return pushUndo(this),e="number"==typeof(e=Sk.builtin.asnum$(e))?Math.max(1,0|Math.abs(e)):Math.max(this._size+4,2*this._size),t=void 0!==t?createColor(this._colorMode,t,n,r,i):this._color,this.addUpdate(drawDot,!0,void 0,e,t)},e.$dot.co_varnames=["size","color","g","b","a"],e.$write=function(e,t,n,r){var i,s,a,o,l,u=this;return pushUndo(this),e=String(e),r&&r.constructor===Array&&(s="string"==typeof r[0]?r[0]:"Arial",a=String(r[1]||"12pt"),o="string"==typeof r[2]?r[2]:"normal",/^\\d+$/.test(a)&&(a+="pt"),r=[o,a,s].join(" ")),n||(n="left"),i=this.addUpdate(drawText,!0,void 0,e,n,r),!t||"left"!==n&&"center"!==n||(l=function measureText(e,t){return t&&(p.font=t),p.measureText(e).width}(e,r),"center"===n&&(l/=2),i=i.then((function(){var e=u.getState();return u.translate(e.x,e.y,l,0,!0)}))),i},e.$write.co_varnames=["message","move","align","font"],e.$write.minArgs=1,e.$pensize=e.$width=function(e){return void 0!==e?(this._size=e,this.addUpdate(void 0,this._shown,{size:e})):this._size},e.$pensize.minArgs=e.$width.minArgs=0,e.$pensize.co_varnames=e.$width.co_varnames=["width"],e.$showturtle=e.$st=function(){return this._shown=!0,this.addUpdate(void 0,!0,{shown:!0})},e.$hideturtle=e.$ht=function(){return this._shown=!1,this.addUpdate(void 0,!0,{shown:!1})},e.$isvisible=function(){return this._shown},e.$shape=function(e){return e&&d[e]?(this._shape=e,this.addUpdate(void 0,this._shown,{shape:e})):this._shape},e.$shape.minArgs=0,e.$shape.co_varnames=["name"],e.$window_width=function(){return this._screen.$window_width()},e.$window_height=function(){return this._screen.$window_height()},e.$tracer=function(e,t){return this._screen.$tracer(e,t)},e.$tracer.minArgs=0,e.$tracer.co_varnames=["n","delay"],e.$update=function(){return this._screen.$update()},e.$delay=function(e){return this._screen.$delay(e)},e.$delay.minArgs=0,e.$delay.co_varnames=["delay"],e.$reset=function(){return this.reset(),this.$clear()},e.$mainloop=e.$done=function(){return this._screen.$mainloop()},e.$clear=function(){return this.addUpdate((function(){clearLayer(this.context())}),!0)},e.$dot.minArgs=0,e.$onclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onclick.minArgs=1,e.$onclick.co_varnames=["method","btn","add"],e.$onrelease=function(e,t,n){this.getManager("mouseup").addHandler(e,n)},e.$onrelease.minArgs=1,e.$onrelease.co_varnames=["method","btn","add"],e.$ondrag=function(e,t,n){this.getManager("mousemove").addHandler(e,n)},e.$ondrag.minArgs=1,e.$ondrag.co_varnames=["method","btn","add"],e.$getscreen=function(){return Sk.misceval.callsimArray(u.Screen)},e.$getscreen.isSk=!0,e.$clone=function(){var e=Sk.misceval.callsimOrSuspendArray(u.Turtle);return e.instance._x=this._x,e.instance._y=this._y,e.instance._angle=this._angle,e.instance._radians=this._radians,e.instance._shape=this._shape,e.instance._color=this._color,e.instance._fill=this._fill,e.instance._filling=this._filling,e.instance._size=this._size,e.instance._computed_speed=this._computed_speed,e.instance._down=this._down,e.instance._shown=this._shown,e.instance._colorMode=this._colorMode,e.instance._isRadians=this._isRadians,e.instance._fullCircle=this._fullCircle,e.instance._bufferSize=this._bufferSize,e.instance._undoBuffer=this._undoBuffer,e._clonedFrom=this,e},e.$clone.returnType=function(e){return e},e.$getturtle=e.$getpen=function(){return this.skInstance},e.$getturtle.isSk=!0}(Turtle.prototype),function(e){e.spriteLayer=function(){return this._sprites||(this._sprites=createLayer(3))},e.bgLayer=function(){return this._background||(this._background=createLayer(1))},e.hitTestLayer=function(){return this._hitTest||(this._hitTest=createLayer(0,!0))},e.getManager=function(e){return this._managers[e]||(this._managers[e]=new EventManager(e,this)),this._managers[e]},e.reset=function(){var e;for(e in this._keyListeners=void 0,this._keyLogger)window.clearInterval(this._keyLogger[e]),window.clearTimeout(this._keyLogger[e]),delete this._keyLogger[e];for(e in this._keyDownListener&&(getTarget().removeEventListener("keydown",this._keyDownListener),this._keyDownListener=void 0),this._keyUpListener&&(getTarget().removeEventListener("keyup",this._keyUpListener),this._keyUpListener=void 0),this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),this._managers)this._managers[e].reset();this._mode="standard",removeLayer(this._sprites),this._sprites=void 0,removeLayer(this._background),this._background=void 0},e.setUpWorld=function(e,t,n,r){var i=this;i.llx=e,i.lly=t,i.urx=n,i.ury=r,i.xScale=(n-e)/getWidth(),i.yScale=-1*(r-t)/getHeight(),i.lineScale=Math.min(Math.abs(i.xScale),Math.abs(i.yScale))},e.$setup=function(e,t,n,r){return isNaN(parseFloat(e))&&(e=getWidth()),isNaN(parseFloat(t))&&(t=getHeight()),e<=1&&(e=getWidth()*e),t<=1&&(t=getHeight()*t),this._width=e,this._height=t,this._xOffset=void 0===n||isNaN(parseInt(n))?0:parseInt(n),this._yOffset=void 0===r||isNaN(parseInt(r))?0:parseInt(r),"world"===this._mode?this._setworldcoordinates(this.llx,this.lly,this.urx,this.ury):this._setworldcoordinates(-e/2,-t/2,e/2,t/2)},e.$setup.minArgs=0,e.$setup.co_varnames=["width","height","startx","starty"],e.$register_shape=e.$addshape=function(e,t){if(!t)return getAsset(e).then((function(t){d[e]=t}));d[e]=t},e.$register_shape.minArgs=1,e.$register_shape.co_varnames=["name","shape"],e.$getshapes=function(){return Object.keys(d)},e.$tracer=function(e,t){return void 0!==e||void 0!==t?("number"==typeof t&&(this._delay=t,getFrameManager().refreshInterval(t)),"number"==typeof e?(this._frames=e,getFrameManager().frameBuffer(e)):void 0):this._frames},e.$tracer.co_varnames=["frames","delay"],e.$tracer.minArgs=0,e.$delay=function(e){return void 0!==e?this.$tracer(void 0,e):void 0===this._delay?h:this._delay},e.$delay.co_varnames=["delay"],e._setworldcoordinates=function(e,t,n,r){return getFrameManager().turtles(),this.setUpWorld(e,t,n,r),this._sprites&&applyWorld(this,this._sprites),this._background&&applyWorld(this,this._background),this.$clear()},e.$setworldcoordinates=function(e,t,n,r){return this._mode="world",this._setworldcoordinates(e,t,n,r)},e.$setworldcoordinates.co_varnames=["llx","lly","urx","ury"],e.minArgs=4,e.$clear=e.$clearscreen=function(){return this.reset(),this.$reset()},e.$update=function(){return getFrameManager().update()},e.$reset=e.$resetscreen=function(){var e=this,t=getFrameManager().turtles();return getFrameManager().addFrame((function(){applyWorld(e,e._sprites),applyWorld(e,e._background);for(var n=0;n1&&t[s]&&t[s].test(r),r===a||i){e._keyListeners[r](),e._createKeyRepeater(r,s),n.preventDefault();break}}},getTarget().addEventListener("keydown",this._keyDownListener))},e._createKeyUpListener=function(){var e=this;this._keyUpListener||(this._keyUpListener=function(t){var n=e._keyLogger[t.charCode||t.keyCode];void 0!==n&&(t.preventDefault(),window.clearInterval(n),window.clearTimeout(n),delete e._keyLogger[t.charCode||t.keyCode])},getTarget().addEventListener("keyup",this._keyUpListener))},e.$title=function(e){document.title=e},e.$title.minArgs=1,e.$title.co_varnames=["title"],e.$listen=function(){this._createKeyUpListener(),this._createKeyDownListener()},e.$onkey=function(e,t){if("function"==typeof t){var n=e;e=t,t=n}t=String(t).toLowerCase(),e&&"function"==typeof e?(this._keyListeners||(this._keyListeners={}),this._keyListeners[t]=e):delete this._keyListeners[t]},e.$onkey.minArgs=2,e.$onkey.co_varnames=["method","keyValue"],e.$onscreenclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onscreenclick.minArgs=1,e.$onscreenclick.co_varnames=["method","btn","add"],e.$ontimer=function(e,t){this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),e&&"number"==typeof t&&(this._timer=window.setTimeout(e,Math.max(0,0|t)))},e.$ontimer.minArgs=0,e.$ontimer.co_varnames=["method","interval"]}(Screen.prototype);var g=new Image;function removeLayer(e){e&&e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas)}function clearLayer(e,t,n){e&&(e.save(),e.setTransform(1,0,0,1,0,0),t?(e.fillStyle=t,e.fillRect(0,0,e.canvas.width,e.canvas.height)):e.clearRect(0,0,e.canvas.width,e.canvas.height),n&&e.drawImage(n,0,0),e.restore())}function drawTurtle(e,t){var n,r,i,s=d[e.shape],a=getScreen(),o=(getWidth(),getHeight(),a.xScale),l=a.yScale;if(t){if(n=Math.cos(e.radians)/o,r=Math.sin(e.radians)/l,i=Math.atan2(r,n)-Math.PI/2,t.save(),t.translate(e.x,e.y),t.scale(o,l),s.nodeName){var u=s.naturalWidth,c=s.naturalHeight;t.drawImage(s,0,0,u,c,-u/2,-c/2,u,c)}else{t.rotate(i),t.beginPath(),t.lineWidth=1,t.strokeStyle=e.color,t.fillStyle=e.fill,t.moveTo(-s[0][0],s[0][1]);for(var h=1;ho)throw u=l===o?"exactly "+o:"between "+l+" and "+o,new Sk.builtin.TypeError(a+"() takes "+u+" positional argument(s) ("+d.length+" given)");for(e=d.length;--e>=0;)void 0!==d[e]&&(d[e]instanceof Sk.builtin.func?d[e]=pythonToJavascriptFunction(d[e]):d[e]instanceof Sk.builtin.method?d[e]=pythonToJavascriptFunction(d[e].im_func,d[e].im_self):d[e]&&d[e].$d instanceof Sk.builtin.dict&&d[e].instance?d[e]=d[e].instance:d[e]=Sk.ffi.remapToJs(d[e]));var _=d.slice(0);for(d=[],e=_.length;e>=0;--e)null!==_[e]&&(d[e]=_[e]);try{t=f[n].apply(f,d)}catch(g){throw window&&window.console&&(window.console.log("wrapped method failed"),window.console.log(g.stack)),g}return t instanceof InstantPromise&&(t=t.lastResult),t instanceof Promise?(t=t.catch((function(e){throw window&&window.console&&(window.console.log("promise failed"),window.console.log(e.stack)),e})),(i=new Sk.misceval.Suspension).resume=function(){return void 0===s?Sk.builtin.none.none$:Sk.ffi.remapToPy(s)},i.data={type:"Sk.promise",promise:t.then((function(e){return s=e,e}))},i):void 0===t?Sk.builtin.none.none$:h?t:"function"==typeof c?c(t):Sk.ffi.remapToPy(t)},i.co_name=new Sk.builtin.str(a),i.co_varnames=u.slice(),i.$defaults=[];for(var d=l;d")})),e.__iter__=new Sk.builtin.func((function(n){var e=n.lineList;return Sk.builtin.makeGenerator((function(){if(!(this.$index>=this.$lines.length))return new Sk.builtin.str(this.$lines[this.$index++])}),{$obj:n,$index:0,$lines:e})})),e.read=new Sk.builtin.func((function(n,e){if(n.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var i=n.data$.length;void 0===e&&(e=i);var t=new Sk.builtin.str(n.data$.substr(n.pos$,e));return n.pos$+=e,n.pos$>=i&&(n.pos$=i),t})),e.readline=new Sk.builtin.func((function(n,e){var i="";return n.currentLinee===o)).length)throw new i("one of the hex, bytes, bytes_le, fields, or int arguments must be given");if(u!==o){u=u.toString().replace("urn:","").replace("uuid:","");let e=0,i=u.length-1;for(;"{}".indexOf(u[e])>=0;)e++;for(;"{}".indexOf(u[i])>=0;)i--;if(u=u.slice(e,i+1),u=u.replace(S,""),32!==u.length)throw new s("badly formed hexadecimal UUID string");f=d(n,[new t(u),U])}if(c!==o){if(!(c instanceof e))throw new i("bytes_le should be a bytes instance");if(c=c.valueOf(),16!==c.length)throw new s("bytes_le is not a 16-char string");h=switchBytesBytesLe(c),h=new e(h)}if(h!==o){if(!(h instanceof e))throw new i("bytes_le should be a bytes instance");if(16!==h.valueOf().length)throw new s("bytes is not a 16-char string");f=d(w,[h],["byteorder",v])}if(p!==o)throw new r("fields argument is not yet supported");if(f!==o&&(g(f,_,"Lt")||((e,t)=>g(e,t,"GtE"))(f,y)))throw new s("int is out of range (need a 128-bit value)");this.$int=f,this.$isSafe=I},tp$str(){const e=E.nb$remainder(this.$int).toString();return new t(`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`)},$r(){const e=u(this.ob$type,t.$name),n=c(this.tp$str());return new t(`${e}(${n})`)},tp$hash(){return this.$int.tp$hash()},tp$richcompare(e,t){return e instanceof R?this.$int.tp$richcompare(e.$int,t):l},tp$as_number:!0,nb$int(){return this.$int}},getsets:{int:{$get(){return this.$int}},is_safe:{$get(){return this.$isSafe}},bytes:{$get(){return d(b,[this.$int,U,v])}},bytes_le:{$get(){const n=this.tp$getattr(new t("bytes")).valueOf();return new e(switchBytesBytesLe(n))}},fields:{$get:()=>notImplemented()},time_low:{$get:()=>notImplemented()},time_mid:{$get:()=>notImplemented()},time_hi_version:{$get:()=>notImplemented()},clock_seq_hi_variant:{$get:()=>notImplemented()},clock_seq_low:{$get:()=>notImplemented()},time:{$get:()=>notImplemented()},clock_seq:{$get:()=>notImplemented()},node:{$get:()=>notImplemented()},hex:{$get(){return E.nb$remainder(this.$int)}},urn:{$get(){return new t(`urn:uuid:${this}`)}},variant:{$get:()=>notImplemented()},version:{$get:()=>notImplemented()}}});return h("uuid",p,{uuid1:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid2:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid3:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid4:{$meth(){const t=new e(f.getRandomValues(new Uint8Array(16)));return d(R,[],["bytes",t,"version",I])},$flags:{NoArgs:!0}},uuid5:{$meth(){notImplemented()},$flags:{FastCall:!0}}}),p}',"src/lib/webbrowser.js":'var $builtinmodule=function(n){var e={},t="undefined"!=typeof window&&"undefined"!=typeof window.navigator;function open_tab(n){return Sk.builtin.pyCheckType("url","string",Sk.builtin.checkString(n)),t?(n=n.$jsstr(),window.open(n,"_blank"),Sk.builtin.bool.true$):Sk.builtin.bool.false$}return e.__name__=new Sk.builtin.str("webbrowser"),e.open=new Sk.builtin.func((function open(n){return Sk.builtin.pyCheckArgsLen("open",arguments.length+1,1,3),open_tab(n)})),e.open_new=new Sk.builtin.func((function open_new(n){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,1,1),open_tab(n)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,1,1),open_tab(n)})),e.DefaultBrowser=Sk.misceval.buildClass(e,(function dflbrowser(n,e){e.__init__=new Sk.builtin.func((function __init__(n){return Sk.builtin.none.none$})),e.open=new Sk.builtin.func((function open(n,e){return Sk.builtin.pyCheckArgsLen("open",arguments.length,2,4),open_tab(e)})),e.open_new=new Sk.builtin.func((function open_new(n,e){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,2,2),open_tab(e)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n,e){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,2,2),open_tab(e)}))}),"DefaultBrowser",[]),e.get=new Sk.builtin.func((function get(){return Sk.builtin.pyCheckArgsLen("get",arguments.length,0,1),Sk.misceval.callsimArray(e.DefaultBrowser,[])})),e};',"src/lib/webgl/math.js":'var $builtinmodule=function(e){var n={};return n.Mat44=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func((function(e){Sk.misceval.callsimArray(t.loadIdentity,[e]),e.stack=[]})),t.push=new Sk.builtin.func((function(e){e.stack.push(e.elements.slice(0))})),t.pop=new Sk.builtin.func((function(e){e.elements=e.stack.pop()})),t.loadIdentity=new Sk.builtin.func((function(e){e.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]})),t.transform3=new Sk.builtin.func((function(e,t){var l=e.elements;return Sk.misceval.callsimArray(n.Vec3,[l[0]*t.x+l[4]*t.y+l[8]*t.z,l[1]*t.x+l[5]*t.y+l[9]*t.z,l[2]*t.x+l[6]*t.y+l[10]*t.z])})),t.scale=new Sk.builtin.func((function(e,n,t,l){return e.elements[0]*=n,e.elements[1]*=n,e.elements[2]*=n,e.elements[3]*=n,e.elements[4]*=t,e.elements[5]*=t,e.elements[6]*=t,e.elements[7]*=t,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,e.elements[11]*=l,e})),t.translate=new Sk.builtin.func((function(e,n,t,l){return e.elements[12]+=e.elements[0]*n+e.elements[4]*t+e.elements[8]*l,e.elements[13]+=e.elements[1]*n+e.elements[5]*t+e.elements[9]*l,e.elements[14]+=e.elements[2]*n+e.elements[6]*t+e.elements[10]*l,e.elements[15]+=e.elements[3]*n+e.elements[7]*t+e.elements[11]*l,e})),t.rotate=new Sk.builtin.func((function(e,t,l,s,m){var i,a,c,u,r,f,o,k,S,y,b,v=Math.sqrt(l*l+s*s+m*m),_=Math.sin(t*Math.PI/180),w=Math.cos(t*Math.PI/180);v>0&&(i=(l/=v)*l,a=(s/=v)*s,c=(m/=v)*m,u=l*s,r=s*m,f=m*l,o=l*_,k=s*_,S=m*_,y=1-w,(b=Sk.misceval.callsimArray(n.Mat44)).elements[0]=y*i+w,b.elements[1]=y*u-S,b.elements[2]=y*f+k,b.elements[3]=0,b.elements[4]=y*u+S,b.elements[5]=y*a+w,b.elements[6]=y*r-o,b.elements[7]=0,b.elements[8]=y*f-k,b.elements[9]=y*r+o,b.elements[10]=y*c+w,b.elements[11]=0,b.elements[12]=0,b.elements[13]=0,b.elements[14]=0,b.elements[15]=1,b=b.multiply(e),e.elements=b.elements);return e})),t.multiply=new Sk.builtin.func((function(e,t){for(var l=Sk.misceval.callsimArray(n.Mat44),s=0;s<4;s++)l.elements[4*s+0]=e.elements[4*s+0]*t.elements[0]+e.elements[4*s+1]*t.elements[4]+e.elements[4*s+2]*t.elements[8]+e.elements[4*s+3]*t.elements[12],l.elements[4*s+1]=e.elements[4*s+0]*t.elements[1]+e.elements[4*s+1]*t.elements[5]+e.elements[4*s+2]*t.elements[9]+e.elements[4*s+3]*t.elements[13],l.elements[4*s+2]=e.elements[4*s+0]*t.elements[2]+e.elements[4*s+1]*t.elements[6]+e.elements[4*s+2]*t.elements[10]+e.elements[4*s+3]*t.elements[14],l.elements[4*s+3]=e.elements[4*s+0]*t.elements[3]+e.elements[4*s+1]*t.elements[7]+e.elements[4*s+2]*t.elements[11]+e.elements[4*s+3]*t.elements[15];return e.elements=l.elements,e})),t.lookAt=new Sk.builtin.func((function(e,t,l,s,m,i,a,c,u,r){var f=[t-m,l-i,s-a],o=Math.sqrt(f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);o&&(f[0]/=o,f[1]/=o,f[2]/=o);var k=[c,u,r],S=[];S[0]=k[1]*f[2]-k[2]*f[1],S[1]=-k[0]*f[2]+k[2]*f[0],S[2]=k[0]*f[1]-k[1]*f[0],k[0]=f[1]*S[2]-f[2]*S[1],k[1]=-f[0]*S[2]+f[2]*S[0],k[2]=f[0]*S[1]-f[1]*S[0],(o=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]))&&(S[0]/=o,S[1]/=o,S[2]/=o),(o=Math.sqrt(k[0]*k[0]+k[1]*k[1]+k[2]*k[2]))&&(k[0]/=o,k[1]/=o,k[2]/=o);var y=Sk.misceval.callsimArray(n.Mat44);return y.elements[0]=S[0],y.elements[4]=S[1],y.elements[8]=S[2],y.elements[12]=0,y.elements[1]=k[0],y.elements[5]=k[1],y.elements[9]=k[2],y.elements[13]=0,y.elements[2]=f[0],y.elements[6]=f[1],y.elements[10]=f[2],y.elements[14]=0,y.elements[3]=0,y.elements[7]=0,y.elements[11]=0,y.elements[15]=1,y=y.multiply(e),e.elements=y.elements,e.translate(-t,-l,-s),e}))}),"Mat44",[]),n.Mat33=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e){Sk.misceval.callsimArray(n.loadIdentity,[e])})),n.loadIdentity=new Sk.builtin.func((function(e){e.elements=[1,0,0,0,1,0,0,0,1]}))}),"Mat33",[]),n.Vec3=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func((function(e,n,t,l){e.x=n,e.y=t,e.z=l})),t.__sub__=new Sk.builtin.func((function(e,t){return Sk.misceval.callsimArray(n.Vec3,[e.x-t.x,e.y-t.y,e.z-t.z])}))}),"Vec3",[]),n.cross=new Sk.builtin.func((function(e,t){return Sk.asserts.assert(e instanceof n.Vec3&&t instanceof n.Vec3),Sk.misceval.callsimArray(n.Vec3,[e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x])})),n};',"src/lib/webgl/matrix4.js":"var $builtinmodule=function(n){var r={},t=new Float32Array(3),a=new Float32Array(3),u=new Float32Array(3),e=(new Float32Array(4),new Float32Array(4),new Float32Array(4),new Float32Array(16),new Float32Array(16),new Float32Array(16),function(n,r){for(var t=0,a=r.length,u=0;u1e-5)for(u=0;u{const n=e.$d;var r={},Buffer=function(t,e){var r=e||n.ARRAY_BUFFER,i=n.createBuffer();if(this.target=r,this.buf=i,this.set(t),this.numComponents_=t.numComponents,this.numElements_=t.numElements,this.totalComponents_=this.numComponents_*this.numElements_,t.buffer instanceof Float32Array)this.type_=n.FLOAT;else if(t.buffer instanceof Uint8Array)this.type_=n.UNSIGNED_BYTE;else if(t.buffer instanceof Int8Array)this.type_=n._BYTE;else if(t.buffer instanceof Uint16Array)this.type_=n.UNSIGNED_SHORT;else{if(!(t.buffer instanceof Int16Array))throw"unhandled type:"+typeof t.buffer;this.type_=n.SHORT}};return Buffer.prototype.set=function(t){n.bindBuffer(this.target,this.buf),n.bufferData(this.target,t.buffer,n.STATIC_DRAW)},Buffer.prototype.type=function(){return this.type_},Buffer.prototype.numComponents=function(){return this.numComponents_},Buffer.prototype.numElements=function(){return this.numElements_},Buffer.prototype.totalComponents=function(){return this.totalComponents_},Buffer.prototype.buffer=function(){return this.buf},Buffer.prototype.stride=function(){return 0},Buffer.prototype.offset=function(){return 0},r.Model=Sk.misceval.buildClass(r,(function(e,r){r.__init__=new Sk.builtin.func((function(e,r,i,f){e.buffers={};var setBuffer=function(t,r){var i="indices"==t?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER;let f=e.buffers[t];f?f.set(r):f=new Buffer(r,i),e.buffers[t]=f};for(t in i)setBuffer(t,i[t]);var o={},s=0;for(var u in f)o[u]=s++;e.mode=n.TRIANGLES,e.textures=f.v,e.textureUnits=o,e.shader=r})),r.drawPrep=new Sk.builtin.func((function(t,e){var r=t.shader,i=t.buffers,f=t.textures;for(var o in e=Sk.ffi.remapToJs(e),Sk.misceval.callsimArray(r.use,[r]),i){var s=i[o];if("indices"==o)n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,s.buffer());else{var u=r.attrib[o];u&&u(s)}}for(var a in f){var m=t.textureUnits[a];r.setUniform$impl(r,f,m),f[a].bindToUnit(m)}for(var p in e)r.setUniform$impl(r,p,e[p])})),r.draw=new Sk.builtin.func((function(t,e,r){var i=t.shader;e=Sk.ffi.remapToJs(e);for(let n in e)i.setUniform$impl(i,n,e[n]);if(r)for(var f in r){var o=t.textureUnits[f];i.setUniform$impl(i,f,o),r[f].bindToUnit(o)}var s=t.buffers;n.drawElements(t.mode,s.indices.totalComponents(),n.UNSIGNED_SHORT,0)}))}),"Model",[]),r}))};',"src/lib/webgl/primitives.js":'var $builtinmodule=function(t){var n={},AttribBuffer=function(t,n,e){e=e||"Float32Array";var r=window[e];n.length?(this.buffer=new r(n),n=this.buffer.length/t,this.cursor=n):(this.buffer=new r(t*n),this.cursor=0),this.numComponents=t,this.numElements=n,this.type=e};return AttribBuffer.prototype.stride=function(){return 0},AttribBuffer.prototype.offset=function(){return 0},AttribBuffer.prototype.getElement=function(t){for(var n=t*this.numComponents,e=[],r=0;r
\'+n+"
"},e=\'This page requires a browser that supports WebGL.
Click here to upgrade your browser.\';return t.Context=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){var i=document.getElementById(t.v),r=function(n,t){var i=document.getElementById(n);if(t||(t=i.getElementsByTagName("canvas")[0]),t){var r=function(n){for(var t=["webgl","experimental-webgl","webkit-3d","moz-webgl"],e=null,i=0;i7||7==a.Chrome[0]&&a.Chrome[1]>0||7==a.Chrome[0]&&0==a.Chrome[1]&&a.Chrome[2]>=521)?i.innerHTML=makeFailHTML(\'It doesn\\\'t appear your computer can support WebGL.
Click here for more information.\'):i.innerHTML=makeFailHTML(e)}return r}i.innerHTML=makeFailHTML(e)}(t.v,i);if(!r)throw new Error("Your browser does not appear to support WebGL.");for(var u in n.gl=r,r.__proto__)if("number"==typeof r.__proto__[u])Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),r.__proto__[u]);else if("function"==typeof r.__proto__[u])switch(u){case"bufferData":case"clearColor":case"drawArrays":case"getAttribLocation":case"getUniformLocation":case"shaderSource":case"uniformMatrix4fv":case"vertexAttribPointer":case"viewport":break;default:!function(t){Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),new Sk.builtin.func((function(){return r.__proto__[t].apply(r,arguments)})))}(u)}r.clearColor(100/255,149/255,237/255,1),r.clear(r.COLOR_BUFFER_BIT)})),t.tp$getattr=Sk.generic.getAttr,t.bufferData=new Sk.builtin.func((function(n,t,e,i){n.gl.bufferData(t,e.v,i)})),t.clearColor=new Sk.builtin.func((function(n,t,e,i,r){n.gl.clearColor(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.getAttribLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getAttribLocation(t,e.v)})),t.getUniformLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getUniformLocation(t,e.v)})),t.shaderSource=new Sk.builtin.func((function(n,t,e){n.gl.shaderSource(t,e.v)})),t.drawArrays=new Sk.builtin.func((function(n,t,e,i){n.gl.drawArrays(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i))})),t.vertexAttribPointer=new Sk.builtin.func((function(n,t,e,i,r,u,a){n.gl.vertexAttribPointer(t,Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),r,Sk.builtin.asnum$(u),Sk.builtin.asnum$(a))})),t.viewport=new Sk.builtin.func((function(n,t,e,i,r){n.gl.viewport(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.uniformMatrix4fv=new Sk.builtin.func((function(n,t,e,i){n.gl.uniformMatrix4fv(Sk.builtin.asnum$(t),e,i.v)})),t.setDrawFunc=new Sk.builtin.func((function(n,t){var e=(new Date).getTime();setInterval((function(){Sk.misceval.callsimArray(t,[n,(new Date).getTime()-e])}),1e3/60)}))}),"Context",[]),t.Float32Array=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){n.v="number"==typeof t?new Float32Array(t):new Float32Array(Sk.ffi.remapToJs(t))})),t.__repr__=new Sk.builtin.func((function(n){for(var t=[],e=0;e(z=e.$d,O)),(e=>{O=e.$d}));return S(L,(()=>{function _strftime(e){return t=>e.$strftime(t).toString().toLowerCase()}function _strftime_timetuple(e,t){return O.strftime.tp$call([new i(e),t]).toString().toLowerCase()}const l=new i("fromordinal");function _struct_time(t){return O.struct_time.tp$call([new s(t.map((t=>new e(t))))])}function _localized_month(){const e=[()=>""];for(let t=0;t<12;t++){const i=new k(2001,t+1,1);e.push(_strftime(i))}return e}function _localized_day(){const e=[];for(let t=0;t<7;t++){const i=new k(2001,1,t+1);e.push(_strftime(i))}return e}const S={__name__:new i("_strptime")},k=z.date,L=z.timedelta,E=z.timezone;function _getlang(){return[t,t]}class LocaleTime{constructor(){this.lang=_getlang(),this.__calc_weekday(),this.__calc_month(),this.__calc_am_pm(),this.__calc_timezone(),this.__calc_date_time()}__calc_weekday(){this.a_weekday=_localized_day().map((e=>e("%a"))),this.f_weekday=_localized_day().map((e=>e("%A")))}__calc_month(){this.a_month=_localized_month().map((e=>e("%b"))),this.f_month=_localized_month().map((e=>e("%B")))}__calc_am_pm(){const e=[];[1,22].forEach((t=>{const i=_strftime_timetuple("%p",_struct_time([1999,3,17,t,44,55,2,76,0]));e.push(i)})),this.am_pm=e}__calc_date_time(){const e=_struct_time([1999,3,17,22,44,55,2,76,0]),i=[t,t,t];i[0]=_strftime_timetuple("%c",e),i[1]=_strftime_timetuple("%x",e),i[2]=_strftime_timetuple("%X",e);const s=[["%","%%"],[this.f_weekday[2],"%A"],[this.f_month[3],"%B"],[this.a_weekday[2],"%a"],[this.a_month[3],"%b"],[this.am_pm[1],"%p"],["1999","%Y"],["99","%y"],["22","%H"],["44","%M"],["55","%S"],["76","%j"],["17","%d"],["03","%m"],["3","%m"],["2","%w"],["10","%I"]];s.push(...this.timezone.flat().map((e=>[e,"%Z"]))),[[0,"%c"],[1,"%x"],[2,"%X"]].forEach((([e,t])=>{let n=i[e];s.forEach((([e,t])=>{e&&(n=n.replace(e,t))}));let a;a=_strftime_timetuple(t,_struct_time([1999,1,3,1,1,1,6,3,0])).includes("00")?"%W":"%U",i[e]=n.replace("11",a)})),this.LC_date_time=i[0],this.LC_date=i[1],this.LC_time=i[2]}__calc_timezone(){try{O.tzset.tp$call([])}catch{}this.tzname=O.tzname.v.map((e=>e.toString())),this.daylight=w(O.daylight);const e=[this.tzname[0].toLowerCase(),"utc","gmt"];let t;t=this.daylight?[this.tzname[1].toLowerCase()]:[],this.timezone=[e,t]}}class TimeRE{constructor(e=null){this.locale_time=e||new LocaleTime,Object.assign(this,{d:"(?3[0-1]|[1-2]\\\\d|0[1-9]|[1-9]| [1-9])",f:"(?[0-9]{1,6})",H:"(?2[0-3]|[0-1]\\\\d|\\\\d)",I:"(?1[0-2]|0[1-9]|[1-9])",G:"(?\\\\d\\\\d\\\\d\\\\d)",j:"(?36[0-6]|3[0-5]\\\\d|[1-2]\\\\d\\\\d|0[1-9]\\\\d|00[1-9]|[1-9]\\\\d|0[1-9]|[1-9])",m:"(?1[0-2]|0[1-9]|[1-9])",M:"(?[0-5]\\\\d|\\\\d)",S:"(?6[0-1]|[0-5]\\\\d|\\\\d)",U:"(?5[0-3]|[0-4]\\\\d|\\\\d)",w:"(?[0-6])",u:"(?[1-7])",V:"(?5[0-3]|0[1-9]|[1-4]\\\\d|\\\\d)",y:"(?\\\\d\\\\d)",Y:"(?\\\\d\\\\d\\\\d\\\\d)",z:"(?[+-]\\\\d\\\\d:?[0-5]\\\\d(:?[0-5]\\\\d(\\\\.\\\\d{1,6})?)?|Z)",A:this.__seqToRE(this.locale_time.f_weekday,"A"),a:this.__seqToRE(this.locale_time.a_weekday,"a"),B:this.__seqToRE(this.locale_time.f_month.slice(1),"B"),b:this.__seqToRE(this.locale_time.a_month.slice(1),"b"),p:this.__seqToRE(this.locale_time.am_pm,"p"),Z:this.__seqToRE(this.locale_time.timezone.flat(),"Z"),"%":"%"}),this.W=this.U.replace("U","W"),this.x=this.pattern(this.locale_time.LC_date),this.X=this.pattern(this.locale_time.LC_time),this.c=this.pattern(this.locale_time.LC_date_time)}__seqToRE(e,t){if((e=e.slice(0).sort(((e,t)=>t.length-e.length))).every((e=>""===e)))return"";return`(?<${t}>${e.map((e=>e)).join("|")})`}pattern(e){let t="";for(e=(e=e.replace(b,"\\\\$1")).replace(v,"\\\\s+");e.includes("%");){const i=e.indexOf("%")+1,s=this[e[i]];if(void 0===s)throw new h(e[i]);t=`${t}${e.slice(0,i-1)}${s}`,e=e.slice(i+1)}return t+e}compile(e){return new RegExp("^"+this.pattern(e),"i")}}let C=new TimeRE;const T=5;let A={};function _strptime(i,s="%a %b %d %H:%M:%S %Y"){function _checkString(e,t){if("string"!=typeof e&&!u(e))throw new m(`strptime() argument ${t} must be a str, not \'${o(e)}\'`)}_checkString(i,0),_checkString(s,1),i=i.toString(),s=s.toString();let n,_=C.locale_time;if(Object.keys(A).length>T&&(A={}),n=A[s],void 0===n)try{n=C.compile(s)}catch(V){if(V instanceof h){let e=V.args.v[0];throw"\\\\"==e&&(e="%"),new d(`\'${e}\' is a bad directive in format \'${s}\'`)}if(V instanceof f)throw new d("stray %% in format \'"+s+"\'");throw V}const c=i.match(n);if(null===c)throw new d(`time data \'${i}\' does not match format \'${s}\'`);if(i.length!==c[0].length)throw new d(`unconverted data remains: ${i.slice(c[0].length)}`);let w=t,p=t,g=1,$=1,y=0,S=0,b=0,v=0,z=-1,L=t,E=0,I=t,M=t,H=t,Y=t,j=t,U=c.groups||{};if(Object.keys(U).forEach((e=>{if(void 0!==U[e])if("y"===e)p=_as_integer(U.y),p+=p<=68?2e3:1900;else if("Y"===e)p=_as_integer(U.Y);else if("G"===e)w=_as_integer(U.G);else if("m"===e)g=_as_integer(U.m);else if("B"===e)g=_.f_month.indexOf(U.B.toLowerCase());else if("b"===e)g=_.a_month.indexOf(U.b.toLowerCase());else if("d"===e)$=_as_integer(U.d);else if("H"===e)y=_as_integer(U.H);else if("H"===e)y=_as_integer(U.H);else if("I"===e){y=_as_integer(U.I);const e=(U.p||"").toLowerCase();["",_.am_pm[0]].includes(e)?12===y&&(y=0):e===_.am_pm[1]&&12!==y&&(y+=12)}else if("M"===e)S=_as_integer(U.M);else if("S"===e)b=_as_integer(U.S);else if("f"===e){let e=U.f;e+="0".repeat(6-e.length),v=_as_integer(e)}else if("A"===e)Y=_.f_weekday.indexOf(U.A.toLowerCase());else if("a"===e)Y=_.a_weekday.indexOf(U.a.toLowerCase());else if("w"===e)Y=_as_integer(U.w),0===Y?Y=6:Y-=1;else if("u"===e)Y=_as_integer(U.u),Y-=1;else if("j"===e)j=_as_integer(U.j);else if(["U","W"].includes(e))M=_as_integer(U[e]),H="U"===e?6:0;else if("V"===e)I=_as_integer(U.V);else if("z"===e){let e=U.z;if("Z"===e)L=0;else{if(":"===e[3]&&(e=e.slice(0,3)+e.slice(4),e.length>5)){if(":"!==e[5]){const e=`Inconsistent use of : in ${U.z}`;throw new d(e)}e=e.slice(0,5)+e.slice(6)}const t=_as_integer(e.slice(1,3)),i=_as_integer(e.slice(3,5)),s=_as_integer(e.slice(5,7)||0);L=3600*t+60*i+s;const n=e.slice(8),a="0".repeat(6-n.length);E=_as_integer(n+a),e.startsWith("-")&&(L=-L,E=-E)}}else if("Z"===e){let e=U.Z.toLowerCase(),t=0;for(let i of _.timezone){if(i.includes(e)){const i=O.tzname.v;if(r(i[0],i[1],"Eq")&&a(O.daylight)&&!["utc","gmt"].includes(e))break;z=t}t++}}})),p===t&&w!==t){if(I===t||Y===t)throw new d("ISO year directive \'%G\' must be used with the ISO week directive \'%V\' and a weekday directive (\'%A\',\'%a\', \'%w\', or \'%u\').");if(j!==t)throw new d("Day of the year directive \'%j\' is not compatible with ISO year directive \'%G\'.Use \'%Y\' instead.")}else if(M===t&&I!==t)throw new d(Y===t?"ISO week directive \'%V\' must be used with the ISO year directive \'%G\' and a weekday directive (\'%A\', \'%a\', \'%w\', or \'%u\').":"ISO week directive \'%V\' is incompatible with the year directive \'%Y\'. Use the ISO year \'%G\' instead.");let x=!1;if(p===t&&2===g&&29===$?(p=1904,x=!0):p===t&&(p=1900),j===t&&Y!==t){if(M!==t){j=function _calc_julian_from_U_or_W(e,t,i,s){let n=(new k(e,1,1).$toOrdinal()+6)%7;return s||(n=(n+1)%7,i=(i+1)%7),0===t?1+i-n:(7-n)%7+7*(t-1)+1+i}(p,M,Y,0===H)}else w!==t&&I!==t&&([p,j]=function _calc_julian_from_V(e,t,i){let s=7*t+i-((new k(e,1,4).$toOrdinal()%7||7)+3);return s<1&&(s+=new k(e,1,1).$toOrdinal(),s-=new k(e-=1,1,1).$toOrdinal()),[e,s]}(w,I,Y+1));if(j!==t&&j<=0){p-=1;const e=function _is_leap(e){return e%4==0&&(e%100!=0||e%400==0)}(p)?366:365;j+=e}}if(j===t)j=new k(p,g,$).$toOrdinal()-new k(p,1,1).$toOrdinal()+1;else{const t=function _fromordinal(t){return k.tp$getattr(l).tp$call([new e(t)])}(j-1+new k(p,1,1).$toOrdinal());p=t.$year,g=t.$month,$=t.$day}Y===t&&(Y=(new k(p,g,$).$toOrdinal()+6)%7);const R=U.Z||t;return x&&(p=1900),[[p,g,$,y,S,b,Y,j,z,R,L],v,E]}return _("_strptime",S,{_strptime_time:{$meth:function _strptime_time(t,i="%a %b %d %H:%M:%S %Y"){let n=_strptime(t,i)[0].slice(0,11);return n=n.map(((t,i)=>i<9?new e(t):p(t))),O.struct_time.tp$call([new s(n)])},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime_datetime:{$meth:function _strptime_datetime(s,r,l="%a %b %d %H:%M:%S %Y"){const[o,_,c]=_strptime(r,l),[m,d]=o.slice(-2),h=o.slice(0,6);let f,u;return h.push(_),h.map((t=>new e(t))),d!==t&&(f=new L(0,d,c),u=a(m)?new E(f,new i(m)):new E(f),h.push(u)),n(s,h)},$flags:{NamedArgs:["cls","data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime:{$meth(i,n){const a=_strptime(i,n);return a[0]=new s(a[0].map((i=>i===t?i:new e(i)))),a[1]=new e(a[1]),a[2]=new e(a[2]),new s(a)},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_getlang:{$meth:()=>p(_getlang()),$flags:{NoArgs:!0}}}),S.LocaleTime=c("_strptime.LocaleTime",{constructor:function(){this.v=new LocaleTime},slots:{tp$getattr(e,t){return this.v.hasOwnProperty(e.toString())?p(this.v[e.toString()]):$.call(this,e,t)},tp$setattr(e,t){if(!this.v.hasOwnProperty(e.toString()))return y.call(this,e,t);this.v[e.toString()]=g(t)}}}),S}))}'}}},312:function(t,e,n){(function(){"use strict";var t=t||{};t.scope={},t.ASSUME_ES5=!1,t.ASSUME_NO_NATIVE_MAP=!1,t.ASSUME_NO_NATIVE_SET=!1,t.SIMPLE_FROUND_POLYFILL=!1,t.ISOLATE_POLYFILLS=!1,t.FORCE_POLYFILL_PROMISE=!1,t.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,t.defineProperty=t.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){return t==Array.prototype||t==Object.prototype||(t[e]=n.value),t},t.getGlobal=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof n.g&&n.g];for(var e=0;e(e=e||0)&&(e=Math.max(e+i,0));e{Sk.abstr.setUpSlots(t),Sk.abstr.setUpMethods(t),Sk.abstr.setUpGetSets(t),Sk.abstr.setUpClassMethods(t)})),n(19),n(20),n(21),[Sk.builtin.str,Sk.builtin.none,Sk.builtin.NotImplemented,Sk.builtin.object].forEach((t=>{(t=t.prototype).__doc__=t.hasOwnProperty("tp$doc")?new Sk.builtin.str(t.tp$doc):Sk.builtin.none.none$})),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29),n(31),n(32),n(33),n(34),n(35),n(36),n(37),n(38),n(39),n(40),n(41),n(42),n(43),n(44),n(45),n(46),n(47),n(48),n(49),n(50),n(51),n(52),n(53),n(66),n(54),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65)},function(t,e,n){(function(t){var e={build:{githash:"1d6da87991edd93117a53858367c32f27d77b396",date:"2023-09-01T06:58:47.589Z"}};e.global=void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e.exportSymbol=function(t,n){t=t.split(".");var i,s=e.global;for(i=0;i=t||0===e||4<=e)return"th";switch(e){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function o(t){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t)}var a={de_DE:{identifier:"de-DE",days:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),shortDays:"So Mo Di Mi Do Fr Sa".split(" "),months:"Januar Februar März April Mai Juni Juli August September Oktober November Dezember".split(" "),shortMonths:"Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d.%m.%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},en_CA:{identifier:"en-CA",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},en_US:{identifier:"en-US",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%m/%d/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},es_MX:{identifier:"es-MX",days:"domingo lunes martes miércoles jueves viernes sábado".split(" "),shortDays:"dom lun mar mié jue vie sáb".split(" "),months:"enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre".split(" "),shortMonths:"ene feb mar abr may jun jul ago sep oct nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},fr_FR:{identifier:"fr-FR",days:"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),shortDays:"dim. lun. mar. mer. jeu. ven. sam.".split(" "),months:"janvier février mars avril mai juin juillet août septembre octobre novembre décembre".split(" "),shortMonths:"janv. févr. mars avril mai juin juil. août sept. oct. nov. déc.".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},it_IT:{identifier:"it-IT",days:"domenica lunedì martedì mercoledì giovedì venerdì sabato".split(" "),shortDays:"dom lun mar mer gio ven sab".split(" "),months:"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),shortMonths:"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},nl_NL:{identifier:"nl-NL",days:"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),shortDays:"zo ma di wo do vr za".split(" "),months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),shortMonths:"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},pt_BR:{identifier:"pt-BR",days:"domingo segunda terça quarta quinta sexta sábado".split(" "),shortDays:"Dom Seg Ter Qua Qui Sex Sáb".split(" "),months:"janeiro fevereiro março abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),shortMonths:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},ru_RU:{identifier:"ru-RU",days:"Воскресенье Понедельник Вторник Среда Четверг Пятница Суббота".split(" "),shortDays:"Вс Пн Вт Ср Чт Пт Сб".split(" "),months:"Январь Февраль Март Апрель Май Июнь Июль Август Сентябрь Октябрь Ноябрь Декабрь".split(" "),shortMonths:"янв фев мар апр май июн июл авг сен окт ноя дек".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X",D:"%d.%m.%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},tr_TR:{identifier:"tr-TR",days:"Pazar Pazartesi Salı Çarşamba Perşembe Cuma Cumartesi".split(" "),shortDays:"Paz Pzt Sal Çrş Prş Cum Cts".split(" "),months:"Ocak Şubat Mart Nisan Mayıs Haziran Temmuz Ağustos Eylül Ekim Kasım Aralık".split(" "),shortMonths:"Oca Şub Mar Nis May Haz Tem Ağu Eyl Eki Kas Ara".split(" "),AM:"ÖÖ",PM:"ÖS",am:"ÖÖ",pm:"ÖS",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},zh_CN:{identifier:"zh-CN",days:"星期日 星期一 星期二 星期三 星期四 星期五 星期六".split(" "),shortDays:"日一二三四五六".split(""),months:"一月份 二月份 三月份 四月份 五月份 六月份 七月份 八月份 九月份 十月份 十一月份 十二月份".split(" "),shortMonths:"一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月".split(" "),AM:"上午",PM:"下午",am:"上午",pm:"下午",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}}},l=a.en_US,u=new function t(u,c,p){function h(t,a,l,u){for(var c="",p=null,_=!1,d=t.length,g=!1,b=0;ba.getHours()?l.am:l.pm;break;case 82:c+=h(l.formats.R,a,l,u);break;case 83:c+=e(a.getSeconds(),p);break;case 84:c+=h(l.formats.T,a,l,u);break;case 85:c+=e(s(a,"sunday"),p);break;case 87:c+=e(s(a,"monday"),p);break;case 88:c+=h(l.formats.X,a,l,u);break;case 89:c+=a.getFullYear();break;case 90:m&&0===f?c+="GMT":c+=(p=(p=(p=a).toString().match(/\(([\w\s]+)\)/))&&p[1])||"";break;case 97:c+=l.shortDays[a.getDay()];break;case 98:case 104:c+=l.shortMonths[a.getMonth()];break;case 99:c+=h(l.formats.c,a,l,u);break;case 100:c+=e(a.getDate(),p);break;case 101:c+=e(a.getDate(),null==p?" ":p);break;case 106:p=new Date(a.getFullYear(),0,1),c+=n(p=Math.ceil((a.getTime()-p.getTime())/864e5));break;case 107:c+=e(a.getHours(),null==p?" ":p);break;case 108:c+=e(i(a.getHours()),null==p?" ":p);break;case 109:c+=e(a.getMonth()+1,p);break;case 110:c+="\n";break;case 111:p=a.getDate(),c=l.ordinalSuffixes?c+(String(p)+(l.ordinalSuffixes[p-1]||r(p))):c+(String(p)+r(p));break;case 112:c+=12>a.getHours()?l.AM:l.PM;break;case 114:c+=h(l.formats.r,a,l,u);break;case 115:c+=Math.floor(u/1e3);break;case 116:c+="\t";break;case 117:c+=0===(p=a.getDay())?7:p;break;case 118:c+=h(l.formats.v,a,l,u);break;case 119:c+=a.getDay();break;case 120:c+=h(l.formats.x,a,l,u);break;case 121:c+=e(_=a.getFullYear()%100,p);break;case 122:m&&0===f?c+=g?"+00:00":"+0000":(p=0!==f?f/6e4:-a.getTimezoneOffset(),_=g?":":"",S=Math.abs(p%60),c+=(0>p?"-":"+")+e(Math.floor(Math.abs(p/60)))+_+e(S));break;default:_&&(c+="%"),c+=t[b]}p=null,_=!1}else 37===S?_=!0:c+=t[b]}return c}var _,d=u||l,f=c||0,m=p||!1,g=0,b=function(t,e){if(e){var n=e.getTime();if(m){var i=6e4*(e.getTimezoneOffset()||0);6e4*((e=new Date(n+i+f)).getTimezoneOffset()||0)!==i&&(e=6e4*(e.getTimezoneOffset()||0),e=new Date(n+e+f))}}else(n=Date.now())>g?(g=n,_=new Date(g),n=g,m&&(_=new Date(g+6e4*(_.getTimezoneOffset()||0)+f))):n=g,e=_;return h(t,e,d,n)};return b.localize=function(e){return new t(e||d,f,m)},b.localizeByIdentifier=function(t){var e=a[t];return e?b.localize(e):(o('[WARNING] No locale found with identifier "'+t+'".'),b)},b.timezone=function(e){var n=f,i=m,s=typeof e;return"number"!==s&&"string"!==s||(i=!0,"string"===s?n=(n="-"===e[0]?-1:1)*(60*(s=parseInt(e.slice(1,3),10))+(e=parseInt(e.slice(3,5),10)))*6e4:"number"===s&&(n=6e4*e)),new t(d,n,i)},b.utc=function(){return new t(d,f,!0)},b}(l,0,!1);if(void 0!==t)t.exports=u;else(function(){return this||(0,eval)("this")}()).strftime=u;"function"!=typeof Date.now&&(Date.now=function(){return+new Date})}()},function(t,e,n){t=n(5);const i=Sk.global.JSBI=void 0!==Sk.global.BigInt?{}:t;void 0===Sk.global.BigInt?(i.__isBigInt||(i.__isBigInt=t=>t instanceof i),i.powermod=(t,e,n)=>{const s=i.BigInt(1);let r=s;for(e=i.greaterThan(e,i.__ZERO)?e:i.unaryMinus(e);i.greaterThan(e,i.__ZERO);)i.bitwiseAnd(e,s)&&(r=i.remainder(i.multiply(r,t),n)),e=i.signedRightShift(e,s),t=i.remainder(i.multiply(t,t),n);return r}):Object.assign(i,{BigInt:Sk.global.BigInt,toNumber:t=>Number(t),toString:t=>t.toString(),__isBigInt:t=>"bigint"==typeof t,unaryMinus:t=>-t,bitwiseNot:t=>~t,bitwiseAnd:(t,e)=>t&e,bitwiseOr:(t,e)=>t|e,bitwiseXor:(t,e)=>t^e,exponentiate:(t,e)=>{const n=i.BigInt(1);let s=n;for(e=e>i.__ZERO?e:-e;e>i.__ZERO;)e&n&&(s*=t),e>>=n,t*=t;return s},powermod:(t,e,n)=>{const s=i.BigInt(1);let r=s;for(e=e>i.__ZERO?e:-e;e>i.__ZERO;)e&s&&(r=r*t%n),e>>=s,t=t*t%n;return r},multiply:(t,e)=>t*e,divide:(t,e)=>t/e,remainder:(t,e)=>t%e,add:(t,e)=>t+e,subtract:(t,e)=>t-e,leftShift:(t,e)=>t<t>>e,unsignedRightShift:(t,e)=>t>>>e,lessThan:(t,e)=>tt<=e,greaterThan:(t,e)=>t>e,greaterThanOrEqual:(t,e)=>t>=e,equal:(t,e)=>t===e,notEqual:(t,e)=>t!==e}),i.__ZERO=i.BigInt(0),i.__MAX_SAFE=i.BigInt(Number.MAX_SAFE_INTEGER),i.__MIN_SAFE=i.BigInt(-Number.MAX_SAFE_INTEGER),i.numberIfSafe=t=>i.lessThan(t,i.__MAX_SAFE)&&i.greaterThan(t,i.__MIN_SAFE)?i.toNumber(t):t,i.BigUp=t=>i.__isBigInt(t)?t:i.BigInt(t)},function(t,e,n){t.exports=function(){var t=Math.imul,e=Math.clz32,n=Math.abs,i=Math.max,s=Math.floor;class r extends Array{constructor(t,e){if(super(t),this.sign=e,t>r.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(t){var e=Number.isFinite;if("number"==typeof t){if(0===t)return r.__zero();if(r.__isOneDigitInt(t))return 0>t?r.__oneDigit(-t,!0):r.__oneDigit(t,!1);if(!e(t)||s(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return r.__fromDouble(t)}if("string"==typeof t){if(null===(e=r.__fromString(t)))throw new SyntaxError("Cannot convert "+t+" to a BigInt");return e}if("boolean"==typeof t)return!0===t?r.__oneDigit(1,!1):r.__zero();if("object"==typeof t)return t.constructor===r?t:(t=r.__toPrimitive(t),r.BigInt(t));throw new TypeError("Cannot convert "+t+" to a BigInt")}toDebugString(){const t=["BigInt["];for(const e of this)t.push((e?(e>>>0).toString(16):e)+", ");return t.push("]"),t.join("")}toString(t){if(2>(t=void 0===t?10:t)||36>>12;const l=a-12;for(e=12<=a?0:i<<20+a,a=20+a,0>>30-l,e=i<>>30-a,a-=30;return 1!==(i=r.__decideRounding(t,a,o,i))&&(0!==i||1&~e)||0!=(e=e+1>>>0)||!(0!=++s>>>20&&(s=0,1023<++n))?(t=t.sign?-2147483648:0,n=n+1023<<20,r.__kBitConversionInts[1]=t|n|s,r.__kBitConversionInts[0]=e,r.__kBitConversionDouble[0]):t.sign?-1/0:1/0}static unaryMinus(t){if(0===t.length)return t;const e=t.__copy();return e.sign=!t.sign,e}static bitwiseNot(t){return t.sign?r.__absoluteSubOne(t).__trim():r.__absoluteAddOne(t,!0)}static exponentiate(t,e){if(e.sign)throw new RangeError("Exponent must be positive");if(0===e.length)return r.__oneDigit(1,!1);if(0===t.length)return t;if(1===t.length&&1===t.__digit(0))return!t.sign||1&e.__digit(0)?t:r.unaryMinus(t);if(1=r.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===t.length&&2===t.__digit(0)){var n=1+(0|e/30);return(t=new r(n,t.sign&&!!(1&e))).__initializeDigits(),t.__setDigit(n-1,1<>=1;0!==e;e>>=1)i=r.multiply(i,i),1&e&&(n=null===n?i:r.multiply(n,i));return n}static multiply(t,e){if(0===t.length)return t;if(0===e.length)return e;var n=t.length+e.length;30<=t.__clzmsd()+e.__clzmsd()&&n--,(n=new r(n,t.sign!==e.sign)).__initializeDigits();for(let i=0;ir.__absoluteCompare(t,e))return r.__zero();const n=t.sign!==e.sign,i=e.__unsignedDigit(0);if(1===e.length&&32767>=i){if(1===i)return n===t.sign?t:r.unaryMinus(t);t=r.__absoluteDivSmall(t,i,null)}else t=r.__absoluteDivLarge(t,e,!0,!1);return t.sign=n,t.__trim()}static remainder(t,e){if(0===e.length)throw new RangeError("Division by zero");if(0>r.__absoluteCompare(t,e))return t;const n=e.__unsignedDigit(0);return 1===e.length&&32767>=n?1===n||0===(e=r.__absoluteModSmall(t,n))?r.__zero():r.__oneDigit(e,t.sign):((e=r.__absoluteDivLarge(t,e,!1,!0)).sign=t.sign,e.__trim())}static add(t,e){const n=t.sign;return n===e.sign?r.__absoluteAdd(t,e,n):0<=r.__absoluteCompare(t,e)?r.__absoluteSub(t,e,n):r.__absoluteSub(e,t,!n)}static subtract(t,e){const n=t.sign;return n===e.sign?0<=r.__absoluteCompare(t,e)?r.__absoluteSub(t,e,n):r.__absoluteSub(e,t,!n):r.__absoluteAdd(t,e,n)}static leftShift(t,e){return 0===e.length||0===t.length?t:e.sign?r.__rightShiftByAbsolute(t,e):r.__leftShiftByAbsolute(t,e)}static signedRightShift(t,e){return 0===e.length||0===t.length?t:e.sign?r.__leftShiftByAbsolute(t,e):r.__rightShiftByAbsolute(t,e)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(t,e){return 0>r.__compareToBigInt(t,e)}static lessThanOrEqual(t,e){return 0>=r.__compareToBigInt(t,e)}static greaterThan(t,e){return 0(t=s(t)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===t)return r.__zero();if(t>=r.__kMaxLengthBits)return e;const n=0|(t+29)/30;if(e.length(t=s(t)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===t)return r.__zero();if(e.sign){if(t>r.__kMaxLengthBits)throw new RangeError("BigInt too big");return r.__truncateAndSubFromPowerOfTwo(t,e,!1)}if(t>=r.__kMaxLengthBits)return e;const n=0|(t+29)/30;if(e.length>>i?r.__truncateToNBits(t,e):e}static ADD(t,e){if(t=r.__toPrimitive(t),e=r.__toPrimitive(e),"string"==typeof t)return"string"!=typeof e&&(e=e.toString()),t+e;if("string"==typeof e)return t.toString()+e;if(t=r.__toNumeric(t),e=r.__toNumeric(e),r.__isBigInt(t)&&r.__isBigInt(e))return r.add(t,e);if("number"==typeof t&&"number"==typeof e)return t+e;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(t,e){return r.__compare(t,e,0)}static LE(t,e){return r.__compare(t,e,1)}static GT(t,e){return r.__compare(t,e,2)}static GE(t,e){return r.__compare(t,e,3)}static EQ(t,e){for(;;){if(r.__isBigInt(t))return r.__isBigInt(e)?r.equal(t,e):r.EQ(e,t);if("number"==typeof t){if(r.__isBigInt(e))return r.__equalToNumber(e,t);if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else if("string"==typeof t){if(r.__isBigInt(e))return null!==(t=r.__fromString(t))&&r.equal(t,e);if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else if("boolean"==typeof t){if(r.__isBigInt(e))return r.__equalToNumber(e,+t);if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else if("symbol"==typeof t){if(r.__isBigInt(e))return!1;if("object"!=typeof e)return t==e;e=r.__toPrimitive(e)}else{if("object"!=typeof t)return t==e;if("object"==typeof e&&e.constructor!==r)return t==e;t=r.__toPrimitive(t)}}}static NE(t,e){return!r.EQ(t,e)}static __zero(){return new r(0,!1)}static __oneDigit(t,e){return(e=new r(1,e)).__setDigit(0,t),e}__copy(){const t=new r(this.length,this.sign);for(let e=0;ee)e=-e-1;else{if(0===n)return-1;n--,i=t.__digit(n),e=29}if(!(i&(e=1<>>20)-1023,n=1+(0|e/30);t=new r(n,0>t);let i,s=1048575&r.__kBitConversionInts[1]|1048576,o=r.__kBitConversionInts[0];if(20>(e%=30)){var a=20-e;i=a+32,e=s>>>a,s=s<<32-a|o>>>a,o<<=32-a}else 20===e?(i=32,e=s,s=o):(i=32-(a=e-20),e=s<>>32-a,s=o<>>2,s=s<<30|o>>>2,o<<=30):e=0,t.__setDigit(n,e);return t.__trim()}static __isWhitespace(t){return!!(13>=t&&9<=t)||(159>=t?32==t:131071>=t?160==t||5760==t:196607>=t?10>=(t&=131071)||40==t||41==t||47==t||95==t||4096==t:65279==t)}static __fromString(t,e){e=void 0===e?0:e;let n=0;const i=t.length;let s=0;if(s===i)return r.__zero();let o=t.charCodeAt(s);for(;r.__isWhitespace(o);){if(++s===i)return r.__zero();o=t.charCodeAt(s)}if(43===o){if(++s===i)return null;o=t.charCodeAt(s),n=1}else if(45===o){if(++s===i)return null;o=t.charCodeAt(s),n=-1}if(0===e){if(e=10,48===o){if(++s===i)return r.__zero();if(o=t.charCodeAt(s),88===o||120===o){if(e=16,++s===i)return null;o=t.charCodeAt(s)}else if(79===o||111===o){if(e=8,++s===i)return null;o=t.charCodeAt(s)}else if(66===o||98===o){if(e=2,++s===i)return null;o=t.charCodeAt(s)}}}else if(16===e&&48===o){if(++s===i)return r.__zero();if(o=t.charCodeAt(s),88===o||120===o){if(++s===i)return null;o=t.charCodeAt(s)}}if(0!=n&&10!==e)return null;for(;48===o;){if(++s===i)return r.__zero();o=t.charCodeAt(s)}var a=i-s;let l=r.__kMaxBitsPerChar[e];var u=r.__kBitsPerCharTableMultiplier-1;if(a>1073741824/l)return null;a=new r(0|(29+(l*a+u>>>r.__kBitsPerCharTableShift))/30,!1);const c=10>e?e:10,p=10>>0>>0>>r.__kBitsPerCharTableShift)/30)}while(!h)}else{l>>=r.__kBitsPerCharTableShift,e=[];var h=[],_=!1;do{for(var d=0,f=0;;){if(o-48>>>0>>0>>l-r)}if(0!==s){if(i>=t.length)throw Error("implementation bug");t.__setDigit(i++,s)}for(;i>>1)+(85&i))>>>2)+(51&i))>>>4)+(15&i),--e;const s=t.__digit(n-1);var o=r.__clz30(s),a=0|(30*n-o+i-1)/i;if(t.sign&&a++,268435456>>(u=i-u),u=30-u;u>=i;)o[a--]=r.__kConversionChars[l&e],l>>>=i,u-=i}for(o[a--]=r.__kConversionChars[(l|s<>>i-u;0!==l;)o[a--]=r.__kConversionChars[l&e],l>>>=i;if(t.sign&&(o[a--]="-"),-1!=a)throw Error("implementation bug");return o.join("")}static __toStringGeneric(t,e,n){var i=t.length;if(0===i)return"";if(1===i)return e=t.__unsignedDigit(0).toString(e),!1===n&&t.sign&&(e="-"+e),e;var s=30*i-r.__clz30(t.__digit(i-1));i=r.__kMaxBitsPerChar[e]-1,i=1+(0|((s*=r.__kBitsPerCharTableMultiplier)+(i-1))/i)>>1;var o=(s=r.exponentiate(r.__oneDigit(e,!1),r.__oneDigit(i,!1))).__unsignedDigit(0);if(1===s.length&&32767>=o){(s=new r(t.length,!1)).__initializeDigits();var a=0;for(let e=2*t.length-1;0<=e;e--)a=a<<15|t.__halfDigit(e),s.__setHalfDigit(e,0|a/o),a=0|a%o;o=a.toString(e)}else s=(o=r.__absoluteDivLarge(t,s,!0,!0)).quotient,o=o.remainder.__trim(),o=r.__toStringGeneric(o,e,!0);for(s.__trim(),e=r.__toStringGeneric(s,e,!0);o.lengtht?r.__absoluteLess(n):0}static __compareToNumber(t,e){if(r.__isOneDigitInt(e)){const i=t.sign,s=0>e;if(i!==s)return r.__unequalSign(i);if(0===t.length){if(s)throw Error("implementation bug");return 0===e?0:-1}return 1e?r.__absoluteGreater(i):te)return r.__unequalSign(n);if(0===e)throw Error("implementation bug: should be handled elsewhere");if(0===t.length)return-1;if(r.__kBitConversionDouble[0]=e,2047==(e=2047&r.__kBitConversionInts[1]>>>20))throw Error("implementation bug: handled elsewhere");var i=e-1023;if(0>i)return r.__absoluteGreater(n);e=t.length;var s=t.__digit(e-1),o=r.__clz30(s),a=30*e-o;if(a<(i+=1))return r.__absoluteLess(n);if(a>i)return r.__absoluteGreater(n);i=1048576|1048575&r.__kBitConversionInts[1];let l=r.__kBitConversionInts[0];if((o=29-o)!=(0|(a-1)%30))throw Error("implementation bug");if(20>o){var u=20-o;o=u+32,a=i>>>u,i=i<<32-u|l>>>u,l<<=32-u}else 20===o?(o=32,a=i,i=l):(o=32-(u=o-20),a=i<>>32-u,i=l<>>=0)>(a>>>=0))return r.__absoluteGreater(n);if(s>>2,i=i<<30|l>>>2,l<<=30):a=0,(s=t.__unsignedDigit(e))>a)return r.__absoluteGreater(n);if(se&&t.__unsignedDigit(0)===n(e):0===r.__compareToDouble(t,e)}static __comparisonResultToBool(t,e){return 0===e?0>t:1===e?0>=t:2===e?0e;case 3:return t>=e}if(r.__isBigInt(t)&&"string"==typeof e)return null!==(e=r.__fromString(e))&&r.__comparisonResultToBool(r.__compareToBigInt(t,e),n);if("string"==typeof t&&r.__isBigInt(e))return null!==(t=r.__fromString(t))&&r.__comparisonResultToBool(r.__compareToBigInt(t,e),n);if(t=r.__toNumeric(t),e=r.__toNumeric(e),r.__isBigInt(t)){if(r.__isBigInt(e))return r.__comparisonResultToBool(r.__compareToBigInt(t,e),n);if("number"!=typeof e)throw Error("implementation bug");return r.__comparisonResultToBool(r.__compareToNumber(t,e),n)}if("number"!=typeof t)throw Error("implementation bug");if(r.__isBigInt(e))return r.__comparisonResultToBool(r.__compareToNumber(e,t),2^n);if("number"!=typeof e)throw Error("implementation bug");return 0===n?te:3===n?t>=e:void 0}__clzmsd(){return r.__clz30(this.__digit(this.length-1))}static __absoluteAdd(t,e,n){if(t.length>>30,n.__setDigit(s,1073741823&r)}for(;s>>30,n.__setDigit(s,1073741823&e);return s>>30,n.__setDigit(s,1073741823&r)}for(;s>>30,n.__setDigit(s,1073741823&e);return n.__trim()}static __absoluteAddOne(t,e,n){n=void 0===n?null:n;const i=t.length;null===n?n=new r(i,e):n.sign=e,e=1;for(let s=0;s>>30,n.__setDigit(s,1073741823&i)}return 0!=e&&n.__setDigitGrow(i,1),n}static __absoluteSubOne(t,e){const n=t.length,i=new r(e=e||n,!1);let s=1;for(let e=0;e>>30,i.__setDigit(e,1073741823&n)}if(0!=s)throw Error("implementation bug");for(t=n;tn?0:t.__unsignedDigit(n)>e.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(t,e,n,i){if(0!==e){var s=32767&e,o=e>>>15,a=e=0;for(let p,h=0;h>>15;l=r.__imul(u,s),u=r.__imul(u,o);const _=r.__imul(c,s);p+=a+l+e,e=p>>>30,p&=1073741823,p+=((32767&u)<<15)+((32767&_)<<15),e+=p>>>30,a=(c=r.__imul(c,o))+(u>>>15)+(_>>>15),n.__setDigit(i,1073741823&p)}for(;0!=e||0!==a;i++)t=n.__digit(i),t+=e+a,a=0,e=t>>>30,n.__setDigit(i,1073741823&t)}}static __internalMultiplyAdd(t,e,n,i,s){let o=0;for(let u=0;u>>15,e)))<<15)+o+n)>>>30,o=a>>>15,s.__setDigit(u,1073741823&l)}if(s.length>i)for(s.__setDigit(i++,n+o);ithis.length&&(n=this.length);const i=32767&t;t>>>=15;let s=0;for(let u=0;u>>15;o=r.__imul(a,i),a=r.__imul(a,t);const n=r.__imul(l,i);s=(o=e+o+s)>>>30,o&=1073741823,s+=(o+=((32767&a)<<15)+((32767&n)<<15))>>>30,e=(l=r.__imul(l,t))+(a>>>15)+(n>>>15),this.__setDigit(u,1073741823&o)}if(0!=s||0!==e)throw Error("implementation bug")}static __absoluteDivSmall(t,e,n){null===(n=void 0===n?null:n)&&(n=new r(t.length,!1));let i=0;for(let s,r=2*t.length-1;0<=r;r-=2){s=(i<<15|t.__halfDigit(r))>>>0;const o=0|s/e;i=0|s%e,s=(i<<15|t.__halfDigit(r-1))>>>0;const a=0|s/e;i=0|s%e,n.__setDigit(r>>>1,o<<15|a)}return n}static __absoluteModSmall(t,e){let n=0;for(let i=2*t.length-1;0<=i;i--)n=0|((n<<15|t.__halfDigit(i))>>>0)%e;return n}static __absoluteDivLarge(t,e,n,i){const s=e.__halfDigitLength(),o=e.length;var a=t.__halfDigitLength()-s;let l=null;n&&(l=new r(a+2>>>1,!1),l.__initializeDigits());const u=new r(s+2>>>1,!1);u.__initializeDigits();const c=r.__clz15(e.__halfDigit(s-1));0>>0)/p,a=0|a%p;const n=e.__halfDigit(s-2),o=t.__halfDigit(c+s-2);for(;r.__imul(i,n)>>>0>(a<<16|o)>>>0&&(i--,!(32767<(a+=p))););}r.__internalMultiplyAdd(e,i,0,o,u),0!==(a=t.__inplaceSub(u,c,s+1))&&(a=t.__inplaceAdd(e,c,s),t.__setHalfDigit(c+s,32767&t.__halfDigit(c+s)+a),i--),n&&(1&c?h=i<<15:l.__setDigit(c>>>1,h|i))}if(i)return t.__inplaceRightShift(c),n?{quotient:l,remainder:t}:t;if(n)return l;throw Error("unreachable")}static __clz15(t){return r.__clz30(t)-15}__inplaceAdd(t,e,n){let i=0;for(let s=0;s>>15,this.__setHalfDigit(e+s,32767&n)}return i}__inplaceSub(t,e,n){let i=0;if(1&e){e>>=1;for(var s=this.__digit(e),r=32767&s,o=0;o>>1;o++){var a=t.__digit(o);i=1&(s=(s>>>15)-(32767&a)-i)>>>15,this.__setDigit(e+o,(32767&s)<<15|32767&r),i=1&(r=(32767&(s=this.__digit(e+o+1)))-(a>>>15)-i)>>>15}const l=(s>>>15)-(32767&(a=t.__digit(o)))-i;if(i=1&l>>>15,this.__setDigit(e+o,(32767&l)<<15|32767&r),e+o+1>=this.length)throw new RangeError("out of bounds");!(1&n)&&(i=1&(r=(32767&(s=this.__digit(e+o+1)))-(a>>>15)-i)>>>15,this.__setDigit(e+t.length,1073709056&s|32767&r))}else{for(e>>=1,r=0;r>>15,i=1&(s=(s>>>15)-(a>>>15)-i)>>>15,this.__setDigit(e+r,(32767&s)<<15|32767&o);i=1&(s=(32767&(o=this.__digit(e+r)))-(32767&(t=t.__digit(r)))-i)>>>15,a=0,!(1&n)&&(i=1&(a=(o>>>15)-(t>>>15)-i)>>>15),this.__setDigit(e+r,(32767&a)<<15|32767&s)}return i}__inplaceRightShift(t){if(0!==t){var e=this.__digit(0)>>>t,n=this.length-1;for(let i=0;i>>t}this.__setDigit(n,e)}}static __specialLeftShift(t,e,n){const i=t.length,s=new r(i+n,!1);if(0===e){for(e=0;e>>30-e}return 0n)throw new RangeError("BigInt too big");e=0|n/30;var i=n%30;const s=t.length,o=0!==i&&0!=t.__digit(s-1)>>>30-i;var a=s+e+(o?1:0);if(n=new r(a,t.sign),0===i){for(i=0;i>>30-i}if(o)n.__setDigit(s+e,a);else if(0!==a)throw Error("implementation bug")}return n.__trim()}static __rightShiftByAbsolute(t,e){var n=t.length,i=t.sign,s=r.__toShiftAmount(e);if(0>s)return r.__rightShiftByMaximum(i);var o=s%30,a=n-(e=0|s/30);if(0>=a)return r.__rightShiftByMaximum(i);if(s=!1,i)if(t.__digit(e)&(1<>>o,n=n-e-1,l=0;l>>o}i.__setDigit(n,a)}return s&&(i=r.__absoluteAddOne(i,!0,i)),i.__trim()}static __rightShiftByMaximum(t){return t?r.__oneDigit(1,!0):r.__zero()}static __toShiftAmount(t){return 1r.__kMaxLengthBits?-1:t}static __toPrimitive(t,e){if(e=void 0===e?"default":e,"object"!=typeof t||t.constructor===r)return t;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const n=t[Symbol.toPrimitive];if(n){if("object"!=typeof(t=n(e)))return t;throw new TypeError("Cannot convert object to primitive value")}}if((e=t.valueOf)&&"object"!=typeof(e=e.call(t)))return e;if((e=t.toString)&&"object"!=typeof(t=e.call(t)))return t;throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(t){return r.__isBigInt(t)?t:+t}static __isBigInt(t){return"object"==typeof t&&null!==t&&t.constructor===r}static __truncateToNBits(t,e){var n=0|(t+29)/30;const i=new r(n,e.sign);--n;for(let t=0;t>>t),i.__setDigit(n,e),i.__trim()}static __truncateAndSubFromPowerOfTwo(t,e,n){var i=Math.min,s=0|(t+29)/30;n=new r(s,n);let o=0;var a=0;for(i=i(--s,e.length);o>>30,n.__setDigit(o,1073741823&t)}for(;o>>t,a=(t=1<<32-t)-e-a,a&=t-1),n.__setDigit(s,a),n.__trim()}__digit(t){return this[t]}__unsignedDigit(t){return this[t]>>>0}__setDigit(t,e){this[t]=0|e}__setDigitGrow(t,e){this[t]=0|e}__halfDigitLength(){const t=this.length;return 32767>=this.__unsignedDigit(t-1)?2*t-1:2*t}__halfDigit(t){return 32767&this[t>>>1]>>>15*(1&t)}__setHalfDigit(t,e){const n=t>>>1,i=this.__digit(n);this.__setDigit(n,1&t?32767&i|e<<15:1073709056&i|32767&e)}static __digitPow(t,e){let n=1;for(;0>>=1,t*=t;return n}static __isOneDigitInt(t){return(1073741823&t)===t}}return r.__kMaxLength=33554432,r.__kMaxLengthBits=r.__kMaxLength<<5,r.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],r.__kBitsPerCharTableShift=5,r.__kBitsPerCharTableMultiplier=1<>>0)/e)},r.__imul=t||function(t,e){return 0|t*e},r}()},function(t,e){[..."abc"].flat(),"a".matchAll(/a/g)},function(t,e,n){(function(t,e){!function(t,n){function i(t){delete a[t]}function s(t){if(l)setTimeout(s,0,t);else{var e=a[t];if(e){l=!0;try{var r=e.callback,o=e.args;switch(o.length){case 0:r();break;case 1:r(o[0]);break;case 2:r(o[0],o[1]);break;case 3:r(o[0],o[1],o[2]);break;default:r.apply(n,o)}}finally{i(t),l=!1}}}}if(!t.setImmediate){var r,o=1,a={},l=!1,u=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){s(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(p="setImmediate$"+Math.random()+"$",h=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(p)&&s(+e.data.slice(p.length))},t.addEventListener?t.addEventListener("message",h,!1):t.attachEvent("onmessage",h),r=function(e){t.postMessage(p+e,"*")}):t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){s(t.data)},r=function(e){t.port2.postMessage(e)}}():u&&"onreadystatechange"in u.createElement("script")?function(){var t=u.documentElement;r=function(e){var n=u.createElement("script");n.onreadystatechange=function(){s(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(s,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=Array(arguments.length-1),n=0;n the object's type\ntype(name, bases, dict) -> a new type",tp$call:function(t,e){if(this===Sk.builtin.type){if(1===t.length&&(void 0===e||!e.length))return t[0].ob$type;if(3!==t.length)throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let n=this.prototype.tp$new(t,e);if(n.$isSuspension)return Sk.misceval.chain(n,(i=>{if(n=i,n.ob$type.$isSubType(this))return n.tp$init(t,e)}),(()=>n));if(n.ob$type.$isSubType(this)){const i=n.tp$init(t,e);return void 0!==i&&i.$isSuspension?Sk.misceval.chain(i,(()=>n)):n}return n},tp$new:function(t,e){if(3!==t.length){if(1===t.length&&(void 0===e||!e.length))return t[0].ob$type;throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}const i=t[0];var s=t[1];const o=t[2];if("dict"!==o.tp$name)throw new Sk.builtin.TypeError("type() argument 3 must be dict, not "+Sk.abstr.typeName(o));if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("type() argument 1 must be str, not "+Sk.abstr.typeName(i));const a=i.$jsstr();if("tuple"!==s.tp$name)throw new Sk.builtin.TypeError("type() argument 2 must be tuple, not "+Sk.abstr.typeName(s));r(a,t=function(){this.sk$hasDict&&(this.$d=new Sk.builtin.dict),this.$s=[]},s=s.sk$asarray(),this.constructor);const u=t.prototype;Sk.globals&&(u.__module__=Sk.globals.__name__),u.__doc__=Sk.builtin.none.none$;let c,p=void 0===(s=o.quick$lookup(Sk.builtin.str.$slots)),h=void 0!==t.$typeLookup(Sk.builtin.str.$dict);if(void 0!==s&&(c=new Set,(s=Sk.builtin.checkString(s)?[s]:Sk.misceval.arrayFromIterable(s)).forEach((t=>{if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__slots__ items must be strings, not '"+Sk.abstr.typeName(t)+"'");if(!t.$isIdentifier())throw new Sk.builtin.TypeError("__slots__ must be identifiers");if(t===Sk.builtin.str.$dict){if(h)throw new Sk.builtin.TypeError("__dict__ slot disallowed: we already got one");p=!0}else c.add(Sk.mangleName(i,t))})),function(t,e){const n=e.prototype,i=n.sk$nslots||0;Object.defineProperty(n,"sk$nslots",{value:i+t.length,writable:!0}),t.length&&Object.defineProperty(e,"sk$solidSlotBase",{value:!0,writable:!0}),t.forEach(((t,s)=>{s+=i,n[t.$mangled]=new Sk.builtin.getset_descriptor(e,{$get(){const e=this.$s[s];if(void 0===e)throw new Sk.builtin.AttributeError(t);return e},$set(t){this.$s[s]=t}})}))}(s=[...c].sort(((t,e)=>t.toString().localeCompare(e.toString()))),t)),p&&!h&&(u.__dict__=new Sk.builtin.getset_descriptor(t,l),h=!0),Object.defineProperties(u,{ht$slots:{value:s||null,writable:!0},sk$hasDict:{value:h,writable:!0}}),o.$items().forEach((t=>{var[e,n]=t;if(c&&c.has(e))throw new Sk.builtin.ValueError("'"+e.toString()+"' in __slots__ conflicts with class variable");u[e.$mangled]=n})),u.hasOwnProperty("__qualname__")){if(s=u.__qualname__,!Sk.builtin.checkString(s))throw new Sk.builtin.TypeError("type __qualname__ must be a str, not '"+Sk.abstr.typeName(s)+"'");u.ht$qualname=s}return n(s=t.prototype,"__init_subclass__","classmethod"),n(s,"__new__","staticmethod"),n(s,"__class_getitem__","classmethod"),t.$allocateSlots(),function(t){const e=t.prototype;Object.keys(e).forEach((n=>{const i=Sk.abstr.lookupSpecial(e[n],Sk.builtin.str.$setname);if(void 0!==i)try{Sk.misceval.callsimArray(i,[t,new Sk.builtin.str(n)])}catch(i){throw(n=new Sk.builtin.RuntimeError("Error calling __set_name__ on '"+Sk.abstr.typeName(e[n])+"' instance '"+n+"' in '"+t.prototype.tp$name+"'")).$cause=i,n}}))}(t),function(t,e){t=new Sk.builtin.super_(t,t).tp$getattr(Sk.builtin.str.$initsubclass),Sk.misceval.callsimArray(t,[],e)}(t,e),t},tp$init:function(t,e){if(t&&1==t.length&&e&&e.length)throw new Sk.builtin.TypeError("type.__init__() takes no keyword arguments");if(3!=t.length&&1!=t.length)throw new Sk.builtin.TypeError("type.__init__() takes 1 or 3 arguments");return Sk.builtin.object.prototype.tp$init.call(this,[])},tp$getattr:function(t,e){var n=this.ob$type;const i=n.$typeLookup(t);let s;return void 0!==i&&(s=i.tp$descr_get,void 0!==s&&void 0!==i.tp$descr_set)?s.call(i,this,n,e):void 0!==(t=this.$typeLookup(t))?void 0!==(n=t.tp$descr_get)?e=n.call(t,null,this,e):t:void 0!==s?s.call(i,this,n,e):void 0!==i?i:void 0},tp$setattr:function(t,e,n){if(!this.sk$klass){if(void 0!==e)throw new Sk.builtin.TypeError("can't set attributes of built-in/extension type '"+this.prototype.tp$name+"'");throw new Sk.builtin.TypeError("can't delete attributes on type object '"+this.prototype.tp$name+"'")}const i=this.ob$type.$typeLookup(t);if(void 0!==i){const t=i.tp$descr_set;if(t)return t.call(i,this,e,n)}if(n=t.$mangled,void 0===e){if(!(e=this.prototype).hasOwnProperty(n))throw new Sk.builtin.AttributeError("type object '"+this.prototype.tp$name+"' has no attribute '"+t.$jsstr()+"'");delete e[n],void 0!==(t=Sk.dunderToSkulpt[n])&&(delete this.prototype[t],e.sk$prototypical||this.$allocateGetterSlot(n))}else this.prototype[n]=e,n in Sk.dunderToSkulpt&&this.$allocateSlot(n,e)},$r:function(){let t=this.prototype.__module__,e="",n="class";return t&&Sk.builtin.checkString(t)?e=t.v+".":t=null,t||this.sk$klass||Sk.__future__.class_repr||(n="type"),new Sk.builtin.str("<"+n+" '"+e+this.prototype.tp$name+"'>")}},writable:!0},tp$methods:{value:null,writable:!0},tp$classmethods:{value:null,writable:!0},tp$getsets:{value:null,writable:!0},sk$type:{value:!0},$isSubType:{value:function(t){return this===t||this.prototype instanceof t||!this.prototype.sk$prototypical&&this.prototype.tp$mro.includes(t)}},$allocateSlot:{value:function(t,e){const n=(t=Sk.slots[t]).$slot_name,i=this.prototype;i.hasOwnProperty(n)&&delete i[n],Object.defineProperty(i,n,{value:t.$slot_func(e),writable:!0,configurable:!0})}},$allocateSlots:{value:function(){const t=this.prototype;this.prototype.sk$prototypical?Object.keys(t).forEach((e=>{e in Sk.slots&&this.$allocateSlot(e,t[e])})):Object.keys(Sk.slots).forEach((e=>{t.hasOwnProperty(e)?this.$allocateSlot(e,t[e]):this.$allocateGetterSlot(e)})),t.hasOwnProperty("__eq__")&&!t.hasOwnProperty("__hash__")&&(t.tp$hash=t.__hash__=Sk.builtin.none.none$)}},$allocateGetterSlot:{value:function(t){const e=Sk.slots[t].$slot_name,n=this.prototype;n.hasOwnProperty(e)||Object.defineProperty(n,e,{configurable:!0,get(){const t=n.tp$mro;for(let n=1;nnew Sk.builtin.dict([]),$flags:{FastCall:!0}}};const l={$get(){const t=o(this.ob$type);return void 0!==t?t.tp$descr_get(this,this.ob$type):Sk.generic.getSetDict.$get.call(this)},$set(t){const e=o(this.ob$type);return void 0!==e?e.tp$descr_set(this,t):void 0!==t?Sk.generic.getSetDict.$set.call(this,t):void(this.$d=new Sk.builtin.dict([]))},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"}},function(t,e){Sk.generic={},Sk.generic.getAttr=function(t,e){let n;const i=this.ob$type,s=i.$typeLookup(t);if(void 0!==s&&(n=s.tp$descr_get,void 0!==n&&void 0!==s.tp$descr_set))return n.call(s,this,i,e);const r=this.$d;return void 0!==r&&void 0!==(t=r.quick$lookup(t))?t:void 0!==n?n.call(s,this,i,e):void 0!==s?s:void 0},Sk.exportSymbol("Sk.generic.getAttr",Sk.generic.getAttr),Sk.generic.setAttr=function(t,e,n){var i=this.ob$type.$typeLookup(t);if(null!=i){const t=i.tp$descr_set;if(t)return t.call(i,this,e,n)}if(void 0!==(n=this.$d))if(n.mp$ass_subscript){if(void 0!==e)return n.mp$ass_subscript(t,e);try{return n.mp$ass_subscript(t)}catch(e){if(e instanceof Sk.builtin.KeyError)throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(this)+"' object has no attribute '"+t.$jsstr()+"'");throw e}}else if("object"==typeof n){if(i=t.$mangled,void 0!==e)return void(n[i]=e);if(void 0!==n[i])return void delete n[i]}throw new Sk.builtin.AttributeError(this.sk$attrError()+" has no attribute '"+t.$jsstr()+"'")},Sk.exportSymbol("Sk.generic.setAttr",Sk.generic.setAttr),Sk.generic.new=function(t){return function(e,n){return this.constructor===t?new this.constructor:(e=new this.constructor,t.call(e),e)}},Sk.generic.newMethodDef={$meth(t,e){const n=this.prototype;if(1>t.length)throw t=n.tp$name,new Sk.builtin.TypeError(t+".__new__(): not enough arguments");var i=t.shift();if(void 0===i.sk$type)throw t=n.tp$name,new Sk.builtin.TypeError(t+"__new__(X): X is not a type object ("+Sk.abstr.typeName(i)+")");if(!i.$isSubType(this))throw t=n.tp$name,i=i.prototype.tp$name,new Sk.builtin.TypeError(t+".__new__("+i+"): "+i+" is not a subtype of "+t);const s=i.prototype.sk$staticNew.prototype;if(s.tp$new!==n.tp$new)throw t=n.tp$name,i=i.prototype.tp$name,new Sk.builtin.TypeError(t+".__new__("+i+") is not safe, use "+s.tp$name+".__new__()");return n.tp$new.call(i.prototype,t,e)},$flags:{FastCall:!0},$textsig:"($type, *args, **kwargs)",$name:"__new__"},Sk.generic.selfIter=function(){return this},Sk.generic.iterNextWithArrayCheckSize=function(){if(this.$seq.length!==this.$orig.get$size()){const t=this.tp$name.split("_")[0];throw new Sk.builtin.RuntimeError(t+" changed size during iteration")}if(!(this.$index>=this.$seq.length))return this.$seq[this.$index++]},Sk.generic.iterNextWithArray=function(){const t=this.$seq[this.$index++];return void 0===t&&(this.tp$iternext=()=>{}),t},Sk.generic.iterLengthHintWithArrayMethodDef={$meth:function(){return new Sk.builtin.int_(this.$seq.length-this.$index)},$flags:{NoArgs:!0}},Sk.generic.iterReverseLengthHintMethodDef={$meth:function(){return new Sk.builtin.int_(this.$index)},$flags:{NoArgs:!0}},Sk.generic.getSetDict={$get(){return this.$d},$set(t){if(void 0===t)throw new Sk.builtin.TypeError("cannot delete __dict__");if(!(t instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("__dict__ must be set to a dictionary, not a '"+Sk.abstr.typeName(t)+"'");this.$d=t},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"},Sk.generic.seqCompare=function(t,e){if(this===t&&Sk.misceval.opAllowsEquality(e))return!0;if(!(t instanceof this.sk$builtinBase))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.v;let i;if(t=t.v,n.length!==t.length&&("Eq"===e||"NotEq"===e))return"Eq"!==e;for(i=0;i=s||i>=r)switch(e){case"Lt":return sr;case"GtE":return s>=r;default:Sk.asserts.fail()}return"Eq"!==e&&("NotEq"===e||Sk.misceval.richCompareBool(n[i],t[i],e))},Sk.generic.classGetItem={__class_getitem__:{$meth(t){return new Sk.builtin.GenericAlias(this,t)},$flags:{OneArg:!0}}}},function(t,e){Sk.builtin.pyCheckArgs=function(t,e,n,i,s,r){if(e=e.length,void 0===i&&(i=1/0),s&&--e,r&&--e,ei)throw new Sk.builtin.TypeError((n===i?t+"() takes exactly "+n+" arguments":ei)throw new Sk.builtin.TypeError((n===i?t+"() takes exactly "+n+" arguments":e"};const r={Add:"+",Sub:"-",Mult:"*",MatMult:"@",Div:"/",FloorDiv:"//",Mod:"%",DivMod:"divmod()",Pow:"** or pow()",LShift:"<<",RShift:">>",BitAnd:"&",BitXor:"^",BitOr:"|"},o={UAdd:"+",USub:"-",Invert:"~"};Sk.abstr.numberBinOp=function(t,e,n){var s;if(!(s=i(t,e,n)))throw t=Sk.abstr.typeName(t),e=Sk.abstr.typeName(e),new Sk.builtin.TypeError("unsupported operand type(s) for "+r[n]+": '"+t+"' and '"+e+"'");return s},Sk.exportSymbol("Sk.abstr.numberBinOp",Sk.abstr.numberBinOp),Sk.abstr.numberInplaceBinOp=function(t,e,n){var i;if(!(i=s(t,e,n)))throw t=Sk.abstr.typeName(t),e=Sk.abstr.typeName(e),new Sk.builtin.TypeError("unsupported operand type(s) for "+r[n]+"=: '"+t+"' and '"+e+"'");return i},Sk.exportSymbol("Sk.abstr.numberInplaceBinOp",Sk.abstr.numberInplaceBinOp),Sk.abstr.numberUnaryOp=function(t,e){if("Not"===e)return Sk.misceval.isTrue(t)?Sk.builtin.bool.false$:Sk.builtin.bool.true$;t:{switch(e){case"USub":var n=t.nb$negative;break t;case"UAdd":n=t.nb$positive;break t;case"Invert":n=t.nb$invert;break t}n=void 0}if(!(n=void 0!==n?n.call(t):void 0))throw t=Sk.abstr.typeName(t),new Sk.builtin.TypeError("bad operand type for unary "+o[e]+": '"+t+"'");return n},Sk.exportSymbol("Sk.abstr.numberUnaryOp",Sk.abstr.numberUnaryOp),Sk.abstr.fixSeqIndex_=function(t,e){return 0>(e=Sk.builtin.asnum$(e))&&t.sq$length&&(e+=t.sq$length()),e},Sk.abstr.sequenceContains=function(t,e,n){return t.sq$contains?t.sq$contains(e,n):(t=Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){return!(t!==e&&!Sk.misceval.richCompareBool(t,e,"Eq"))&&new Sk.misceval.Break(!0)}),!1),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t))},Sk.abstr.sequenceConcat=function(t,e){if(t.sq$concat)return t.sq$concat(e);if(Sk.builtin.checkSequence(t)&&Sk.builtin.checkSequence(e)&&void 0!==(e=i(t,e,"Add")))return e;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object can't be concatenated")},Sk.abstr.sequenceInPlaceConcat=function(t,e){if(t.sq$inplace_concat)return t.sq$inplace_concat(e);if(t.sq$concat)return t.sq$concat(e);if(Sk.builtin.checkSequence(t)&&Sk.builtin.checkSequence(e)&&void 0!==(e=s(t,e,"Add")))return e;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object can't be concatenated")},Sk.abstr.sequenceGetIndexOf=function(t,e){if(t.index)return Sk.misceval.callsimArray(t.index,[t,e]);let n=0;for(let i=Sk.abstr.iter(t),s=i.tp$iternext();void 0!==s;s=i.tp$iternext()){if(Sk.misceval.richCompareBool(e,s,"Eq"))return new Sk.builtin.int_(n);n+=1}throw new Sk.builtin.ValueError("sequence.index(x): x not in sequence")},Sk.abstr.sequenceGetCountOf=function(t,e){if(t.count)return Sk.misceval.callsimArray(t.count,[t,e]);let n=0;for(let i=Sk.abstr.iter(t),s=i.tp$iternext();void 0!==s;s=i.tp$iternext())Sk.misceval.richCompareBool(e,s,"Eq")&&(n+=1);return new Sk.builtin.int_(n)},Sk.abstr.sequenceGetItem=function(t,e,n){return"number"==typeof e&&(e=new Sk.builtin.int_(e)),Sk.abstr.objectGetItem(t,e,n)},Sk.abstr.sequenceSetItem=function(t,e,n,i){return"number"==typeof e&&(e=new Sk.builtin.int_(e)),Sk.abstr.objectSetItem(t,e,n,i)},Sk.abstr.sequenceDelItem=function(t,e,n){return Sk.abstr.objectDelItem(t,e,n)},Sk.abstr.sequenceGetSlice=function(t,e,n){return Sk.abstr.objectGetItem(t,new Sk.builtin.slice(e,n))},Sk.abstr.sequenceDelSlice=function(t,e,n){return Sk.abstr.objectDelItem(t,new Sk.builtin.slice(e,n))},Sk.abstr.sequenceSetSlice=function(t,e,n,i){return Sk.abstr.objectSetItem(t,new Sk.builtin.slice(e,n))},Sk.abstr.sequenceUnpack=function(t,e,n,i){if(!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("cannot unpack non-iterable "+Sk.abstr.typeName(t)+" object");const s=Sk.abstr.iter(t),r=[];let o,a=0;return 0{if(r.push(t),++a===e)return new Sk.misceval.Break}))),Sk.misceval.chain(o,(()=>{if(r.length{if(void 0!==t)throw new Sk.builtin.ValueError("too many values to unpack (expected "+e+")");return r}));const t=[];return Sk.misceval.chain(Sk.misceval.iterFor(s,(e=>{t.push(e)})),(()=>{const i=t.length+e-n;if(0>i)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+n+", got "+(n+i)+")");return r.push(new Sk.builtin.list(t.slice(0,i))),r.push(...t.slice(i)),r}))}))},Sk.abstr.mappingUnpackIntoKeywordArray=function(t,e,n){if(!(e instanceof Sk.builtin.dict)){var i=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$keys);if(void 0===i)throw new Sk.builtin.TypeError("Object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(i),(i=>Sk.misceval.iterFor(Sk.abstr.iter(i),(i=>{if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError((n.$qualname?n.$qualname+"() ":"")+"keywords must be strings");return Sk.misceval.chain(e.mp$subscript(i,!0),(e=>{t.push(i.v),t.push(e)}))}))))}e.$items().forEach((e=>{var[i,s]=e;if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError((n.$qualname?n.$qualname+"() ":"")+"keywords must be strings");t.push(i.v),t.push(s)}))},Sk.abstr.keywordArrayFromPyDict=function(t){const e=[];return t.$items().forEach((t=>{var[n,i]=t;if(!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError("keywords must be strings");e.push(n.toString()),e.push(i)})),e},Sk.abstr.keywordArrayToPyDict=function(t){const e=new Sk.builtin.dict;for(let n=0;ne.length)throw new Sk.builtin.TypeError(t+"() expected at most "+e.length+" arguments ("+r+" given)");if(!i.length&&void 0===s)return n;if(r===e.length&&!i.length)return n;if(0===r&&e.length===(s&&s.length))return s;for(n=n.slice(0),r=0;rvoid 0===n[e]))).length)throw new Sk.builtin.TypeError(t+"() missing "+e.length+" required positional arguments: "+e.join(", "))}return n},Sk.exportSymbol("Sk.abstr.copyKeywordsToNamedArgs",Sk.abstr.copyKeywordsToNamedArgs),Sk.abstr.checkNoKwargs=function(t,e){if(e&&e.length)throw new Sk.builtin.TypeError(t+"() takes no keyword arguments")},Sk.exportSymbol("Sk.abstr.checkNoKwargs",Sk.abstr.checkNoKwargs),Sk.abstr.checkNoArgs=function(t,e,n){if(e=e.length+(n?n.length:0))throw new Sk.builtin.TypeError(t+"() takes no arguments ("+e+" given)")},Sk.exportSymbol("Sk.abstr.checkNoArgs",Sk.abstr.checkNoArgs),Sk.abstr.checkOneArg=function(t,e,n){if(Sk.abstr.checkNoKwargs(t,n),1!==e.length)throw new Sk.builtin.TypeError(t+"() takes exactly one argument ("+e.length+" given)")},Sk.exportSymbol("Sk.abstr.checkOneArg",Sk.abstr.checkOneArg),Sk.abstr.checkArgsLen=function(t,e,n,i){if(void 0===i&&(i=1/0),(e=e.length)i)throw new Sk.builtin.TypeError((n===i?t+"() takes exactly "+n+" arguments":eSk.builtin.str&&Sk.builtin.str.$fixReserved?(a=Sk.builtin.str.$fixReserved,Sk.builtin.str.$fixReserved(t)):t;Sk.abstr.setUpGetSets=function(t,e){if(void 0!==Sk.builtin.getset_descriptor){var n=t.prototype;e=e||n.tp$getsets||{},Object.entries(e).forEach((e=>{var[i,s]=e;s.$name=i,n[a(i)]=new Sk.builtin.getset_descriptor(t,s)})),Object.defineProperty(n,"tp$getsets",{value:null,writable:!0})}},Sk.abstr.setUpMethods=function(t,e){if(void 0!==Sk.builtin.method_descriptor){var n=t.prototype;e=e||n.tp$methods||{},Object.entries(e).forEach((e=>{var[i,s]=e;s.$name=i,n[a(i)]=new Sk.builtin.method_descriptor(t,s)})),Object.defineProperty(n,"tp$methods",{value:null,writable:!0})}},Sk.abstr.setUpClassMethods=function(t,e){if(void 0!==Sk.builtin.classmethod_descriptor){var n=t.prototype;e=e||n.tp$classmethods||{},Object.entries(e).forEach((e=>{var[i,s]=e;s.$name=i,n[a(i)]=new Sk.builtin.classmethod_descriptor(t,s)})),Object.defineProperty(n,"tp$classmethods",{value:null,writable:!0})}};const l={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},u=Object.entries(l);Sk.abstr.setUpSlots=function(t,e){function n(e,n){s[e]=new Sk.builtin.wrapper_descriptor(t,Sk.slots[e],n)}function i(t,e){"string"==typeof t?n(t,e):t.forEach((t=>{n(t,e)}))}if(void 0!==Sk.builtin.wrapper_descriptor){var s=t.prototype;(e=e||s.tp$slots||{}).tp$new===Sk.generic.new&&(e.tp$new=Sk.generic.new(t)),e.tp$richcompare?function(t){u.forEach((e=>{var[n,i]=e;t[i]=function(t){return this.tp$richcompare(t,n)}}))}(e):e.ob$eq&&(e.tp$richcompare=function(t,e){return this[l[e]].call(this,t)}),e.tp$as_number&&function(t){const e=Sk.reflectedNumberSlots;Object.keys(e).forEach((n=>{if(void 0!==t[n]){const i=e[n],s=i.reflected,r=t[s];void 0!==r?null===r&&delete t[s]:t[s]=i.slot||t[n]}}))}(e),e.tp$as_sequence_or_mapping&&function(t){const e=Sk.sequenceAndMappingSlots;Object.keys(e).forEach((n=>{void 0!==t[n]&&e[n].forEach((e=>{t[e]=t[n]}))}))}(e),Object.entries(e).forEach((t=>{var[e,n]=t;Object.defineProperty(s,e,{value:n,writable:!0})})),e.tp$new&&(s.__new__=new Sk.builtin.sk_method(Sk.generic.newMethodDef,t),Object.defineProperty(s,"sk$staticNew",{value:t,writable:!0})),Sk.subSlots.main_slots.forEach((t=>{var[n,s]=t;void 0!==(t=e[n])&&i(s,t)}));var r=e.tp$hash;void 0!==r&&("function"==typeof r?n("__hash__",r):r===Sk.builtin.none.none$?s.__hash__=r:Sk.asserts.fail("invalid tp$hash")),e.tp$as_number&&Sk.subSlots.number_slots.forEach((t=>{var[n,s]=t;void 0!==(t=e[n])&&i(s,t)})),e.tp$as_sequence_or_mapping&&Sk.subSlots.sequence_and_mapping_slots.forEach((t=>{var[n,s]=t;void 0!==(t=e[n])&&i(s,t)})),Object.defineProperty(s,"tp$slots",{value:null,writable:!0})}},Sk.abstr.buildNativeClass=function(t,e){e=e||{},Sk.asserts.assert(e.hasOwnProperty("constructor"),"A constructor is required to build a native class");let n=e.constructor;Sk.abstr.setUpInheritance(t,n,e.base,e.meta),Sk.abstr.setUpBuiltinMro(n);const i=n.prototype;return Object.defineProperties(i,{tp$slots:{value:e.slots,writable:!0},tp$getsets:{value:e.getsets,writable:!0},tp$methods:{value:e.methods,writable:!0},tp$classmethods:{value:e.classmethods,writable:!0}}),Sk.abstr.setUpSlots(n,e.slots||{}),Sk.abstr.setUpMethods(n,e.methods),Sk.abstr.setUpGetSets(n,e.getsets),Sk.abstr.setUpClassMethods(n,e.classmethods),Object.entries(e.proto||{}).forEach((t=>{var[e,n]=t;Object.defineProperty(i,e,{value:n,writable:!0,enumerable:!(e.includes("$")||e in Object.prototype)})})),Object.entries(e.flags||{}).forEach((t=>{var[e,i]=t;Object.defineProperty(n,e,{value:i,writable:!0})})),i.hasOwnProperty("tp$iter")&&(i[Symbol.iterator]=function(){return this.tp$iter()[Symbol.iterator]()}),void 0!==Sk.builtin.str&&i.hasOwnProperty("tp$doc")&&!i.hasOwnProperty("__doc__")&&(t=i.tp$doc||null,i.__doc__="string"==typeof t?new Sk.builtin.str(t):Sk.builtin.none.none$),n},Sk.abstr.buildIteratorClass=function(t,e){return Sk.asserts.assert(e.hasOwnProperty("constructor"),"must provide a constructor"),e.slots=e.slots||{},e.slots.tp$iter=Sk.generic.selfIter,e.slots.tp$iternext=e.slots.tp$iternext||e.iternext,e.slots.tp$getattr=e.slots.tp$getattr||Sk.generic.getAttr,t=Sk.abstr.buildNativeClass(t,e),Sk.abstr.built$iterators.push(t),t.prototype[Symbol.iterator]=function(){return{next:()=>{const t=this.tp$iternext();return{value:t,done:void 0===t}}}},t},Sk.abstr.built$iterators=[],Sk.abstr.setUpModuleMethods=function(t,e,n){return Object.entries(n).forEach((n=>{var[i,s]=n;s.$name=s.$name||i,e[i]=new Sk.builtin.sk_method(s,null,t)})),e},Sk.abstr.superConstructor=function(t,e,n){var i=Array.prototype.slice.call(arguments,2);t.prototype.tp$base.apply(e,i)}},function(t,e){function n(t){const e=t.prototype,n=e.tp$base;if(null==n)return!1;const i=n.prototype;return!(n.sk$solidSlotBase||t.sk$solidSlotBase||i.sk$hasDict!==e.sk$hasDict||n.sk$solidBase&&n!==Sk.builtin.module)}const i=new WeakMap;Sk.builtin.object=Sk.abstr.buildNativeClass("object",{constructor:function(){Sk.asserts.assert(this instanceof Sk.builtin.object,"bad call to object, use 'new'")},base:null,slots:{tp$new(t,e){if(t.length||e&&e.length){if(this.tp$new!==Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError("object.__new__() takes exactly one argument (the type to instantiate)");if(this.tp$init===Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+"() takes no arguments")}return new this.constructor},tp$init(t,e){if(t.length||e&&e.length){if(this.tp$init!==Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError("object.__init__() takes exactly one argument (the instance to initialize)");if(this.tp$new===Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+".__init__() takes exactly one argument (the instance to initialize)")}},tp$getattr:Sk.generic.getAttr,tp$setattr:Sk.generic.setAttr,$r(){const t=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$module);let e="";return t&&Sk.builtin.checkString(t)&&(e=t.v+"."),new Sk.builtin.str("<"+e+Sk.abstr.typeName(this)+" object>")},tp$str(){return this.$r()},tp$hash(){let t=i.get(this);return void 0!==t||(t=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2),i.set(this,t)),t},tp$richcompare(t,e){switch(e){case"Eq":t=this===t||Sk.builtin.NotImplemented.NotImplemented$;break;case"NotEq":(t=this.ob$eq(t,"Eq"))!==Sk.builtin.NotImplemented.NotImplemented$&&(t=!Sk.misceval.isTrue(t));break;default:t=Sk.builtin.NotImplemented.NotImplemented$}return t},tp$doc:"The most base type"},getsets:{__class__:{$get(){return this.ob$type},$set(t){if(void 0===t)throw new Sk.builtin.TypeError("can't delete __class__ attribute");if(!Sk.builtin.checkClass(t))throw new Sk.builtin.TypeError("__class__ must be set to a class, not '"+Sk.abstr.typeName(t)+"' object");const e=this.ob$type;if(!(e.$isSubType(Sk.builtin.module)&&t.$isSubType(Sk.builtin.module)||void 0!==e.prototype.ht$type&&void 0!==t.prototype.ht$type))throw new Sk.builtin.TypeError(" __class__ assignment only supported for heap types or ModuleType subclasses");{let i=e,s=t;for(;n(i);)i=i.prototype.tp$base;for(;n(s);)s=s.prototype.tp$base;if(i!==s&&(i.prototype.tp$base!==s.prototype.tp$base||!function(t,e){t=t.prototype,e=e.prototype;const n=t.ht$slots,i=e.ht$slots;return t.sk$hasDict===e.sk$hasDict&&(n===i||(n&&i?n.length===i.length&&n.every(((t,e)=>t===i[e])):(n&&(n.length||null))===(i&&(i.length||null))))}(i,s)))throw new Sk.builtin.TypeError("__class__ assignment: '"+t.prototype.tp$name+"' object layout differs from '"+e.prototype.tp$name+"'")}Object.setPrototypeOf(this,t.prototype)},$doc:"the object's class"}},methods:{__dir__:{$meth:function(){let t=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);t=void 0===t?new Sk.builtin.dict([]):t instanceof Sk.builtin.dict?t.dict$copy():new Sk.builtin.dict([]);const e=Sk.abstr.lookupAttr(this,Sk.builtin.str.$class);return void 0!==e&&e.$mergeClassDict(t),new Sk.builtin.list(t.sk$asarray())},$flags:{NoArgs:!0},$doc:"Default dir() implementation."},__format__:{$meth(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__format__() argument must be str, not "+Sk.abstr.typeName(t));if(t!==Sk.builtin.str.$empty)throw new Sk.builtin.TypeError(`unsupported format string passed to ${Sk.abstr.typeName(this)}.__format__`);return this.tp$str()},$flags:{OneArg:!0},$doc:"Default object formatter."}},classmethods:{__init_subclass__:{$meth:t=>Sk.builtin.none.none$,$flags:{FastCall:!0,NoKwargs:!0}}},proto:{valueOf:Object.prototype.valueOf,toString(){return this.tp$str().v},hasOwnProperty:Object.prototype.hasOwnProperty,ht$type:void 0,sk$attrError(){return"'"+this.tp$name+"' object"},$mergeClassDict(t){var e=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);if(void 0!==e&&t.dict$merge(e),void 0!==(e=Sk.abstr.lookupAttr(this,Sk.builtin.str.$bases))){var n=Sk.builtin.len(e).valueOf();for(let i=0;ivoid 0===t?Sk.builtin.none.none$:t))}function r(t,e,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,1,2),void 0===(t=this.call(t,...e))?Sk.builtin.none.none$:t}function o(t,e,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,2,2),Sk.misceval.chain(this.call(t,e[0],e[1],!0),(()=>Sk.builtin.none.none$))}function a(t,e,n){return Sk.abstr.checkOneArg(this.$name,e,n),t=this.call(t,e[0],void 0,!0),Sk.misceval.chain(t,(t=>void 0===t?Sk.builtin.none.none$:t))}function l(t,e,n){return(t=i.call(this,t,e,n))===Sk.builtin.NotImplemented.NotImplemented$?t:new Sk.builtin.bool(t)}function u(t,e,n){return function(i,s,r){return i=t.call(this,i,s,r),n?Sk.misceval.chain(i,e):e(Sk.misceval.retryOptionalSuspensionOrThrow(i))}}function c(t){return function(){const e=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return Sk.misceval.callsimArray(e,[])}}function p(t,e,n,i){return function(s){return function(){var r=s.tp$descr_get?s.tp$descr_get(this,this.ob$type):s;if(r=Sk.misceval.callsimArray(r,[]),!e(r))throw new Sk.builtin.TypeError(t+" should return "+n+" (returned "+Sk.abstr.typeName(r)+")");return void 0!==i?i(r):r}}}function h(t){return function(e){const n=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return Sk.misceval.callsimArray(n,[e])}}function _(t,e){let n=this.ob$type.$typeLookup(Sk.builtin.str.$getattribute);if(n instanceof Sk.builtin.wrapper_descriptor)return n.d$wrapped.call(this,t,e);n.tp$descr_get&&(n=n.tp$descr_get(this,this.ob$type));const i=Sk.misceval.tryCatch((()=>Sk.misceval.callsimOrSuspendArray(n,[t])),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t}));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}function d(t,e,n){return function(i){return function(i,s,r){let o;void 0===s?(o=e,n=null):o=t;let a=this.ob$type.$typeLookup(new Sk.builtin.str(o));if(a instanceof Sk.builtin.wrapper_descriptor)return a.d$wrapped.call(this,i,s);if(a.tp$descr_get&&(a=a.tp$descr_get(this,this.ob$type,r)),void 0===a){if(n)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this)+"' object "+n);throw new Sk.builtin.AttributeError(o)}return i=Sk.misceval.callsimOrSuspendArray(a,void 0===s?[i]:[i,s]),r?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}}}function f(t,e){let n=t.ob$type;for(;n&&void 0!==n.sk$klass;)n=n.prototype.tp$base;if(n&&n.prototype.tp$setattr!==e)throw new Sk.builtin.TypeError("can't apply this "+e.$name+" to "+Sk.abstr.typeName(t)+" object")}Sk.slots=Object.create(null),t=Sk.slots,Sk.slots.__init__={$name:"__init__",$slot_name:"tp$init",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(i,e,n),Sk.misceval.chain(e,(t=>{if(!Sk.builtin.checkNone(t)&&void 0!==t)throw new Sk.builtin.TypeError("__init__() should return None, not "+Sk.abstr.typeName(t))}))}},$wrapper:function(t,e,n){return this.call(t,e,n),Sk.builtin.none.none$},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Initialize self. See help(type(self)) for accurate signature."},t.__new__={$name:"__new__",$slot_name:"tp$new",$slot_func:function(t){const e=function(e,n){let i=t;return t.tp$descr_get&&(i=t.tp$descr_get(null,this.constructor)),Sk.misceval.callsimOrSuspendArray(i,[this.constructor,...e],n)};return e.sk$static_new=!1,e},$wrapper:null,$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Create and return a new object."},t.__call__={$name:"__call__",$slot_name:"tp$call",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return Sk.misceval.callsimOrSuspendArray(i,e,n)}},$wrapper:function(t,e,n){return void 0===(t=t.tp$call(e,n))?Sk.builtin.none.none$:t},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Call self as a function."},t.__repr__={$name:"__repr__",$slot_name:"$r",$slot_func:p("__repr__",Sk.builtin.checkString,"str"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return repr(self)."},t.__str__={$name:"__str__",$slot_name:"tp$str",$slot_func:p("__str__",Sk.builtin.checkString,"str"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return str(self)."};var m=p("__hash__",Sk.builtin.checkInt,"int",(t=>"number"==typeof t.v?t.v:t.tp$hash()));t.__hash__={$name:"__hash__",$slot_name:"tp$hash",$slot_func:function(t){return t===Sk.builtin.none.none$?Sk.builtin.none.none$:m(t)},$wrapper:u(n,(t=>new Sk.builtin.int_(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return hash(self)."},t.__getattribute__={$name:"__getattribute__",$slot_name:"tp$getattr",$slot_func:function(t){return function(t,e){let n=this.ob$type.$typeLookup(Sk.builtin.str.$getattr);if(void 0===n)return _.call(this,t,e);const i=Sk.misceval.chain(_.call(this,t,e),(e=>Sk.misceval.tryCatch((()=>void 0!==e?e:(n.tp$descr_get&&(n=n.tp$descr_get(this,this.ob$type)),Sk.misceval.callsimOrSuspendArray(n,[t]))),(function(t){if(!(t instanceof Sk.builtin.AttributeError))throw t}))));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}},$wrapper:function(t,e,n){Sk.abstr.checkOneArg(this.$name,e,n);const i=e[0];if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("attribute name must be string, not '"+Sk.abstr.typeName(i)+"'");return e=this.call(t,i,!0),Sk.misceval.chain(e,(e=>{if(void 0===e)throw new Sk.builtin.AttributeError(Sk.abstr.typeName(t)+" has no attribute "+i.$jsstr());return e}))},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},t.__getattr__={$name:"__getattr__",$slot_name:"tp$getattr",$slot_func:t.__getattribute__.$slot_func,$wrapper:null,$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},t.__setattr__={$name:"__setattr__",$slot_name:"tp$setattr",$slot_func:d("__setattr__","__delattr__"),$wrapper:function(t,e,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,2,2),f(t,this),Sk.misceval.chain(this.call(t,e[0],e[1],!0),(()=>Sk.builtin.none.none$))},$textsig:"($self, name, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Implement setattr(self, name, value)."},t.__delattr__={$name:"__delattr__",$slot_name:"tp$setattr",$slot_func:t.__setattr__.$slot_func,$wrapper:function(t,e,n){return Sk.abstr.checkOneArg(this.$name,e,n),f(t,this),this.call(t,e[0]),Sk.builtin.none.none$},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Implement delattr(self, name)."},t.__get__={$name:"__get__",$slot_name:"tp$descr_get",$slot_func:function(t){return function(e,n,i){null===e&&(e=Sk.builtin.none.none$),null==n&&(n=Sk.builtin.none.none$);const s=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(s,[e,n]),i?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)}},$wrapper:function(t,e,n){if(Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,e,1,2),n=e[0],e=e[1],n===Sk.builtin.none.none$&&(n=null),e===Sk.builtin.none.none$&&(e=null),null===e&&null===n)throw new Sk.builtin.TypeError("__get__(None, None) is invalid");return this.call(t,n,e,!0)},$textsig:"($self, instance, owner, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Return an attribute of instance, which is of type owner."},t.__set__={$name:"__set__",$slot_name:"tp$descr_set",$slot_func:d("__set__","__delete__"),$wrapper:o,$textsig:"($self, instance, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set an attribute of instance to value."},t.__delete__={$name:"__delete__",$slot_name:"tp$descr_set",$slot_func:t.__set__.$slot_func,$wrapper:a,$textsig:"($self, instance, /)",$flags:{OneArg:!0},$doc:"Delete an attribute of instance."},t.__eq__={$name:"__eq__",$slot_name:"ob$eq",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self==value."},t.__ge__={$name:"__ge__",$slot_name:"ob$ge",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>=value."},t.__gt__={$name:"__gt__",$slot_name:"ob$gt",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>value."},t.__le__={$name:"__le__",$slot_name:"ob$le",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<=value."},t.__lt__={$name:"__lt__",$slot_name:"ob$lt",$slot_func:h,$wrapper:l,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return selfSk.misceval.callsimOrSuspendArray(n,[])),(t=>{if(!(t instanceof Sk.builtin.StopIteration))throw t;this.gi$ret=t.$value}));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}},$wrapper:function(t,e,n){return Sk.abstr.checkNoArgs(this.$name,e,n),Sk.misceval.chain(t.tp$iternext(!0),(t=>{if(void 0===t)throw new Sk.builtin.StopIteration;return t}))},$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement next(self)."},t.__len__={$name:"__len__",$slot_name:"sq$length",$slot_func:function(t){return function(e){const n=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e?(e=Sk.misceval.callsimOrSuspendArray(n,[]),Sk.misceval.chain(e,(t=>Sk.misceval.asIndexOrThrow(t)))):(e=Sk.misceval.callsimArray(n,[]),Sk.misceval.asIndexOrThrow(e))}},$wrapper:u((function(t,e,n){return Sk.abstr.checkNoArgs(this.$name,e,n),t=this.call(t,!0),Sk.misceval.chain(t,(t=>void 0===t?Sk.builtin.none.none$:t))}),(t=>new Sk.builtin.int_(t)),!0),$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return len(self)."},t.__contains__={$name:"__contains__",$slot_name:"sq$contains",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(i,[e]),(e=Sk.misceval.chain(e,(t=>Sk.misceval.isTrue(t)))).$isSuspension?n?e:Sk.misceval.retryOptionalSuspensionOrThrow(e):e}},$wrapper:u(s,(t=>new Sk.builtin.bool(t)),!0),$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return key in self."},t.__getitem__={$name:"__getitem__",$slot_name:"mp$subscript",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return e=Sk.misceval.callsimOrSuspendArray(i,[e]),n?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)}},$wrapper:s,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return self[key]."},t.__setitem__={$name:"__setitem__",$slot_name:"mp$ass_subscript",$slot_func:d("__setitem__","__delitem__","does not support item assignment"),$wrapper:o,$textsig:"($self, key, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set self[key] to value."},t.__delitem__={$name:"__delitem__",$slot_name:"mp$ass_subscript",$slot_func:t.__setitem__.$slot_func,$wrapper:a,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Delete self[key]."},t.__add__={$name:"__add__",$slot_name:"nb$add",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self+value."},t.__radd__={$name:"__radd__",$slot_name:"nb$reflected_add",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value+self."},t.__iadd__={$name:"__iadd__",$slot_name:"nb$inplace_add",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self+=value."},t.__sub__={$name:"__sub__",$slot_name:"nb$subtract",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self-value."},t.__rsub__={$name:"__rsub__",$slot_name:"nb$reflected_subtract",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value-self."},t.__imul__={$name:"__imul__",$slot_name:"nb$inplace_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self*=value."},t.__mul__={$name:"__mul__",$slot_name:"nb$multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self*value."},t.__rmul__={$name:"__rmul__",$slot_name:"nb$reflected_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value*self."},t.__isub__={$name:"__isub__",$slot_name:"nb$inplace_subtract",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self-=value."},t.__mod__={$name:"__mod__",$slot_name:"nb$remainder",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self%value."},t.__rmod__={$name:"__rmod__",$slot_name:"nb$reflected_remainder",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value%self."},t.__imod__={$name:"__imod__",$slot_name:"nb$inplace_remainder",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement value%=self."},t.__divmod__={$name:"__divmod__",$slot_name:"nb$divmod",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(self, value)."},t.__rdivmod__={$name:"__rdivmod__",$slot_name:"nb$reflected_divmod",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(value, self)"},t.__pos__={$name:"__pos__",$slot_name:"nb$positive",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"+self"},t.__neg__={$name:"__neg__",$slot_name:"nb$negative",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"-self"},t.__abs__={$name:"__abs__",$slot_name:"nb$abs",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"abs(self)"},t.__bool__={$name:"__bool__",$slot_name:"nb$bool",$slot_func:p("__bool__",Sk.builtin.checkBool,"bool",(t=>0!==t.v)),$wrapper:u(n,(t=>new Sk.builtin.bool(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"self != 0"},t.__invert__={$name:"__invert__",$slot_name:"nb$invert",$slot_func:c,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"~self"},t.__lshift__={$name:"__lshift__",$slot_name:"nb$lshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<>value."},t.__rrshift__={$name:"__rrshift__",$slot_name:"nb$reflected_rshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value>>self."},t.__ilshift__={$name:"__ilshift__",$slot_name:"nb$inplace_lshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self<<=value."},t.__irshift__={$name:"__irshift__",$slot_name:"nb$inplace_rshift",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self=>>value."},t.__and__={$name:"__and__",$slot_name:"nb$and",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self&value."},t.__rand__={$name:"__rand__",$slot_name:"nb$refelcted_and",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value&self."},t.__iand__={$name:"__iand__",$slot_name:"nb$and",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self&=value."},t.__xor__={$name:"__xor__",$slot_name:"nb$xor",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self^value."},t.__rxor__={$name:"__rxor__",$slot_name:"nb$reflected_xor",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value^self."},t.__ixor__={$name:"__ixor__",$slot_name:"nb$inplace_xor",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self^=value."},t.__or__={$name:"__or__",$slot_name:"nb$or",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self|value."},t.__ror__={$name:"__ror__",$slot_name:"nb$reflected_or",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value|self."},t.__ior__={$name:"__ior__",$slot_name:"nb$inplace_or",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self|=value."},t.__int__={$name:"__int__",$slot_name:"nb$int",$slot_func:p("__int__",Sk.builtin.checkInt,"int"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"},t.__float__={$name:"__float__",$slot_name:"nb$float",$slot_func:p("__float__",Sk.builtin.checkFloat,"float"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"float(self)"},t.__floordiv__={$name:"__floordiv__",$slot_name:"nb$floor_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self//value."},t.__rfloordiv__={$name:"__rfloordiv__",$slot_name:"nb$reflected_floor_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value//self."},t.__ifloordiv__={$name:"__ifloordiv__",$slot_name:"nb$inplace_floor_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self//=value."},t.__truediv__={$name:"__truediv__",$slot_name:"nb$divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self/value."},t.__rtruediv__={$name:"__rtruediv__",$slot_name:"nb$reflected_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value/self."},t.__itruediv__={$name:"__itruediv__",$slot_name:"nb$inplace_divide",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self/=value."},t.__index__={$name:"__index__",$slot_name:"nb$index",$slot_func:p("__index__",Sk.builtin.checkInt,"int",(t=>t.v)),$wrapper:u(n,(t=>new Sk.builtin.int_(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return self converted to an integer, if self is suitable for use as an index into a list."},t.__pow__={$name:"__pow__",$slot_name:"nb$power",$slot_func:function(t){return function(e,n){const i=t.tp$descr_get?t.tp$descr_get(this,this.ob$type):t;return null==n?Sk.misceval.callsimArray(i,[e]):Sk.misceval.callsimArray(i,[e,n])}},$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(self, value, mod)."},t.__rpow__={$name:"__rpow__",$slot_name:"nb$reflected_power",$slot_func:t.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(value, self, mod)."},t.__ipow__={$name:"__ipow__",$slot_name:"nb$inplace_power",$slot_func:t.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Implement **="},t.__matmul__={$name:"__matmul__",$slot_name:"nb$matrix_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self@value."},t.__rmatmul__={$name:"__rmatmul__",$slot_name:"nb$reflected_matrix_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value@self."},t.__imatmul__={$name:"__imatmul__",$slot_name:"nb$inplace_matrix_multiply",$slot_func:h,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self@=value."},t.__long__={$name:"__long__",$slot_name:"nb$long",$slot_func:p("__long__",Sk.builtin.checkInt,"int"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"};var g,b={next:{$name:"next",$slot_name:"tp$iternext",$slot_func:t.__next__.$slot_func,$wrapper:t.__next__.$wrapper,$textsig:t.__next__.$textsig,$flags:t.__next__.$flags},__nonzero__:{$name:"__nonzero__",$slot_name:"nb$bool",$slot_func:p("__nonzero__",Sk.builtin.checkInt,"int",(t=>0!==t.v)),$wrapper:u(n,(t=>new Sk.builtin.bool(t))),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"x.__nonzero__() <==> x != 0"},__div__:{$name:"__div__",$slot_name:"nb$divide",$slot_func:h,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__div__(y) <==> x/y"},__rdiv__:{$name:"__rdiv__",$slot_name:"nb$reflected_divide",$slot_func:h,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__rdiv__(y) <==> x/y"},__idiv__:{$name:"__idiv__",$slot_name:"nb$inplace_divide",$slot_func:h,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"implement self /= other"}};Sk.subSlots={main_slots:Object.entries({tp$init:"__init__",tp$call:"__call__",$r:"__repr__",tp$str:"__str__",tp$getattr:"__getattribute__",tp$setattr:["__setattr__","__delattr__"],ob$eq:"__eq__",ob$ne:"__ne__",ob$lt:"__lt__",ob$le:"__le__",ob$gt:"__gt__",ob$ge:"__ge__",tp$descr_get:"__get__",tp$descr_set:["__set__","__delete__"],tp$iter:"__iter__",tp$iternext:"__next__"}),number_slots:Object.entries({nb$abs:"__abs__",nb$negative:"__neg__",nb$positive:"__pos__",nb$int:"__int__",nb$long:"__long__",nb$float:"__float__",nb$index:"__index__",nb$add:"__add__",nb$reflected_add:"__radd__",nb$inplace_add:"__iadd__",nb$subtract:"__sub__",nb$reflected_subtract:"__rsub__",nb$inplace_subtract:"__isub__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_multiply:"__imul__",nb$floor_divide:"__floordiv__",nb$reflected_floor_divide:"__rfloordiv__",nb$inplace_floor_divide:"__ifloordiv__",nb$invert:"__invert__",nb$remainder:"__mod__",nb$reflected_remainder:"__rmod__",nb$inplace_remainder:"__imod__",nb$divmod:"__divmod__",nb$reflected_divmod:"__rdivmod__",nb$power:"__pow__",nb$reflected_power:"__rpow__",nb$inplace_power:"__ipow__",nb$divide:"__truediv__",nb$reflected_divide:"__rtruediv__",nb$inplace_divide:"__itruediv__",nb$bool:"__bool__",nb$and:"__and__",nb$reflected_and:"__rand__",nb$inplace_and:"__iand__",nb$or:"__or__",nb$reflected_or:"__ror__",nb$inplace_or:"__ior__",nb$xor:"__xor__",nb$reflected_xor:"__rxor__",nb$inplace_xor:"__ixor__",nb$lshift:"__lshift__",nb$reflected_lshift:"__rlshift__",nb$rshift:"__rshift__",nb$reflected_rshift:"__rrshift__",nb$inplace_lshift:"__ilshift__",nb$inplace_rshift:"__irshift__",nb$matrix_multiply:"__matmul__",nb$reflected_matrix_multiply:"__rmatmul__",nb$inplace_matrix_multiply:"__imatmul__"}),sequence_and_mapping_slots:Object.entries({sq$length:"__len__",sq$contains:"__contains__",mp$subscript:"__getitem__",mp$ass_subscript:["__setitem__","__delitem__"],nb$add:"__add__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_add:"__iadd__",nb$inplace_multiply:"__imul__"})},Sk.reflectedNumberSlots={nb$add:{reflected:"nb$reflected_add"},nb$subtract:{reflected:"nb$reflected_subtract",slot:function(t){return t instanceof this.constructor?t.nb$subtract(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$multiply:{reflected:"nb$reflected_multiply"},nb$divide:{reflected:"nb$reflected_divide",slot:function(t){return t instanceof this.constructor?t.nb$divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$floor_divide:{reflected:"nb$reflected_floor_divide",slot:function(t){return t instanceof this.constructor?t.nb$floor_divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$remainder:{reflected:"nb$reflected_remainder",slot:function(t){return t instanceof this.constructor?t.nb$remainder(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$divmod:{reflected:"nb$reflected_divmod",slot:function(t){return t instanceof this.constructor?t.nb$divmod(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$power:{reflected:"nb$reflected_power",slot:function(t,e){return t instanceof this.constructor?t.nb$power(this,e):Sk.builtin.NotImplemented.NotImplemented$}},nb$and:{reflected:"nb$reflected_and"},nb$or:{reflected:"nb$reflected_or"},nb$xor:{reflected:"nb$reflected_xor"},nb$lshift:{reflected:"nb$reflected_lshift",slot:function(t){return t instanceof this.constructor?t.nb$lshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$rshift:{reflected:"nb$reflected_rshift",slot:function(t){return t instanceof this.constructor?t.nb$rshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$matrix_multiply:{reflected:"nb$reflexted_matrix_multiply",slot:function(t){return t instanceof this.constructor?t.nb$matrix_multiply(this):Sk.builtin.NotImplemented.NotImplemented$}}},Sk.sequenceAndMappingSlots={sq$concat:["nb$add"],sq$repeat:["nb$multiply","nb$reflected_multiply"],mp$length:["sq$length"],sq$inplace_repeat:["nb$inplace_multiply"],sq$inplace_concat:["nb$inplace_add"]},Sk.dunderToSkulpt={__repr__:"$r",__str__:"tp$str",__init__:"tp$init",__new__:"tp$new",__hash__:"tp$hash",__call__:"tp$call",__iter__:"tp$iter",__next__:"tp$iternext",__eq__:"ob$eq",__ne__:"ob$ne",__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge",__abs__:"nb$abs",__neg__:"nb$negative",__pos__:"nb$positive",__int__:"nb$int",__float__:"nb$float",__index__:"nb$index",__add__:"nb$add",__radd__:"nb$reflected_add",__iadd__:"nb$inplace_add",__sub__:"nb$subtract",__rsub__:"nb$reflected_subtract",__isub__:"nb$inplace_subtract",__mul__:"nb$multiply",__rmul__:"nb$reflected_multiply",__imul__:"nb$inplace_multiply",__truediv__:"nb$divide",__rtruediv__:"nb$reflected_divide",__itruediv__:"nb$inplace_divide",__floordiv__:"nb$floor_divide",__rfloordiv__:"nb$reflected_floor_divide",__ifloordiv__:"nb$inplace_floor_divide",__invert__:"nb$invert",__mod__:"nb$remainder",__rmod__:"nb$reflected_remainder",__imod__:"nb$inplace_remainder",__divmod__:"nb$divmod",__rdivmod__:"nb$reflected_divmod",__pow__:"nb$power",__rpow__:"nb$reflected_power",__ipow__:"nb$inplace_power",__bool__:"nb$bool",__long__:"nb$long",__lshift__:"nb$lshift",__rlshift__:"nb$reflected_lshift",__ilshift__:"nb$inplace_lshift",__rshift__:"nb$rshift",__rrshift__:"nb$reflected_rshift",__irshift__:"nb$inplace_rshift",__and__:"nb$and",__rand__:"nb$reflected_and",__iand__:"nb$inplace_and",__or__:"nb$or",__ror__:"nb$reflected_or",__ior__:"nb$inplace_or",__xor__:"nb$xor",__rxor__:"nb$reflected_xor",__ixor__:"nb$inplace_xor",__matmul__:"nb$matrix_multiply",__rmatmul__:"nb$reflected_matrix_multiply",__imatmul__:"nb$inplace_matrix_multiply",__get__:"tp$descr_get",__set__:"tp$descr_set",__delete__:"tp$descr_set",__getattribute__:"tp$getattr",__getattr__:"tp$getattr",__setattr__:"tp$setattr",__delattr__:"tp$setattr",__len__:"sq$length",__contains__:"sq$contains",__getitem__:"mp$subscript",__setitem__:"mp$ass_subscript",__delitem__:"mp$ass_subscript"},Sk.exportSymbol("Sk.setupDunderMethods",Sk.setupDunderMethods),Sk.setupDunderMethods=function(t){function e(t,e,n){for(let i=0;i"tp$iternext"===t[0])),l=r.findIndex((t=>"nb$bool"===t[0])),u=Sk.dunderToSkulpt;if(t){u.__bool__="nb$bool",u.__next__="tp$iternext",delete u.__nonzero__,delete u.__div__,delete u.__rdiv__,delete u.__idiv__,delete u.next;for(let t in g)n[t]=g[t];for(let t in b)delete n[t];for(t=0;t")}const o={__doc__:{$get(){return this.d$def.$doc?new Sk.builtin.str(this.d$def.$doc):Sk.builtin.none.none$}},__objclass__:{$get(){return this.d$type}},__name__:{$get(){return new Sk.builtin.str(this.d$name)}}};t={__text_signature__:{$get(){return this.d$def.$textsig?new Sk.builtin.str(this.d$def.$textsig):Sk.builtin.none.none$}}},Sk.builtin.getset_descriptor=n("getset_descriptor",void 0,{constructor:function(t,e){this.d$def=e,this.$get=e.$get,this.$set=e.$set,this.d$type=t,this.d$name=e.$name},slots:{tp$descr_get(t,e,n){if(e=this.d$check(t))return e;if(void 0!==this.$get)return t=this.$get.call(t),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t);throw new Sk.builtin.AttributeError("getset_descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is not readable")},tp$descr_set(t,e,n){if(this.d$set_check(t),void 0!==this.$set)return t=this.$set.call(t,e),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t);throw new Sk.builtin.AttributeError("attribute '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is readonly")}}}),Sk.builtin.method_descriptor=n("method_descriptor","method",{constructor:function(t,e){this.d$def=e,this.$meth=e.$meth,this.d$type=t,this.d$name=e.$name||"",this.$flags=t=e.$flags||{},t.FastCall&&t.NoKwargs?this.tp$call=this.$methodFastCallNoKwargs:t.FastCall?this.tp$call=this.$methodFastCall:t.NoArgs?this.tp$call=this.$methodCallNoArgs:t.OneArg?this.tp$call=this.$methodCallOneArg:t.NamedArgs?this.tp$call=this.$methodCallNamedArgs:void 0!==t.MinArgs?this.tp$call=this.$methodCallMinArgs:(this.func_code=e.$meth,this.tp$call=this.$defaultCall,this.$memoiseFlags=Sk.builtin.func.prototype.$memoiseFlags,this.$resolveArgs=Sk.builtin.func.prototype.$resolveArgs)},slots:{tp$call(t,e){return this.tp$call(t,e)},tp$descr_get(t,e){let n;return(n=this.d$check(t))?n:new Sk.builtin.sk_method(this.d$def,t)}},getsets:t,proto:{$methodFastCall(t,e){const n=t.shift();return this.m$checkself(n),this.$meth.call(n,t,e)},$methodFastCallNoKwargs(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkNoKwargs(this.d$name,e),this.$meth.call(n,t)},$methodCallNoArgs(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkNoArgs(this.d$name,t,e),this.$meth.call(n)},$methodCallOneArg(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkOneArg(this.d$name,t,e),this.$meth.call(n,t[0])},$methodCallNamedArgs(t,e){const n=t.shift();return this.m$checkself(n),t=Sk.abstr.copyKeywordsToNamedArgs(this.d$name,this.$flags.NamedArgs,t,e,this.$flags.Defaults),this.$meth.call(n,...t)},$methodCallMinArgs(t,e){const n=t.shift();return this.m$checkself(n),Sk.abstr.checkNoKwargs(this.d$name,e),Sk.abstr.checkArgsLen(this.d$name,t,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth.call(n,...t)},$defaultCall(t,e){return this.m$checkself(t[0]),Sk.builtin.func.prototype.tp$call.call(this,t,e)},m$checkself(t){if(void 0===t)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");this.d$check(t)}}}),Sk.builtin.wrapper_descriptor=n("wrapper_descriptor","slot wrapper",{constructor:function(t,e,n){this.d$def=e,this.d$type=t,this.d$name=n.$name=e.$name,this.d$wrapped=n},slots:{tp$descr_get(t,e){let n;return(n=this.d$check(t))?n:new Sk.builtin.method_wrapper(this,t)},tp$call(t,e){if(1>t.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const n=t.shift();if(!n.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(n)+"'");return this.raw$call(n,t,e)}},proto:{raw$call(t,e,n){return this.d$wrapped.$name=this.d$name,this.d$def.$wrapper.call(this.d$wrapped,t,e,n)}}}),Sk.builtin.method_wrapper=n("method_wrapper",void 0,{constructor:function(t,e){this.m$descr=t,this.m$self=e,this.d$def=t.d$def,this.d$name=t.d$name,this.d$type=t.d$type},slots:{tp$call(t,e){return this.m$descr.raw$call(this.m$self,t,e)},tp$richcompare(t,e){return("Eq"===e||"NotEq"===e)&&t instanceof Sk.builtin.method_wrapper?(t=this.m$self===t.m$self&&this.m$descr===t.m$descr,"Eq"===e?t:!t):Sk.builtin.NotImplemented.NotImplemented$},$r(){return new Sk.builtin.str("")}},getsets:{__self__:{$get(){return this.m$self}}}}),Sk.builtin.classmethod_descriptor=n("classmethod_descriptor","method",{constructor:function(t,e){this.d$def=e,this.$meth=e.$meth,this.d$type=t,this.d$name=e.$name||""},slots:{tp$call(t,e){if(1>t.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const n=t.shift();return this.tp$descr_get(null,n).tp$call(t,e)},tp$descr_get(t,e,n){if(void 0===e){if(null===t)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs an object or a type");e=e||t.ob$type}if(!e.ob$type.$isSubType(Sk.builtin.type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs a type not a '"+Sk.abstr.typeName(e)+"' as arg 2");if(!e.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(e)+"' object");return new Sk.builtin.sk_method(this.d$def,e)}},getsets:t}),[Sk.builtin.method_descriptor,Sk.builtin.getset_descriptor,Sk.builtin.wrapper_descriptor,Sk.builtin.method_wrapper,Sk.builtin.classmethod_descriptor].forEach((t=>{Sk.abstr.setUpSlots(t),Sk.abstr.setUpMethods(t),Sk.abstr.setUpGetSets(t)}))},function(t,e){Sk.builtin.sk_method=Sk.abstr.buildNativeClass("builtin_function_or_method",{constructor:function(t,e,n){this.$meth=t.$meth.bind(e),this.$doc=t.$doc,this.$self=e||null,this.$module=n?new Sk.builtin.str(n):null,this.$name=t.$name||t.$meth.name||"",this.m$def=t,this.$textsig=t.$textsig,this.$flags=t=t.$flags||{},t.FastCall&&t.NoKwargs?this.tp$call=this.$fastCallNoKwargs:t.FastCall?this.tp$call=this.$meth:t.NoArgs?this.tp$call=this.$callNoArgs:t.OneArg?this.tp$call=this.$callOneArg:t.NamedArgs?this.tp$call=this.$callNamedArgs:void 0!==t.MinArgs?this.tp$call=this.$callMinArgs:(this.func_code=this.$meth,this.tp$call=this.$defaultCallMethod)},proto:{$fastCallNoKwargs(t,e){return Sk.abstr.checkNoKwargs(this.$name,e),this.$meth(t)},$callNoArgs(t,e){return Sk.abstr.checkNoArgs(this.$name,t,e),this.$meth()},$callOneArg(t,e){return Sk.abstr.checkOneArg(this.$name,t,e),this.$meth(t[0])},$callNamedArgs(t,e){return t=Sk.abstr.copyKeywordsToNamedArgs(this.$name,this.$flags.NamedArgs,t,e,this.$flags.Defaults),this.$meth(...t)},$callMinArgs(t,e){return Sk.abstr.checkNoKwargs(this.$name,e),Sk.abstr.checkArgsLen(this.$name,t,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth(...t)},$defaultCallMethod(t,e){return null!==this.$self?Sk.builtin.func.prototype.tp$call.call(this,[this.$self,...t],e):Sk.builtin.func.prototype.tp$call.call(this,t,e)},$memoiseFlags(){return Sk.builtin.func.prototype.$memoiseFlags.call(this)},$resolveArgs(){return Sk.builtin.func.prototype.$resolveArgs.call(this)}},flags:{sk$unacceptableBase:!0},slots:{tp$getattr:Sk.generic.getAttr,$r(){return null===this.$self?new Sk.builtin.str(""):new Sk.builtin.str("")},tp$call(t,e){return this.tp$call(t,e)},tp$richcompare(t,e){return("Eq"===e||"NotEq"===e)&&t instanceof Sk.builtin.sk_method?(t=this.$self===t.$self&&this.m$def.$meth===t.m$def.$meth,"Eq"===e?t:!t):Sk.builtin.NotImplemented.NotImplemented$}},getsets:{__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(t){this.$module=t=t||Sk.builtin.none.none$}},__doc__:{$get(){return this.$doc?new Sk.builtin.str(this.$doc):Sk.builtin.none.none$}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__text_signature__:{$get(){return new Sk.builtin.str(this.$textsig)}},__self__:{$get(){return this.$self||Sk.sysModules.mp$lookup(this.$module)||Sk.builtin.none.none$}}}})},function(t,e){Sk.builtin.none=Sk.abstr.buildNativeClass("NoneType",{constructor:function(){return Sk.builtin.none.none$},slots:{tp$new:(t,e)=>(Sk.abstr.checkNoArgs("NoneType",t,e),Sk.builtin.none.none$),$r:()=>new Sk.builtin.str("None"),tp$as_number:!0,nb$bool:()=>!1},proto:{valueOf:()=>null},flags:{sk$unacceptableBase:!0}}),Sk.builtin.none.none$=Object.create(Sk.builtin.none.prototype,{v:{value:null,enumerable:!0}}),Sk.builtin.NotImplemented=Sk.abstr.buildNativeClass("NotImplementedType",{constructor:function(){return Sk.builtin.NotImplemented.NotImplemented$},slots:{$r:()=>new Sk.builtin.str("NotImplemented"),tp$new:(t,e)=>(Sk.abstr.checkNoArgs("NotImplementedType",t,e),Sk.builtin.NotImplemented.NotImplemented$)},flags:{sk$unacceptableBase:!0}}),Sk.builtin.NotImplemented.NotImplemented$=Object.create(Sk.builtin.NotImplemented.prototype,{v:{value:null,enumerable:!0}}),t=Sk.abstr.buildNativeClass("ellipsis",{constructor:function(){return Sk.builtin.Ellipsis},slots:{tp$new:(t,e)=>(Sk.abstr.checkNoArgs("ellipsis",t,e),Sk.builtin.Ellipsis),$r:()=>new Sk.builtin.str("Ellipsis")},flags:{sk$unacceptableBase:!0}}),Sk.builtin.Ellipsis=Object.create(t.prototype,{v:{value:"..."}})},function(t,e){const n=/^(?:(.)?([<>=\^]))?([\+\-\s])?(#)?(0)?(\d+)?(,|_)?(?:\.(\d+))?([bcdeEfFgGnosxX%])?$/;Sk.formatting={};let i=function(t,e,n,i){if(Sk.asserts.assert("string"==typeof e),t[6]){var s=parseInt(t[6],10);i=t[2]||(t[5]?"=":i?">":"<");let r=s-(e.length+(n?n.length:0));if(0>=r)return n+e;switch(s=(t[1]||(t[5]?"0":" ")).repeat(r),i){case"=":if("s"===t[9])throw new Sk.builtin.ValueError("'=' alignment not allowed in string format specifier");return n+s+e;case">":return s+n+e;case"<":return n+e+s;case"^":return t=Math.floor(r/2),s.substring(0,t)+n+e+s.substring(t)}}return n+e},s=function(t,e){return e?"-":"+"===t[3]?"+":" "===t[3]?" ":""};const r=/\B(?=(\d{3})+(?!\d))/g,o=/\B(?=([A-Za-z0-9]{4})+(?![A-Za-z0-9]))/g;let a=function(t,e,n){if(Sk.asserts.assert(e instanceof Sk.builtin.int_||e instanceof Sk.builtin.lng),t[8])throw new Sk.builtin.ValueError("Precision not allowed in integer format");var a=e.str$(n,!1);e=e.nb$isnegative(),e=s(t,e),t[4]&&(16===n?e+="0x":8===n?e+="0o":2===n&&(e+="0b"));const l=t[9];if("X"===l&&(a=a.toUpperCase()),"n"===t[9])a=(+a).toLocaleString();else if(t[7]){a=a.split(".");const e=t[7];if(","===e&&10!==n)throw new Sk.builtin.ValueError(`Cannot specify ',' with '${l}'`);a[0]=a[0].replace(10===n?r:o,e),a=a.join(".")}return i(t,a,e,!0)};Sk.formatting.mkNumber__format__=t=>function(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(e));return new Sk.builtin.str(function(t,e,r){if(!e)return t.str$(10,!0);if(!(e=e.match(n)))throw new Sk.builtin.ValueError("Invalid format specifier");var o=e[9];if(o||(o=r?"g":"d"),-1==(r?"fFeEgG%":"bcdoxXnfFeEgG%").indexOf(o))throw new Sk.builtin.ValueError("Unknown format code '"+e[9]+"' for object of type '"+Sk.abstr.typeName(t)+"'");switch(o){case"d":case"n":return a(e,t,10);case"x":case"X":return a(e,t,16);case"o":return a(e,t,8);case"b":return a(e,t,2);case"c":if(e[3])throw new Sk.builtin.ValueError("Sign not allowed with integer format specifier 'c'");if(e[4])throw new Sk.builtin.ValueError("Alternate form not allowed with integer format specifier 'c'");if(e[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");if(e[8])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");return i(e,String.fromCodePoint(Sk.builtin.asnum$(t)),"",!0);case"f":case"F":case"e":case"E":case"g":case"G":{if(e[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed in float format specifier");if("string"==typeof(r=Sk.builtin.asnum$(t))&&(r=Number(r)),1/0===r)return i(e,"inf","",!0);if(-1/0===r)return i(e,"inf","-",!0);if(isNaN(r))return i(e,"nan","",!0);t=!1,0>r&&(r=-r,t=!0);var l=["toExponential","toFixed","toPrecision"]["efg".indexOf(o.toLowerCase())];let n=e[8]?parseInt(e[8],10):6;if(r=r[l](n),-1!=="EFG".indexOf(o)&&(r=r.toUpperCase()),"g"===o.toLowerCase()||!e[9]){if(l=r.match(/\.(\d*[1-9])?(0+)$/)){let[,t,e]=l;r=r.slice(0,t?-e.length:-(e.length+1))}-1!=r.indexOf(".")||e[9]||(r+=".0")}return"e"===o.toLowerCase()&&(r=r.replace(/^([-+]?[0-9]*\.?[0-9]+[eE][-+]?)([0-9])?$/,"$10$2")),e[7]&&((o=r.toString().split("."))[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r=o.join(".")),i(e,r,s(e,t),!0)}case"%":if(e[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with format specifier '%'");return"string"==typeof(t=Sk.builtin.asnum$(t))&&(t=Number(t)),1/0===t?i(e,"inf%","",!0):-1/0===t?i(e,"inf%","-",!0):isNaN(t)?i(e,"nan%","",!0):(o=!1,0>t&&(t=-t,o=!0),r=e[8]?parseInt(e[8],10):6,t=(100*t).toFixed(r)+"%",i(e,t,s(e,o),!0));default:throw new Sk.builtin.ValueError("Unknown format code '"+e[9]+"'")}}(this,e.$jsstr(),t))},Sk.formatting.format=function(t,e){e=e||[];const n={};for(let t=0;tn?1/0:n;null!=(o=s.exec(t))&&li)return new Sk.builtin.tuple([new Sk.builtin.str(""),new Sk.builtin.str(""),new Sk.builtin.str(n)])}else if(i=n.indexOf(e),0>i)return new Sk.builtin.tuple([new Sk.builtin.str(n),new Sk.builtin.str(""),new Sk.builtin.str("")]);return new Sk.builtin.tuple([new Sk.builtin.str(n.substring(0,i)),new Sk.builtin.str(e),new Sk.builtin.str(n.substring(i+e.length))])}}function o(t,e){return function(n,i){if(n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),void 0===i)i=" ";else{if(!(i instanceof Sk.builtin.str&&1===i.sq$length()))throw new Sk.builtin.TypeError("the fill character must be a str of length 1");i=i.v}var s=this.sq$length();return s>=n?new Sk.builtin.str(this.v):e?(s=n-s,n=Math.floor(s/2)+(s&n&1),i=i.repeat(n)+this.v+i.repeat(s-n),new Sk.builtin.str(i)):(i=i.repeat(n-s),new Sk.builtin.str(t?i+this.v:this.v+i))}}function a(t,e,n){if(({start:e,end:n}=Sk.builtin.slice.startEnd$wrt(t,e,n)),t.$hasAstralCodePoints()){const i=t.codepoints[e];e=void 0===i?e+t.v.length-t.codepoints.length:i,n=void 0===(n=t.codepoints[n])?t.v.length:n}return{start:e,end:n}}function l(t){return function(e,n,i){if(e=this.get$tgt(e),({start:n,end:i}=a(this,n,i)),i=n&&e<=i?e:-1,this.codepoints){i=this.sq$length(),n=-1;for(let t=0;ts)return Sk.builtin.bool.false$;if(i=this.v.slice(i,s),n instanceof Sk.builtin.tuple){for(let s=Sk.abstr.iter(n),r=s.tp$iternext();void 0!==r;r=s.tp$iternext()){if(!(r instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("tuple for "+t+" must only contain str, not "+Sk.abstr.typeName(r));if(e(i,r.v))return Sk.builtin.bool.true$}return Sk.builtin.bool.false$}return new Sk.builtin.bool(e(i,n.v))}}function c(t){return void 0===g[t]?t:t+"_$rw$"}var p=/^[0-9!#_]/,h=Object.create(null);Sk.builtin.str=Sk.abstr.buildNativeClass("str",{constructor:function(t){if(Sk.asserts.assert(this instanceof Sk.builtin.str,"bad call to str - use 'new'"),"string"!=typeof t)if(void 0===t)t="";else if(null===t)t="None";else{if(void 0!==t.tp$str)return t.tp$str();if("number"!=typeof t)throw new Sk.builtin.TypeError("could not convert object of type '"+Sk.abstr.typeName(t)+"' to str");t=Number.isFinite(t)?String(t):String(t).replace("Infinity","inf").replace("NaN","nan")}const e=h[t];if(void 0!==e)return e;h[t]=this,this.$mangled=c(t),this.$savedKeyHash=t.replace(p,"!$&"),this.v=t},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'.",tp$new(t,e){if(e=e||[],this!==Sk.builtin.str.prototype)return this.$subtype_new(t,e);if(1>=t.length&&!e.length)return new Sk.builtin.str(t[0]);if(Sk.__future__.python3){const[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("str",["object","encoding","errors"],t,e);if(void 0===n||void 0===i&&void 0===s)return new Sk.builtin.str(n);if(Sk.builtin.bytes.check$encodeArgs("str",i,s),!Sk.builtin.checkBytes(n))throw new Sk.builtin.TypeError("decoding to str: need a bytes-like object, "+Sk.abstr.typeName(n)+" found");return Sk.builtin.bytes.$decode.call(n,i,s)}throw new Sk.builtin.TypeError("str takes at most one argument ("+(t.length+e.length)+" given)")},$r(){let t="'";-1!==this.v.indexOf("'")&&-1===this.v.indexOf('"')&&(t='"');const e=this.v.length;let n=t;for(let r=0;rs||57344<=s)&&!Sk.__future__.python3?n+="\\u"+("000"+s.toString(16)).slice(-4):55296<=s&&!Sk.__future__.python3?(i=this.v.codePointAt(r),r++,s="0000000"+(i=i.toString(16)).toString(16),n=4i||127<=s&&!Sk.__future__.python3?(2>(i=i.charCodeAt(0).toString(16)).length&&(i="0"+i),n+="\\x"+i):n+=i}return new Sk.builtin.str(n+t)},tp$str(){return this.constructor===Sk.builtin.str?this:new Sk.builtin.str(this.v)},tp$iter(){return new m(this)},tp$richcompare(t,e){if(!(t instanceof Sk.builtin.str))return Sk.builtin.NotImplemented.NotImplemented$;switch(e){case"Lt":return this.vt.v;case"GtE":return this.v>=t.v}},mp$subscript(t){let e;if(Sk.misceval.isIndex(t)){if(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError),e=this.sq$length(),0>t&&(t+=e),0>t||t>=e)throw new Sk.builtin.IndexError("string index out of range");return this.codepoints?new Sk.builtin.str(this.v.substring(this.codepoints[t],this.codepoints[t+1])):new Sk.builtin.str(this.v.charAt(t))}if(t instanceof Sk.builtin.slice){let n="";return e=this.sq$length(),this.codepoints?t.sssiter$(e,(t=>{n+=this.v.substring(this.codepoints[t],this.codepoints[t+1])})):t.sssiter$(e,(t=>{n+=this.v.charAt(t)})),new Sk.builtin.str(n)}throw new Sk.builtin.TypeError("string indices must be integers, not "+Sk.abstr.typeName(t))},sq$length(){return this.$hasAstralCodePoints()?this.codepoints.length:this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("cannot concatenate 'str' and '"+Sk.abstr.typeName(t)+"' objects");return new Sk.builtin.str(this.v+t.v)},sq$repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");if((t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let e="";for(let n=0;n' requires string as left operand not "+Sk.abstr.typeName(t));return-1!==this.v.indexOf(t.v)},tp$as_number:!0,nb$remainder:function(t){const e=this.sk$builtinBase;t.constructor===Sk.builtin.tuple||t instanceof Sk.builtin.dict||t instanceof Sk.builtin.mappingproxy||(t=new Sk.builtin.tuple([t]));var n=0,i=this.$jsstr().replace(/%(\([a-zA-Z0-9]+\))?([#0 +\-]+)?(\*|[0-9]+)?(\.(\*|[0-9]+))?[hlL]?([diouxXeEfFgGcrsb%])/g,(function(i,s,r,o,a,l,u){var c,p,h,_,d;o=Sk.builtin.asnum$(o),a=Sk.builtin.asnum$(a),void 0!==s&&""!==s||"%"==u||(c=n++),""===a&&(a=void 0);var f=p=h=_=d=!1;if(r&&(-1!==r.indexOf("-")?_=!0:-1!==r.indexOf("0")&&(d=!0),-1!==r.indexOf("+")?p=!0:-1!==r.indexOf(" ")&&(h=!0),f=-1!==r.indexOf("#")),a&&(a=parseInt(a.substr(1),10)),r=function(t,e){var n;e=Sk.builtin.asnum$(e);var i=!1;if("number"==typeof t){0>t&&(t=-t,i=!0);var s=t.toString(e)}else t instanceof Sk.builtin.float_?(2<(s=t.str$(e,!1)).length&&".0"===s.substr(-2)&&(s=s.substr(0,s.length-2)),i=t.nb$isnegative()):(t instanceof Sk.builtin.int_||t instanceof Sk.builtin.lng)&&(s=t.str$(e,!1),i=t.nb$isnegative());if(Sk.asserts.assert(void 0!==s,"unhandled number format"),t=!1,a)for(n=s.length;ne){for(this.codepoints=[],t=0;te&&t++;return!0}}return this.codepoints=null,!1},sk$asarray(){const t=[];if(this.$hasAstralCodePoints()){var e=this.codepoints;for(let n=0;ni)return new Sk.builtin.str(this.v.replace(t,e));let s=0;return t=this.v.replace(t,(t=>s++e?0:2*(t.length/2-e);for(e=[],0>=n?n=0:e.push(new Sk.builtin.str(this.v.slice(0,t[n-1])));n{if(!(t instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("sequence item "+e.length+": expected str, "+Sk.abstr.typeName(t)+" found");e.push(t.v)})),(()=>new Sk.builtin.str(e.join(this.v))))},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Concatenate any number of strings.\n\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\n\nExample: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'"},capitalize:{$meth:function(){return new Sk.builtin.str(this.v.charAt(0).toUpperCase()+this.v.slice(1).toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a capitalized version of the string.\n\nMore specifically, make the first character have upper case and the rest lower\ncase."},title:{$meth:function(){const t=this.v.replace(/[a-z][a-z]*/gi,(t=>t[0].toUpperCase()+t.substr(1).toLowerCase()));return new Sk.builtin.str(t)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a version of the string where each word is titlecased.\n\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case."},center:{$meth:o(!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a centered string of length width.\n\nPadding is done using the specified fill character (default is a space)."},count:{$meth:function(t,e,n){return t=this.get$tgt(t),({start:e,end:n}=a(this,e,n)),n int\n\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation."},expandtabs:{$meth:function(t){if(!Sk.builtin.checkInt(t))throw new Sk.builtin.TypeError("an integer is required, got type"+Sk.abstr.typeName(t));t=Sk.builtin.asnum$(t);const e=Array(t+1).join(" "),n=this.v.replace(/([^\r\n\t]*)\t/g,((n,i)=>i+e.slice(i.length%t)));return new Sk.builtin.str(n)},$flags:{NamedArgs:["tabsize"],Defaults:[8]},$textsig:"($self, /, tabsize=8)",$doc:"Return a copy where all tab characters are expanded using spaces.\n\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(t,e,n){return new Sk.builtin.int_(this.find$left(t,e,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},partition:{$meth:r(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings."},index:{$meth:function(t,e,n){if(-1===(t=this.find$left(t,e,n)))throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found, \nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},ljust:{$meth:o(!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a left-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},lower:{$meth(){return new Sk.builtin.str(this.v.toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to lowercase."},lstrip:{$meth:s(/^\s+/g,(t=>"^["+t+"]+")),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rfind:{$meth(t,e,n){return new Sk.builtin.int_(this.find$right(t,e,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rfind(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(t,e,n){if(-1===(t=this.find$right(t,e,n)))throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},rjust:{$meth:o(!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a right-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},rstrip:{$meth:s(/\s+$/g,(t=>"["+t+"]+$")),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with trailing whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rpartition:{$meth:r(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string."},splitlines:{$meth:function(t){t=Sk.misceval.isTrue(t);const e=this.v,n=[],i=e.length;var s=0;for(let o=0;o"^["+t+"]+|["+t+"]+$")),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading and trailing whitespace remove.\n\nIf chars is given and not None, remove characters in chars instead."},swapcase:{$meth(){const t=this.v.replace(/[a-z]/gi,(t=>{const e=t.toLowerCase();return e===t?t.toUpperCase():e}));return new Sk.builtin.str(t)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Convert uppercase characters to lowercase and lowercase characters to uppercase."},upper:{$meth(){return new Sk.builtin.str(this.v.toUpperCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to uppercase."},startswith:{$meth:u("startswith",((t,e)=>0===t.indexOf(e))),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try."},endswith:{$meth:u("endswith",((t,e)=>-1!==t.indexOf(e,t.length-e.length))),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try."},isascii:{$meth(){return new Sk.builtin.bool(/^[\x00-\x7F]*$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if all characters in the string are ASCII, False otherwise.\n\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too."},islower:{$meth:function(){return new Sk.builtin.bool(this.v.length&&/[a-z]/.test(this.v)&&!/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a lowercase string, False otherwise.\n\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string."},isupper:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[a-z]/.test(this.v)&&/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an uppercase string, False otherwise.\n\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string."},istitle:{$meth:function(){const t=this.v;let e,n=!1,i=!1;for(let s=0;s str\n\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces ('{' and '}')."},__format__:{$meth:Sk.formatting.formatString,$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:"Return a formatted version of the string as described by format_spec."},__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.str(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null}}}),Sk.exportSymbol("Sk.builtin.str",Sk.builtin.str);var _=/^[A-Za-z0-9]+$/,d=/([.*+?=|\\\/()\[\]\{\}^$])/g,f=/^[\s\xa0]+/;Sk.builtin.str.$py2decode=new Sk.builtin.method_descriptor(Sk.builtin.str,{$name:"decode",$meth(t,e){const n=new Sk.builtin.bytes(this.v);return Sk.builtin.bytes.$decode.call(n,t,e)},$flags:{NamedArgs:["encoding","errors"]}});var m=Sk.abstr.buildIteratorClass("str_iterator",{constructor:function(t){this.$index=0,t.$hasAstralCodePoints()?(this.$seq=t.codepoints,this.tp$iternext=()=>{const e=this.$seq[this.$index];if(void 0!==e)return new Sk.builtin.str(t.v.substring(e,this.$seq[++this.$index]))}):(this.$seq=t.v,this.tp$iternext=()=>{const t=this.$seq[this.$index++];if(void 0!==t)return new Sk.builtin.str(t)})},iternext(){return this.tp$iternext()},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),g={abstract:!0,as:!0,boolean:!0,break:!0,byte:!0,case:!0,catch:!0,char:!0,class:!0,continue:!0,const:!0,debugger:!0,default:!0,delete:!0,do:!0,double:!0,else:!0,enum:!0,export:!0,extends:!0,false:!0,final:!0,finally:!0,float:!0,for:!0,function:!0,goto:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,int:!0,interface:!0,is:!0,long:!0,namespace:!0,native:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,short:!0,static:!0,super:!0,switch:!0,synchronized:!0,this:!0,throw:!0,throws:!0,transient:!0,true:!0,try:!0,typeof:!0,use:!0,var:!0,void:!0,volatile:!0,while:!0,with:!0,constructor:!0,__defineGetter__:!0,__defineSetter__:!0,apply:!0,arguments:!0,call:!0,caller:!0,eval:!0,hasOwnProperty:!0,isPrototypeOf:!0,__lookupGetter__:!0,__lookupSetter__:!0,__noSuchMethod__:!0,propertyIsEnumerable:!0,prototype:!0,toSource:!0,toLocaleString:!0,toString:!0,unwatch:!0,valueOf:!0,watch:!0,length:!0,name:!0};Sk.builtin.str.reservedWords_=g,Sk.builtin.str.$fixReserved=c},function(t,e){Sk.builtin.func=Sk.abstr.buildNativeClass("function",{constructor:function(t,e,n,i){if(Sk.asserts.assert(this instanceof Sk.builtin.func,"builtin func should be called as a class with `new`"),this.func_code=t,this.func_globals=e||null,this.$name=t.co_name&&t.co_name.v||t.name||"",this.$d=Sk.builtin.dict?new Sk.builtin.dict:void 0,this.$doc=t.co_docstring||Sk.builtin.none.none$,this.$module=Sk.globals&&Sk.globals.__name__||Sk.builtin.none.none$,this.$qualname=t.co_qualname&&t.co_qualname.v||this.$name,void 0!==i)for(let t in i)n[t]=i[t];this.func_closure=n,this.func_annotations=null,this.$memoiseFlags(),this.memoised=t.co_fastcall||null,this.tp$call=t.co_fastcall?t.bind(this):Sk.builtin.func.prototype.tp$call.bind(this)},slots:{tp$getattr:Sk.generic.getAttr,tp$descr_get(t,e){return null===t?this:new Sk.builtin.method(this,t)},$r(){return new Sk.builtin.str("")},tp$call(t,e){if(this.memoised||(this.$memoiseFlags(),this.memoised=!0),void 0===this.co_argcount&&void 0===this.co_varnames&&!this.co_kwargs&&!this.func_closure){if(e&&0!==e.length)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");return this.func_code.apply(this.func_globals,t)}return t=this.$resolveArgs(t,e),this.func_closure&&t.push(this.func_closure),this.func_code.apply(this.func_globals,t)}},getsets:{__name__:{$get(){return new Sk.builtin.str(this.$name)},$set(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__name__ must be set to a string object");this.$name=t.$jsstr()}},__qualname__:{$get(){return new Sk.builtin.str(this.$qualname)},$set(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__qualname__ must be set to a string object");this.$qualname=t.$jsstr()}},__dict__:Sk.generic.getSetDict,__annotations__:{$get(){return null===this.func_annotations?this.func_annotations=new Sk.builtin.dict([]):Array.isArray(this.func_annotations)&&(this.func_annotations=Sk.abstr.keywordArrayToPyDict(this.func_annotations)),this.func_annotations},$set(t){if(void 0===t||Sk.builtin.checkNone(t))this.func_annotations=new Sk.builtin.dict([]);else{if(!(t instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("__annotations__ must be set to a dict object");this.func_annotations=t}}},__defaults__:{$get(){return null==this.$defaults?Sk.builtin.none.none$:new Sk.builtin.tuple(this.$defaults)},$set(t){if(void 0===t||Sk.builtin.checkNone(t))this.$defaults=null;else{if(!(t instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("__defaults__ must be set to a tuple object");this.$defaults=t.valueOf()}}},__doc__:{$get(){return this.$doc},$set(t){this.$doc=t||Sk.builtin.none.none$}},__module__:{$get(){return this.$module},$set(t){this.$module=t||Sk.builtin.none.none$}}},proto:{$memoiseFlags(){this.co_varnames=this.func_code.co_varnames,this.co_argcount=this.func_code.co_argcount,void 0===this.co_argcount&&this.co_varnames&&(this.co_argcount=this.co_varnames.length),this.co_kwonlyargcount=this.func_code.co_kwonlyargcount||0,this.co_varargs=this.func_code.co_varargs,this.co_kwargs=this.func_code.co_kwargs,this.$defaults=this.func_code.$defaults,this.$kwdefs=this.func_code.$kwdefs||[]},$resolveArgs:function(t,e){var n=this.co_argcount;void 0===n&&(n=this.co_varnames?this.co_varnames.length:t.length);var i=this.co_varnames||[],s=this.co_kwonlyargcount||0;let r,o=n+s;if(!(0!==s||this.co_kwargs||e&&0!==e.length||this.co_varargs)){if(t.length==n)return t;if(0===t.length&&this.$defaults&&this.$defaults.length===n){for(i=0;i!=this.$defaults.length;i++)t[i]=this.$defaults[i];return t}}this.co_kwargs&&(r=[]);var a=t.length;let l=t.length<=n?t:t.slice(0,n);if(this.co_varargs)t=t.length>l.length?t.slice(l.length):[],l[o]=new Sk.builtin.tuple(t);else if(a>n)throw new Sk.builtin.TypeError(`${this.$name}"() takes ${n} positional ${1==n?"argument":"arguments"} but ${a} ${1==a?"was":"were"} given`);if(e){if(this.func_code.no_kw)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");for(t=0;t"'"+t+"'")).join(", ")));for(;tt.indexOf(".")&&0>t.indexOf("e")&&0>t.indexOf("E"))return t;var e=0;if(0<=t.indexOf("e")){var n=t.substr(0,t.indexOf("e"));e=t.substr(t.indexOf("e")+1)}else 0<=t.indexOf("E")?(n=t.substr(0,t.indexOf("e")),e=t.substr(t.indexOf("E")+1)):n=t;if(e=parseInt(e,10),0>(t=n.indexOf("."))){if(0<=e){for(;0-e?n.substr(0,n.length+e):0}for(n=0===t?n.substr(1):tn.length;)n+="0";return 0>=t?0:n.substr(0,t)},Sk.exportSymbol("Sk.builtin.asnum$nofloat",Sk.builtin.asnum$nofloat),Sk.builtin.round=function(t,e){if(void 0===t)throw new Sk.builtin.TypeError("a float is required");if(!Sk.__future__.dunder_round){if(!Sk.builtin.checkNumber(t))throw new Sk.builtin.TypeError("a float is required");if(t.round$)return t.round$(e);throw new Sk.builtin.AttributeError(Sk.abstr.typeName(t)+" instance has no attribute '__float__'")}if(void 0!==e&&!Sk.builtin.checkNone(e)&&!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object cannot be interpreted as an index");if(void 0!==(t=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$round)))return void 0!==e?Sk.misceval.callsimArray(t,[e]):Sk.misceval.callsimArray(t,[]);throw new Sk.builtin.TypeError("a float is required")},Sk.builtin.len=function(t){if(!t.sq$length)throw new Sk.builtin.TypeError("object of type '"+Sk.abstr.typeName(t)+"' has no len()");return t=t.sq$length(!0),Sk.misceval.chain(t,(t=>new Sk.builtin.int_(t)))},Sk.builtin.min=function(t,e){let n;const i=t.length;if(!i)throw new Sk.builtin.TypeError("min expected 1 argument, got 0");const[s,r]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],e,[null,Sk.builtin.none.none$]);if(1{if(o=t,void 0!==o)return Sk.builtin.checkNone(r)?Sk.misceval.iterFor(n,(t=>{Sk.misceval.richCompareBool(t,o,"Lt")&&(o=t)})):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[o]),(t=>Sk.misceval.iterFor(n,(e=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[e]),(n=>{Sk.misceval.richCompareBool(n,t,"Lt")&&(o=e,t=n)}))))))}),(()=>{if(void 0===o){if(null===s)throw new Sk.builtin.ValueError("min() arg is an empty sequence");o=s}return o}))},Sk.builtin.max=function(t,e){let n;const i=t.length;if(!i)throw new Sk.builtin.TypeError("max expected 1 argument, got 0");const[s,r]=Sk.abstr.copyKeywordsToNamedArgs("max",["default","key"],[],e,[null,Sk.builtin.none.none$]);if(1{if(o=t,void 0!==o)return Sk.builtin.checkNone(r)?Sk.misceval.iterFor(n,(t=>{Sk.misceval.richCompareBool(t,o,"Gt")&&(o=t)})):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[o]),(t=>Sk.misceval.iterFor(n,(e=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[e]),(n=>{Sk.misceval.richCompareBool(n,t,"Gt")&&(o=e,t=n)}))))))}),(()=>{if(void 0===o){if(null===s)throw new Sk.builtin.ValueError("max() arg is an empty sequence");o=s}return o}))},Sk.builtin.min.co_fastcall=Sk.builtin.max.co_fastcall=1,Sk.builtin.any=function(t){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){if(Sk.misceval.isTrue(t))return new Sk.misceval.Break(Sk.builtin.bool.true$)})),(t=>t||Sk.builtin.bool.false$))},Sk.builtin.all=function(t){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){if(!Sk.misceval.isTrue(t))return new Sk.misceval.Break(Sk.builtin.bool.false$)})),(t=>t||Sk.builtin.bool.true$))},Sk.builtin.sum=function(t,e){const n=Sk.abstr.iter(t);if(void 0===e)var i=new Sk.builtin.int_(0);else{if(Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("sum() can't sum strings [use ''.join(seq) instead]");i=e}return t=void 0===e||e.constructor===Sk.builtin.int_?Sk.misceval.iterFor(n,(t=>{if(t.constructor!==Sk.builtin.int_)return t.constructor===Sk.builtin.float_?(i=i.nb$float().nb$add(t),new Sk.misceval.Break("float")):(i=Sk.abstr.numberBinOp(i,t,"Add"),new Sk.misceval.Break("slow"));i=i.nb$add(t)})):e.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(t,(t=>"float"===t?Sk.misceval.iterFor(n,(t=>{if(t.constructor!==Sk.builtin.float_&&t.constructor!==Sk.builtin.int_)return i=Sk.abstr.numberBinOp(i,t,"Add"),new Sk.misceval.Break("slow");i=i.nb$add(t)})):t),(t=>{if("slow"===t)return Sk.misceval.iterFor(n,(t=>{i=Sk.abstr.numberBinOp(i,t,"Add")}))}),(()=>i))},Sk.builtin.zip=function(){var t,e;if(0===arguments.length)return new Sk.builtin.list([]);var n=[];for(e=0;et||1114112<=t)throw new Sk.builtin.ValueError("chr() arg not in range(0x110000)")}else if(0>t||256<=t)throw new Sk.builtin.ValueError("chr() arg not in range(256)");return new Sk.builtin.str(String.fromCodePoint(t))},Sk.builtin.unichr=function(t){if(Sk.builtin.pyCheckArgsLen("unichr",arguments.length,1,1),!Sk.builtin.checkInt(t))throw new Sk.builtin.TypeError("an integer is required");t=Sk.builtin.asnum$(t);try{return new Sk.builtin.str(String.fromCodePoint(t))}catch(t){if(t instanceof RangeError)throw new Sk.builtin.ValueError(t.message);throw t}},Sk.builtin.int2str_=function(t,e,n){let i=Sk.misceval.asIndexOrThrow(t),s=i.toString(e);return s=0>i?"-"+n+s.slice(1):n+s,2!==e&&!Sk.__future__.python3&&(t instanceof Sk.builtin.lng||JSBI.__isBigInt(i))&&(s+="L"),new Sk.builtin.str(s)},Sk.builtin.hex=function(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("hex() argument can't be converted to hex");return Sk.builtin.int2str_(t,16,"0x")},Sk.builtin.oct=function(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("oct() argument can't be converted to hex");return Sk.__future__.octal_number_literal?Sk.builtin.int2str_(t,8,"0o"):Sk.builtin.int2str_(t,8,"0")},Sk.builtin.bin=function(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object can't be interpreted as an index");return Sk.builtin.int2str_(t,2,"0b")},Sk.builtin.dir=function(t){if(void 0!==t)return t=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$dir),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[]),(t=>Sk.builtin.sorted(t)));throw new Sk.builtin.NotImplementedError("skulpt does not yet support dir with no args")},Sk.builtin.repr=function(t){return t.$r()},Sk.builtin.ascii=function(t){return Sk.misceval.chain(t.$r(),(t=>{let e,n;for(n=0;n=s?(2>(i=s.toString(16)).length&&(i="0"+i),e+="\\x"+i):127s||57344<=s?e+="\\u"+("000"+s.toString(16)).slice(-4):55296<=s?(i=t.v.codePointAt(n),n++,s="0000000"+(i=i.toString(16)).toString(16),e=4t.tp$getattr(e,!0)),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t}));return Sk.misceval.chain(i,(i=>{if(void 0===i){if(void 0!==n)return n;throw new Sk.builtin.AttributeError(t.sk$attrError()+" has no attribute "+Sk.misceval.objectRepr(e))}return i}))},Sk.builtin.setattr=function(t,e,n){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("attribute name must be string");return Sk.misceval.chain(t.tp$setattr(e,n,!0),(()=>Sk.builtin.none.none$))},Sk.builtin.raw_input=function(t){var e=t||"";return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(function(t){return Sk.inputfunTakesPrompt?Sk.builtin.file.$readline(t.$d.stdin,null,e):Sk.misceval.chain(void 0,(function(){return Sk.misceval.callsimOrSuspendArray(t.$d.stdout.write,[t.$d.stdout,new Sk.builtin.str(e)])}),(function(){return Sk.misceval.callsimOrSuspendArray(t.$d.stdin.readline,[t.$d.stdin])}))}))},Sk.builtin.input=Sk.builtin.raw_input,Sk.builtin.jseval=function(t){return t=Sk.global.eval(Sk.ffi.remapToJs(t)),Sk.ffi.remapToPy(t)},Sk.builtin.jsmillis=function(){return console.warn("jsmillis is deprecated"),(new Date).valueOf()};const n=Sk.abstr.buildNativeClass("code",{constructor:function(t,e){this.compiled=e,this.code=e.code,this.filename=t},slots:{tp$new(t,e){throw new Sk.builtin.NotImplementedError("cannot construct a code object in skulpt")},$r(){return new Sk.builtin.str(", file "+this.filename+">")}}});Sk.builtin.compile=function(t,e,i,s,r,o){return Sk.builtin.pyCheckType("source","str",Sk.builtin.checkString(t)),Sk.builtin.pyCheckType("filename","str",Sk.builtin.checkString(e)),Sk.builtin.pyCheckType("mode","str",Sk.builtin.checkString(i)),t=t.$jsstr(),e=e.$jsstr(),i=i.$jsstr(),Sk.misceval.chain(Sk.compile(t,e,i,!0),(t=>new n(e,t)))},Sk.builtin.exec=function(t,e,i){let s=e&&e.__file__;if(s=void 0!==s&&Sk.builtin.checkString(s)?s.toString():"",Sk.builtin.checkString(t))t=Sk.compile(t.$jsstr(),s,"exec",!0);else if("string"==typeof t)t=Sk.compile(t,s,"exec",!0);else if(!(t instanceof n))throw new Sk.builtin.TypeError("exec() arg 1 must be a string, bytes or code object");Sk.asserts.assert(void 0===e||e.constructor===Object,"internal calls to exec should be called with a javascript object for globals"),Sk.asserts.assert(void 0===i||i.constructor===Object,"internal calls to exec should be called with a javascript object for locals");const r=Sk.globals;return e=e||r,Sk.misceval.chain(t,(t=>Sk.global.eval(t.code)(e,i)),(t=>(Sk.globals=r,t)))},Sk.builtin.eval=function(t,e,i){if(Sk.builtin.checkString(t))t=t.$jsstr();else if(Sk.builtin.checkBytes(t))throw new Sk.builtin.NotImplementedError("bytes for eval is not yet implemented in skulpt");if("string"==typeof t){t=t.trim();var s=Sk.parse("?",t);if(1<(s=Sk.astFromParse(s.cst,"?",s.flags)).body.length||!(s.body[0]instanceof Sk.astnodes.Expr))throw new Sk.builtin.SyntaxError("invalid syntax");t="__final_res__ = "+t}else if(!(t instanceof n))throw new Sk.builtin.TypeError("eval() arg 1 must be a string, bytes or code object");return Sk.misceval.chain(Sk.builtin.exec(t,e,i),(t=>{const e=t.__final_res__||Sk.builtin.none.none$;return delete t.__final_res__,e}))},Sk.builtin.map=function(t,e){var n,i,s=[];if(Sk.builtin.pyCheckArgsLen("map",arguments.length,2),2((t=new Sk.builtin.list(t)).list$sort(e,n,i),t)))},Sk.builtin.filter=function(t,e){var n;if(Sk.builtin.pyCheckArgsLen("filter",arguments.length,2,2),!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not iterable");var i=function(){return[]},s=function(t,e){return t.push(e),t},r=function(t){return new Sk.builtin.list(t)};e.ob$type===Sk.builtin.str?(i=function(){return new Sk.builtin.str("")},s=function(t,e){return t.sq$concat(e)},r=function(t){return t}):e.ob$type===Sk.builtin.tuple&&(r=function(t){return new Sk.builtin.tuple(t)});var o=i(),a=Sk.abstr.iter(e);for(n=a.tp$iternext();void 0!==n;n=a.tp$iternext())i=t===Sk.builtin.none.none$?new Sk.builtin.bool(n):Sk.misceval.callsimArray(t,[n]),Sk.misceval.isTrue(i)&&(o=s(o,n));return r(o)},Sk.builtin.hasattr=function(t,e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("hasattr(): attribute name must be string");const n=Sk.misceval.tryCatch((()=>t.tp$getattr(e,!0)),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t}));return Sk.misceval.chain(n,(t=>void 0===t?Sk.builtin.bool.false$:Sk.builtin.bool.true$))},Sk.builtin.pow=function(t,e,n){if(void 0===n||Sk.builtin.checkNone(n))return Sk.abstr.numberBinOp(t,e,"Pow");if(!(Sk.builtin.checkInt(t)&&Sk.builtin.checkInt(e)&&Sk.builtin.checkInt(n))){if(Sk.builtin.checkFloat(t)||Sk.builtin.checkComplex(t))return t.nb$power(e,n);throw new Sk.builtin.TypeError("unsupported operand type(s) for ** or pow(): '"+Sk.abstr.typeName(t)+"', '"+Sk.abstr.typeName(e)+"', '"+Sk.abstr.typeName(n)+"'")}return t.nb$power(e,n)},Sk.builtin.quit=function(t){throw t=new Sk.builtin.str(t).v,new Sk.builtin.SystemExit(t)},Sk.builtin.issubclass=function(t,e){if(!Sk.builtin.checkClass(t))throw new Sk.builtin.TypeError("issubclass() arg 1 must be a class");var n=Sk.builtin.checkClass(e);if(!(n||e instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("issubclass() arg 2 must be a class or tuple of classes");if(n)return t.$isSubType(e)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(n=0;n{if(void 0===n){if(e)return e;if(void 0!==(n=t.gi$ret)&&n!==Sk.builtin.none.none$)throw new Sk.builtin.StopIteration(n);throw new Sk.builtin.StopIteration}return n}))},Sk.builtin.reload=function(){throw new Sk.builtin.NotImplementedError("reload is not yet implemented")},Sk.builtin.vars=function(){throw new Sk.builtin.NotImplementedError("vars is not yet implemented")},Sk.builtin.apply_=function(){throw new Sk.builtin.NotImplementedError("apply is not yet implemented")},Sk.builtin.buffer=function(){throw new Sk.builtin.NotImplementedError("buffer is not yet implemented")},Sk.builtin.coerce=function(){throw new Sk.builtin.NotImplementedError("coerce is not yet implemented")},Sk.builtin.intern=function(){throw new Sk.builtin.NotImplementedError("intern is not yet implemented")}},function(t,e){function n(t,e){return e=new this.constructor,this.ht$type&&a.call(e),e.args=new Sk.builtin.tuple(t.slice(0)),e}function i(t,e){Sk.abstr.checkNoKwargs(Sk.abstr.typeName(this),e),this.args=new Sk.builtin.tuple(t.slice(0))}function s(){return 1>=this.args.v.length?new Sk.builtin.str(this.args.v[0]):this.args.$r()}function r(t,e,n,s,r,o){r||(r=[]);const a=s?{}:{sk$solidBase:!1};return n={tp$init:s||i,tp$doc:n},o&&(n.tp$str=o),Sk.abstr.buildNativeClass(e,{base:t,constructor:function(...e){t.apply(this,e),r.forEach(((t,n)=>{this["$"+t]=Sk.ffi.remapToPy(e[n])}))},slots:n,getsets:Object.fromEntries(r.map((t=>[t,{$get(){return this["$"+t]||Sk.builtin.none.none$},$set(e){this["$"+t]=e||Sk.builtin.none.none$}}]))),flags:a})}function o(t,e,s){const r=t.prototype.tp$init;return s={tp$doc:s,tp$init:r},r===i&&(s.tp$new=n),Sk.abstr.buildNativeClass(e,{base:t,constructor:function(...e){t.apply(this,e)},slots:s,flags:{sk$solidBase:!1}})}const a=Sk.abstr.buildNativeClass("BaseException",{constructor:function t(e,...n){Sk.asserts.assert(this instanceof t,"bad call to exception constructor, use 'new'"),"string"==typeof e&&(e=new Sk.builtin.str(e)),this.args=new Sk.builtin.tuple(e?[e]:[]),this.traceback=2<=n.length?[{filename:n[0]||"",lineno:n[1]}]:[],this.context=this.cause=null,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"Common base class for all exceptions",tp$new:n,tp$init:i,$r(){let t=this.tp$name;return t+="("+this.args.v.map((t=>Sk.misceval.objectRepr(t))).join(", ")+")",new Sk.builtin.str(t)},tp$str:s},getsets:{args:{$get(){return this.args},$set(t){if(void 0===t)throw new Sk.builtin.TypeError("args may not be deleted");this.args=new Sk.builtin.tuple(t)}},__cause__:{$get(){return this.$cause||Sk.builtin.none.none$},$set(t){if(!(Sk.builtin.checkNone(t)||t instanceof Sk.builtin.BaseException))throw new B("exception cause must be None or derive from BaseException");this.$cause=t}},__dict__:Sk.generic.getSetDict},proto:{toString(){let t=this.tp$name;return t+=": "+this.tp$str().v,0!==this.traceback.length?t+" on line "+this.traceback[0].lineno:t+" at "}}});t=o(a,"SystemExit","Request to exit from the interpreter."),e=o(a,"KeyboardInterrupt","Program interrupted by user.");const l=o(a,"GeneratorExit","Request that a generator exit."),u=o(a,"Exception","Common base class for all non-exit exceptions."),c=r(u,"StopIteration","Signal the end from iterator.__next__().",(function(t,e){i.call(this,t,e),this.$value=t[0]||Sk.builtin.none.none$}),["value"]),p=o(u,"StopAsyncIteration","Signal the end from iterator.__anext__()."),h=o(u,"ArithmeticError","Base class for arithmetic errors."),_=o(h,"FloatingPointError","Floating point operation failed."),d=o(h,"OverflowError","Result too large to be represented."),f=o(h,"ZeroDivisionError","Second argument to a division or modulo operation was zero."),m=o(u,"AssertionError","Assertion failed."),g=o(u,"AttributeError","Attribute not found."),b=o(u,"BufferError","Buffer error."),S=o(u,"EOFError","Read beyond end of file."),k=r(u,"ImportError","Import can't find module, or can't find name in module.",(function(t,e){i.call(this,t);const[n,s]=Sk.abstr.copyKeywordsToNamedArgs("ImportError",["name","path"],[],e);this.$name=n,this.$path=s,1===t.length&&(this.$msg=t[0])}),["msg","name","path"],(function(){return Sk.builtin.checkString(this.$msg)?this.$msg:s.call(this)})),y=o(k,"ModuleNotFoundError","Module not found."),T=o(u,"LookupError","Base class for lookup errors."),v=o(T,"IndexError","Sequence index out of range."),$=r(T,"KeyError","Mapping key not found.",null,null,(function(){return 1===this.args.v.length?this.args.v[0].$r():s.call(this)})),w=o(u,"MemoryError","Out of memory."),E=o(u,"NameError","Name not found globally."),I=o(E,"UnboundLocalError","Local name referenced but not bound to a value."),A=r(u,"OSError","Base class for I/O related errors.",(function(t,e){i.call(this,t,e)})),O=o(A,"FileNotFoundError","File not found."),M=o(A,"TimeoutError","Timeout expired."),C=o(u,"ReferenceError","Weak ref proxy used after referent went away."),R=o(u,"RuntimeError","Unspecified run-time error."),x=o(R,"NotImplementedError","Method or function hasn't been implemented yet."),N=o(R,"RecursionError","Recursion limit exceeded."),L=r(u,"SyntaxError","Invalid syntax.",(function(t,e){i.call(this,t,e),1<=t.length&&(this.$msg=t[0]),2===t.length&&(t=new Sk.builtin.tuple(t[1]).v,this.$filename=t[0],this.$lineno=t[1],this.$offset=t[2],this.$text=t[3])}),["msg","filename","lineno","offset","text"],(function(){return s.call(this)})),D=o(L,"IndentationError","Improper indentation."),F=o(D,"TabError","Improper mixture of spaces and tabs."),P=o(u,"SystemError","Internal error in the Skulpt interpreter."),B=o(u,"TypeError","Inappropriate argument type."),V=o(u,"ValueError","Inappropriate argument value (of correct type)."),U=o(V,"UnicodeError","Unicode related error."),Y=o(U,"UnicodeDecodeError","Unicode decoding error."),j=o(U,"UnicodeEncodeError","Unicode encoding error.");Object.assign(Sk.builtin,{BaseException:a,SystemExit:t,KeyboardInterrupt:e,GeneratorExit:l,Exception:u,StopIteration:c,StopAsyncIteration:p,ArithmeticError:h,FloatingPointError:_,OverflowError:d,ZeroDivisionError:f,AssertionError:m,AttributeError:g,BufferError:b,EOFError:S,ImportError:k,ModuleNotFoundError:y,LookupError:T,IndexError:v,KeyError:$,MemoryError:w,NameError:E,UnboundLocalError:I,OSError:A,IOError:A,FileNotFoundError:O,TimeoutError:M,ReferenceError:C,RuntimeError:R,NotImplementedError:x,RecursionError:N,SyntaxError:L,IndentationError:D,TabError:F,SystemError:P,TypeError:B,ValueError:V,UnicodeError:U,UnicodeDecodeError:Y,UnicodeEncodeError:j}),Sk.builtin.SuspensionError=o(u,"SuspensionError","Unsupported Suspension in code."),Sk.builtin.ExternalError=Sk.abstr.buildNativeClass("ExternalError",{constructor:function(...t){if(this.nativeError=t[0],!Sk.builtin.checkString(this.nativeError)&&(t[0]=this.nativeError.toString(),t[0].startsWith("RangeError: Maximum call")))return t[0]="Maximum call stack size exceeded",new N(...t);u.apply(this,t)},base:u}),Sk.builtin.getExcInfo=function(t){return new Sk.builtin.tuple([t.ob$type||Sk.builtin.none.none$,t,Sk.builtin.none.none$])}},function(t,e){Sk.builtin.method=Sk.abstr.buildNativeClass("method",{constructor:function(t,e){Sk.asserts.assert(this instanceof Sk.builtin.method,"bad call to method constructor, use 'new'"),this.im_func=t,this.im_self=e,this.im_call=t.tp$call},slots:{$r(){let t=this.im_func.tp$getattr(Sk.builtin.str.$qualname)||this.im_func.tp$getattr(Sk.builtin.str.$name);return t=t&&t.v||"?",new Sk.builtin.str("")},tp$hash(){return Sk.abstr.objectHash(this.im_self)+Sk.abstr.objectHash(this.im_func)},tp$call(t,e){var n=this.im_call;if(void 0===n)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this.im_func)+"' object is not callable");return t=[this.im_self,...t],n.call(this.im_func,t,e)},tp$new(t,e){if(Sk.abstr.checkNoKwargs("method",e),Sk.abstr.checkArgsLen("method",t,2,2),e=t[0],t=t[1],!Sk.builtin.checkCallable(e))throw new Sk.builtin.TypeError("first argument must be callable");if(Sk.builtin.checkNone(t))throw new Sk.builtin.TypeError("self must not be None");return new Sk.builtin.method(e,t)},tp$richcompare(t,e){if("Eq"!=e&&"NotEq"!=e||!(t instanceof Sk.builtin.method))return Sk.builtin.NotImplemented.NotImplemented$;let n;try{n=Sk.misceval.richCompareBool(this.im_self,t.im_self,"Eq",!1)&&this.im_func==t.im_func}catch(t){n=!1}return"Eq"==e?n:!n},tp$descr_get(t,e){return this},tp$getattr(t,e){const n=Sk.abstr.lookupSpecial(this,t);return void 0!==n?n:this.im_func.tp$getattr(t,e)}},getsets:{__func__:{$get(){return this.im_func}},__self__:{$get(){return this.im_self}},__doc__:{$get(){return this.im_func.tp$getattr(Sk.builtin.str.$doc)}}},flags:{sk$unacceptableBase:!0}})},function(t,e){function n(t){if(null!=t){if(!0===t.sk$int)return t.v;if(void 0!==t.nb$index)return t.nb$index();if("number"==typeof t&&Number.isInteger(t))return t}}function i(t,e){const i=n(t);if(void 0!==i)return i;throw e=(e||"'{tp$name}' object cannot be interpreted as an integer").replace("{tp$name}",Sk.abstr.typeName(t)),new Sk.builtin.TypeError(e)}Sk.misceval={},Sk.misceval.Suspension=function(t,e,n){this.$isSuspension=!0,void 0!==t&&void 0!==e&&(this.resume=function(){return t(e.resume())}),this.child=e,this.optional=void 0!==e&&e.optional,this.data=void 0===n&&void 0!==e?e.data:n},Sk.exportSymbol("Sk.misceval.Suspension",Sk.misceval.Suspension),Sk.misceval.retryOptionalSuspensionOrThrow=function(t,e){for(;t instanceof Sk.misceval.Suspension;){if(!t.optional){e=new Sk.builtin.SuspensionError(e||"Cannot call a function that blocks or suspends here");const n=[];for(;null!=t;)t.$lineno&&n.push({filename:t.$filename,lineno:t.$lineno,colno:t.$colno}),t=t.child;throw n.reverse(),e.traceback.push(...n),e}t=t.resume()}return t},Sk.exportSymbol("Sk.misceval.retryOptionalSuspensionOrThrow",Sk.misceval.retryOptionalSuspensionOrThrow),Sk.misceval.isIndex=function(t){return null!=t&&(void 0!==t.nb$index||"number"==typeof t&&Number.isInteger(t))},Sk.exportSymbol("Sk.misceval.isIndex",Sk.misceval.isIndex),Sk.misceval.asIndex=n,Sk.misceval.asIndexSized=function(t,e,n){if("number"==typeof(n=i(t,n)))return n;if(null==e)return JSBI.lessThan(n,JSBI.__ZERO)?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;throw new e("cannot fit '"+Sk.abstr.typeName(t)+"' into an index-sized integer")},Sk.misceval.asIndexOrThrow=i,Sk.misceval.applySlice=function(t,e,n,i){return Sk.abstr.objectGetItem(t,new Sk.builtin.slice(e,n,null),i)},Sk.exportSymbol("Sk.misceval.applySlice",Sk.misceval.applySlice),Sk.misceval.assignSlice=function(t,e,n,i,s){return e=new Sk.builtin.slice(e,n),null===i?Sk.abstr.objectDelItem(t,e):Sk.abstr.objectSetItem(t,e,i,s)},Sk.exportSymbol("Sk.misceval.assignSlice",Sk.misceval.assignSlice),Sk.misceval.arrayFromArguments=function(t){var e;if(1!=t.length)return t;var n=t[0];if(n instanceof Sk.builtin.set?n=n.tp$iter().$obj:n instanceof Sk.builtin.dict&&(n=Sk.builtin.dict.prototype.keys.func_code(n)),n instanceof Sk.builtin.list||n instanceof Sk.builtin.tuple)return n.v;if(Sk.builtin.checkIterable(n)){for(t=[],e=(n=Sk.abstr.iter(n)).tp$iternext();void 0!==e;e=n.tp$iternext())t.push(e);return t}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(n)+"' object is not iterable")},Sk.exportSymbol("Sk.misceval.arrayFromArguments",Sk.misceval.arrayFromArguments),Sk.misceval.iterator=Sk.abstr.buildIteratorClass("iterator",{constructor:function(t,e){this.tp$iternext=e?t:function(e){let n=t();return e||void 0===n||!n.$isSuspension?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)}},iternext:function(t){return this.tp$iternext(t)},flags:{sk$unacceptableBase:!0}}),Sk.misceval.swappedOp_={Eq:"Eq",NotEq:"NotEq",Lt:"Gt",LtE:"GtE",Gt:"Lt",GtE:"LtE"},Sk.misceval.opSymbols={Eq:"==",NotEq:"!=",Lt:"<",LtE:"<=",Gt:">",GtE:">=",Is:"is",IsNot:"is not",In_:"in",NotIn:"not in"},Sk.misceval.richCompareBool=function(t,e,n,i){Sk.asserts.assert(t.sk$object&&e.sk$object,"JS object passed to richCompareBool");var s=t.ob$type,r=e.ob$type,o=r!==s&&void 0===r.sk$baseClass&&r.$isSubType(s);if(!Sk.__future__.python3&&s!==r&&("GtE"===n||"Gt"===n||"LtE"===n||"Lt"===n)){var a=[Sk.builtin.float_,Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.bool];const i=[Sk.builtin.dict,Sk.builtin.enumerate,Sk.builtin.filter_,Sk.builtin.list,Sk.builtin.map_,Sk.builtin.str,Sk.builtin.tuple,Sk.builtin.zip_];var l=a.indexOf(s);if(s=i.indexOf(s),a=a.indexOf(r),r=i.indexOf(r),t===Sk.builtin.none.none$)switch(n){case"Lt":case"LtE":return!0;case"Gt":case"GtE":return!1}if(e===Sk.builtin.none.none$)switch(n){case"Lt":case"LtE":return!1;case"Gt":case"GtE":return!0}if(-1!==l&&-1!==r)switch(n){case"Lt":case"LtE":return!0;case"Gt":case"GtE":return!1}if(-1!==s&&-1!==a)switch(n){case"Lt":case"LtE":return!1;case"Gt":case"GtE":return!0}if(-1!==s&&-1!==r)switch(n){case"Lt":return sr;case"GtE":return s>=r}}if("Is"===n)return t===e;if("IsNot"===n)return t!==e;if("In"===n)return Sk.misceval.chain(Sk.abstr.sequenceContains(e,t,i),Sk.misceval.isTrue);if("NotIn"===n)return Sk.misceval.chain(Sk.abstr.sequenceContains(e,t,i),(function(t){return!Sk.misceval.isTrue(t)}));if(l=(r={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"})[n],o&&(i=e[i=r[Sk.misceval.swappedOp_[n]]](t))!==Sk.builtin.NotImplemented.NotImplemented$||(i=t[l](e))!==Sk.builtin.NotImplemented.NotImplemented$||!o&&(i=e[i=r[Sk.misceval.swappedOp_[n]]](t))!==Sk.builtin.NotImplemented.NotImplemented$)return Sk.misceval.isTrue(i);if(!Sk.__future__.python3){if(o=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$cmp))try{if(i=Sk.misceval.callsimArray(o,[e]),Sk.builtin.checkNumber(i)){if(i=Sk.builtin.asnum$(i),"Eq"===n)return 0===i;if("NotEq"===n)return 0!==i;if("Lt"===n)return 0>i;if("Gt"===n)return 0=i;if("GtE"===n)return 0<=i}if(i!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch(t){throw new Sk.builtin.TypeError("comparison did not return an int")}if(o=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$cmp))try{if(i=Sk.misceval.callsimArray(o,[t]),Sk.builtin.checkNumber(i)){if(i=Sk.builtin.asnum$(i),"Eq"===n)return 0===i;if("NotEq"===n)return 0!==i;if("Lt"===n)return 0i;if("LtE"===n)return 0<=i;if("GtE"===n)return 0>=i}if(i!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch(t){throw new Sk.builtin.TypeError("comparison did not return an int")}if(t===Sk.builtin.none.none$&&e===Sk.builtin.none.none$){if("Eq"===n)return t.v===e.v;if("NotEq"===n)return t.v!==e.v;if("Gt"===n)return t.v>e.v;if("GtE"===n)return t.v>=e.v;if("Lt"===n)return t.v";throw t}},Sk.exportSymbol("Sk.misceval.objectRepr",Sk.misceval.objectRepr),Sk.misceval.opAllowsEquality=function(t){switch(t){case"LtE":case"Eq":case"GtE":return!0}return!1},Sk.exportSymbol("Sk.misceval.opAllowsEquality",Sk.misceval.opAllowsEquality),Sk.misceval.isTrue=function(t){return!0===t||t===Sk.builtin.bool.true$||!1!==t&&t!==Sk.builtin.bool.false$&&null!=t&&(t.nb$bool?t.nb$bool():t.sq$length?0!==t.sq$length():!!t)},Sk.exportSymbol("Sk.misceval.isTrue",Sk.misceval.isTrue),Sk.misceval.softspace_=!1,Sk.misceval.print_=function(t){Sk.misceval.softspace_&&("\n"!==t&&Sk.output(" "),Sk.misceval.softspace_=!1);var e=new Sk.builtin.str(t);return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(function(t){return Sk.misceval.apply(t.$d.stdout.write,void 0,void 0,void 0,[t.$d.stdout,e])}),(function(){var t;(t=0===e.v.length)||(t=!("\n"===(t=e.v[e.v.length-1])||"\t"===t||"\r"===t)),(t||" "===e.v[e.v.length-1])&&(Sk.misceval.softspace_=!0)}))},Sk.exportSymbol("Sk.misceval.print_",Sk.misceval.print_),Sk.misceval.loadname=function(t,e){if(void 0!==(e=e[t]))return e;if(void 0!==(e=Sk.builtins[t]))return e;throw new Sk.builtin.NameError("name '"+Sk.unfixReserved(t)+"' is not defined")},Sk.exportSymbol("Sk.misceval.loadname",Sk.misceval.loadname),Sk.misceval.call=function(t,e,n,i,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.apply(t,e,n,i,s)},Sk.exportSymbol("Sk.misceval.call",Sk.misceval.call),Sk.misceval.callAsync=function(t,e,n,i,s,r){return r=Array.prototype.slice.call(arguments,5),Sk.misceval.applyAsync(t,e,n,i,s,r)},Sk.exportSymbol("Sk.misceval.callAsync",Sk.misceval.callAsync),Sk.misceval.callOrSuspend=function(t,e,n,i,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.applyOrSuspend(t,e,n,i,s)},Sk.exportSymbol("Sk.misceval.callOrSuspend",Sk.misceval.callOrSuspend),Sk.misceval.callsim=function(t,e){return e=Array.prototype.slice.call(arguments,1),Sk.misceval.apply(t,void 0,void 0,void 0,e)},Sk.exportSymbol("Sk.misceval.callsim",Sk.misceval.callsim),Sk.misceval.callsimArray=function(t,e,n){return e=e||[],Sk.misceval.retryOptionalSuspensionOrThrow(Sk.misceval.callsimOrSuspendArray(t,e,n))},Sk.exportSymbol("Sk.misceval.callsimArray",Sk.misceval.callsimArray),Sk.misceval.callsimAsync=function(t,e,n){return n=Array.prototype.slice.call(arguments,2),Sk.misceval.applyAsync(t,e,void 0,void 0,void 0,n)},Sk.exportSymbol("Sk.misceval.callsimAsync",Sk.misceval.callsimAsync),Sk.misceval.callsimOrSuspend=function(t,e){return e=Array.prototype.slice.call(arguments,1),Sk.misceval.applyOrSuspend(t,void 0,void 0,void 0,e)},Sk.exportSymbol("Sk.misceval.callsimOrSuspend",Sk.misceval.callsimOrSuspend),Sk.misceval.callsimOrSuspendArray=function(t,e,n){return e=e||[],void 0!==t&&t.tp$call?t.tp$call(e,n):Sk.misceval.applyOrSuspend(t,void 0,void 0,n,e)},Sk.exportSymbol("Sk.misceval.callsimOrSuspendArray",Sk.misceval.callsimOrSuspendArray),Sk.misceval.apply=function(t,e,n,i,s){return(t=Sk.misceval.applyOrSuspend(t,e,n,i,s))instanceof Sk.misceval.Suspension?Sk.misceval.retryOptionalSuspensionOrThrow(t):t},Sk.exportSymbol("Sk.misceval.apply",Sk.misceval.apply),Sk.misceval.asyncToPromise=function(t,e){return new Promise((function(n,i){try{!function t(s){try{for(var r=function(){try{t(s.resume())}catch(t){i(t)}},o=function(t){try{s.data.result=t,r()}catch(t){i(t)}},a=function(t){try{s.data.error=t,r()}catch(t){i(t)}};s instanceof Sk.misceval.Suspension;){var l=e&&(e[s.data.type]||e["*"]);if(l){var u=l(s);if(u)return void u.then(t,i)}if("Sk.promise"==s.data.type)return void s.data.promise.then(o,a);if("Sk.yield"==s.data.type)return void Sk.global.setImmediate(r);if("Sk.delay"==s.data.type)return void Sk.global.setImmediate(r);if(!s.optional)throw new Sk.builtin.SuspensionError("Unhandled non-optional suspension of type '"+s.data.type+"'");s=s.resume()}n(s)}catch(t){i(t)}}(t())}catch(t){i(t)}}))},Sk.exportSymbol("Sk.misceval.asyncToPromise",Sk.misceval.asyncToPromise),Sk.misceval.applyAsync=function(t,e,n,i,s,r){return Sk.misceval.asyncToPromise((function(){return Sk.misceval.applyOrSuspend(e,n,i,s,r)}),t)},Sk.exportSymbol("Sk.misceval.applyAsync",Sk.misceval.applyAsync),Sk.misceval.chain=function(t,e){for(var n,i,s=1,r=t;;){if(s==arguments.length)return r;if(r&&r.$isSuspension)break;r=arguments[s](r),s++}for(i=Array(arguments.length-s),n=0;nt[i++]},e,n)},Sk.misceval.arrayFromIterable=function(t,e){if(void 0===t)return[];if(void 0===t.ht$type&&void 0!==t.sk$asarray)return t.sk$asarray();const n=[];return t=Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{n.push(t)})),(()=>n)),e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},Sk.misceval.Break=function(t){if(!(this instanceof Sk.misceval.Break))return new Sk.misceval.Break(t);this.brValue=t},Sk.exportSymbol("Sk.misceval.Break",Sk.misceval.Break),Sk.misceval.applyOrSuspend=function(t,e,n,i,s){var r;if(null==t||t===Sk.builtin.none.none$)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not callable");"function"==typeof t&&void 0===t.tp$call&&(t=new Sk.builtin.func(t));var o=t.tp$call;if(void 0!==o){if(n)for(r=(n=n.tp$iter()).tp$iternext();void 0!==r;r=n.tp$iternext())s.push(r);if(e)for(r=(n=Sk.abstr.iter(e)).tp$iternext();void 0!==r;r=n.tp$iternext()){if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("Function keywords must be strings");i.push(r.v),i.push(Sk.abstr.objectGetItem(e,r,!1))}return o.call(t,s,i,e)}if(void 0!==(o=t.__call__))return s.unshift(t),Sk.misceval.apply(o,e,n,i,s);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not callable")},Sk.exportSymbol("Sk.misceval.applyOrSuspend",Sk.misceval.applyOrSuspend),Sk.misceval.promiseToSuspension=function(t){var e=new Sk.misceval.Suspension;return e.resume=function(){if(e.data.error)throw e.data.error;return e.data.result},e.data={type:"Sk.promise",promise:t},e},Sk.exportSymbol("Sk.misceval.promiseToSuspension",Sk.misceval.promiseToSuspension),Sk.misceval.buildClass=function(t,e,n,i,s,r){n=new Sk.builtin.str(n);const o=new Sk.builtin.tuple(i);let a;i=i||[];var l=!0;const u=(r=r||[]).indexOf("metaclass");-1{if(t=t.ob$type,!n.$isSubType(t)){if(!t.$isSubType(n))throw new Sk.builtin.TypeError("metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases");n=t}})),n}(a,i));let c=null;a!==Sk.builtin.type&&([c,h]=function(t,e,n,i,s){const r=t.tp$getattr(Sk.builtin.str.$prepare);let o,a=null;if(void 0===r)return[a,o];if(a=Sk.misceval.callsimArray(r,[e,n],i),!Sk.builtin.checkMapping(a))throw new Sk.builtin.TypeError(s?t.prototype.tp$name:".__prepare__() must return a mapping not '"+Sk.abstr.typeName(a)+"'");return o={get(t,e){try{return Sk.abstr.objectGetItem(t,new Sk.builtin.str(Sk.unfixReserved(e)))}catch(t){if(!(t instanceof Sk.builtin.KeyError))throw t}},set:(t,e,n)=>(Sk.abstr.objectSetItem(t,new Sk.builtin.str(Sk.unfixReserved(e)),n),!0)},[a,o]}(a,n,o,r,l)),i=!1;let p={};if(null===c)c=new Sk.builtin.dict([]);else if(c.constructor===Sk.builtin.dict||function(){const t=(Sk.global.navigator||{}).userAgent||"";return-1{Sk.abstr.objectSetItem(c,new Sk.builtin.str(t),p[t])})),Sk.misceval.callsimOrSuspendArray(a,[n,o,c],r)},Sk.exportSymbol("Sk.misceval.buildClass",Sk.misceval.buildClass)},function(t,e){Sk.builtin.callable_iter_=Sk.abstr.buildIteratorClass("callable_iterator",{constructor:function(t,e){if(!Sk.builtin.checkCallable(t))throw new Sk.builtin.TypeError("iter(v, w): v must be callable");this.$callable=t,this.$sentinel=e,this.$flag=!1},iternext(t){if(!0!==this.$flag){if(t)return t=Sk.misceval.callsimOrSuspendArray(this.$callable,[]),Sk.misceval.chain(t,(t=>{if(!Sk.misceval.richCompareBool(t,this.$sentinel,"Eq",!0))return t;this.$flag=!0}));if(t=Sk.misceval.callsimArray(this.$callable,[]),!Sk.misceval.richCompareBool(t,this.$sentinel,"Eq",!1))return t;this.$flag=!0}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.seq_iter_=Sk.abstr.buildIteratorClass("iterator",{constructor:function(t){this.$index=0,this.$seq=t},iternext(t){let e;return e=Sk.misceval.tryCatch((()=>this.$seq.mp$subscript(new Sk.builtin.int_(this.$index++),t)),(t=>{if(!(t instanceof Sk.builtin.IndexError||t instanceof Sk.builtin.StopIteration))throw t;this.gi$ret=t.$value||Sk.builtin.none.none$})),t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},methods:{__length_hint__:{$flags:{NoArgs:!0},$meth(){if(this.$seq.sq$length)return this.$seq.sq$length()-this.$index;throw new Sk.builtin.NotImplementedError("len is not implemented for "+Sk.abstr.typeName(this.$seq))}}},flags:{sk$unacceptableBase:!0}}),Sk.exportSymbol("Sk.builtin.callable_iter_",Sk.builtin.callable_iter_)},function(t,e){Sk.builtin.list=Sk.abstr.buildNativeClass("list",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.list,"bad call to list, use 'new' with an Array of python objects"),this.v=t,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"Built-in mutable sequence.\n\nIf no argument is given, the constructor creates a new empty list.\nThe argument must be an iterable if specified.",tp$new:Sk.generic.new,tp$init(t,e){return Sk.abstr.checkNoKwargs("list",e),Sk.abstr.checkArgsLen("list",t,0,1),Sk.misceval.chain(Sk.misceval.arrayFromIterable(t[0],!0),(t=>{this.v=t}))},$r(){if(this.in$repr)return new Sk.builtin.str("[...]");this.in$repr=!0;const t=this.v.map((t=>Sk.misceval.objectRepr(t)));return this.in$repr=!1,new Sk.builtin.str("["+t.join(", ")+"]")},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new n(this)},sq$length(){return this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.list))throw new Sk.builtin.TypeError("can only concatenate list to list");return new Sk.builtin.list(this.v.concat(t.v))},sq$contains(t){for(let e=this.tp$iter(),n=e.tp$iternext();void 0!==n;n=e.tp$iternext())if(n===t||Sk.misceval.richCompareBool(n,t,"Eq"))return!0;return!1},sq$repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");if((t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;const e=[];for(let n=0;n{e.push(this.v[t])})),new Sk.builtin.list(e)}throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(t))},mp$ass_subscript(t,e){void 0===e?this.del$subscript(t):this.ass$subscript(t,e)},sq$inplace_concat(t){return t===this?(this.v.push(...this.v),this):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.v.push(t)})),(()=>this))},sq$inplace_repeat(t){if(!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(t)+"'");t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const e=this.v.length;if(0>=t)this.v.length=0;else if(t*e>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;for(let n=1;n{this.v.push(t)})),(()=>Sk.builtin.none.none$))},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Extend list by appending elements from the iterable."},pop:{$meth(t){t=void 0===t?this.v.length-1:Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError),t=this.list$inRange(t,"pop index out of range");const e=this.v[t];return this.v.splice(t,1),e},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, index=-1, /)",$doc:"Remove and return item at index (default last).\n\nRaises IndexError if list is empty or index is out of range."},remove:{$meth(t){if(-1===(t=this.list$indexOf(t)))throw new Sk.builtin.ValueError("list.remove(x): x not in list");return this.v.splice(t,1),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Remove first occurrence of value.\n\nRaises ValueError if the value is not present."},sort:{$meth(t,e){if(t.length)throw new Sk.builtin.TypeError("sort() takes no positional arguments");const[n,i]=Sk.abstr.copyKeywordsToNamedArgs("sort",["key","reverse"],t,e,[Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(void 0,n,i)},$flags:{FastCall:!0},$textsig:"($self, /, *, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."},index:{$meth(t,e,n){if(void 0!==e&&!Sk.misceval.isIndex(e)||void 0!==n&&!Sk.misceval.isIndex(n))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");if(-1===(e=this.list$indexOf(t,e,n)))throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in list");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:"Return first index of value.\n\nRaises ValueError if the value is not present."},count:{$meth(t){let e=0;const n=this.v.length;for(let i=0;it&&(t+=this.v.length),0<=t&&t{n.push(t)})),!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("must assign iterable to extended slice");if(t=Sk.misceval.arrayFromIterable(e),n.length!==t.length)throw new Sk.builtin.ValueError("attempt to assign sequence of size "+t.length+" to extended slice of size "+n.length);for(e=0;e{this.v.splice(t-n,1),n+=e}))},valueOf(){return this.v}}}),Sk.exportSymbol("Sk.builtin.list",Sk.builtin.list),Sk.builtin.list.py2$methods={sort:{$name:"sort",$meth(t,e){const[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("sort",["cmp","key","reverse"],t,e,[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(n,i,s)},$flags:{FastCall:!0},$textsig:"($self, cmp=None, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."}};var n=Sk.abstr.buildIteratorClass("list_iterator",{constructor:function(t){this.$index=0,this.$seq=t.v},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),i=Sk.abstr.buildIteratorClass("list_reverseiterator",{constructor:function(t){this.$index=t.v.length-1,this.$seq=t.v},iternext(){const t=this.$seq[this.$index--];if(void 0!==t)return t;this.tp$iternext=()=>{}},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}})},function(t,e,n){function i(t){var e=t.replace(y,"").replace(T,"_").toLowerCase();return void 0===(e=k[e])?t:e}function s(t,e,n){if(void 0===e)e="utf-8";else{if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError(t+"() argument "+("bytesstr".includes(t)?2:1)+" must be str not "+Sk.abstr.typeName(e));e=e.$jsstr()}if(void 0===n)n="strict";else{if(!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError(t+"() argument "+("bytesstr".includes(t)?3:2)+" must be str not "+Sk.abstr.typeName(n));n=n.$jsstr()}return{encoding:e,errors:n}}function r(t,e,n){if(t=t.$jsstr(),e=i(e),"strict"!==n&&"ignore"!==n&&"replace"!==n)throw new Sk.builtin.NotImplementedError("'"+n+"' error handling not implemented in Skulpt");if("ascii"===e){for(s in e=[],t){const i=t.charCodeAt(s);if(127=t?"\\x":"\\u";return 3===(t=t.toString(16)).length&&(t=t.slice(1,3)),1===t.length?e+"0"+t:e+t}function a(t,e){if(({encoding:t,errors:e}=s("decode",t,e)),t=i(t),"strict"!==e&&"ignore"!==e&&"replace"!==e)throw new Sk.builtin.NotImplementedError("'"+e+"' error handling not implemented in Skulpt");if("ascii"===t){t=this.v;var n="";for(let i=0;i=n&&en)return new Sk.builtin.tuple([new Sk.builtin.bytes,new Sk.builtin.bytes,this])}else if(n=this.find$subleft(e,0,this.v.length),0>n)return new Sk.builtin.tuple([this,new Sk.builtin.bytes,new Sk.builtin.bytes]);return new Sk.builtin.tuple([new Sk.builtin.bytes(this.v.subarray(0,n)),new Sk.builtin.bytes(e),new Sk.builtin.bytes(this.v.subarray(n+e.length))])}}function p(t,e){return function(n){var i=void 0===n||n===Sk.builtin.none.none$?new Uint8Array([9,10,11,12,13,32,133]):this.get$raw(n);n=0;var s=this.v.length;if(t)for(;nn&&i.includes(this.v[s-1]);)s--;for(i=new Uint8Array(s-n),s=0;s=t||32===t}function d(t){return 97<=t&&122>=t}function f(t){return 65<=t&&90>=t}function m(t){return 48<=t&&57>=t}function g(t,e){return function(){return 0===this.v.length?e?Sk.builtin.bool.true$:Sk.builtin.bool.false$:this.v.every((e=>t(e)))?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function b(t,e){return function(){let n=!1;for(let i=0;i0<=t&&255>=t)),"bad internal call to bytes with array"),this.v=new Uint8Array(t);else if("string"==typeof t){let e;const n=new Uint8Array(t.length),i=t.length;for(let s=0;s bytes\nbytes(string, encoding[, errors]) -> bytes\nbytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\nbytes(int) -> bytes object of size given by the parameter initialized with null bytes\nbytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n - an iterable yielding integers in range(256)\n - a text string encoded using the specified encoding\n - any object implementing the buffer API.\n - an integer",tp$new(t,e){if(this!==Sk.builtin.bytes.prototype)return this.$subtype_new(t,e);let n;if(e=e||[],!(1>=t.length&&0==+e.length)){if([t,e,n]=Sk.abstr.copyKeywordsToNamedArgs("bytes",[null,"pySource","errors"],t,e),({encoding:e,errors:n}=s("bytes",e,n)),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("encoding or errors without a string argument");return r(t,e,n)}if(void 0===(t=t[0]))return new Sk.builtin.bytes;if(void 0!==(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$bytes)))return t=Sk.misceval.callsimOrSuspendArray(e,[]),Sk.misceval.chain(t,(t=>{if(!Sk.builtin.checkBytes(t))throw new Sk.builtin.TypeError("__bytes__ returned non-bytes (type "+Sk.abstr.typeName(t)+")");return t}));if(Sk.misceval.isIndex(t)){if(0>(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError)))throw new Sk.builtin.ValueError("negative count");return new Sk.builtin.bytes(t)}if(Sk.builtin.checkBytes(t))return new Sk.builtin.bytes(t.v);if(Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("string argument without an encoding");if(Sk.builtin.checkIterable(t)){let e=[];return t=Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(0>(t=Sk.misceval.asIndexSized(t))||255new Sk.builtin.bytes(e)))}throw new Sk.builtin.TypeError("cannot convert '"+Sk.abstr.typeName(t)+"' object into bytes")},$r(){let t,e="'";const n=-1!==this.v.indexOf(34);let i="";for(let s=0;st||10t||13t||126t.length||n[i]>t[i];case"GtE":return i===s&&n.length>=t.length||n[i]>=t[i]}},tp$hash(){return new Sk.builtin.str(this.$jsstr()).tp$hash()},tp$as_sequence_or_mapping:!0,mp$subscript(t){if(Sk.misceval.isIndex(t)){let e=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError);if(void 0!==e){if(0>e&&(e=this.v.length+e),0>e||e>=this.v.length)throw new Sk.builtin.IndexError("index out of range");return new Sk.builtin.int_(this.v[e])}}else if(t instanceof Sk.builtin.slice){const e=[];return t.sssiter$(this.v.length,(t=>{e.push(this.v[t])})),new Sk.builtin.bytes(new Uint8Array(e))}throw new Sk.builtin.TypeError("byte indices must be integers or slices, not "+Sk.abstr.typeName(t))},sq$length(){return this.v.length},sq$concat(t){if(!(t instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("can't concat "+Sk.abstr.typeName(t)+" to bytes");const e=new Uint8Array(this.v.length+t.v.length);let n;for(n=0;nNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;if(0>=t)return new Sk.builtin.bytes;t=new Uint8Array(e);let n=0;for(;n(t=Sk.misceval.asIndexOrThrow(t,"argument should be integer or bytes-like object, not {tp$name}"))||255(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError))?1/0:e,null!==(t=Sk.builtin.checkNone(t)?null:this.get$raw(t))&&!t.length)throw new Sk.builtin.ValueError("empty separator");return{sep:t,maxsplit:e}},find$left:u(!1),find$right:u(!0),find$subleft:function(t,e,n){n=n-t.length+1;let i=e;for(;it===this.v[i+e])))return i;i++}return-1},find$subright(t,e,n){let i=n-t.length;for(;i>=e;){if(t.every(((t,e)=>t===this.v[i+e])))return i;i--}return-1},$subtype_new(t,e){const n=new this.constructor;return t=Sk.builtin.bytes.prototype.tp$new(t,e),n.v=t.v,n},sk$asarray(){const t=[];return this.v.forEach((e=>{t.push(new Sk.builtin.int_(e))})),t},valueOf(){return this.v}},flags:{str$encode:r,$decode:a,check$encodeArgs:s},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.bytes(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null},capitalize:{$meth(){const t=this.v.length;if(0===t)return new Sk.builtin.bytes(this.v);const e=new Uint8Array(t);let n=this.v[0];e[0]=d(n)?n-32:n;for(let i=1;i copy of B\n\nReturn a copy of B with only its first character capitalized (ASCII)\nand the rest lower-cased."},center:{$meth:h("center",!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.center(width[, fillchar]) -> copy of B\n\nReturn B centered in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},count:{$meth(t,e,n){t=this.get$tgt(t),({start:e,end:n}=Sk.builtin.slice.startEnd$wrt(this,e,n));let i=0;if("number"==typeof t)for(;et===this.v[s+e]))&&(i++,s+=t.length-1)}return new Sk.builtin.int_(i)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.count(sub[, start[, end]]) -> int\n\nReturn the number of non-overlapping occurrences of subsection sub in\nbytes B[start:end]. Optional arguments start and end are interpreted\nas in slice notation."},decode:{$meth:a,$flags:{NamedArgs:["encoding","errors"]},$textsig:"($self, /, encoding='utf-8', errors='strict')",$doc:"Decode the bytes using the codec registered for encoding.\n\n encoding\n The encoding with which to decode the bytes.\n errors\n The error handling scheme to use for the handling of decoding errors.\n The default is 'strict' meaning that decoding errors raise a\n UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n as well as any other name registered with codecs.register_error that\n can handle UnicodeDecodeErrors."},endswith:{$meth:l("endswith",((t,e)=>{const n=t.length-e.length;return 0<=n&&e.every(((e,i)=>e===t[n+i]))})),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if B ends with the specified suffix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nsuffix can also be a tuple of bytes to try."},expandtabs:{$meth(t){t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"an integer is required (got type {tp$nam})");const e=[];let n=0;for(let s=0;s copy of B\n\nReturn a copy of B where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(t,e,n){return new Sk.builtin.int_(this.find$left(t,e,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},hex:{$meth(){let t="";for(let e=0;e string\n\nCreate a string of hexadecimal numbers from a bytes object.\nExample: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'."},index:{$meth:function(t,e,n){if(-1===(t=this.find$left(t,e,n)))throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the subsection is not found."},isalnum:{$meth:g((t=>m(t)||d(t)||f(t))),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalnum() -> bool\n\nReturn True if all characters in B are alphanumeric\nand there is at least one character in B, False otherwise."},isalpha:{$meth:g((t=>65<=t&&90>=t||97<=t&&122>=t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalpha() -> bool\n\nReturn True if all characters in B are alphabetic\nand there is at least one character in B, False otherwise."},isascii:{$meth:g((t=>0<=t&&127>=t),!0),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isascii() -> bool\n\nReturn True if B is empty or all characters in B are ASCII,\nFalse otherwise."},isdigit:{$meth:g(m),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isdigit() -> bool\n\nReturn True if all characters in B are digits\nand there is at least one character in B, False otherwise."},islower:{$meth:b(d,f),$flags:{NoArgs:!0},$textsig:null,$doc:"B.islower() -> bool\n\nReturn True if all cased characters in B are lowercase and there is\nat least one cased character in B, False otherwise."},isspace:{$meth:g(_),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isspace() -> bool\n\nReturn True if all characters in B are whitespace\nand there is at least one character in B, False otherwise."},istitle:{$meth:function(){let t=!1,e=!1;for(let n=0;n bool\n\nReturn True if B is a titlecased string and there is at least one\ncharacter in B, i.e. uppercase characters may only follow uncased\ncharacters and lowercase characters only cased ones. Return False\notherwise."},isupper:{$meth:b(f,d),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isupper() -> bool\n\nReturn True if all cased characters in B are uppercase and there is\nat least one cased character in B, False otherwise."},join:{$meth(t){const e=[];let n=0;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(!(t instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("sequence item "+n+": expected a bytes-like object, "+Sk.abstr.typeName(t)+" found");n++,e.length&&e.push(...this.v),e.push(...t.v)})),(()=>new Sk.builtin.bytes(new Uint8Array(e))))},$flags:{OneArg:!0},$textsig:"($self, iterable_of_bytes, /)",$doc:"Concatenate any number of bytes objects.\n\nThe bytes whose method is called is inserted in between each pair.\n\nThe result is returned as a new bytes object.\n\nExample: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'."},ljust:{$meth:h("ljust",!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.ljust(width[, fillchar]) -> copy of B\n\nReturn B left justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},lower:{$meth:S((t=>f(t)?t+32:t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.lower() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to lowercase."},lstrip:{$meth:p(!0,!1),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading ASCII whitespace."},partition:{$meth:c(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original bytes\nobject and two empty bytes objects."},replace:{$meth(t,e,n){t=this.get$raw(t),e=this.get$raw(e),n=0>(n=void 0===n?-1:Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError))?1/0:n;const i=[];let s=0;for(var r=0;r int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(t,e,n){if(-1===(t=this.find$right(t,e,n)))throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaise ValueError when the subsection is not found."},rjust:{$meth:h("rjust",!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.rjust(width[, fillchar]) -> copy of B\n\nReturn B right justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)"},rpartition:{$meth:c(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty bytes\nobjects and the original bytes object."},rsplit:{$meth:function(t,e){({sep:t,maxsplit:e}=this.get$splitArgs(t,e));const n=[];let i=0,s=this.v.length;if(null!==t){for(;0<=s&&is)break;for(t=s+1,s--;0<=s&&!_(this.v[s]);)s--;n.push(new Sk.builtin.bytes(this.v.subarray(s+1,t))),i++}if(0<=s){for(;_(this.v[s]);)s--;0<=s&&n.push(new Sk.builtin.bytes(this.v.subarray(0,s+1)))}}return new Sk.builtin.list(n.reverse())},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the sections in the bytes, using sep as the delimiter.\n\n sep\n The delimiter according which to split the bytes.\n None (the default value) means split on ASCII whitespace characters\n (space, tab, return, newline, formfeed, vertical tab).\n maxsplit\n Maximum number of splits to do.\n -1 (the default value) means no limit.\n\nSplitting is done starting at the end of the bytes and working to the front."},rstrip:{$meth:p(!1,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip trailing ASCII whitespace."},split:{$meth:function(t,e){({sep:t,maxsplit:e}=this.get$splitArgs(t,e));const n=[],i=this.v.length;let s=0,r=0;if(null!==t){for(;re.length<=t.length&&e.every(((e,n)=>e===t[n])))),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if B starts with the specified prefix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nprefix can also be a tuple of bytes to try."},strip:{$meth:p(!0,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading and trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading and trailing ASCII whitespace."},swapcase:{$meth:S((t=>f(t)?t+32:d(t)?t-32:t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.swapcase() -> copy of B\n\nReturn a copy of B with uppercase ASCII characters converted\nto lowercase ASCII and vice versa."},title:{$meth(){const t=this.v.length,e=new Uint8Array(t);let n=!1;for(let i=0;i copy of B\n\nReturn a titlecased version of B, i.e. ASCII words start with uppercase\ncharacters, all remaining cased characters have lowercase."},upper:{$meth:S((t=>d(t)?t-32:t)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.upper() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to uppercase."},zfill:{$meth(t){const e=(t=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError))-this.v.length;if(0>=e)return new Sk.builtin.bytes(this.v);const n=new Uint8Array(t);let i,s=0;for(43!==this.v[0]&&45!==this.v[0]||(n[0]=this.v[0],s++),n.fill(48,s,s+e),i=s,s+=e;s copy of B\n\nPad a numeric string B with zeros on the left, to fill a field\nof the specified width. B is never truncated."}},classmethods:{fromhex:{$meth:function(t){function e(e){for(let n=o;n b'\\\\xb9\\\\x01\\\\xef'."}}});var w=Sk.abstr.buildIteratorClass("bytes_iterator",{constructor:function(t){this.$index=0,this.$seq=t.v},iternext(){const t=this.$seq[this.$index++];if(void 0!==t)return new Sk.builtin.int_(t)},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}});Sk.exportSymbol("Sk.builtin.bytes",Sk.builtin.bytes)},function(t,e,n){(function(t){!function(t){function e(){}function n(){}var i=String.fromCharCode,s={}.toString,r=s.call(t.SharedArrayBuffer),o=s(),a=t.Uint8Array,l=a||Array,u=a?ArrayBuffer:l,c=u.isView||function(t){return t&&"length"in t},p=s.call(u.prototype);u=n.prototype;var h=t.TextEncoder,_=new(a?Uint16Array:l)(32);e.prototype.decode=function(t){if(!c(t)){var e=s.call(t);if(e!==p&&e!==r&&e!==o)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");t=a?new l(t):t||[]}for(var n,u,h,d=e="",f=0,m=0|t.length,g=m-32|0,b=0,S=0,k=0,y=-1;f>4){case 15:if(2!=(h=255&t[f=f+1|0])>>6||247>6?S+4|0:24,u=u+256&768;case 13:case 12:b<<=6,b|=(31&u)<<6|63&(h=255&t[f=f+1|0]),S=S+7|0,f>6&&b>>S&&1114112>b?(u=b,0<=(b=b-65536|0)&&(y=55296+(b>>10)|0,u=56320+(1023&b)|0,31>k?(_[k]=y,k=k+1|0,y=-1):(h=y,y=u,u=h))):(f=f-(u>>=8)-1|0,u=65533),b=S=0,n=f<=g?32:m-f|0;default:_[k]=u;continue;case 11:case 10:case 9:case 8:}_[k]=65533}if(d+=i(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15],_[16],_[17],_[18],_[19],_[20],_[21],_[22],_[23],_[24],_[25],_[26],_[27],_[28],_[29],_[30],_[31]),32>k&&(d=d.slice(0,k-32|0)),f>>31,y=-1,d.length=o)i[s]=o;else{if(2047>=o)i[s]=192|o>>6;else{t:{if(55296<=o)if(56319>=o){var u=0|t.charCodeAt(e=e+1|0);if(56320<=u&&57343>=u){if(65535<(o=(o<<10)+u-56613888|0)){i[s]=240|o>>18,i[s=s+1|0]=128|o>>12&63,i[s=s+1|0]=128|o>>6&63,i[s=s+1|0]=128|63&o;continue}break t}o=65533}else 57343>=o&&(o=65533);!r&&e<<1>12,i[s=s+1|0]=128|o>>6&63}i[s=s+1|0]=128|63&o}}return a?i.subarray(0,s):i.slice(0,s)},h||(t.TextDecoder=e,t.TextEncoder=n)}(void 0===t?"undefined"==typeof self?this:self:t)}).call(this,n(0))},function(t,e){Sk.builtin.tuple=Sk.abstr.buildNativeClass("tuple",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.tuple,"bad call to tuple, use 'new' with an Array of python objects"),this.v=t,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"Built-in immutable sequence.\n\nIf no argument is given, the constructor returns an empty tuple.\nIf iterable is specified the tuple is initialized from iterable's items.\n\nIf the argument is a tuple, the return value is the same object.",$r(){if(this.in$repr)return new Sk.builtin.str("(...)");this.in$repr=!0;let t=this.v.map((t=>Sk.misceval.objectRepr(t)));return this.in$repr=!1,t=t.join(", "),1===this.v.length&&(t+=","),new Sk.builtin.str("("+t+")")},tp$new(t,e){return this!==Sk.builtin.tuple.prototype?this.$subtype_new(t,e):(Sk.abstr.checkNoKwargs("tuple",e),Sk.abstr.checkArgsLen("tuple",t,0,1),void 0===(t=t[0])?new Sk.builtin.tuple([]):t.constructor===Sk.builtin.tuple?t:Sk.misceval.chain(Sk.misceval.arrayFromIterable(t,!0),(t=>new Sk.builtin.tuple(t))))},tp$hash(){let t,e=3430008,n=1000003;const i=this.v.length;for(let s=0;s(t=Sk.misceval.asIndexSized(t,Sk.builtin.IndexError))&&(t=this.v.length+t),0>t||t>=this.v.length)throw new Sk.builtin.IndexError("tuple index out of range");return this.v[t]}if(t instanceof Sk.builtin.slice){const e=[];return t.sssiter$(this.v.length,(t=>{e.push(this.v[t])})),new Sk.builtin.tuple(e)}throw new Sk.builtin.TypeError("tuple indices must be integers or slices, not "+Sk.abstr.typeName(t))},sq$length(){return this.v.length},sq$repeat(t){if(1===(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))&&this.constructor===Sk.builtin.tuple)return this;const e=[];for(let n=0;n(this.$seq=t.$items(),this.$version=t.$version,n&&(this.$seq=this.$seq.reverse()),this.tp$iternext=this.constructor.prototype.tp$iternext,this.tp$iternext())},iternext:e,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0},proto:{next$item:a}})}function a(){if(this.$version!==this.$orig.$version){if(this.$seq.length!==this.$orig.get$size())throw new Sk.builtin.RuntimeError("dict changed size during iteration");throw new Sk.builtin.RuntimeError("dictionary keys changed during iteration")}return this.$seq[this.$index++]}Sk.builtin.dict=Sk.abstr.buildNativeClass("dict",{constructor:function(t){void 0===t&&(t=[]),Sk.asserts.assert(Array.isArray(t)&&0==t.length%2&&this instanceof Sk.builtin.dict,"bad call to dict constructor"),this.size=0,this.entries=Object.create(null),this.buckets={};for(let e=0;e new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n d = {}\n for k, v in iterable:\n d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n in the keyword argument list. For example: dict(one=1, two=2)",$r(){if(this.in$repr)return new Sk.builtin.str("{...}");this.in$repr=!0;const t=this.$items().map((t=>{var[e,n]=t;return Sk.misceval.objectRepr(e)+": "+Sk.misceval.objectRepr(n)}));return this.in$repr=!1,new Sk.builtin.str("{"+t.join(", ")+"}")},tp$new:Sk.generic.new,tp$init(t,e){return this.update$common(t,e,"dict")},tp$iter(){return new h(this)},tp$richcompare(t,e){let n;if(!(t instanceof Sk.builtin.dict)||"Eq"!==e&&"NotEq"!==e)return Sk.builtin.NotImplemented.NotImplemented$;if(t===this)n=!0;else if(this.size!==t.size)n=!1;else{let e;n=this.$items().every((n=>{var[i,s]=n;return e=t.mp$lookup(i),void 0!==e&&(e===s||Sk.misceval.richCompareBool(s,e,"Eq"))}))}return"Eq"===e?n:!n},nb$or(t){if(!(t instanceof Sk.builtin.dict))return Sk.builtin.NotImplemented.NotImplemented$;const e=this.dict$copy();return e.dict$merge(t),e},nb$reflected_or(t){return t instanceof Sk.builtin.dict?((t=t.dict$copy()).dict$merge(this),t):Sk.builtin.NotImplemented.NotImplemented$},nb$inplace_or(t){return Sk.misceval.chain(this.update$onearg(t),(()=>this))},sq$length(){return this.get$size()},sq$contains(t){return void 0!==this.mp$lookup(t)},mp$subscript(t,e){var n=this.mp$lookup(t);if(void 0!==n)return n;if(void 0!==(n=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$missing)))return t=Sk.misceval.callsimOrSuspendArray(n,[t]),e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t);throw new Sk.builtin.KeyError(t)},mp$ass_subscript(t,e){if(void 0===e){if(void 0===this.pop$item(t))throw new Sk.builtin.KeyError(t)}else this.set$item(t,e)}},methods:{__reversed__:{$meth(){return new f(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator over the dict keys."},get:{$meth(t,e){return this.mp$lookup(t)||e||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Return the value for key if key is in the dictionary, else default."},setdefault:{$meth(t,e){let i;const s=n(t);return i="string"==typeof s?this.entries[s]:this.get$bucket_item(t,s),void 0!==i?i[1]:(e=e||Sk.builtin.none.none$,"string"==typeof s?this.entries[s]=[t,e]:this.set$bucket_item(t,e,s),this.size++,this.$version++,e)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Insert key with a value of default if key is not in the dictionary.\n\nReturn the value for key if key is in the dictionary, else default."},pop:{$meth(t,e){const n=this.pop$item(t);if(void 0!==n)return n[1];if(void 0!==e)return e;throw new Sk.builtin.KeyError(t)},$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\nIf key is not found, d is returned if given, otherwise KeyError is raised"},popitem:{$meth(){const t=this.get$size();if(0===t)throw new Sk.builtin.KeyError("popitem(): dictionary is empty");const[e,n]=this.$items()[t-1];return this.pop$item(e),new Sk.builtin.tuple([e,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.popitem() -> (k, v), remove and return some (key, value) pair as a\n2-tuple; but raise KeyError if D is empty."},keys:{$meth(){return new u(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return new p(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return new c(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"},update:{$meth(t,e){return Sk.misceval.chain(this.update$common(t,e,"update"),(()=>Sk.builtin.none.none$))},$flags:{FastCall:!0},$textsig:null,$doc:"D.update([E, ]**F) -> None. Update D from dict/iterable E and F.\nIf E is present and has a .keys() method, then does: for k in E: D[k] = E[k]\nIf E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v\nIn either case, this is followed by: for k in F: D[k] = F[k]"},clear:{$meth(){this.size=0,this.$version++,this.entries=Object.create(null),this.buckets={}},$flags:{NoArgs:!0},$textsig:null,$doc:"D.clear() -> None. Remove all items from D."},copy:{$meth(){return this.dict$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Object.assign({fromkeys:{$meth:function(t,e){e=e||Sk.builtin.none.none$;let n=this===Sk.builtin.dict?new this:this.tp$call([],[]);return Sk.misceval.chain(n,(i=>(n=i,Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>n.mp$ass_subscript(t,e,!0))))),(()=>n))},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($type, iterable, value=None, /)",$doc:"Create a new dictionary with keys from iterable and values set to value."}},Sk.generic.classGetItem),proto:{quick$lookup:function(t){if(void 0!==(t=this.entries[t.$savedKeyHash]))return t[1]},mp$lookup:function(t){const e=n(t);if(void 0!==(t="string"==typeof e?this.entries[e]:this.get$bucket_item(t,e)))return t[1]},get$size(){return this.size},sk$asarray(){return Object.values(this.entries).map((t=>t[0]))},update$common:function(t,e,n){let i;return Sk.abstr.checkArgsLen(n,t,0,1),void 0!==(t=t[0])&&(i=this.update$onearg(t)),Sk.misceval.chain(i,(()=>{if(e)for(let t=0;tvoid 0===t))&&delete this.buckets[e],i},set$bucket_item:function(t,e,n){let i=this.buckets[n];t=[t,e],void 0===i?(this.buckets[n]=[t],n="#"+n+"_0"):-1!==(e=i.indexOf(void 0))?(n="#"+n+"_"+e,i[e]=t):(n="#"+n+"_"+i.length,i.push(t)),this.entries[n]=t},pop$item:function(t){const e=n(t);if("string"==typeof e?(t=this.entries[e],delete this.entries[e]):t=this.pop$bucket_item(t,e),void 0!==t)return this.size--,this.$version++,t},dict$merge:function(t){if(t.tp$iter!==Sk.builtin.dict.prototype.tp$iter){if(void 0===(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$keys)))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(e),(e=>Sk.misceval.iterFor(Sk.abstr.iter(e),(e=>Sk.misceval.chain(Sk.abstr.objectGetItem(t,e,!0),(t=>{this.set$item(e,t)}))))))}var e=t.tp$iter();for(let n=e.tp$iternext();void 0!==n;n=e.tp$iternext()){const e=t.mp$subscript(n);this.set$item(n,e)}},dict$merge_seq:function(t){let e=0;return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("cannot convert dictionary update sequence element #"+e+" to a sequence");if(2!==(t=Sk.misceval.arrayFromIterable(t)).length)throw new Sk.builtin.ValueError("dictionary update sequence element #"+e+" has length "+t.length+"; 2 is required");this.set$item(t[0],t[1]),e++}))}}});const l={tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,$r(){if(this.in$repr)return new Sk.builtin.str("...");this.in$repr=!0;let t=Sk.misceval.arrayFromIterable(this);return t=t.map((t=>Sk.misceval.objectRepr(t))),this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+t.join(", ")+"])")},tp$richcompare(t,e){if(!(Sk.builtin.checkAnySet(t)||t instanceof u||t instanceof p))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.sq$length(),i=t.sq$length();switch(e){case"NotEq":case"Eq":let r;return this===t?r=!0:n===i&&(r=s(this,t)),"NotEq"===e?!r:r;case"Lt":return ni&&s(t,this);case"GtE":return n>=i&&s(t,this)}},nb$subtract(t){const e=i(this);return e.difference.$meth.call(e,t)},nb$and(t){const e=i(this);return e.intersection.$meth.call(e,t)},nb$or(t){const e=i(this);return e.union.$meth.call(e,t)},nb$xor(t){const e=i(this);return e.symmetric_difference.$meth.call(e,t)},sq$length(){return this.dict.get$size()}};var u=r("dict_keys",{sq$contains(t){return void 0!==this.dict.mp$lookup(t)},tp$iter(){return new h(this.dict)}},(function(){return new f(this.dict)})),c=r("dict_values",{tp$iter(){return new d(this.dict)}},(function(){return new g(this.dict)})),p=r("dict_items",{sq$contains(t){if(!(t instanceof Sk.builtin.tuple&&2===t.sq$length()))return!1;var e=t.mp$subscript(new Sk.builtin.int_(0));return t=t.mp$subscript(new Sk.builtin.int_(1)),void 0!==(e=this.dict.mp$lookup(e))&&(e===t||Sk.misceval.richCompareBool(e,t,"Eq"))},tp$iter(){return new _(this.dict)}},(function(){return new m(this.dict)})),h=o("dict_keyiterator",(function(){const t=this.next$item();return t&&t[0]})),_=o("dict_itemiterator",(function(){const t=this.next$item();return t&&new Sk.builtin.tuple([t[0],t[1]])})),d=o("dict_valueiterator",(function(){const t=this.next$item();return t&&t[1]})),f=o("dict_reversekeyiterator",h.prototype.tp$iternext,!0),m=o("dict_reverseitemiterator",_.prototype.tp$iternext,!0),g=o("dict_reversevalueiterator",d.prototype.tp$iternext,!0);Sk.builtin.dict.py2$methods={has_key:{$name:"has_key",$flags:{OneArg:!0},$meth(t){return new Sk.builtin.bool(this.sq$contains(t))},$doc:"D.has_key(k) -> True if D has a key k, else False"},keys:{$name:"keys",$meth(){return new Sk.builtin.list(this.sk$asarray())},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$name:"items",$meth(){return new Sk.builtin.list(this.$items().map((t=>{var[e,n]=t;return new Sk.builtin.tuple([e,n])})))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$name:"values",$meth(){return new Sk.builtin.list(this.$items().map((t=>([,t]=t,t))))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"}}},function(t,e){Sk.builtin.mappingproxy=Sk.abstr.buildNativeClass("mappingproxy",{constructor:function(t){if(Sk.asserts.assert(this instanceof Sk.builtin.mappingproxy,"bad call to mapping proxy, use 'new'"),void 0!==t){const e=t.constructor;e===Object||null===e||t.hasOwnProperty("sk$object")?(this.mapping=new Sk.builtin.dict([]),function(t,e){Object.defineProperties(t,{entries:{get:()=>{const t=Object.create(null);return Object.entries(e).forEach((e=>{var[n,i]=e;(n=Sk.unfixReserved(n)).includes("$")||(n=new Sk.builtin.str(n),t[n.$savedKeyHash]=[n,i])})),t},configurable:!0},size:{get:()=>Object.keys(e).map((t=>Sk.unfixReserved(t))).filter((t=>!t.includes("$"))).length,configurable:!0}})}(this.mapping,t)):Sk.builtin.checkMapping(t)?this.mapping=t:Sk.asserts.fail("unhandled case for mappingproxy")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$new(t,e){if(Sk.abstr.checkNoKwargs("mappingproxy",e),Sk.abstr.checkOneArg("mappingproxy",t,e),t=t[0],!Sk.builtin.checkMapping(t))throw new Sk.builtin.TypeError("mappingproxy() argument must be a mapping, not "+Sk.abstr.typeName(t));return(e=new Sk.builtin.mappingproxy).mapping=t,e},tp$richcompare(t,e){return Sk.misceval.richCompareBool(this.mapping,t,e)},tp$str(){return this.mapping.tp$str()},$r(){return new Sk.builtin.str("mappingproxy("+Sk.misceval.objectRepr(this.mapping)+")")},mp$subscript(t,e){return this.mapping.mp$subscript(t,e)},sq$contains(t){return this.mapping.sq$contains(t)},sq$length(){return this.mapping.sq$length()},tp$iter(){return this.mapping.tp$iter()},tp$as_number:!0,nb$or(t){return t instanceof Sk.builtin.mappingproxy&&(t=t.mapping),Sk.abstr.numberBinOp(this.mapping,t,"BitOr")},nb$reflected_or(t){return t instanceof Sk.builtin.mappingproxy&&(t=t.mapping),Sk.abstr.numberBinOp(t,this.mapping,"BitOr")},nb$inplace_or(t){throw new Sk.builtin.TypeError("'|=' is not supported by "+Sk.abstr.typeName(this)+"; use '|' instead")}},methods:{get:{$meth(t,e){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$get),t,e)},$flags:{FastCall:!0},$textsig:null,$doc:"D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."},keys:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$keys),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$items),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$values),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> a set-like object providing a view on D's values"},copy:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$copy),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Sk.generic.classGetItem,proto:{str$get:new Sk.builtin.str("get"),str$copy:new Sk.builtin.str("copy"),str$keys:new Sk.builtin.str("keys"),str$items:new Sk.builtin.str("items"),str$values:new Sk.builtin.str("values"),mp$lookup(t){return this.mapping.mp$lookup(t)}},flags:{sk$unacceptableBase:!0}})},function(t,e){Sk.builtin.property=Sk.abstr.buildNativeClass("property",{constructor:function(t,e,n,i){this.prop$get=t||Sk.builtin.none.none$,this.prop$set=e||Sk.builtin.none.none$,this.prop$del=n||Sk.builtin.none.none$,this.prop$doc=i||t&&t.$doc||Sk.builtin.none.none$},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(t,e){t=Sk.abstr.copyKeywordsToNamedArgs("property",["fget","fset","fdel","doc"],t,e,Array(4).fill(Sk.builtin.none.none$)),this.prop$get=t[0],this.prop$set=t[1],this.prop$del=t[2],Sk.builtin.checkNone(t[3])?Sk.builtin.checkNone(t[0])||(this.prop$doc=t[0].$doc||t[3]):this.prop$doc=t[3]},tp$doc:"Property attribute.\n\n fget\n function to be used for getting an attribute value\n fset\n function to be used for setting an attribute value\n fdel\n function to be used for del'ing an attribute\n doc\n docstring\n\nTypical use is to define a managed attribute x:\n\nclass C(object):\n def getx(self): return self._x\n def setx(self, value): self._x = value\n def delx(self): del self._x\n x = property(getx, setx, delx, 'I'm the 'x' property.')\n\nDecorators make defining new properties or modifying existing ones easy:\n\nclass C(object):\n @property\n def x(self):\n 'I am the 'x' property.'\n return self._x\n @x.setter\n def x(self, value):\n self._x = value\n @x.deleter\n def x(self):\n del self._x",tp$descr_get(t,e,n){if(null===t)return this;if(void 0===this.prop$get)throw new Sk.builtin.AttributeError("unreadable attribute");return t=Sk.misceval.callsimOrSuspendArray(this.prop$get,[t]),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},tp$descr_set(t,e,n){let i;if(i=null==e?this.prop$del:this.prop$set,Sk.builtin.checkNone(i))throw new Sk.builtin.AttributeError("can't "+(null==e?"delete":"set")+" attribute");if(!i.tp$call)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(i)+"' is not callable");return t=null==e?i.tp$call([t]):i.tp$call([t,e]),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},methods:{getter:{$meth(t){return new Sk.builtin.property(t,this.prop$set,this.prop$del,this.prop$doc)},$flags:{OneArg:!0}},setter:{$meth(t){return new Sk.builtin.property(this.prop$get,t,this.prop$del,this.prop$doc)},$flags:{OneArg:!0}},deleter:{$meth(t){return new Sk.builtin.property(this.prop$get,this.prop$set,t,this.prop$doc)},$flags:{OneArg:!0}}},getsets:{fget:{$get(){return this.prop$get}},fset:{$get(){return this.prop$set}},fdel:{$get(){return this.prop$del}},__doc__:{$get(){return this.prop$doc},$set(t){this.prop$doc=t=t||Sk.builtin.none.none$}}}}),Sk.builtin.classmethod=Sk.abstr.buildNativeClass("classmethod",{constructor:function(t){this.cm$callable=t,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(t,e){Sk.abstr.checkNoKwargs("classmethod",e),Sk.abstr.checkArgsLen("classmethod",t,1,1),this.cm$callable=t[0]},tp$doc:"classmethod(function) -> method\n\nConvert a function to be a class method.\n\nA class method receives the class as implicit first argument,\njust like an instance method receives the instance.\nTo declare a class method, use this idiom:\n\n class C:\n @classmethod\n def f(cls, arg1, arg2, ...):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\nIf a class method is called for a derived class, the derived class\nobject is passed as the implied first argument.\n\nClass methods are different than C++ or Java static methods.\nIf you want those, see the staticmethod builtin.",tp$descr_get(t,e,n){const i=this.cm$callable;if(void 0===i)throw new Sk.builtin.RuntimeError("uninitialized classmethod object");return void 0===e&&(e=t.ob$type),(t=i.tp$descr_get)?t.call(i,e,n):new Sk.builtin.method(i,e)}},getsets:{__func__:{$get(){return this.cm$callable}},__dict__:Sk.generic.getSetDict}}),Sk.builtin.staticmethod=Sk.abstr.buildNativeClass("staticmethod",{constructor:function(t){this.sm$callable=t,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(t,e){Sk.abstr.checkNoKwargs("staticmethod",e),Sk.abstr.checkArgsLen("staticmethod",t,1,1),this.sm$callable=t[0]},tp$doc:"staticmethod(function) -> method\n\nConvert a function to be a static method.\n\nA static method does not receive an implicit first argument.\nTo declare a static method, use this idiom:\n\n class C:\n @staticmethod\n def f(arg1, arg2, ...):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\n\nStatic methods in Python are similar to those found in Java or C++.\nFor a more advanced concept, see the classmethod builtin.",tp$descr_get(t,e){if(void 0===this.sm$callable)throw new Sk.builtin.RuntimeError("uninitialized staticmethod object");return this.sm$callable}},getsets:{__func__:{$get(){return this.sm$callable}},__dict__:Sk.generic.getSetDict}})},function(t,e){function n(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;if(n=n.v,"number"==typeof i&&"number"==typeof n){const e=t(i,n);if(p(e))return new Sk.builtin.int_(e)}return i=_(i),n=_(n),new Sk.builtin.int_(e(i,n))}}function i(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;return n=n.v,"number"==typeof i&&"number"==typeof n?t(i,n):(i=_(i),n=_(n),e(i,n))}}function s(t,e){return function(){let n=this.v;if("number"==typeof n){const e=t(n);if(void 0!==e)return new Sk.builtin.int_(e);n=_(n)}return new Sk.builtin.int_(e(n))}}function r(){return new Sk.builtin.int_(this.v)}function o(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;if(0===(n=n.v))throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return"number"==typeof i&&"number"==typeof n?new Sk.builtin.int_(t(i,n)):(i=_(i),n=_(n),new Sk.builtin.int_(JSBI.numberIfSafe(e(i,n))))}}function a(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;if(n.nb$isnegative())throw new Sk.builtin.ValueError("negative shift count");let i=this.v;if(0===i)return new Sk.builtin.int_(0);if(n=n.v,"number"==typeof i&&"number"==typeof n&&53>n){const e=t(i,n);if(void 0!==e)return new Sk.builtin.int_(e)}return i=_(i),n=_(n),new Sk.builtin.int_(e(i,n))}}function l(t,e){return function(n){if(!(n instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let i=this.v;return n=n.v,"number"==typeof i&&"number"==typeof n&&Math.abs(i)=-Number.MAX_SAFE_INTEGER}function h(t){return t<=Number.MAX_SAFE_INTEGER&&t>=-Number.MAX_SAFE_INTEGER?+t:JSBI.BigInt(t)}function _(t){return"number"==typeof t?JSBI.BigInt(t):t}function d(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("'byteorder' must be str, not "+Sk.abstr.typeName(t));if("little"===(t=t.toString()))return 1;if("big"===t)return 0;throw new Sk.builtin.ValueError("byteorder must be either 'little' or 'big'")}Sk.builtin.int_=Sk.abstr.buildNativeClass("int",{constructor:function(t){let e;if(Sk.asserts.assert(this instanceof Sk.builtin.int_,"bad call to int use 'new'"),"number"==typeof t){if(-6t)return $[t];e=t}else if(JSBI.__isBigInt(t))e=t;else{if(void 0===t)return w;if("string"==typeof t)e=h(t);else{if(t.nb$int)return t.nb$int();Sk.asserts.fail("bad argument to int constructor")}}this.v=e},slots:{tp$as_number:!0,tp$doc:"int(x=0) -> integer\nint(x, base=10) -> integer\n\nConvert a number or string to an integer, or return 0 if no arguments\nare given. If x is a number, return x.__int__(). For floating point\nnumbers, this truncates towards zero.\n\nIf x is not a number or if base is given, then x must be a string,\nbytes, or bytearray instance representing an integer literal in the\ngiven base. The literal can be preceded by '+' or '-' and be surrounded\nby whitespace. The base defaults to 10. Valid bases are 0 and 2-36.\nBase 0 means to interpret the base from the string as an integer literal.\n>>> int('0b100', base=0)\n4",$r(){return new Sk.builtin.str(this.v.toString())},tp$hash(){var t=this.v;if("number"==typeof t){if(-1===t)return-2;if(536870911>t&&-536870911t==e),JSBI.equal),ob$ne:i(((t,e)=>t!=e),JSBI.notEqual),ob$gt:i(((t,e)=>t>e),JSBI.greaterThan),ob$ge:i(((t,e)=>t>=e),JSBI.greaterThanOrEqual),ob$lt:i(((t,e)=>tt<=e),JSBI.lessThanOrEqual),nb$int:r,nb$index(){return this.v},nb$float(){var t=this.v;if("number"==typeof t)return new Sk.builtin.float_(t);if(1/0===(t=parseFloat(JSBI.toNumber(t)))||-1/0===t)throw new Sk.builtin.OverflowError("int too large to convert to float");return new Sk.builtin.float_(t)},nb$isnegative(){const t=this.v;return"number"==typeof t?0>t:JSBI.lessThan(t,JSBI.__ZERO)},nb$ispositive(){const t=this.v;return"number"==typeof t?0<=t:JSBI.greaterThanOrEqual(t,JSBI.__ZERO)},nb$bool(){return 0!==this.v},nb$positive:r,nb$negative:s((t=>-t),JSBI.unaryMinus),nb$add:n(((t,e)=>t+e),((t,e)=>JSBI.numberIfSafe(JSBI.add(t,e)))),nb$subtract:n(((t,e)=>t-e),((t,e)=>JSBI.numberIfSafe(JSBI.subtract(t,e)))),nb$multiply:n(((t,e)=>t*e),((t,e)=>t===JSBI.__ZERO||e===JSBI.__ZERO?0:JSBI.multiply(t,e))),nb$divide:function(t){if(!Sk.__future__.python3)return this.nb$floor_divide(t);if(!(t instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;var e=this.v,n=t.v;if(0===n)throw new Sk.builtin.ZeroDivisionError("division by zero");if("number"==typeof e&&"number"==typeof n)return new Sk.builtin.float_(e/n);if(e=_(e),n=_(n),t=JSBI.lessThan(JSBI.bitwiseXor(e,n),JSBI.__ZERO),JSBI.equal(e,JSBI.__ZERO))return new Sk.builtin.float_(t?-0:0);if(e=u(e),n=u(n),JSBI.greaterThanOrEqual(e,JSBI.multiply(k,n)))throw new Sk.builtin.OverflowError("int/int too large to represent as a float");var i=e.toString(2).length-n.toString(2).length,s=JSBI.BigInt(0>i?-i:i);if((0<=i&&JSBI.greaterThanOrEqual(e,JSBI.multiply(JSBI.exponentiate(b,s),n))||0>i&&JSBI.greaterThanOrEqual(JSBI.multiply(e,JSBI.exponentiate(b,s)),n))&&(i+=1),i=Math.max(i,g)-m,e=JSBI.leftShift(e,JSBI.BigInt(Math.max(-i,0))),n=JSBI.leftShift(n,JSBI.BigInt(Math.max(i,0))),s=JSBI.divide(e,n),e=JSBI.remainder(e,n),e=JSBI.multiply(b,e),(JSBI.greaterThan(e,n)||JSBI.equal(e,n)&&JSBI.equal(JSBI.remainder(s,b),S))&&(s=JSBI.add(s,S)),1/0===(s=JSBI.toNumber(s))||-1/0===s)throw new Sk.builtin.OverflowError("int/int too large to represent as a float");return n=s*Math.pow(2,i),new Sk.builtin.float_(t?-n:n)},nb$floor_divide:o(((t,e)=>Math.floor(t/e)),c),nb$remainder:o(((t,e)=>t-Math.floor(t/e)*e),((t,e)=>JSBI.subtract(t,JSBI.multiply(e,c(t,e))))),nb$divmod(t){const e=this.nb$floor_divide(t);return t=this.nb$remainder(t),e===Sk.builtin.NotImplemented.NotImplemented$||t===Sk.builtin.NotImplemented.NotImplemented$?Sk.builtin.NotImplemented.NotImplemented$:new Sk.builtin.tuple([e,t])},nb$and:l(((t,e)=>t&e),JSBI.bitwiseAnd),nb$or:l(((t,e)=>t|e),JSBI.bitwiseOr),nb$xor:l(((t,e)=>t^e),JSBI.bitwiseXor),nb$abs:s(Math.abs,u),nb$lshift:a(((t,e)=>{if(p(t=2*t*T[e]))return t}),JSBI.leftShift),nb$rshift:a(((t,e)=>{Math.floor(t/T[e+1])}),((t,e)=>JSBI.numberIfSafe(JSBI.signedRightShift(t,e)))),nb$invert:s((t=>Math.abs(t)JSBI.numberIfSafe(JSBI.bitwiseNot(t)))),nb$power(t,e){let n;if(void 0!==e&&Sk.builtin.checkNone(e)&&(e=void 0),!(t instanceof Sk.builtin.int_&&(void 0===e||e instanceof Sk.builtin.int_)))return Sk.builtin.NotImplemented.NotImplemented$;const i=t.nb$isnegative();if(i&&void 0===e)return this.nb$float().nb$power(t.nb$float());let s=this.v;if(t=t.v,"number"==typeof s&&"number"==typeof t){const i=Math.pow(s,t);if(p(i)&&(n=new Sk.builtin.int_(i),void 0===e))return n}if(void 0!==e){if(i)throw new Sk.builtin.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");if(0===e.v)throw new Sk.builtin.ValueError("pow() 3rd argument cannot be 0");return void 0!==n?n.nb$remainder(e):new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.powermod(_(s),_(t),_(e.v))))}return new Sk.builtin.int_(JSBI.exponentiate(_(s),_(t)))},nb$long(){return new Sk.builtin.lng(this.v)}},getsets:{real:{$get:r,$doc:"the real part of a complex number"},imag:{$get:()=>w,$doc:"the imaginary part of a complex number"},numerator:{$get:r},denominator:{$get:()=>E}},classmethods:{from_bytes:{$meth(t,e){Sk.abstr.checkArgsLen("from_bytes",t,0,2);let[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("from_bytes",["bytes","byteorder","signed"],t,e,[Sk.builtin.bool.false$]);if(t=d(i),n instanceof Sk.builtin.bytes||(n=Sk.misceval.callsimArray(Sk.builtin.bytes,[n])),Sk.misceval.isTrue(s))throw new Sk.builtin.NotImplementedError("from_bytes with signed=True is not yet implemented in Skulpt");const r=[];return n.valueOf().forEach((t=>{r.push(t.toString(16).padStart(2,"0"))})),t&&r.reverse(),t=new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.BigInt("0x"+(r.join("")||"0")))),this===Sk.builtin.int_?t:Sk.misceval.callsimArray(this,[t])},$flags:{FastCall:!0}}},methods:{conjugate:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Returns self, the complex conjugate of any int."},bit_length:{$meth(){let t=this.v;return 0===t?new Sk.builtin.int_(0):(t="number"==typeof t?Math.abs(t):u(t),new Sk.builtin.int_(t.toString(2).length))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Number of bits necessary to represent self in binary.\n\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6"},to_bytes:{$meth(t,e){Sk.abstr.checkArgsLen("to_bytes",t,0,2);let[n,i,s]=Sk.abstr.copyKeywordsToNamedArgs("to_bytes",["length","byteorder","signed"],t,e,[Sk.builtin.bool.false$]);if(t=d(i),n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),0>n)throw new Sk.builtin.ValueError("length argument must be non-negative");if(Sk.misceval.isTrue(s))throw new Sk.builtin.NotImplementedError("to_bytes with signed=True is not yet implemented in Skulpt");if(this.nb$isnegative())throw new Sk.builtin.OverflowError("can't convert negative int to unsigned");(e=JSBI.BigInt(this.v).toString(16)).length%2&&(e="0"+e);var r=e.length/2;if(r>n){if(0===n&&"00"===e)return new Sk.builtin.bytes;throw new Sk.builtin.OverflowError("int too big to convert")}const o=Array(n).fill(0);r=n-r;let a=0;for(;rMath.abs(e)?new Sk.builtin.int_(0):Sk.__future__.bankers_rounding?(e/=t,n=Math.round(e),new Sk.builtin.int_((.5==(0e||36= 2 and <= 36");if("string"==typeof e&&(e=Number(e)),"0x"===t.substring(0,2).toLowerCase()){if(16===e||0===e)t=t.substring(2),e=16;else if(34>e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}else if("0b"===t.substring(0,2).toLowerCase()){if(2===e||0===e)t=t.substring(2),e=2;else if(12>e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}else if("0o"===t.substring(0,2).toLowerCase()){if(8===e||0===e)t=t.substring(2),e=8;else if(25>e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}else if("0"===t.charAt(0)){if("0"===t)return 0;8!==e&&0!==e||(e=8)}if(0===e&&(e=10),-1!==t.indexOf("_")){if(-1!==t.indexOf("__"))throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'");t=10!==e?t.replace(y,""):t.charAt(0)+t.substring(1).replace(y,"")}if(0===t.length)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'");for(n=0;n=r?o=r-48:65<=r&&90>=r?o=r-65+10:97<=r&&122>=r&&(o=r-97+10),o>=e)throw new Sk.builtin.ValueError("invalid literal for int() with base "+e+": '"+i+"'")}if(s&&(t="-"+t),p(o=parseInt(t,e)))return o;for(i=!1,"-"===t[0]&&(i=!0,t=t.substring(1)),e=JSBI.BigInt(e),s=S,n=JSBI.__ZERO,r=t.length-1;0<=r;r--)48<=(o=t.charCodeAt(r))&&57>=o?o-=48:65<=o&&90>=o?o=o-65+10:97<=o&&122>=o&&(o=o-97+10),o=JSBI.multiply(JSBI.BigInt(o),s),n=JSBI.add(n,o),s=JSBI.multiply(s,e);return i&&(n=JSBI.multiply(n,JSBI.BigInt(-1))),n},Sk.builtin.int_.py2$methods={},Sk.longFromStr=function(t,e){return Sk.__future__.python3?new Sk.builtin.int_(h(t)):(t=Sk.str2number(t,e),new Sk.builtin.lng(t))},Sk.exportSymbol("Sk.longFromStr",Sk.longFromStr),Sk.builtin.int_.withinThreshold=p,Sk.builtin.int_.stringToNumberOrBig=h;const T=[.5,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,0x800000000000,281474976710656,562949953421312,0x4000000000000,0x8000000000000,4503599627370496,9007199254740992];Sk.builtin.lng=Sk.abstr.buildNativeClass("long",{base:Sk.builtin.int_,constructor:function(t){void 0!==(t=Sk.builtin.int_.call(this,t))&&(this.v=t.v)},slots:{$r(){return new Sk.builtin.str(this.v.toString()+"L")},tp$as_number:!0,nb$negative(){return new Sk.builtin.lng(v.nb$negative.call(this).v)},nb$positive(){return new Sk.builtin.lng(v.nb$positive.call(this).v)}}});const v=Sk.builtin.int_.prototype,$=[];for(t=-5;257>t;t++)$[t]=Object.create(Sk.builtin.int_.prototype,{v:{value:t}});const w=$[0],E=$[1]},function(t,e){const n=Sk.builtin.int_.prototype;Sk.builtin.bool=Sk.abstr.buildNativeClass("bool",{constructor:function(t){return Sk.misceval.isTrue(t)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},base:Sk.builtin.int_,slots:{tp$doc:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",tp$new:(t,e)=>(Sk.abstr.checkNoKwargs("bool",e),Sk.abstr.checkArgsLen("bool",t,0,1),new Sk.builtin.bool(t[0])),$r(){return this.v?this.str$True:this.str$False},tp$as_number:!0,nb$and(t){return t.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v&t.v):n.nb$and.call(this,t)},nb$or(t){return t.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v|t.v):n.nb$or.call(this,t)},nb$xor(t){return t.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v^t.v):n.nb$xor.call(this,t)}},flags:{sk$unacceptableBase:!0},methods:{__format__:{$meth(){return this.$r()},$flags:{OneArg:!0}}},proto:{str$False:new Sk.builtin.str("False"),str$True:new Sk.builtin.str("True"),valueOf(){return!!this.v}}}),Sk.exportSymbol("Sk.builtin.bool",Sk.builtin.bool),Sk.builtin.bool.true$=Object.create(Sk.builtin.bool.prototype,{v:{value:1,enumerable:!0}}),Sk.builtin.bool.false$=Object.create(Sk.builtin.bool.prototype,{v:{value:0,enumerable:!0}})},function(t,e){function n(t){const e=[t,0];if(0===t)return e;var n=Math.abs(t);let i=Math.max(-1023,Math.floor(Math.log2(n))+1);for(n*=Math.pow(2,-i);.5>n;)n*=2,i--;for(;1<=n;)n*=.5,i++;return 0>t&&(n=-n),e[0]=n,e[1]=i,e}function i(){return new Sk.builtin.float_(this.v)}function s(t){return function(e){const n=this.v;if("number"!=typeof(e=e.v)){if(!JSBI.__isBigInt(e))return Sk.builtin.NotImplemented.NotImplemented$;if(1/0==(e=parseFloat(JSBI.toNumber(e)))||-1/0==e)throw new Sk.builtin.OverflowError("int too large to convert to float")}return t(n,e)}}function r(t,e){return function(n){const i=this.v;if("number"!=typeof(n=n.v)){if(!JSBI.__isBigInt(n))return Sk.builtin.NotImplemented.NotImplemented$;if(void 0!==e)return e(i,n)}return t(i,n)}}function o(t){const e=s(t);return function(t,n){if(void 0!==n&&!Sk.builtin.checkNone(n))throw new Sk.builtin.TypeError("pow() 3rd argument not allowed unless all arguments are integers");return e.call(this,t)}}function a(t,e){if(0===e)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return 1/0===t?1/0===e||-1/0===t?new Sk.builtin.float_(NaN):0>e?new Sk.builtin.float_(-1/0):new Sk.builtin.float_(1/0):-1/0===t?1/0===e||-1/0===t?new Sk.builtin.float_(NaN):0>e?new Sk.builtin.float_(1/0):new Sk.builtin.float_(-1/0):new Sk.builtin.float_(t/e)}function l(t,e){if(1/0===t||-1/0===t)return new Sk.builtin.float_(NaN);if(0===e)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return 1/0===e?0>t?new Sk.builtin.float_(-1):new Sk.builtin.float_(0):-1/0===e?0>t||0!==t?new Sk.builtin.float_(0):new Sk.builtin.float_(-1):new Sk.builtin.float_(Math.floor(t/e))}function u(t,e){if(0===e)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if(0===t)return new Sk.builtin.float_(0);if(1/0===e)return 1/0===t||-1/0===t?new Sk.builtin.float_(NaN):0t?0n&&(n+=e):0>e&&0!==n&&(n+=e),0===n&&(0>e?n=-0:-1/0==1/0/n&&(n=0)),new Sk.builtin.float_(n)}function c(t,e){if(0>t&&0!=e%1)return new Sk.builtin.complex(t,0).nb$power(new Sk.builtin.complex(e,0));if(0===t&&0>e)throw new Sk.builtin.ZeroDivisionError("0.0 cannot be raised to a negative power");const n=Math.pow(t,e);if(1/0===Math.abs(n)&&1/0!==Math.abs(t)&&1/0!==Math.abs(e))throw new Sk.builtin.OverflowError("Numerical result out of range");return new Sk.builtin.float_(n)}Sk.builtin.float_=Sk.abstr.buildNativeClass("float",{constructor:function(t){if(Sk.asserts.assert(this instanceof Sk.builtin.float_,"bad call to float use 'new'"),"number"==typeof t)this.v=t;else if(void 0===t)this.v=0;else if("string"==typeof t)this.v=parseFloat(t);else{if(t.nb$float)return t.nb$float();Sk.asserts.fail("bad argument to float constructor")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$doc:"Convert a string or number to a floating point number, if possible.",tp$hash(){var t=this.v;if(!Number.isFinite(t))return Number.isNaN(t)?0:0e&&(t=-1,e=-e);let s,r=0;for(;e;)r=r<<28&536870911|r>>1,e*=268435456,i-=28,s=Math.trunc(e),e-=s,r+=s,536870911<=r&&(r-=536870911);return i=0<=i?i%29:28-(-1-i)%29,r=(r<>29-i)*t,-1===r?-2:r},$r(){return new Sk.builtin.str(this.str$(10,!0))},tp$new(t,e){if(e&&e.length)throw new Sk.builtin.TypeError("float() takes no keyword arguments");if(t&&1t?Math.ceil(t):Math.floor(t),Sk.builtin.int_.withinThreshold(t)?new Sk.builtin.int_(t):new Sk.builtin.int_(JSBI.BigInt(t))},nb$float:i,nb$long(){return new Sk.builtin.lng(this.nb$int().v)},nb$add:s(((t,e)=>new Sk.builtin.float_(t+e))),nb$subtract:s(((t,e)=>new Sk.builtin.float_(t-e))),nb$reflected_subtract:s(((t,e)=>new Sk.builtin.float_(e-t))),nb$multiply:s(((t,e)=>new Sk.builtin.float_(t*e))),nb$divide:s(a),nb$reflected_divide:s(((t,e)=>a(e,t))),nb$floor_divide:s(l),nb$reflected_floor_divide:s(((t,e)=>l(e,t))),nb$remainder:s(u),nb$reflected_remainder:s(((t,e)=>u(e,t))),nb$divmod:s(((t,e)=>new Sk.builtin.tuple([l(t,e),u(t,e)]))),nb$reflected_divmod:s(((t,e)=>new Sk.builtin.tuple([l(e,t),u(e,t)]))),nb$power:o(c),nb$reflected_power:o(((t,e)=>c(e,t))),nb$abs(){return new Sk.builtin.float_(Math.abs(this.v))},nb$negative(){return new Sk.builtin.float_(-this.v)},nb$positive(){return new Sk.builtin.float_(this.v)},nb$bool(){return 0!==this.v},nb$isnegative(){return 0>this.v},nb$ispositive(){return 0<=this.v},ob$eq:r(((t,e)=>t==e),JSBI.EQ),ob$ne:r(((t,e)=>t!=e),JSBI.NE),ob$gt:r(((t,e)=>t>e),JSBI.GT),ob$ge:r(((t,e)=>t>=e),JSBI.GE),ob$lt:r(((t,e)=>tt<=e),JSBI.LE)},getsets:{real:{$get:i,$doc:"the real part of a complex number"},imag:{$get:()=>new Sk.builtin.float_(0),$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:i,$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return self, the complex conjugate of any float."},__trunc__:{$meth(){return this.nb$int()},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return the Integral closest to x between 0 and x."},__round__:{$meth(t){return this.round$(t)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, ndigits=None, /)",$doc:"Return the Integral closest to x, rounding half toward even.\n\nWhen an argument is passed, work like built-in round(x, ndigits)."},as_integer_ratio:{$meth(){if(!Number.isFinite(this.v)){if(Number.isNaN(this.v))throw new Sk.builtin.ValueError("cannot convert NaN to integer ratio");throw new Sk.builtin.OverflowError("cannot convert Infinity to integer ratio")}let[t,e]=n(this.v);for(var i=0;300>i&&t!=Math.floor(t);i++)t*=2,e--;i=new Sk.builtin.int_(Math.abs(e));let s=new Sk.builtin.int_(t),r=new Sk.builtin.int_(1);return 0>> (10.0).as_integer_ratio()\n(10, 1)\n>>> (0.0).as_integer_ratio()\n(0, 1)\n>>> (-.25).as_integer_ratio()\n(-1, 4)"},is_integer:{$meth(){return new Sk.builtin.bool(Number.isInteger(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the float is an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([this])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!0),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{valueOf(){return this.v}}});const p=/_[eE]|[eE]_|\._|_\.|[+-]_|__/,h=/_(?=[^_])/g;Sk.builtin.float_.PyFloat_Check=function(t){return void 0!==t&&!!(Sk.builtin.checkNumber(t)||Sk.builtin.checkFloat(t)||t.ob$type.$isSubType(Sk.builtin.float_))},Sk.builtin.float_.prototype.toFixed=function(t){return t=Sk.builtin.asnum$(t),this.v.toFixed(t)},Sk.builtin.float_.prototype.round$=function(t){var e=Sk.builtin.asnum$(this),n=void 0===t?0:Sk.misceval.asIndexSized(t);if(Sk.__future__.bankers_rounding){e*=Math.pow(10,n);var i=Math.round(e);return n=(.5==(0n.length?e.toExponential():e.toExponential(11)),0>n.indexOf("e")&&0<=n.indexOf(".")){for(;"0"==n.charAt(n.length-1);)n=n.substring(0,n.length-1);"."==n.charAt(n.length-1)&&(n+="0")}n=(n=(n=n.replace(/\.0+e/,"e","i")).replace(/(e[-+])([1-9])$/,"$10$2")).replace(/0+(e.*)/,"$1")}else n=e.toString(t);return 0===this.v&&-1/0==1/this.v&&(n="-"+n),0>n.indexOf(".")&&0>n.indexOf("E")&&0>n.indexOf("e")&&(n+=".0"),n},Sk.builtin.float_.py2$methods={}},function(t,e){function n(t){let e=t.v;if("number"==typeof e)return e;if(t.nb$float&&(e=t.nb$float()),void 0===e)throw new Sk.builtin.TypeError("a float is required");return e.v}function i(t,e,n){return n===Sk.builtin.complex.prototype?new Sk.builtin.complex(t,e):(n=new n.constructor,Sk.builtin.complex.call(n,t,e),n)}function s(t,e){return function(n){const i=this.real,s=this.imag;var r=n.real;const o=n.v;if("number"==typeof r)n=n.imag;else if("number"==typeof o)r=o,n=0;else{if(!JSBI.__isBigInt(o))return Sk.builtin.NotImplemented.NotImplemented$;if(void 0===e){if(1/0==(r=parseFloat(JSBI.toNumber(o)))||-1/0==r)throw new Sk.builtin.OverflowError("int too large to convert to float")}else r=o.toString();n=0}return t(i,s,r,n)}}function r(t,e,n,i){var s=Math.abs(n);const r=Math.abs(i);if(s>=r){if(0===s)throw new Sk.builtin.ZeroDivisionError("complex division by zero");i=(t+e*(s=i/n))/(n+=i*s),t=(e-t*s)/n}else r>=s?(n=n*(s=n/i)+i,Sk.asserts.assert(0!==i),i=(t*s+e)/n,t=(e*s-t)/n):t=i=NaN;return new Sk.builtin.complex(i,t)}function o(t,e,n,i){if(0===n&&0===i){i=1;var s=0}else if(0===t&&0===e){if(0!==i||0>n)throw new Sk.builtin.ZeroDivisionError("complex division by zero");s=i=0}else{const r=Math.hypot(t,e);s=Math.pow(r,n),n*=t=Math.atan2(e,t),0!==i&&(s/=Math.exp(t*i),n+=i*Math.log(r)),i=s*Math.cos(n),s*=Math.sin(n)}return new Sk.builtin.complex(i,s)}function a(t,e,n){let i=1;var s=new Sk.builtin.complex(1,0);for(t=new Sk.builtin.complex(t,e);0=i;)n&i&&(s=new Sk.builtin.complex(s.real*t.real-s.imag*t.imag,s.real*t.imag+t.real*s.imag)),i<<=1,t=new Sk.builtin.complex(t.real*t.real-t.imag*t.imag,2*t.real*t.imag);return s}function l(t,e,n,i,s){switch(s=!1,e){case"e":case"f":case"g":break;case"E":s=!0,e="e";break;case"F":s=!0,e="f";break;case"r":if(0!==n)throw Error("Bad internall call");n=17,e="g";break;default:throw Error("Bad internall call")}if(isNaN(t))t="nan";else if(1/0===t)t="inf";else if(-1/0===t)t="-inf";else{i&l.Py_DTSF_ADD_DOT_0&&(e="g");var r="%"+(i&l.Py_DTSF_ALT?"#":"");null!=n&&(r=r+"."+n),t=(t=(r=new Sk.builtin.str(r+e)).nb$remainder(new Sk.builtin.float_(t))).v}return i&l.Py_DTSF_SIGN&&"-"!==t[0]&&(t="+"+t),s&&(t=t.toUpperCase()),t}Sk.builtin.complex=Sk.abstr.buildNativeClass("complex",{constructor:function(t,e){Sk.asserts.assert(this instanceof Sk.builtin.complex,"bad call to complex constructor, use 'new'"),this.real=t,this.imag=e},slots:{tp$as_number:!0,tp$doc:"Create a complex number from a real part and an optional imaginary part.\n\nThis is equivalent to (real + imag*1j) where imag defaults to 0.",tp$hash(){var t=new Sk.builtin.float_(this.real).tp$hash();return t=1003*new Sk.builtin.float_(this.imag).tp$hash()+t,Sk.builtin.int_.withinThreshold(t)?t:new Sk.builtin.int_(JSBI.BigInt(t)).tp$hash()},tp$getattr:Sk.generic.getAttr,tp$new(t,e){{var s,r=(t=Sk.abstr.copyKeywordsToNamedArgs("complex",["real","imag"],t,e,[null,null]))[1];let a=e=!1;var o=t[0];if(null!=o&&o.constructor===Sk.builtin.complex&&null==r)e=o;else if(Sk.builtin.checkString(o)){if(null!=r)throw new Sk.builtin.TypeError("complex() can't take second arg if first is a string");e=Sk.builtin.complex.complex_subtype_from_string(o,this)}else{if(null!=r&&Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("complex() second arg can't be a string");if(null==o?t=null:t=void 0!==(t=Sk.abstr.lookupSpecial(o,Sk.builtin.str.$complex))?Sk.misceval.callsimArray(t,[]):null,null!=t&&t!==Sk.builtin.NotImplemented.NotImplemented$){if(!u(t))throw new Sk.builtin.TypeError("__complex__ should return a complex object");o=t}if(null!=o&&void 0===o.nb$float)throw new Sk.builtin.TypeError("complex() first argument must be a string or a number, not '"+Sk.abstr.typeName(o)+"'");if(null!=r&&void 0===r.nb$float)throw new Sk.builtin.TypeError("complex() second argument must be a number, not '"+Sk.abstr.typeName(o)+"'");null==o?o=t=0:u(o)?(t=o.real,o=o.imag,e=!0):(t=n(o),o=0),null==r?r=s=0:u(r)?(s=r.real,r=r.imag,a=!0):(s=n(r),r=0),!0===a&&(t-=r),!0===e&&(s+=o),e=i(t,s,this)}}return e},tp$richcompare(t,e){if("Eq"!==e&&"NotEq"!==e){if(Sk.builtin.checkNumber(t)||u(t))throw new Sk.builtin.TypeError("no ordering relation is defined for complex numbers");return Sk.builtin.NotImplemented.NotImplemented$}return s((function(t,n,i,s){return t=t==i&&n==s,"Eq"===e?t:!t}),!0).call(this,t)},$r(){{var t,e;let s=t="";var n=this.real,i=this.imag;(e=0===n)&&(e=1==(n?0>n?-1:1:0>1/n?-1:1)),e?(n="",e=l(i,"g",null,0,null)):(n=t=l(n,"g",null,0,null),e=l(i,"g",null,l.Py_DTSF_SIGN,null),0===i&&-1/0==1/i&&e&&"-"!==e[0]&&(e="-"+e),t="(",s=")"),i=new Sk.builtin.str(""+t+n+e+"j"+s)}return i},nb$int(){throw new Sk.builtin.TypeError("can't convert complex to int")},nb$long(){throw new Sk.builtin.TypeError("can't convert complex to long")},nb$float(){throw new Sk.builtin.TypeError("can't convert complex to float")},nb$positive(){return new Sk.builtin.complex(this.real,this.imag)},nb$negative(){return new Sk.builtin.complex(-this.real,-this.imag)},nb$bool(){return this.real||this.imag},nb$add:s(((t,e,n,i)=>new Sk.builtin.complex(t+n,e+i))),nb$subtract:s(((t,e,n,i)=>new Sk.builtin.complex(t-n,e-i))),nb$reflected_subtract:s(((t,e,n,i)=>new Sk.builtin.complex(n-t,i-e))),nb$multiply:s(((t,e,n,i)=>new Sk.builtin.complex(n*t-i*e,t*i+e*n))),nb$divide:s(r),nb$reflected_divide:s(((t,e,n,i)=>r(n,i,t,e))),nb$floor_divide(t){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$reflected_floor_divide(t){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$remainder(t){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$reflected_remainder(t){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$divmod(t){throw new Sk.builtin.TypeError("can't take floor or mod of complex number.")},nb$power(t,e){if(null!=e&&!Sk.builtin.checkNone(e))throw new Sk.builtin.ValueError("complex modulo");return _.call(this,t)},nb$reflected_power(t,e){if(null!=e&&!Sk.builtin.checkNone(e))throw new Sk.builtin.ValueError("complex modulo");return d.call(this,t)},nb$abs(){var t=this.real;const e=this.imag;if(!Number.isFinite(t)||!Number.isFinite(e))return 1/0===t||-1/0===t?new Sk.builtin.float_(Math.abs(t)):1/0===e||-1/0===e?new Sk.builtin.float_(Math.abs(e)):new Sk.builtin.float_(NaN);if(t=Math.hypot(t,e),!Number.isFinite(t))throw new Sk.builtin.OverflowError("absolute value too large");return new Sk.builtin.float_(t)}},getsets:{real:{$get(){return new Sk.builtin.float_(this.real)},$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(this.imag)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth(){return new Sk.builtin.complex(this.real,-this.imag)},$flags:{NoArgs:!0},$textsig:null,$doc:"complex.conjugate() -> complex\n\nReturn the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.float_(this.real),new Sk.builtin.float_(this.imag)])},$flags:{NoArgs:!0},$textsig:null,$doc:Sk.builtin.none.none$},__format__:{$meth(t){if(Sk.builtin.checkString(t))throw new Sk.builtin.NotImplementedError("__format__ is not implemented for complex type.");throw new Sk.builtin.TypeError("__format__ requires str")},$flags:{OneArg:!0},$textsig:null,$doc:"complex.__format__() -> str\n\nConvert to a string according to format_spec."}}}),Sk.exportSymbol("Sk.builtin.complex",Sk.builtin.complex);const u=Sk.builtin.checkComplex,c=/_[eE]|[eE]_|\._|_\.|[+-]_|_j|j_/,p=/_(?=[^_])/g;Sk.builtin.complex.complex_subtype_from_string=function(t,e){e=e||Sk.builtin.complex.prototype;var n=0,s=0,r=!1;if(Sk.builtin.checkString(t))t=Sk.ffi.remapToJs(t);else if("string"!=typeof t)throw new TypeError("provided unsupported string-alike argument");if(-1!==t.indexOf("\0")||0===t.length||""===t)throw new Sk.builtin.ValueError("complex() arg is a malformed string");var o=0;for(t=(t=t.replace(/inf|infinity/gi,"Infinity")).replace(/nan/gi,"NaN");" "===t[o];)o++;if("("===t[o])for(r=!0,o++;" "===t[o];)o++;if(-1!==t.indexOf("_")){if(c.test(t))throw new Sk.builtin.ValueError("could not convert string to complex: '"+t+"'");t=t.charAt(0)+t.substring(1).replace(p,"")}var a=/^(?:[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[eE][+-]?\d+)?|NaN|Infinity))/,l=t.substr(o),u=l.match(a);if(null!==u)if("j"===t[o+=u[0].length]||"J"===t[o])s=parseFloat(u[0]),o++;else if("+"===t[o]||"-"===t[o]){if(n=parseFloat(u[0]),null!==(u=t.substr(o).match(a))?(s=parseFloat(u[0]),o+=u[0].length):(s="+"===t[o]?1:-1,o++),"j"!==t[o]&&"J"!==t[o])throw new Sk.builtin.ValueError("complex() arg is malformed string");o++}else n=parseFloat(u[0]);else null!==(u=u=l.match(/^([+-]?[jJ])/))&&(s=1===u[0].length||"+"===u[0][0]?1:-1,o+=u[0].length);for(;" "===t[o];)o++;if(r){if(")"!==t[o])throw new Sk.builtin.ValueError("complex() arg is malformed string");for(o++;" "===t[o];)o++}if(t.length!==o)throw new Sk.builtin.ValueError("complex() arg is malformed string");return i(n,s,e)};const h=(t,e,n,i)=>{const s=0|n;return 0===i&&n===s?(100s?t=o(t,e,s,0):0h(n,i,t,e)));l.Py_DTSF_SIGN=1,l.Py_DTSF_ADD_DOT_0=2,l.Py_DTSF_ALT=4,l.Py_DTST_FINITE=0,l.Py_DTST_INFINITE=1,l.Py_DTST_NAN=2},function(t,e){Sk.builtin.slice=Sk.abstr.buildNativeClass("slice",{constructor:function(t,e,n){void 0===e&&void 0===n&&(e=t,t=Sk.builtin.none.none$),void 0===e&&(e=Sk.builtin.none.none$),void 0===n&&(n=Sk.builtin.none.none$),this.start=t,this.stop=e,this.step=n},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"slice(stop)\nslice(start, stop[, step])\n\nCreate a slice object. This is used for extended slicing (e.g. a[0:10:2]).",tp$hash:Sk.builtin.none.none$,tp$new:(t,e)=>(Sk.abstr.checkNoKwargs("slice",e),Sk.abstr.checkArgsLen("slice",t,1,3),new Sk.builtin.slice(...t)),$r(){const t=Sk.misceval.objectRepr(this.start),e=Sk.misceval.objectRepr(this.stop),n=Sk.misceval.objectRepr(this.step);return new Sk.builtin.str("slice("+t+", "+e+", "+n+")")},tp$richcompare(t,e){if(t.ob$type!==Sk.builtin.slice)return Sk.builtin.NotImplemented.NotImplemented$;const n=new Sk.builtin.tuple([this.start,this.stop,this.step]);return t=new Sk.builtin.tuple([t.start,t.stop,t.step]),n.tp$richcompare(t,e)}},getsets:{start:{$get(){return this.start}},step:{$get(){return this.step}},stop:{$get(){return this.stop}}},methods:{indices:{$meth:function(t){if(0>(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError)))throw new Sk.builtin.TypeError("length should not be negative");const{start:e,stop:n,step:i}=this.slice$indices(t);return new Sk.builtin.tuple([new Sk.builtin.int_(e),new Sk.builtin.int_(n),new Sk.builtin.int_(i)])},$doc:"S.indices(len) -> (start, stop, stride)\n\nAssuming a sequence of length len, calculate the start and stop\nindices, and the stride length of the extended slice described by\nS. Out of bounds indices are clipped in a manner consistent with the\nhandling of normal slices.",$textsig:null,$flags:{OneArg:!0}}},proto:{slice$as_indices(t){let e;var n=t?t=>Sk.misceval.asIndexSized(t,null,"slice indices must be integers or None or have an __index__ method"):t=>Sk.misceval.asIndexOrThrow(t,"slice indices must be integers or None or have an __index__ method");if(Sk.builtin.checkNone(this.step))e=1;else if(e=n(this.step),0===e)throw new Sk.builtin.ValueError("slice step cannot be zero");return{start:t=Sk.builtin.checkNone(this.start)?null:n(this.start),stop:n=Sk.builtin.checkNone(this.stop)?null:n(this.stop),step:e}},$wrt:(t,e,n,i,s)=>(s=s?e=>JSBI.__isBigInt(e)?JSBI.add(e,JSBI.BigInt(t)):e+t:e=>e+t,0e&&(0>(e=s(e))&&(e=0)),null===n||n>t?n=t:0>n&&(n=s(n))):(null===e||e>=t?e=t-1:0>e&&(e=s(e)),null===n?n=-1:0>n&&(0>(n=s(n))&&(n=-1))),{start:e,stop:n,step:i}),slice$indices(t,e){let{start:n,stop:i,step:s}=this.slice$as_indices(!0,e);return this.$wrt(t,n,i,s,e)},sssiter$(t,e){let{start:n,stop:i,step:s}=this.slice$indices(t,!0);if(0i;t+=s)e(t)}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.slice.startEnd$wrt=function(t,e,n){return t=t.sq$length(),void 0===e||Sk.builtin.checkNone(e)?e=0:0>(e=Sk.misceval.asIndexSized(e,null,"slice indices must be integers or have an __index__ method"))&&(0>(e+=t)&&(e=0)),void 0===n||Sk.builtin.checkNone(n)?n=t:0>(n=Sk.misceval.asIndexSized(n,null,"slice indices must be integers or have an __index__ method"))?0>(n+=t)&&(n=0):n>t&&(n=t),{start:e,end:n}}},function(t,e){function n(t){return function(e){return Sk.builtin.checkAnySet(e)?t.call(this,e):Sk.builtin.NotImplemented.NotImplemented$}}function i(t){return t instanceof Sk.builtin.set&&t.tp$hash===Sk.builtin.none.none$&&(t=new Sk.builtin.frozenset(Sk.misceval.arrayFromIterable(t))),t}t={},Sk.builtin.set=Sk.abstr.buildNativeClass("set",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.set,"Bad call to set - must be called with an Array and 'new'");const e=[];for(let n=0;n new empty set object\nset(iterable) -> new set object\n\nBuild an unordered collection of unique elements.",tp$init(t,e){return Sk.abstr.checkNoKwargs("set",e),Sk.abstr.checkArgsLen("set",t,0,1),this.set$clear(),(t=t[0])&&this.set$update(t)},tp$new:Sk.generic.new,$r(){if(this.in$repr)return new Sk.builtin.str(Sk.abstr.typeName(this)+"(...)");this.in$repr=!0;const t=this.sk$asarray().map((t=>Sk.misceval.objectRepr(t)));return this.in$repr=!1,Sk.__future__.python3?0===t.length?new Sk.builtin.str(Sk.abstr.typeName(this)+"()"):this.ob$type!==Sk.builtin.set?new Sk.builtin.str(Sk.abstr.typeName(this)+"({"+t.join(", ")+"})"):new Sk.builtin.str("{"+t.join(", ")+"}"):new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+t.join(", ")+"])")},tp$iter(){return new s(this)},tp$richcompare(t,e){if(!Sk.builtin.checkAnySet(t))return Sk.builtin.NotImplemented.NotImplemented$;switch(e){case"NotEq":case"Eq":return t=this===t||this.get$size()===t.get$size()&&Sk.misceval.isTrue(this.set$issubset(t)),"Eq"===e?t:!t;case"LtE":return this===t||Sk.misceval.isTrue(this.set$issubset(t));case"GtE":return this===t||Sk.misceval.isTrue(t.set$issubset(this));case"Lt":return this.get$size()t.get$size()&&Sk.misceval.isTrue(t.set$issubset(this))}},nb$subtract:n((function(t){return this.difference.$meth.call(this,t)})),nb$and:n((function(t){return this.intersection.$meth.call(this,t)})),nb$or:n((function(t){return this.union.$meth.call(this,t)})),nb$xor:n((function(t){return this.symmetric_difference.$meth.call(this,t)})),nb$inplace_subtract:n((function(t){return t===this&&(t=t.set$copy()),Sk.misceval.chain(this.difference_update.$meth.call(this,t),(()=>this))})),nb$inplace_and:n((function(t){return Sk.misceval.chain(this.intersection_update.$meth.call(this,t),(()=>this))})),nb$inplace_or:n((function(t){return Sk.misceval.chain(this.update.$meth.call(this,t),(()=>this))})),nb$inplace_xor:n((function(t){return t===this&&(t=t.set$copy()),Sk.misceval.chain(this.symmetric_difference_update.$meth.call(this,t),(()=>this))})),sq$length(){return this.get$size()},sq$contains(t){return t=i(t),this.v.sq$contains(t)}},methods:{add:{$meth(t){return this.set$add(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Add an element to a set.\n\nThis has no effect if the element is already present."},clear:{$meth(){return this.set$clear(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove all elements from this set."},copy:{$meth(){return this.set$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a shallow copy of a set."},discard:{$meth(t){return t=i(t),this.set$discard(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set if it is a member.\n\nIf the element is not a member, do nothing."},difference:{$meth(...t){const e=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>e.set$difference_update(t))),(()=>e))},$flags:{MinArgs:0},$textsig:null,$doc:"Return the difference of two or more sets as a new set.\n\n(i.e. all elements that are in this set but not the others.)"},difference_update:{$meth(...t){return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>this.set$difference_update(t))),(()=>Sk.builtin.none.none$))},$flags:{MinArgs:0},$textsig:null,$doc:"Remove all elements of another set from this set."},intersection:{$meth(...t){return this.set$intersection_multi(...t)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the intersection of two sets as a new set.\n\n(i.e. all elements that are in both sets.)"},intersection_update:{$meth(...t){return Sk.misceval.chain(this.set$intersection_multi(...t),(t=>(this.swap$bodies(t),Sk.builtin.none.none$)))},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the intersection of itself and another."},isdisjoint:{$meth(t){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{if(this.sq$contains(t))return new Sk.misceval.Break(Sk.builtin.bool.false$)})),(t=>t||Sk.builtin.bool.true$))},$flags:{OneArg:!0},$textsig:null,$doc:"Return True if two sets have a null intersection."},issubset:{$meth(t){return Sk.builtin.checkAnySet(t)||(t=this.set$make_basetype(t)),Sk.misceval.chain(t,(t=>this.set$issubset(t)))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether another set contains this set."},issuperset:{$meth(t){return Sk.builtin.checkAnySet(t)||(t=this.set$make_basetype(t)),Sk.misceval.chain(t,(t=>t.set$issubset(this)))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether this set contains another set."},pop:{$meth(){if(0===this.get$size())throw new Sk.builtin.KeyError("pop from an empty set");return Sk.misceval.callsimArray(this.v.popitem,[this.v]).v[0]},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return an arbitrary set element.\nRaises KeyError if the set is empty."},remove:{$meth(t){const e=i(t);if(this.v.mp$lookup(e))return this.v.mp$ass_subscript(e),Sk.builtin.none.none$;throw new Sk.builtin.KeyError(t)},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set; it must be a member.\n\nIf the element is not a member, raise a KeyError."},symmetric_difference:{$meth(t){let e;return Sk.misceval.chain(this.set$make_basetype(t),(t=>(e=t,e.set$symmetric_diff_update(this))),(()=>e))},$flags:{OneArg:!0},$textsig:null,$doc:"Return the symmetric difference of two sets as a new set.\n\n(i.e. all elements that are in exactly one of the sets.)"},symmetric_difference_update:{$meth(t){return Sk.builtin.checkAnySet(t)||(t=this.set$make_basetype(t)),Sk.misceval.chain(t,(t=>this.set$symmetric_diff_update(t)),(()=>Sk.builtin.none.none$))},$flags:{OneArg:!0},$textsig:null,$doc:"Update a set with the symmetric difference of itself and another."},union:{$meth(...t){const e=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>e.set$update(t))),(()=>e))},$flags:{MinArgs:0},$textsig:null,$doc:"Return the union of sets as a new set.\n\n(i.e. all elements that are in either set.)"},update:{$meth(...t){return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>this.set$update(t))),(()=>Sk.builtin.none.none$))},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the union of itself and others."}},classmethods:Sk.generic.classGetItem,proto:Object.assign(t,{sk$asarray(){return this.v.sk$asarray()},get$size(){return this.v.sq$length()},set$add(t){this.v.mp$ass_subscript(t,!0)},set$make_basetype(t){return Sk.misceval.chain(Sk.misceval.arrayFromIterable(t,!0),(t=>new this.sk$builtinBase(t)))},set$discard(t){return this.v.pop$item(t)},set$clear(){this.v=new Sk.builtin.dict([])},set$copy(){const t=new this.sk$builtinBase;return t.v=this.v.dict$copy(),t},set$difference_update(t){return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.set$discard(t)}))},set$intersection(t){const e=new this.sk$builtinBase;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.sq$contains(t)&&e.set$add(t)})),(()=>e))},set$intersection_multi(...t){if(!t.length)return this.set$copy();let e=this;return Sk.misceval.chain(Sk.misceval.iterArray(t,(t=>Sk.misceval.chain(e.set$intersection(t),(t=>{e=t})))),(()=>e))},set$issubset(t){if(this.get$size()>t.get$size())return Sk.builtin.bool.false$;for(let e=this.tp$iter(),n=e.tp$iternext();void 0!==n;n=e.tp$iternext())if(!t.sq$contains(n))return Sk.builtin.bool.false$;return Sk.builtin.bool.true$},set$symmetric_diff_update(t){return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{void 0===this.set$discard(t)&&this.set$add(t)}))},set$update(t){return Sk.misceval.iterFor(Sk.abstr.iter(t),(t=>{this.set$add(t)}))},swap$bodies(t){this.v=t.v}})}),Sk.exportSymbol("Sk.builtin.set",Sk.builtin.set),e=Sk.builtin.set.prototype,Sk.builtin.frozenset=Sk.abstr.buildNativeClass("frozenset",{constructor:function(t){void 0===t?t=[]:Array.isArray(t)||(t=Sk.misceval.arrayFromIterable(t)),Sk.asserts.assert(this instanceof Sk.builtin.frozenset,"bad call to frozen set - must be called with 'new'");const e=[];for(let n=0;n empty frozenset object\nfrozenset(iterable) -> frozenset object\n\nBuild an immutable unordered collection of unique elements.",tp$hash(){let t=1927868237;const e=this.sk$asarray();t*=e.length+1;for(let n=0;nt.length?new Sk.builtin.frozenset(t):Sk.builtin.frozenset.$emptyset)))},$r:e.$r,tp$iter:e.tp$iter,tp$richcompare:e.tp$richcompare,nb$subtract:e.nb$subtract,nb$and:e.nb$and,nb$or:e.nb$or,nb$xor:e.nb$xor,sq$length:e.sq$length,sq$contains:e.sq$contains},methods:{copy:Object.assign({},e.copy.d$def,{$meth(){return this.constructor===this.sk$builtinBase?this:new Sk.builtin.frozenset(this.sk$asarray())}}),difference:e.difference.d$def,intersection:e.intersection.d$def,isdisjoint:e.isdisjoint.d$def,issubset:e.issubset.d$def,issuperset:e.issuperset.d$def,symmetric_difference:e.symmetric_difference.d$def,union:e.union.d$def},classmethods:Sk.generic.classGetItem,proto:Object.assign({$subtype_new(t,e){const n=new this.constructor;return Sk.misceval.chain(Sk.builtin.frozenset.prototype.tp$new(t),(t=>(n.v=t.v,n)))}},t)}),Sk.builtin.frozenset.$emptyset=new Sk.builtin.frozenset([]),Sk.exportSymbol("Sk.builtin.frozenset",Sk.builtin.frozenset);var s=Sk.abstr.buildIteratorClass("set_iterator",{constructor:function(t){this.$index=0,this.$seq=t.sk$asarray(),this.$orig=t},iternext:Sk.generic.iterNextWithArrayCheckSize,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}})},function(t,e){Sk.builtin.print=function(t,e){let n,[i,s,r]=Sk.abstr.copyKeywordsToNamedArgs("print",["sep","end","file","flush"],[],e);if(void 0===i||Sk.builtin.checkNone(i))i=" ";else{if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("sep must be None or a string, not "+Sk.abstr.typeName(i));i=i.$jsstr()}if(void 0===s||Sk.builtin.checkNone(s))s="\n";else{if(!Sk.builtin.checkString(s))throw new Sk.builtin.TypeError("end must be None or a string, not "+Sk.abstr.typeName(s));s=s.$jsstr()}if(void 0!==r&&!Sk.builtin.checkNone(r)&&(n=Sk.abstr.lookupSpecial(r,Sk.builtin.str.$write),void 0===n))throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(r)+"' object has no attribute 'write'");const o=new Sk.builtin.str(t.map((t=>new Sk.builtin.str(t).toString())).join(i)+s);if(void 0===n)return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(t=>(n=Sk.abstr.lookupSpecial(t.$d.stdout,Sk.builtin.str.$write))&&Sk.misceval.callsimOrSuspendArray(n,[o])));Sk.misceval.callsimArray(n,[o])},Sk.builtin.print.co_fastcall=1},function(t,e){Sk.builtin.module=Sk.abstr.buildNativeClass("module",{constructor:function(){this.$d={}},slots:{tp$doc:"Create a module object.\n\nThe name must be a string; the optional doc argument can have any type.",tp$getattr(t,e){var n=this.$d[t.$mangled];if(void 0!==n)return n;if(void 0!==(n=this.ob$type.$typeLookup(t))){const t=n.tp$descr_get;return t?t.call(n,this,this.ob$type,e):n}const i=this.$d.__getattr__;return void 0!==i?(n=Sk.misceval.tryCatch((()=>Sk.misceval.callsimOrSuspendArray(i,[t])),(t=>{if(!(t instanceof Sk.builtin.AttributeError))throw t})),e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)):void 0},tp$setattr:Sk.generic.setAttr,tp$new:Sk.generic.new,tp$init(t,e){const[n,i]=Sk.abstr.copyKeywordsToNamedArgs("module",["name","doc"],t,e,[Sk.builtin.none.none$]);Sk.builtin.pyCheckType("module","string",n),this.init$dict(n,i)},$r(){let t=this.get$name();if(void 0!==t){var e=this.get$mod_reprf();if(void 0!==e)return Sk.misceval.callsimOrSuspendArray(e,[this])}return t=void 0===t?"'?'":t,e=void 0===(e=this.from$file())?this.empty_or$loader():e,new Sk.builtin.str("")}},getsets:{__dict__:{$get(){return new Sk.builtin.mappingproxy(this.$d)}}},methods:{__dir__:{$meth(){const t=this.tp$getattr(Sk.builtin.str.$dict);if(!Sk.builtin.checkMapping(t))throw new Sk.builtin.TypeError("__dict__ is not a dictionary");const e=t.mp$lookup(Sk.builtin.str.$dir);return void 0!==e?Sk.misceval.callsimOrSuspendArray(e,[]):new Sk.builtin.list(Sk.misceval.arrayFromIterable(t))},$flags:{NoArgs:!0},$doc:"__dir__() -> list\nspecialized dir() implementation"}},proto:{sk$hasDict:!0,init$dict(t,e){this.$d.__name__=t,this.$d.__doc__=e,this.$d.__package__=Sk.builtin.none.none$,this.$d.__spec__=Sk.builtin.none.none$,this.$d.__loader__=Sk.builtin.none.none$},sk$attrError(){let t=this.get$name();return t=void 0===t?"module":"module "+t,this.$initializing&&(t="(most likely due to a circular import) partially initialized "+t),t},get$name(){const t=this.tp$getattr(Sk.builtin.str.$name);return t&&Sk.misceval.objectRepr(t)},from$file(){const t=this.tp$getattr(Sk.builtin.str.$file);return t&&" from "+Sk.misceval.objectRepr(t)},empty_or$loader(){if(this.$js&&this.$js.includes("$builtinmodule"))return" (built-in)";const t=this.tp$getattr(Sk.builtin.str.$loader);return void 0===t||Sk.builtin.checkNone(t)?"":" ("+Sk.misceval.objectRepr(t)+")"},get$mod_reprf(){const t=this.tp$getattr(Sk.builtin.str.$loader);return t&&t.tp$getattr(this.str$mod_repr)},str$mod_repr:new Sk.builtin.str("module_repr")}}),Sk.exportSymbol("Sk.builtin.module",Sk.builtin.module)},function(t,e){Sk.builtin.structseq_types={},Sk.builtin.make_structseq=function(t,e,n,i,s){i=void 0===i?{}:i,s=void 0===s?null:s;const r=t+"."+e,o=[],a={};Object.keys(n).forEach(((t,e)=>{o.push(t),a[t]={$get(){return this.v[e]},$doc:n[t]}}));const l=o.length;let u=l;Object.keys(i).forEach(((t,e)=>{a[t]={$get(){return this.$hidden[e]||Sk.builtin.none.none$},$doc:i[t]},u++}));var c=Sk.abstr.buildNativeClass(r,{constructor:function(t,e){Sk.asserts.assert(this instanceof c),Sk.builtin.tuple.call(this,t),this.$hidden=e||[]},base:Sk.builtin.tuple,slots:{tp$new(t,e){if(Sk.abstr.checkOneArg(r,t,e),(t=Sk.misceval.arrayFromIterable(t[0])).lengthu)throw new Sk.builtin.TypeError(r+"() takes an at most "+u+"-sequence ("+t.length+"-sequence given)");return new c(t.slice(0,l),t.slice(l))},tp$doc:s||Sk.builtin.none.none$,$r(){var t;if(0===this.v.length)return new Sk.builtin.str(r+"()");var e=[];for(t=0;t")}},iternext(t,e){var n=this;if(this.gi$running)throw new Sk.builtin.ValueError("generator already executing");return this.gi$running=!0,void 0===e&&(e=Sk.builtin.none.none$),this.gi$sentvalue=e,e=[this],this.func_closure&&e.push(this.func_closure),function e(i){if(i instanceof Sk.misceval.Suspension){if(t)return new Sk.misceval.Suspension(e,i);i=Sk.misceval.retryOptionalSuspensionOrThrow(i)}if(n.gi$running=!1,Sk.asserts.assert(void 0!==i),Array.isArray(i))return n.gi$resumeat=i[0],i[1];n.gi$ret=i}(this.func_code.apply(this.func_globals,e))},methods:{send:{$meth(t){return Sk.misceval.chain(this.tp$iternext(!0,t),(t=>{if(void 0===t)throw void 0!==(t=this.gi$ret)&&t!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(t):new Sk.builtin.StopIteration;return t}))},$flags:{OneArg:!0},$doc:"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration."}}}),Sk.exportSymbol("Sk.builtin.generator",Sk.builtin.generator),Sk.builtin.makeGenerator=function(t,e){var n,i=new Sk.builtin.generator(null,null,null);for(n in i.tp$iternext=t,e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i},Sk.exportSymbol("Sk.builtin.makeGenerator",Sk.builtin.makeGenerator)},function(t,e){Sk.builtin.file=function(t,e,n){var i;if(!(this instanceof Sk.builtin.file))return new Sk.builtin.file(t,e,n);if(this.mode=e,this.name=Sk.ffi.remapToJs(t),this.closed=!1,"/dev/stdout"===this.name)this.data$=Sk.builtin.none.none$,this.fileno=1;else if("/dev/stdin"===this.name)this.fileno=0;else if("/dev/stderr"===this.name)this.fileno=2;else{if(Sk.inBrowser)if(this.fileno=10,null==(n=document.getElementById(t.v))){if("w"!=e.v&&"a"!=e.v)throw new Sk.builtin.IOError("[Errno 2] No such file or directory: '"+t.v+"'");this.data$=""}else"textarea"==n.nodeName.toLowerCase()?this.data$=n.value:this.data$=n.textContent;else this.fileno=11,this.data$=Sk.read(t.v);for(i in this.lineList=this.data$.split("\n"),this.lineList=this.lineList.slice(0,-1),this.lineList)this.lineList[i]+="\n";this.currentLine=0}return this.pos$=0,Sk.fileopen&&10<=this.fileno&&Sk.fileopen(this),this},Sk.abstr.setUpInheritance("file",Sk.builtin.file,Sk.builtin.object),Sk.abstr.setUpBuiltinMro(Sk.builtin.file),Sk.builtin.file.prototype.$r=function(){return new Sk.builtin.str("<"+(this.closed?"closed":"open")+"file '"+this.name+"', mode '"+Sk.ffi.remapToJs(this.mode)+"'>")},Sk.builtin.file.prototype.tp$iter=function(){var t={tp$iter:function(){return t},$obj:this,$index:this.currentLine,$lines:this.lineList,tp$iternext:function(){if(!(t.$index>=t.$lines.length))return new Sk.builtin.str(t.$lines[t.$index++])}};return t},Sk.abstr.setUpSlots(Sk.builtin.file),Sk.builtin.file.prototype.__enter__=new Sk.builtin.func((function(t){return t})),Sk.builtin.file.prototype.__exit__=new Sk.builtin.func((function(t){return Sk.misceval.callsimArray(Sk.builtin.file.prototype.close,[t])})),Sk.builtin.file.prototype.close=new Sk.builtin.func((function(t){return t.closed=!0,Sk.builtin.none.none$})),Sk.builtin.file.prototype.flush=new Sk.builtin.func((function(t){})),Sk.builtin.file.prototype.fileno=new Sk.builtin.func((function(t){return this.fileno})),Sk.builtin.file.prototype.isatty=new Sk.builtin.func((function(t){return!1})),Sk.builtin.file.prototype.read=new Sk.builtin.func((function(t,e){var n=t.data$.length;if(t.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var i=void 0===e?n:Sk.ffi.remapToJs(e);return i=new Sk.builtin.str(t.data$.substr(t.pos$,i)),t.pos$=void 0===e?n:t.pos$+Sk.ffi.remapToJs(e),t.pos$>=n&&(t.pos$=n),i})),Sk.builtin.file.$readline=function(t,e,n){if(0===t.fileno){if(t=Sk.ffi.remapToJs(n),(t=Sk.inputfun(t||""))instanceof Promise||t&&"function"==typeof t.then){var i=new Sk.misceval.Suspension;return i.resume=function(){if(i.data.error)throw i.data.error;return new Sk.builtin.str(i.data.result)},i.data={type:"Sk.promise",promise:t},i}return new Sk.builtin.str(t)}return e="",t.currentLinen(t,e))));if("object"===i){if((i=t.constructor)===Object&&Object.getPrototypeOf(t)===c||void 0===i)return e.dictHook?e.dictHook(t):l(t,e);if(i===Uint8Array)return new Sk.builtin.bytes(t);if(i===Set)return a(t,e);if(i===Map){const i=new Sk.builtin.dict;return t.forEach(((t,s)=>{i.mp$ass_subscript(n(s,e),n(t,e))})),i}return i===Sk.misceval.Suspension?t:e.proxyHook?e.proxyHook(t):u(t)}if(e.unhandledHook)return e.unhandledHook(t);Sk.asserts.fail("unhandled remap case of type "+i)}function i(t,e){if(null==t)return t;const n=t.valueOf();if(null===n)return n;const o=typeof n;return e=e||{},"string"===o?e.stringHook?e.stringHook(n):n:"boolean"===o?n:"number"===o?e.numberHook?e.numberHook(n,t):n:JSBI.__isBigInt(n)?e.bigintHook?e.bigintHook(n,t):n:Array.isArray(n)?e.arrayHook?e.arrayHook(n,t):n.map((t=>i(t,e))):n.sk$object?t instanceof Sk.builtin.dict?e.dictHook?e.dictHook(t):r(t,e):t instanceof Sk.builtin.set?e.setHook?e.setHook(t):new Set(s(t,e)):e.unhandledHook?e.unhandledHook(t):void 0:"object"===o?e.objectHook?e.objectHook(n,t):n:"function"===o?e.funcHook?e.funcHook(n,t):n:void Sk.asserts.fail("unhandled type "+o)}function s(t,e){return Array.from(t,(t=>i(t,e)))}function r(t,e){const n={};return t.$items().forEach((t=>{var[s,r]=t;n[s.valueOf()]=i(r,e)})),n}function o(t){return Number.isInteger(t)?Math.abs(t)n(t,e))))}function l(t,e){const i=new Sk.builtin.dict;return Object.entries(t).forEach((t=>{var[s,r]=t;i.mp$ass_subscript(new Sk.builtin.str(s),n(r,e))})),i}function u(t,e){if(null==t)return Sk.builtin.none.none$;var i=typeof t;if("object"!==i&&"function"!==i)return n(t);if(e=e||{},i=_.get(t)){if(e.bound===i.$bound)return i;e.name||(e.name=i.$name)}return e=new g(t,e),_.set(t,e),e}Sk.ffi={remapToPy:n,remapToJs:i,toPy:n,toJs:i,isTrue:function(t){return null!=t&&t.nb$bool?t.nb$bool():t.sq$length?0!==t.sq$length():!!t},toJsString:function(t){return String(t)},toJsNumber:function(t){return Number(t)},toJsArray:s,toJsHashMap:r,toPyDict:l,toPyFloat:function(t){return new Sk.builtin.float_(Number(t))},toPyInt:function(t){if("number"==typeof t)return t=Math.trunc(t),Math.abs(t)n(t,e))))},toPyTuple:function(t,e){return new Sk.builtin.tuple(Array.from(t,(t=>n(t,e))))},toPySet:a,numberToPy:o,proxy:u};const c=Object.prototype,p=Function.prototype,h=/^-?\d+$/,_=new WeakMap,d={dictHook:t=>u(t),unhandledHook:t=>String(t)},f=(t,e)=>({dictHook:t=>u(t),funcHook:n=>u(n,{bound:t,name:e}),unhandledHook:t=>String(t)}),m={unhandledHook:t=>{var e=_.get(t);if(e)return e;if(e={v:t,$isPyWrapped:!0,unwrap:()=>t},void 0===t.tp$call)return _.set(t,e),e;const s=(...e)=>{e=e.map((t=>n(t,d)));let s=Sk.misceval.tryCatch((()=>Sk.misceval.chain(t.tp$call(e),(t=>i(t,m)))),(t=>{if(!Sk.uncaughtException)throw t;Sk.uncaughtException(t)}));for(;s instanceof Sk.misceval.Suspension;){if(!s.optional)return Sk.misceval.asyncToPromise((()=>s));s=s.resume()}return s};return _.set(t,Object.assign(s,e)),s}},g=Sk.abstr.buildNativeClass("Proxy",{constructor:function(t,e){if(void 0===t)throw new Sk.builtin.TypeError("Proxy cannot be called from python");this.js$wrapped=t,this.$module=null,this.$methods=Object.create(null),this.in$repr=!1,e||(e={}),Object.defineProperties(this,this.memoized$slots),"function"==typeof t?(this.is$callable=!0,this.$bound=e.bound,this.$name=e.name||t.name||"(native JS)",2>=this.$name.length&&(this.$name+=" (native JS)")):(this.is$callable=!1,delete this.is$type,this.is$type=!1,this.$name=e.name)},slots:{tp$doc:"proxy for a javascript object",tp$hash(){return Sk.builtin.object.prototype.tp$hash.call(this.js$wrapped)},tp$getattr(t){return this.$lookup(t)||Sk.generic.getAttr.call(this,t)},tp$setattr(t,e){t=t.toString(),void 0===e?delete this.js$wrapped[t]:this.js$wrapped[t]=i(e,m)},$r(){if(this.is$callable){if(this.is$type||!this.$bound)return new Sk.builtin.str("<"+this.tp$name+" '"+this.$name+"'>");var t=Sk.misceval.objectRepr(u(this.$bound));return new Sk.builtin.str("")}return this.js$proto===c?this.in$repr?new Sk.builtin.str("{...}"):(this.in$repr=!0,t=Object.entries(this.js$wrapped).map((t=>{var[e,i]=t;return i=n(i,f(this.js$wrapped,e)),"'"+e+"': "+Sk.misceval.objectRepr(i)})),t=new Sk.builtin.str("proxyobject({"+t.join(", ")+"})"),this.in$repr=!1,t):new Sk.builtin.str("<"+this.tp$name+" "+("proxyobject"===this.tp$name?"object":"proxyobject")+">")},tp$as_sequence_or_mapping:!0,mp$subscript(t){const e=this.$lookup(t);if(void 0===e)throw new Sk.builtin.LookupError(t);return e},mp$ass_subscript(t,e){return this.tp$setattr(t,e)},sq$contains(t){return i(t)in this.js$wrapped},ob$eq(t){return this.js$wrapped===t.js$wrapped},ob$ne(t){return this.js$wrapped!==t.js$wrapped},tp$as_number:!0,nb$bool(){return this.js$proto===c?0new Sk.builtin.str(t)))))},$flags:{NoArgs:!0}},__new__:{$meth(t,...e){if(!(t instanceof g))throw new Sk.builtin.TypeError("expected a proxy object as the first argument not "+Sk.abstr.typeName(t));try{return t.$new(e)}catch(e){if(e instanceof TypeError&&e.message.includes("not a constructor"))throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(t)+" is not a constructor");throw e}},$flags:{MinArgs:1}},__call__:{$meth(t,e){if("function"!=typeof this.js$wrapped)throw new Sk.builtin.TypeError("'"+this.tp$name+"' object is not callable");return this.$call(t,e)},$flags:{FastCall:!0}},keys:{$meth(){return new Sk.builtin.list(Object.keys(this.js$wrapped).map((t=>new Sk.builtin.str(t))))},$flags:{NoArgs:!0}},get:{$meth(t,e){return this.$lookup(t)||e||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2}}},getsets:{__class__:{$get(){return n(this.js$wrapped.constructor,d)},$set(){throw new Sk.builtin.TypeError("not writable")}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(t){this.$module=t}}},proto:{valueOf(){return this.js$wrapped},$new(t,e){return Sk.abstr.checkNoKwargs("__new__",e),n(new this.js$wrapped(...t.map((t=>i(t,m)))),{dictHook:t=>u(t),proxyHook:t=>u(t,{name:this.$name})})},$call(t,e){return Sk.abstr.checkNoKwargs("__call__",e),Sk.misceval.chain(this.js$wrapped.apply(this.$bound,t.map((t=>i(t,m)))),(t=>t instanceof Promise?Sk.misceval.promiseToSuspension(t):t),(t=>n(t,d)))},$lookup(t){t=t.toString();const e=this.js$wrapped[t];return void 0!==e?n(e,f(this.js$wrapped,t)):t in this.js$wrapped?Sk.builtin.none.none$:void 0},memoized$slots:{js$proto:{configurable:!0,get(){return delete this.js$proto,this.js$proto=Object.getPrototypeOf(this.js$wrapped)}},$dir:{configurable:!0,get(){const t=[];let e=this.js$wrapped;for(;null!=e&&e!==c&&e!==p;)t.push(...Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return new Set(t)}},tp$iter:{configurable:!0,get(){return delete this.tp$iter,void 0!==this.js$wrapped[Symbol.iterator]?this.tp$iter=()=>u(this.js$wrapped[Symbol.iterator]()):this.tp$iter=()=>{throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(this)+" is not iterable")}}},tp$iternext:{configurable:!0,get(){if(delete this.tp$iternext,void 0!==this.js$wrapped.next)return this.tp$iternext=()=>{const t=this.js$wrapped.next().value;return t&&n(t,d)}}},sq$length:{configurable:!0,get(){if(delete this.sq$length,!this.is$callable&&void 0!==this.js$wrapped.length)return this.sq$length=()=>this.js$wrapped.length}},tp$call:{configurable:!0,get(){if(delete this.tp$call,this.is$callable)return this.tp$call=this.is$type?this.$new:this.$call}},tp$name:{configurable:!0,get(){if(delete this.tp$name,this.is$callable)return this.tp$name=this.is$type?"proxyclass":this.$bound?"proxymethod":"proxyfunction";{const t=this.js$wrapped;let e=t[Symbol.toStringTag]||this.$name||t.constructor&&t.constructor.name||"proxyobject";return"Object"===e?e="proxyobject":2>=e.length&&(e=u(t.constructor).$name),this.tp$name=e}}},is$type:{configurable:!0,get(){delete this.is$type;var t=this.js$wrapped;const e=t.prototype;if(void 0===e)return this.is$type=t===Sk.global.Proxy;{const e=S.call(t).match(b);t=null===e?null:"class"===e[0]||!k.has(t)}return!0===t?this.is$type=!0:!1===t?this.is$type=!1:1e;r+=n)s.push(new Sk.builtin.int_(r));else{if(t=r=JSBI.BigInt(t),n=JSBI.BigInt(n),e=JSBI.BigInt(e),JSBI.greaterThan(n,JSBI.__ZERO))for(;JSBI.lessThan(r,e);)s.push(new Sk.builtin.int_(i(r))),r=JSBI.add(r,n);else for(;JSBI.greaterThan(r,e);)s.push(new Sk.builtin.int_(i(r))),r=JSBI.add(r,n);t=i(t),n=i(n),e=i(e)}return new Sk.builtin.range_(t,e,n,s)}function i(t){return JSBI.lessThan(t,JSBI.__MAX_SAFE)&&JSBI.greaterThan(t,JSBI.__MIN_SAFE)?JSBI.toNumber(t):t}Sk.builtin.range_=Sk.abstr.buildNativeClass("range",{constructor:function(t,e,n,i){this.start=t,this.stop=e,this.step=n,this.v=i},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"range(stop) -> range object\nrange(start, stop[, step]) -> range object\n\nReturn an object that produces a sequence of integers from start (inclusive)\nto stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.\nstart defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.\nThese are exactly the valid indices for a list of 4 elements.\nWhen step is given, it specifies the increment (or decrement).",tp$new:(t,e)=>(Sk.abstr.checkNoKwargs("range",e),Sk.abstr.checkArgsLen("range",t,1,3),n(t[0],t[1],t[2])),$r(){let t="range("+this.start+", "+this.stop;return 1!=this.step&&(t+=", "+this.step),new Sk.builtin.str(t+")")},tp$richcompare(t,e){return"Eq"!==e&&"NotEq"!==e||t.ob$type!==Sk.builtin.range_?Sk.builtin.NotImplemented.NotImplemented$:(t=new Sk.builtin.list(t.v),new Sk.builtin.list(this.v).tp$richcompare(t,e))},tp$iter(){return new s(this)},nb$bool(){return 0!==this.v.length},sq$contains(t){const e=this.v;for(let n=0;n(t=Sk.misceval.asIndexSized(t))&&(t=this.v.length+t),0>t||t>=this.v.length)throw new Sk.builtin.IndexError("range object index out of range");return this.v[t]}if(t.constructor===Sk.builtin.slice){const e=[],n=this.v;t.sssiter$(n.length,(t=>{e.push(n[t])}));let{start:i,stop:s,step:r}=t.slice$indices(n.length);return i=Sk.misceval.asIndex(n[i])||this.start,s=Sk.misceval.asIndex(n[s])||this.stop,r="number"==typeof this.step?r*this.step:JSBI.multiply(this.step,JSBI.BigInt(r)),new Sk.builtin.range_(i,s,r,e)}throw new Sk.builtin.TypeError("range indices must be integers or slices, not "+Sk.abstr.typeName(t))}},getsets:{start:{$get(){return new Sk.builtin.int_(this.start)}},step:{$get(){return new Sk.builtin.int_(this.step)}},stop:{$get(){return new Sk.builtin.int_(this.stop)}}},methods:{__reversed__:{$meth(){return new r(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator."},count:{$meth(t){let e=0;for(let n=0;n integer -- return number of occurrences of value"},index:{$meth(t){for(let e=0;e integer -- return index of value.\nRaise ValueError if the value is not present."}},proto:{sk$asarray(){return this.v.slice(0)}},flags:{sk$unacceptableBase:!0}});var s=Sk.abstr.buildIteratorClass("range_iterator",{constructor:function(t){this.$index=0,this.$seq=t.v},iternext(){return this.$seq[this.$index++]},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),r=Sk.abstr.buildIteratorClass("range_reverseiterator",{constructor:function(t){this.$seq=t.v,this.$index=this.$seq.length-1},iternext(){return this.$seq[this.$index--]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}});Sk.builtin.range=Sk.builtin.xrange=function(t,e,i){return t=n(t,e,i),new Sk.builtin.list(t.v)}},function(t,e){Sk.builtin.enumerate=Sk.abstr.buildIteratorClass("enumerate",{constructor:function(t,e){if(!(this instanceof Sk.builtin.enumerate))throw TypeError("Failed to construct 'enumerate': Please use the 'new' operator");return this.$iterable=t,this.$index=e,this},iternext(t){const e=Sk.misceval.chain(this.$iterable.tp$iternext(t),(t=>{if(void 0!==t)return new Sk.builtin.tuple([new Sk.builtin.int_(this.$index++),t])}));return t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},slots:{tp$doc:"Return an enumerate object.\n\n iterable\n an object supporting iteration\n\nThe enumerate object yields pairs containing a count (from start, which\ndefaults to zero) and a value yielded by the iterable argument.\n\nenumerate is useful for obtaining an indexed list:\n (0, seq[0]), (1, seq[1]), (2, seq[2]), ...",tp$new(t,e){let[n,i]=Sk.abstr.copyKeywordsToNamedArgs("enumerate",["iterable","start"],t,e,[new Sk.builtin.int_(0)]);return n=Sk.abstr.iter(n),i=Sk.misceval.asIndexOrThrow(i),this===Sk.builtin.enumerate.prototype?new Sk.builtin.enumerate(n,i):(t=new this.constructor,Sk.builtin.enumerate.call(t,n,i),t)}},classmethods:Sk.generic.classGetItem}),Sk.exportSymbol("Sk.builtin.enumerate",Sk.builtin.enumerate)},function(t,e){Sk.builtin.filter_=Sk.abstr.buildIteratorClass("filter",{constructor:function(t,e){this.$func=t,this.$iterable=e},iternext(t){const e=Sk.misceval.iterFor(this.$iterable,(t=>Sk.misceval.chain(this.check$filter(t),(t=>t?new Sk.misceval.Break(t):void 0))));return t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},slots:{tp$doc:"Return an iterator yielding those items of iterable for which function(item)\nis true. If function is None, return the items that are true.",tp$new(t,e){let[n,i]=Sk.abstr.copyKeywordsToNamedArgs("filter",["predicate","iterable"],t,e,[]);return n=Sk.builtin.checkNone(n)?null:n,i=Sk.abstr.iter(i),this===Sk.builtin.filter_.prototype?new Sk.builtin.filter_(n,i):(t=new this.constructor,Sk.builtin.filter_.call(t,n,i),t)}},proto:{check$filter(t){let e;return e=null===this.$func?t:Sk.misceval.callsimOrSuspendArray(this.$func,[t]),Sk.misceval.chain(e,(e=>Sk.misceval.isTrue(e)?t:void 0))}}}),Sk.exportSymbol("Sk.builtin.filter_",Sk.builtin.filter_)},function(t,e){Sk.builtin.map_=Sk.abstr.buildIteratorClass("map",{constructor:function(t,e){this.$func=t,this.$iters=e},iternext(t){const e=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,(n=>Sk.misceval.chain(n.tp$iternext(t),(t=>{if(void 0===t)return new Sk.misceval.Break(!0);e.push(t)})))),(t=>t?void 0:Sk.misceval.callsimOrSuspendArray(this.$func,e)));return t?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:"map(func, *iterables) --\x3e map object\n\nMake an iterator that computes the function using arguments from\neach of the iterables. Stops when the shortest iterable is exhausted.",tp$new(t,e){this===Sk.builtin.map_.prototype&&Sk.abstr.checkNoKwargs("map",e),Sk.abstr.checkArgsLen("map",t,2),e=t[0];const n=[];for(let e=1;ethis.$idx)){var e=Sk.misceval.tryCatch((()=>Sk.abstr.objectGetItem(this.$seq,new Sk.builtin.int_(this.$idx--),t)),(t=>{if(!(t instanceof Sk.builtin.IndexError))throw t;this.$idx=-1}));return t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)}},slots:{tp$doc:"Return a reverse iterator over the values of the given sequence.",tp$new(t,e){if(this===Sk.builtin.reversed.prototype&&Sk.abstr.checkNoKwargs("reversed",e),Sk.abstr.checkArgsLen("reversed",t,1,1),t=t[0],void 0!==(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$reversed)))return Sk.misceval.callsimArray(e,[]);if(!Sk.builtin.checkSequence(t)||void 0===Sk.abstr.lookupSpecial(t,Sk.builtin.str.$len))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not a sequence");return this===Sk.builtin.reversed.prototype?new Sk.builtin.reversed(t):(e=new this.constructor,Sk.builtin.reversed.call(e,t),e)}},methods:{__length_hint__:{$meth:function(){return 0<=this.$idx?new Sk.builtin.int_(this.$idx):new Sk.builtin.int_(0)},$flags:{NoArgs:!0}}}})},function(t,e){Sk.builtin.zip_=Sk.abstr.buildIteratorClass("zip",{constructor:function(t){this.$iters=t,0===t.length&&(this.tp$iternext=()=>{})},iternext(t){const e=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,(n=>Sk.misceval.chain(n.tp$iternext(t),(t=>{if(void 0===t)return new Sk.misceval.Break(!0);e.push(t)})))),(t=>t?void 0:new Sk.builtin.tuple(e)));return t?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:"zip(iter1 [,iter2 [...]]) --\x3e zip object\n\nReturn a zip object whose .__next__() method returns a tuple where\nthe i-th element comes from the i-th iterable argument. The .__next__()\nmethod continues until the shortest iterable in the argument sequence\nis exhausted and then it raises StopIteration.",tp$new(t,e){this===Sk.builtin.zip_.prototype&&Sk.abstr.checkNoKwargs("zip",e),e=[];for(let n=0;n":n.T_RARROW,".":n.T_DOT,"...":n.T_ELLIPSIS,"/":n.T_SLASH,"//":n.T_DOUBLESLASH,"//=":n.T_DOUBLESLASHEQUAL,"/=":n.T_SLASHEQUAL,":":n.T_COLON,";":n.T_SEMI,"<":n.T_LESS,"<<":n.T_LEFTSHIFT,"<<=":n.T_LEFTSHIFTEQUAL,"<=":n.T_LESSEQUAL,"=":n.T_EQUAL,"==":n.T_EQEQUAL,">":n.T_GREATER,">=":n.T_GREATEREQUAL,">>":n.T_RIGHTSHIFT,">>=":n.T_RIGHTSHIFTEQUAL,"@":n.T_AT,"@=":n.T_ATEQUAL,"[":n.T_LSQB,"]":n.T_RSQB,"^":n.T_CIRCUMFLEX,"^=":n.T_CIRCUMFLEXEQUAL,"{":n.T_LBRACE,"|":n.T_VBAR,"|=":n.T_VBAREQUAL,"}":n.T_RBRACE,"~":n.T_TILDE};var i={};!function(){for(var t in n)i[n[t]]=t}(),["tok_name","ISTERMINAL","ISNONTERMINAL","ISEOF"].concat(Object.keys(i).map((function(t){return i[t]}))),Sk.token={},Sk.token.tokens=n,Sk.token.tok_name=i,Sk.token.EXACT_TOKEN_TYPES=t,Sk.token.ISTERMINAL=function(t){return t=n.T_NT_OFFSET},Sk.token.ISEOF=function(t){return t==n.T_ENDMARKER},Sk.exportSymbol("Sk.token",Sk.token),Sk.exportSymbol("Sk.token.tokens",Sk.token.tokens),Sk.exportSymbol("Sk.token.tok_name",Sk.token.tok_name),Sk.exportSymbol("Sk.token.EXACT_TOKEN_TYPES"),Sk.exportSymbol("Sk.token.ISTERMINAL",Sk.token.ISTERMINAL),Sk.exportSymbol("Sk.token.ISNONTERMINAL",Sk.token.ISNONTERMINAL),Sk.exportSymbol("Sk.token.ISEOF",Sk.token.ISEOF)},function(t,e){Sk.OpMap={"(":Sk.token.tokens.T_LPAR,")":Sk.token.tokens.T_RPAR,"[":Sk.token.tokens.T_LSQB,"]":Sk.token.tokens.T_RSQB,":":Sk.token.tokens.T_COLON,",":Sk.token.tokens.T_COMMA,";":Sk.token.tokens.T_SEMI,"+":Sk.token.tokens.T_PLUS,"-":Sk.token.tokens.T_MINUS,"*":Sk.token.tokens.T_STAR,"/":Sk.token.tokens.T_SLASH,"|":Sk.token.tokens.T_VBAR,"&":Sk.token.tokens.T_AMPER,"<":Sk.token.tokens.T_LESS,">":Sk.token.tokens.T_GREATER,"=":Sk.token.tokens.T_EQUAL,".":Sk.token.tokens.T_DOT,"%":Sk.token.tokens.T_PERCENT,"`":Sk.token.tokens.T_BACKQUOTE,"{":Sk.token.tokens.T_LBRACE,"}":Sk.token.tokens.T_RBRACE,"@":Sk.token.tokens.T_AT,"@=":Sk.token.tokens.T_ATEQUAL,"==":Sk.token.tokens.T_EQEQUAL,"!=":Sk.token.tokens.T_NOTEQUAL,"<>":Sk.token.tokens.T_NOTEQUAL,"<=":Sk.token.tokens.T_LESSEQUAL,">=":Sk.token.tokens.T_GREATEREQUAL,"~":Sk.token.tokens.T_TILDE,"^":Sk.token.tokens.T_CIRCUMFLEX,"<<":Sk.token.tokens.T_LEFTSHIFT,">>":Sk.token.tokens.T_RIGHTSHIFT,"**":Sk.token.tokens.T_DOUBLESTAR,"+=":Sk.token.tokens.T_PLUSEQUAL,"-=":Sk.token.tokens.T_MINEQUAL,"*=":Sk.token.tokens.T_STAREQUAL,"/=":Sk.token.tokens.T_SLASHEQUAL,"%=":Sk.token.tokens.T_PERCENTEQUAL,"&=":Sk.token.tokens.T_AMPEREQUAL,"|=":Sk.token.tokens.T_VBAREQUAL,"^=":Sk.token.tokens.T_CIRCUMFLEXEQUAL,"<<=":Sk.token.tokens.T_LEFTSHIFTEQUAL,">>=":Sk.token.tokens.T_RIGHTSHIFTEQUAL,"**=":Sk.token.tokens.T_DOUBLESTAREQUAL,"//":Sk.token.tokens.T_DOUBLESLASH,"//=":Sk.token.tokens.T_DOUBLESLASHEQUAL,"->":Sk.token.tokens.T_RARROW,"...":Sk.token.tokens.T_ELLIPSIS},Sk.ParseTables={sym:{and_expr:257,and_test:258,annassign:259,arglist:260,argument:261,arith_expr:262,assert_stmt:263,async_funcdef:264,async_stmt:265,atom:266,atom_expr:267,augassign:268,break_stmt:269,classdef:270,comp_for:271,comp_if:272,comp_iter:273,comp_op:274,comparison:275,compound_stmt:276,continue_stmt:277,debugger_stmt:278,decorated:279,decorator:280,decorators:281,del_stmt:282,dictorsetmaker:283,dotted_as_name:284,dotted_as_names:285,dotted_name:286,encoding_decl:287,eval_input:288,except_clause:289,expr:290,expr_stmt:291,exprlist:292,factor:293,file_input:294,flow_stmt:295,for_stmt:296,funcdef:297,global_stmt:298,if_stmt:299,import_as_name:300,import_as_names:301,import_from:302,import_name:303,import_stmt:304,lambdef:305,lambdef_nocond:306,nonlocal_stmt:307,not_test:308,or_test:309,parameters:310,pass_stmt:311,power:312,print_stmt:313,raise_stmt:314,return_stmt:315,shift_expr:316,simple_stmt:317,single_input:256,sliceop:318,small_stmt:319,star_expr:320,stmt:321,subscript:322,subscriptlist:323,suite:324,term:325,test:326,test_nocond:327,testlist:328,testlist_comp:329,testlist_star_expr:330,tfpdef:331,trailer:332,try_stmt:333,typedargslist:334,varargslist:335,vfpdef:336,while_stmt:337,with_item:338,with_stmt:339,xor_expr:340,yield_arg:341,yield_expr:342,yield_stmt:343},number2symbol:{256:"single_input",257:"and_expr",258:"and_test",259:"annassign",260:"arglist",261:"argument",262:"arith_expr",263:"assert_stmt",264:"async_funcdef",265:"async_stmt",266:"atom",267:"atom_expr",268:"augassign",269:"break_stmt",270:"classdef",271:"comp_for",272:"comp_if",273:"comp_iter",274:"comp_op",275:"comparison",276:"compound_stmt",277:"continue_stmt",278:"debugger_stmt",279:"decorated",280:"decorator",281:"decorators",282:"del_stmt",283:"dictorsetmaker",284:"dotted_as_name",285:"dotted_as_names",286:"dotted_name",287:"encoding_decl",288:"eval_input",289:"except_clause",290:"expr",291:"expr_stmt",292:"exprlist",293:"factor",294:"file_input",295:"flow_stmt",296:"for_stmt",297:"funcdef",298:"global_stmt",299:"if_stmt",300:"import_as_name",301:"import_as_names",302:"import_from",303:"import_name",304:"import_stmt",305:"lambdef",306:"lambdef_nocond",307:"nonlocal_stmt",308:"not_test",309:"or_test",310:"parameters",311:"pass_stmt",312:"power",313:"print_stmt",314:"raise_stmt",315:"return_stmt",316:"shift_expr",317:"simple_stmt",318:"sliceop",319:"small_stmt",320:"star_expr",321:"stmt",322:"subscript",323:"subscriptlist",324:"suite",325:"term",326:"test",327:"test_nocond",328:"testlist",329:"testlist_comp",330:"testlist_star_expr",331:"tfpdef",332:"trailer",333:"try_stmt",334:"typedargslist",335:"varargslist",336:"vfpdef",337:"while_stmt",338:"with_item",339:"with_stmt",340:"xor_expr",341:"yield_arg",342:"yield_expr",343:"yield_stmt"},dfas:{256:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],257:[[[[44,1]],[[45,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],258:[[[[46,1]],[[47,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],259:[[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],{48:1}],260:[[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],261:[[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],262:[[[[55,1]],[[30,0],[43,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],263:[[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],{24:1}],264:[[[[10,1]],[[56,2]],[[0,2]]],{10:1}],265:[[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],{10:1}],266:[[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,33:1,35:1,38:1}],267:[[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],268:[[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],{67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:1,75:1,76:1,77:1,78:1,79:1}],269:[[[[39,1]],[[0,1]]],{39:1}],270:[[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],{13:1}],271:[[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],{10:1,34:1}],272:[[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],{37:1}],273:[[[[87,1],[54,1]],[[0,1]]],{10:1,34:1,37:1}],274:[[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],{8:1,83:1,88:1,89:1,90:1,91:1,92:1,93:1,94:1}],275:[[[[95,1]],[[96,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],276:[[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],{4:1,10:1,13:1,20:1,21:1,34:1,37:1,41:1,42:1}],277:[[[[40,1]],[[0,1]]],{40:1}],278:[[[[17,1]],[[0,1]]],{17:1}],279:[[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],{41:1}],280:[[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],{41:1}],281:[[[[106,1]],[[106,1],[0,1]]],{41:1}],282:[[[[27,1]],[[82,2]],[[0,2]]],{27:1}],283:[[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],284:[[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],285:[[[[109,1]],[[52,0],[0,1]]],{25:1}],286:[[[[25,1]],[[110,0],[0,1]]],{25:1}],287:[[[[25,1]],[[0,1]]],{25:1}],288:[[[[111,1]],[[2,1],[112,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],289:[[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],{113:1}],290:[[[[114,1]],[[115,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],291:[[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],292:[[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],{6:1,7:1,9:1,11:1,12:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],293:[[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],294:[[[[2,0],[112,1],[121,0]],[[0,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1,112:1}],295:[[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],{5:1,23:1,31:1,39:1,40:1}],296:[[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],{34:1}],297:[[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],{4:1}],298:[[[[26,1]],[[25,2]],[[52,1],[0,2]]],{26:1}],299:[[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{37:1}],300:[[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],301:[[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],{25:1}],302:[[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],{36:1}],303:[[[[32,1]],[[133,2]],[[0,2]]],{32:1}],304:[[[[134,1],[135,1]],[[0,1]]],{32:1,36:1}],305:[[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],{14:1}],306:[[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],{14:1}],307:[[[[18,1]],[[25,2]],[[52,1],[0,2]]],{18:1}],308:[[[[8,1],[137,2]],[[46,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],309:[[[[138,1]],[[139,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],310:[[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],{35:1}],311:[[[[28,1]],[[0,1]]],{28:1}],312:[[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],313:[[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],{16:1}],314:[[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],{5:1}],315:[[[[23,1]],[[111,2],[0,1]],[[0,2]]],{23:1}],316:[[[[143,1]],[[144,0],[142,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],317:[[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],318:[[[[48,1]],[[49,2],[0,1]],[[0,2]]],{48:1}],319:[[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],320:[[[[15,1]],[[95,2]],[[0,2]]],{15:1}],321:[[[[1,1],[3,1]],[[0,1]]],{4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],322:[[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],323:[[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],324:[[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],{2:1,5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],325:[[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],326:[[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],327:[[[[165,1],[84,1]],[[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],328:[[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],329:[[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],330:[[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],331:[[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],{25:1}],332:[[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],{35:1,38:1,110:1}],333:[[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],{20:1}],334:[[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],335:[[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],336:[[[[25,1]],[[0,1]]],{25:1}],337:[[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{21:1}],338:[[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],339:[[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],{42:1}],340:[[[[172,1]],[[173,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],341:[[[[111,2],[36,1]],[[49,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,36:1,38:1,43:1}],342:[[[[31,1]],[[174,2],[0,1]],[[0,2]]],{31:1}],343:[[[[62,1]],[[0,1]]],{31:1}]},states:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],[[[44,1]],[[45,0],[0,1]]],[[[46,1]],[[47,0],[0,1]]],[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],[[[55,1]],[[30,0],[43,0],[0,1]]],[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],[[[10,1]],[[56,2]],[[0,2]]],[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],[[[39,1]],[[0,1]]],[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],[[[87,1],[54,1]],[[0,1]]],[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],[[[95,1]],[[96,0],[0,1]]],[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],[[[40,1]],[[0,1]]],[[[17,1]],[[0,1]]],[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],[[[106,1]],[[106,1],[0,1]]],[[[27,1]],[[82,2]],[[0,2]]],[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[109,1]],[[52,0],[0,1]]],[[[25,1]],[[110,0],[0,1]]],[[[25,1]],[[0,1]]],[[[111,1]],[[2,1],[112,2]],[[0,2]]],[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],[[[114,1]],[[115,0],[0,1]]],[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],[[[2,0],[112,1],[121,0]],[[0,1]]],[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],[[[26,1]],[[25,2]],[[52,1],[0,2]]],[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],[[[32,1]],[[133,2]],[[0,2]]],[[[134,1],[135,1]],[[0,1]]],[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],[[[18,1]],[[25,2]],[[52,1],[0,2]]],[[[8,1],[137,2]],[[46,2]],[[0,2]]],[[[138,1]],[[139,0],[0,1]]],[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],[[[28,1]],[[0,1]]],[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],[[[23,1]],[[111,2],[0,1]],[[0,2]]],[[[143,1]],[[144,0],[142,0],[0,1]]],[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],[[[48,1]],[[49,2],[0,1]],[[0,2]]],[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],[[[15,1]],[[95,2]],[[0,2]]],[[[1,1],[3,1]],[[0,1]]],[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],[[[165,1],[84,1]],[[0,1]]],[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[25,1]],[[0,1]]],[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],[[[172,1]],[[173,0],[0,1]]],[[[111,2],[36,1]],[[49,2]],[[0,2]]],[[[31,1]],[[174,2],[0,1]],[[0,2]]],[[[62,1]],[[0,1]]]],labels:[[0,"EMPTY"],[317,null],[4,null],[276,null],[1,"def"],[1,"raise"],[1,"True"],[3,null],[1,"not"],[1,"None"],[55,null],[2,null],[25,null],[1,"class"],[1,"lambda"],[16,null],[1,"print"],[1,"debugger"],[1,"nonlocal"],[52,null],[1,"try"],[1,"while"],[31,null],[1,"return"],[1,"assert"],[1,null],[1,"global"],[1,"del"],[1,"pass"],[54,null],[15,null],[1,"yield"],[1,"import"],[1,"False"],[1,"for"],[7,null],[1,"from"],[1,"if"],[9,null],[1,"break"],[1,"continue"],[49,null],[1,"with"],[14,null],[316,null],[19,null],[308,null],[1,"and"],[11,null],[326,null],[22,null],[261,null],[12,null],[35,null],[271,null],[325,null],[297,null],[339,null],[296,null],[26,null],[283,null],[8,null],[342,null],[329,null],[10,null],[266,null],[332,null],[45,null],[38,null],[40,null],[50,null],[46,null],[41,null],[42,null],[36,null],[43,null],[48,null],[44,null],[37,null],[39,null],[324,null],[260,null],[292,null],[1,"in"],[309,null],[273,null],[327,null],[272,null],[28,null],[21,null],[27,null],[29,null],[1,"is"],[30,null],[20,null],[290,null],[274,null],[333,null],[299,null],[270,null],[337,null],[279,null],[265,null],[281,null],[264,null],[286,null],[280,null],[320,null],[1,"as"],[284,null],[23,null],[328,null],[0,null],[1,"except"],[340,null],[18,null],[330,null],[268,null],[259,null],[312,null],[293,null],[321,null],[269,null],[277,null],[314,null],[315,null],[343,null],[1,"else"],[310,null],[51,null],[1,"elif"],[300,null],[301,null],[285,null],[303,null],[302,null],[335,null],[275,null],[258,null],[1,"or"],[334,null],[267,null],[34,null],[262,null],[33,null],[319,null],[13,null],[295,null],[263,null],[291,null],[311,null],[307,null],[313,null],[282,null],[298,null],[304,null],[278,null],[318,null],[322,null],[5,null],[6,null],[47,null],[17,null],[24,null],[305,null],[306,null],[323,null],[289,null],[1,"finally"],[331,null],[336,null],[338,null],[257,null],[32,null],[341,null]],keywords:{False:33,None:9,True:6,and:47,as:108,assert:24,break:39,class:13,continue:40,debugger:17,def:4,del:27,elif:130,else:127,except:113,finally:168,for:34,from:36,global:26,if:37,import:32,in:83,is:92,lambda:14,nonlocal:18,not:8,or:139,pass:28,print:16,raise:5,return:23,try:20,while:21,with:42,yield:31},tokens:{0:112,1:25,2:11,3:7,4:2,5:159,6:160,7:35,8:61,9:38,10:64,11:48,12:52,13:146,14:43,15:30,16:15,17:162,18:115,19:45,20:94,21:89,22:50,23:110,24:163,25:12,26:59,27:90,28:88,29:91,30:93,31:22,32:173,33:144,34:142,35:53,36:74,37:78,38:68,39:79,40:69,41:72,42:73,43:75,44:77,45:67,46:71,47:161,48:76,49:41,50:70,51:129,52:19,54:29,55:10},start:256}},function(t,e){function n(t,e){return this.filename=t,this.grammar=e,this.p_flags=0,this}n.FUTURE_PRINT_FUNCTION="print_function",n.FUTURE_UNICODE_LITERALS="unicode_literals",n.FUTURE_DIVISION="division",n.FUTURE_ABSOLUTE_IMPORT="absolute_import",n.FUTURE_WITH_STATEMENT="with_statement",n.FUTURE_NESTED_SCOPES="nested_scopes",n.FUTURE_GENERATORS="generators",n.CO_FUTURE_PRINT_FUNCTION=65536,n.CO_FUTURE_UNICODE_LITERALS=131072,n.CO_FUTURE_DIVISON=8192,n.CO_FUTURE_ABSOLUTE_IMPORT=16384,n.CO_FUTURE_WITH_STATEMENT=32768,n.prototype.setup=function(t){t=t||this.grammar.start,this.stack=[{dfa:this.grammar.dfas[t],state:0,node:{type:t,value:null,context:null,children:[]}}],this.used_names={}},n.prototype.addtoken=function(t,e,n){var i,s=this.classify(t,e,n);t:for(;;){var r=this.stack[this.stack.length-1],o=r.dfa[0],a=o[r.state];for(i=0;ic),this.shift(t,e,u,n),n=u;1===o[n].length&&0===o[n][0][0]&&o[n][0][1]===n;){if(this.pop(),0===this.stack.length)return!0;n=(r=this.stack[this.stack.length-1]).state,o=r.dfa[0]}return!1}if(256<=c&&(l=(l=this.grammar.dfas[c])[1]).hasOwnProperty(s)){this.push(c,this.grammar.dfas[c],u,n);continue t}}e:{for(o=[0,r.state],r=a.length;r--;)if(a[r][0]===o[0]&&a[r][1]===o[1]){a=!0;break e}a=!1}if(!a)throw t=n[0][0],new Sk.builtin.SyntaxError("bad input",this.filename,t,n);if(this.pop(),0===this.stack.length)throw new Sk.builtin.SyntaxError("too much input",this.filename)}},n.prototype.classify=function(t,e,i){if(t===Sk.token.tokens.T_NAME){this.used_names[e]=!0;var s=this.grammar.keywords.hasOwnProperty(e)&&this.grammar.keywords[e];if("print"===e&&(this.p_flags&n.CO_FUTURE_PRINT_FUNCTION||!0===Sk.__future__.print_function)&&(s=!1),s)return s}if(!(s=this.grammar.tokens.hasOwnProperty(t)&&this.grammar.tokens[t])){e="#"+t;for(let n in Sk.token.tokens)if(Sk.token.tokens[n]==t){e=n;break}throw new Sk.builtin.SyntaxError("bad token "+e,this.filename,i[0][0],i)}return s},n.prototype.shift=function(t,e,n,i){var s=this.stack[this.stack.length-1].dfa,r=this.stack[this.stack.length-1].node;r.children.push({type:t,value:e,lineno:i[0][0],col_offset:i[0][1],children:null}),this.stack[this.stack.length-1]={dfa:s,state:n,node:r}},n.prototype.push=function(t,e,n,i){t={type:t,value:null,lineno:i[0][0],col_offset:i[0][1],children:[]},this.stack[this.stack.length-1]={dfa:this.stack[this.stack.length-1].dfa,state:n,node:this.stack[this.stack.length-1].node},this.stack.push({dfa:e,state:0,node:t})},n.prototype.pop=function(){var t=this.stack.pop().node;if(t)if(0!==this.stack.length){this.stack[this.stack.length-1].node.children.push(t)}else this.rootnode=t,this.rootnode.used_names=this.used_names},Sk.parse=function(t,e){var i,s=Sk.token.tokens.T_COMMENT,r=Sk.token.tokens.T_NL,o=Sk.token.tokens.T_OP,a=Sk.token.tokens.T_ENDMARKER,l=Sk.token.tokens.T_ENCODING,u=!1,c=function(t,e){return void 0===e&&(e="file_input"),t=new n(t,Sk.ParseTables),"file_input"===e?t.setup(Sk.ParseTables.sym.file_input):Sk.asserts.fail("todo;"),t}(t);if(Sk._tokenize(t,(i=e.split("\n").reverse().map((function(t){return t+"\n"})),function(){if(0===i.length)throw new Sk.builtin.Exception("EOF");return i.pop()}),"utf-8",(function(t){var e=null;t.type!==s&&t.type!==r&&t.type!==l&&(t.type===o&&(e=Sk.OpMap[t.string]),c.addtoken(e||t.type,t.string,[t.start,t.end,t.line]),t.type===a&&(u=!0))})),!u)throw new Sk.builtin.SyntaxError("incomplete input",this.filename);return{cst:c.rootnode,flags:c.p_flags}},Sk.parseTreeDump=function(t,e){var n,i=""+(e=e||"");if(256<=t.type)for(i+=Sk.ParseTables.number2symbol[t.type]+"\n",n=0;n=i(e)||o+2==i(e)&&s(e,o+1).type==V.T_COMMA)throw new Sk.builtin.SyntaxError("named arguments must follow bare *",t.c_filename,e.lineno);(_=s(e,o+1)).type==V.T_COMMA?o=$(t,e,o+=2,u,c):(p=v(t,_),(o+=3)t.c_feature_version)return o(t,l,"Async functions are only supported in Python 3.5 and greater"),null;r(l,B.funcdef);var d=h(s(l,p));if(u(t,0,s(l,p),0))return null;var f=w(t,s(l,p+1));if(!f)return null;if(s(l,p+2).type==V.T_RARROW){if(!(c=F(t,s(l,p+3))))return null;p+=2}if(s(l,p+3).type==V.T_TYPE_COMMENT){if(!(_=V.T_NEW_TYPE_COMMENT(s(l,p+3))))return null;p+=1}var g=m(t,s(l,p+3));if(!g)return null;if(1":return Sk.astnodes.RShift;case"&":return Sk.astnodes.BitAnd;case"^":return Sk.astnodes.BitXor;case"|":return Sk.astnodes.BitOr;case"*":return"*"===e.value.charAt(1)?Sk.astnodes.Pow:Sk.astnodes.Mult;case"@":if(Sk.__future__.python3)return Sk.astnodes.MatMult;default:Sk.asserts.fail("invalid augassign")}}(0,s(e,1)),a,e.lineno,e.col_offset)}if(s(e,1).type===B.annassign){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("Annotated assignment is not supported in Python 2",t.c_filename,e.lineno);n=s(e,0);var l=s(e,1),p=1;for(o=n;1==i(o);)o=s(o,0);switch(0o(r,a,"f-string: expecting '}'");for(Sk.asserts.assert(e<=n);e=e),Sk.asserts.assert("{"==t.charAt(e-1)),Sk.asserts.assert("}"==t.charAt(n)||"!"==t.charAt(n)||":"==t.charAt(n)),t=t.substring(e,n),/^\s*$/.test(t)&&o(i,s,"f-string: empty expression not allowed");try{let e=Sk.parse("","("+t+")");var r=Sk.astFromParse(e.cst,"",e.flags)}catch(t){throw t.traceback&&t.traceback[0]&&((r=t.traceback[0]).lineno=(r.lineno||1)-1+s.lineno,r.filename=i.c_filename),t}return Sk.asserts.assert(1==r.body.length&&r.body[0].constructor===Sk.astnodes.Expr),r.body[0].value}(t,l,e,r,a),"!"==t.charAt(e)&&(++e>=n&&d(),c=t.charAt(e),e++,"s"!=c&&"r"!=c&&"a"!=c&&o(r,a,"f-string: invalid conversion character: expected 's', 'r', or 'a'")),e>=n&&d(),":"==t.charAt(e)&&(++e>=n&&d(),[u,e]=x(t,e,n,i,s+1,r,a)),(e>=n||"}"!=t.charAt(e))&&d(),e++,[new Sk.astnodes.FormattedValue(l,c,u,a.lineno,a.col_offset),e]}function x(t,e,n,i,s,r,o){let a=[],l=t=>{if(-1!==t.indexOf("}")){if(/(^|[^}])}(}})*($|[^}])/.test(t))throw new Sk.builtin.SyntaxError("f-string: single '}' is not allowed",r.c_filename,o.lineno,o.col_offset);t=t.replace(/}}/g,"}")}a.push(new Sk.astnodes.Str(new Sk.builtin.str(t),o.lineno,o.col_offset,r.end_lineno,o.end_col_offset))};for(;ei&&(u=-1,n=i))}if(-1===u){l(t.substring(e,n)),e=n;break}if(u+1=l.length){if("None"===l)return new Sk.astnodes.NameConstant(Sk.builtin.none.none$,e.lineno,e.col_offset);if("True"===l)return new Sk.astnodes.NameConstant(Sk.builtin.bool.true$,e.lineno,e.col_offset);if("False"===l)return new Sk.astnodes.NameConstant(Sk.builtin.bool.false$,e.lineno,e.col_offset)}return t=h(l),new Sk.astnodes.Name(t,Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset);case V.T_STRING:n=[];for(var u=0;u=y&&o(p,_,"Truncated \\xNN escape"),T+=String.fromCharCode(parseInt(b.substr(m+1,2),16)),m+=2):k||"u"!==g?k||"U"!==g?T+="\\"+g:(m+8>=y&&o(p,_,"Truncated \\UXXXXXXXX escape"),T+=String.fromCodePoint(parseInt(b.substr(m+1,8),16)),m+=8):(m+4>=y&&o(p,_,"Truncated \\uXXXX escape"),T+=String.fromCharCode(parseInt(b.substr(m+1,4),16)),m+=4))):k&&127l.charCodeAt(1)&&(l="0o"+l.substring(1)),n=!0,"l"!==u&&"L"!==u||(l=l.slice(0,-1),n=!1),l=(u=Number(l))>Number.MAX_SAFE_INTEGER?n?new Sk.builtin.int_(JSBI.BigInt(l)):new Sk.builtin.lng(JSBI.BigInt(l)):n?new Sk.builtin.int_(u):new Sk.builtin.lng(u)),new t(l,e.lineno,e.col_offset);case V.T_ELLIPSIS:return new Sk.astnodes.Ellipsis(e.lineno,e.col_offset,e.end_lineno,e.end_col_offset);case V.T_LPAR:return(n=s(e,1)).type==V.T_RPAR?new Sk.astnodes.Tuple([],Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset):n.type==B.yield_expr?F(t,n):1==i(n)?M(t,n):s(n,1).type==B.comp_for?d(S(t,n),e):d(M(t,n),e);case V.T_LSQB:return(n=s(e,1)).type==V.T_RSQB?new Sk.astnodes.List([],Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset):(r(n,B.testlist_comp),1==i(n)||s(n,1).type==V.T_COMMA?(t=f(t,n))?new Sk.astnodes.List(t,Sk.astnodes.Load,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset):null:(l=n,Sk.asserts.assert(l.type==B.testlist_comp),d(t=O(t,l,1),e)));case V.T_LBRACE:if((n=s(e,1)).type==V.T_RBRACE)return new Sk.astnodes.Dict(null,null,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset);if(l=s(n,0).type==V.T_DOUBLESTAR,1==i(n)||13-l&&s(n,3-l).type==B.comp_for){if(l)return o(t,e,"dict unpacking cannot be used in dict comprehension"),null;l=n,Sk.asserts.assert(3>11&7,this.__namespaces=n||[]}function i(t,e,n,i,s){this.symFlags={},this.name=e,this.varnames=[],this.children=[],this.blockType=n,this.returnsValue=this.varkeywords=this.varargs=this.generator=this.childHasFree=this.hasFree=this.isNested=!1,this.lineno=s,this.table=t,t.cur&&(t.cur.nested||"function"===t.cur.blockType)&&(this.isNested=!0),i.scopeId=a++,t.stss[i.scopeId]=this,this.symbols={}}function s(t){this.filename=t,this.top=this.cur=null,this.stack=[],this.curClass=this.global=null,this.tmpname=0,this.stss={}}function r(t,e){var n;for(n=0;n>11&7)||2==t}))),this._funcGlobals},i.prototype.get_frees=function(){return Sk.asserts.assert("function"==this.get_type(),"get_frees only valid for function scopes"),this._funcFrees||(this._funcFrees=this._identsMatching((function(t){return 4==(t>>11&7)}))),this._funcFrees},i.prototype.get_methods=function(){var t;if(Sk.asserts.assert("class"==this.get_type(),"get_methods only valid for class scopes"),!this._classMethods){var e=[];for(t=0;t>11&7},s.prototype.getStsForAst=function(t){return Sk.asserts.assert(void 0!==t.scopeId,"ast wasn't added to st?"),t=this.stss[t.scopeId],Sk.asserts.assert(void 0!==t,"unknown sym tab entry"),t},s.prototype.SEQStmt=function(t){var e,n;if(null!==t){Sk.asserts.assert(Sk.isArrayLike(t),"SEQ: nodes isn't array? got "+t.toString());var i=t.length;for(n=0;n","").replace(" ","_"))};var a=Sk.builtin.str.reservedWords_;n.prototype.makeConstant=function(t){var e,n="";for(e=0;e Sk.execLimit) {throw new Sk.builtin.TimeoutError(Sk.timeoutMsg())}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(t=t+"if (!$waking && ($dateNow - Sk.lastYield > Sk.yieldLimit)) {var $susp = $saveSuspension({data: {type: 'Sk.yield'}, resume: function() {}}, '"+this.filename+"',$currLineNo,$currColNo);",t+="$susp.$blk = $blk;$susp.optional = true;return $susp;}$waking = false;",this.u.doesSuspend=!0)),t},n.prototype._jumpfalse=function(t,e){t=this._gr("jfalse","(",t,"===false||!Sk.misceval.isTrue(",t,"))"),o("if(",t,"){/*test failed */$blk=",e,";continue;}")},n.prototype._jumpundef=function(t,e){o("if(",t,"===undefined){$blk=",e,";continue;}")},n.prototype._jumpnotundef=function(t,e){o("if(",t,"!==undefined){$blk=",e,";continue;}")},n.prototype._jumptrue=function(t,e){t=this._gr("jtrue","(",t,"===true||Sk.misceval.isTrue(",t,"))"),o("if(",t,"){/*test passed */$blk=",e,";continue;}")},n.prototype._jump=function(t){null===this.u.blocks[this.u.curblock]._next&&(o("$blk=",t,";"),this.u.blocks[this.u.curblock]._next=t)},n.prototype._checkSuspension=function(t){if(this.u.canSuspend){var e=this.newBlock("function return or resume suspension");this._jump(e),this.setBlock(e),t=t||{lineno:"$currLineNo",col_offset:"$currColNo"},o("if ($ret && $ret.$isSuspension) { return $saveSuspension($ret,'"+this.filename+"',"+t.lineno+","+t.col_offset+"); }"),this.u.doesSuspend=!0,this.u.tempsToSave=this.u.tempsToSave.concat(this.u.localtemps)}else o("if ($ret && $ret.$isSuspension) { $ret = Sk.misceval.retryOptionalSuspensionOrThrow($ret); }")},n.prototype.cunpackstarstoarray=function(t,e){if(!t||0==t.length)return"[]";let n=!1;for(let i of t){if(e&&n)throw new Sk.builtin.SyntaxError("Extended argument unpacking is not permitted in Python 2");i.constructor===Sk.astnodes.Starred&&(n=!0)}if(n){e=this._gr("unpack","[]");for(let n of t)n.constructor!==Sk.astnodes.Starred?o(e,".push(",this.vexpr(n),");"):(o("$ret = Sk.misceval.iterFor(Sk.abstr.iter(",this.vexpr(n.value),"), function(e) { ",e,".push(e); });"),this._checkSuspension());return e}return"["+t.map((t=>this.vexpr(t))).join(",")+"]"},n.prototype.cunpackkwstoarray=function(t,e){var n="undefined";if(t&&0=n.length&&(n=this.vexpr(s),"dict"===t?(t=this.vexpr(r),o(e,".mp$ass_subscript(",t,",",n,");")):"list"===t?o(e,".v.push(",n,");"):"set"===t&&o(e,".v.mp$ass_subscript(",n,", true);"),this._jump(c),this.setBlock(c)),this._jump(u),this.setBlock(p),e},n.prototype.cyield=function(t){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,t.lineno);var e="Sk.builtin.none.none$";return t.value&&(e=this.vexpr(t.value)),t=this.newBlock("after yield"),o("return [/*resume*/",t,",/*ret*/",e,"];"),this.setBlock(t),"$gen.gi$sentvalue"},n.prototype.cyieldfrom=function(t){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,t.lineno);var e=this.vexpr(t.value);e=this._gr("iter","Sk.abstr.iter(",e,")"),o("$gen."+e+"=",e,";");var n=this.newBlock("after iter"),i=this.newBlock("after yield from");this._jump(n),this.setBlock(n);var s=this.gensym("retval");o(e,"=$gen.",e,";"),o("var ",s,";"),o("if ($gen.gi$sentvalue === Sk.builtin.none.none$ || "+e+".constructor === Sk.builtin.generator) {"),o("$ret=",e,".tp$iternext(true, $gen.gi$sentvalue);"),o("} else {");var r=this.makeConstant("new Sk.builtin.str('send');");return o("$ret=Sk.misceval.tryCatch("),o("function(){"),o("return Sk.misceval.callsimOrSuspendArray(Sk.abstr.gattr(",e,",",r,"), [$gen.gi$sentvalue]);},"),o("function (e) { "),o("if (e instanceof Sk.builtin.StopIteration) { "),o(e,".gi$ret = e.$value;"),o("return undefined;"),o("} else { throw e; }"),o("}"),o(");"),o("}"),this._checkSuspension(t),o(s,"=$ret;"),o("if(",s,"===undefined) {"),o("$gen.gi$sentvalue=$gen."+e+".gi$ret;"),o("$blk=",i,";continue;"),o("}"),o("return [/*resume*/",n,",/*ret*/",s,"];"),this.setBlock(i),"$gen.gi$sentvalue"},n.prototype.ccompare=function(t){var e;Sk.asserts.assert(t.ops.length===t.comparators.length);var n=this.vexpr(t.left),i=t.ops.length,s=this.newBlock("done"),r=this._gr("compareres","null");for(e=0;ethis.u.lineno&&(this.u.lineno=t.lineno,this.u.linenoSet=!1),t.constructor){case Sk.astnodes.BoolOp:return this.cboolop(t);case Sk.astnodes.BinOp:return this._gr("binop","Sk.abstr.numberBinOp(",this.vexpr(t.left),",",this.vexpr(t.right),",'",t.op.prototype._astname,"')");case Sk.astnodes.UnaryOp:return this._gr("unaryop","Sk.abstr.numberUnaryOp(",this.vexpr(t.operand),",'",t.op.prototype._astname,"')");case Sk.astnodes.Lambda:return this.clambda(t);case Sk.astnodes.IfExp:return this.cifexp(t);case Sk.astnodes.Dict:return this.cdict(t);case Sk.astnodes.ListComp:return this.clistcomp(t);case Sk.astnodes.DictComp:return this.cdictcomp(t);case Sk.astnodes.SetComp:return this.csetcomp(t);case Sk.astnodes.GeneratorExp:return this.cgenexp(t);case Sk.astnodes.Yield:return this.cyield(t);case Sk.astnodes.YieldFrom:return this.cyieldfrom(t);case Sk.astnodes.Compare:return this.ccompare(t);case Sk.astnodes.Call:return e=this.ccall(t),this.annotateSource(t),e;case Sk.astnodes.Num:if("number"==typeof t.n)return t.n;if(t.n instanceof Sk.builtin.lng)return this.makeConstant("new Sk.builtin.lng('"+t.n.v.toString()+"')");if(t.n instanceof Sk.builtin.int_)return"number"==typeof t.n.v?this.makeConstant("new Sk.builtin.int_("+t.n.v+")"):this.makeConstant("new Sk.builtin.int_('"+t.n.v.toString()+"')");if(t.n instanceof Sk.builtin.float_)return t=0===t.n.v&&-1/0==1/t.n.v?"-0":t.n.v,this.makeConstant("new Sk.builtin.float_("+t+")");if(t.n instanceof Sk.builtin.complex)return this.makeConstant("new Sk.builtin.complex("+(0===t.n.real&&-1/0==1/t.n.real?"-0":t.n.real)+", "+(0===t.n.imag&&-1/0==1/t.n.imag?"-0":t.n.imag)+")");Sk.asserts.fail("unhandled Num type");case Sk.astnodes.Bytes:if(Sk.__future__.python3){for(e=[],t=t.s.$jsstr(),n=0;ni||127<=i&&256>i?n+"\\x"+("0"+i.toString(16)).substr(-2):256<=i?n+"\\u"+("000"+i.toString(16)).substr(-4):n+t.charAt(s);return t=n+'"',e.call(this,"new Sk.builtin.str(",t,")");case Sk.astnodes.Attribute:switch(t.ctx!==Sk.astnodes.AugLoad&&t.ctx!==Sk.astnodes.AugStore&&(s=this.vexpr(t.value)),i=(i=t.attr.$r().v).substring(1,i.length-1),i=r(this.u.private_,new Sk.builtin.str(i)).v,i=this.makeConstant("new Sk.builtin.str('"+i+"')"),t.ctx){case Sk.astnodes.AugLoad:return o("$ret = ",n,".tp$getattr(",i,", true);"),this._checkSuspension(t),o("\nif ($ret === undefined) {"),o("\nthrow new Sk.builtin.AttributeError(",n,'.sk$attrError() + " has no attribute \'" + ',i,'.$jsstr() + "\'");'),o("\n};"),this._gr("lattr","$ret");case Sk.astnodes.Load:return o("$ret = ",s,".tp$getattr(",i,", true);"),this._checkSuspension(t),o("\nif ($ret === undefined) {"),o("\nthrow new Sk.builtin.AttributeError(",s,'.sk$attrError() + " has no attribute \'" + ',i,'.$jsstr() + "\'");'),o("\n};"),this._gr("lattr","$ret");case Sk.astnodes.AugStore:o("$ret = undefined;"),o("if(",e,"!==undefined){"),o("$ret = ",n,".tp$setattr(",i,",",e,", true);"),o("}"),this._checkSuspension(t);break;case Sk.astnodes.Store:o("$ret = ",s,".tp$setattr(",i,",",e,", true);"),this._checkSuspension(t);break;case Sk.astnodes.Del:o("$ret = ",s,".tp$setattr(",i,", undefined, true);"),this._checkSuspension(t);break;default:Sk.asserts.fail("invalid attribute expression")}break;case Sk.astnodes.Subscript:switch(t.ctx){case Sk.astnodes.AugLoad:return o("$ret = Sk.abstr.objectGetItem(",n,",",i,", true);"),this._checkSuspension(t),this._gr("gitem","$ret");case Sk.astnodes.Load:case Sk.astnodes.Store:case Sk.astnodes.Del:return this.vslice(t.slice,t.ctx,this.vexpr(t.value),e);case Sk.astnodes.AugStore:o("$ret=undefined;"),o("if(",e,"!==undefined){"),o("$ret=Sk.abstr.objectSetItem(",n,",",i,",",e,", true)"),o("}"),this._checkSuspension(t);break;default:Sk.asserts.fail("invalid subscript expression")}break;case Sk.astnodes.Name:return this.nameop(t.id,t.ctx,e);case Sk.astnodes.NameConstant:if(t.ctx===Sk.astnodes.Store||t.ctx===Sk.astnodes.AugStore||t.ctx===Sk.astnodes.Del)throw new Sk.builtin.SyntaxError("can not assign to a constant name");switch(t.value){case Sk.builtin.none.none$:return"Sk.builtin.none.none$";case Sk.builtin.bool.true$:return"Sk.builtin.bool.true$";case Sk.builtin.bool.false$:return"Sk.builtin.bool.false$";default:Sk.asserts.fail("invalid named constant")}break;case Sk.astnodes.List:return this.ctuplelistorset(t,e,"list");case Sk.astnodes.Tuple:return this.ctuplelistorset(t,e,"tuple");case Sk.astnodes.Set:return this.ctuplelistorset(t,e,"set");case Sk.astnodes.Starred:if(t.ctx===Sk.astnodes.Store)throw new Sk.builtin.SyntaxError("starred assignment target must be in a list or tuple",this.filename,t.lineno);throw new Sk.builtin.SyntaxError("can't use starred expression here",this.filename,t.lineno);case Sk.astnodes.JoinedStr:return this.cjoinedstr(t);case Sk.astnodes.FormattedValue:return this.cformattedvalue(t);case Sk.astnodes.Ellipsis:return this.makeConstant("Sk.builtin.Ellipsis");default:Sk.asserts.fail("unhandled case "+t.constructor.name+" vexpr")}},n.prototype.vseqexpr=function(t,e){var n;Sk.asserts.assert(void 0===e||t.length===e.length);var i=[];for(n=0;n",this.u.blocks[e]._next=null,e},n.prototype.setBlock=function(t){Sk.asserts.assert(0<=t&&t0) { $err=err; $blk=$exc.pop(); } else { throw err; } }};",o+="var $saveSuspension = function($child, $filename, $lineno, $colno) {var susp = new Sk.misceval.Suspension(); susp.child=$child;susp.resume=function(){"+t.scopename+".$wakingSuspension=susp; return "+t.scopename+"("+(t.ste.generator?"$gen":"")+"); };susp.data=susp.child.data;susp.$blk=$blk;susp.$loc=$loc;susp.$gbl=$gbl;susp.$exc=$exc;susp.$err=$err;susp.$postfinally=$postfinally;susp.$filename=$filename;susp.$lineno=$lineno;susp.$colno=$colno;susp.optional=susp.child.optional;"+(r?"susp.$cell=$cell;":""),s={},e=0;et?this.vexpr(t):"undefined"))),i&&i.vararg&&(d=i.vararg),i&&i.kwarg&&(f=i.kwarg),!Sk.__future__.python3&&i&&i.kwonlyargs&&0!=i.kwonlyargs.length)throw new Sk.builtin.SyntaxError("Keyword-only arguments are not supported in Python 2");var m=this.enterScope(e,t,t.lineno,this.canSuspend),g=this.u.ste.generator,b=this.u.ste.hasFree,S=this.u.ste.childHasFree,k=this.newBlock("codeobj entry");this.u.prefixCode="var "+m+"=(function "+this.niceName(e.v)+"$(";var y=[];if(g){if(f)throw new Sk.builtin.SyntaxError(e.v+"(): keyword arguments in generators not supported",this.filename,t.lineno);if(d)throw new Sk.builtin.SyntaxError(e.v+"(): variable number of arguments in generators not supported",this.filename,t.lineno);y.push("$gen")}else{for(f&&(y.push("$kwa"),this.u.tempsToSave.push("$kwa")),u=0;i&&u0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} }});",a.call(this,m),i){for(let t of i.args)c.push(t.arg.v);for(let t of i.kwonlyargs||[])c.push(t.arg.v);this.u.argnames=c}if(this.exitScope(),0"),null,t.args,(function(e){e=this.vexpr(t.body),o("return ",e,";")}))},n.prototype.cifexp=function(t){var e=this.newBlock("next of ifexp"),n=this.newBlock("end of ifexp"),i=this._gr("res","null"),s=this.vexpr(t.test);return this._jumpfalse(s,e),o(i,"=",this.vexpr(t.body),";"),this._jump(n),this.setBlock(e),o(i,"=",this.vexpr(t.orelse),";"),this._jump(n),this.setBlock(n),i},n.prototype.cgenexpgen=function(t,e,n){var i=this.newBlock("start for "+e),s=this.newBlock("skip for "+e);this.newBlock("if cleanup for "+e);var r=this.newBlock("end for "+e),a=t[e];if(0===e)var l="$loc.$iter0";else{var u=this.vexpr(a.iter);l="$loc."+this.gensym("iter"),o(l,"=","Sk.abstr.iter(",u,");")}this._jump(i),this.setBlock(i),this.annotateSource(n),o("$ret = Sk.abstr.iternext(",l,this.u.canSuspend?", true":", false",");"),this._checkSuspension(n),u=this._gr("next","$ret"),this._jumpundef(u,r),this.vexpr(a.target,u);var c=a.ifs?a.ifs.length:0;for(l=0;l=t.length&&(this.annotateSource(n),t=this.vexpr(n),o("return [",s,"/*resume*/,",t,"/*ret*/];"),this.setBlock(s)),this._jump(i),this.setBlock(r),1===e&&o("return Sk.builtin.none.none$;")},n.prototype.cgenexp=function(t){var e=this.buildcodeobj(t,new Sk.builtin.str(""),null,null,(function(e){this.cgenexpgen(t.generators,0,t.elt)}));return e=this._gr("gener","Sk.misceval.callsimArray(",e,");"),o(e,".gi$locals.$iter0=Sk.abstr.iter(",this.vexpr(t.generators[0].iter),");"),e},n.prototype.cclass=function(t){Sk.asserts.assert(t instanceof Sk.astnodes.ClassDef);var e=this.vseqexpr(t.decorator_list),n=this.vseqexpr(t.bases);let i=this.cunpackkwstoarray(t.keywords);var s=this.enterScope(t.name,t,t.lineno),r=this.newBlock("class entry");this.u.prefixCode="var "+s+"=(function $"+t.name.v+"$class_outer($globals,$locals,$cell){var $gbl=$globals,$loc=$locals,$free=$globals;",this.u.switchCode+="(function $"+t.name.v+"$_closure($cell){",this.u.switchCode+="var $blk="+r+",$exc=[],$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.switchCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.switchCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.switchCode+="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }}}",this.u.suffixCode+="}).call(null, $cell);});",this.u.private_=t.name,this.cbody(t.body,t.name),o("return;"),this.exitScope(),o("$ret = Sk.misceval.buildClass($gbl,",s,",",t.name.$r().v,",[",n,"], $cell, ",i,");"),this._checkSuspension();for(let t of e.reverse())o("$ret = Sk.misceval.callsimOrSuspendArray(",t,", [$ret]);"),this._checkSuspension();this.nameop(t.name,Sk.astnodes.Store,"$ret")},n.prototype.ccontinue=function(t){var e=this.peekFinallyBlock();if(0==this.u.continueBlocks.length)throw new Sk.builtin.SyntaxError("'continue' outside loop",this.filename,t.lineno);t=this.u.continueBlocks[this.u.continueBlocks.length-1],Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length),e&&e.breakDepth==this.u.continueBlocks.length?o("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},n.prototype.cbreak=function(t){var e=this.peekFinallyBlock();if(0===this.u.breakBlocks.length)throw new Sk.builtin.SyntaxError("'break' outside loop",this.filename,t.lineno);t=this.u.breakBlocks[this.u.breakBlocks.length-1],e&&e.breakDepth==this.u.breakBlocks.length?o("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},n.prototype.vstmt=function(t,e){if(this.u.lineno=t.lineno,this.u.linenoSet=!1,this.u.localtemps=[],Sk.debugging&&this.u.canSuspend){var n=this.newBlock("debug breakpoint for line "+t.lineno);o("if (Sk.breakpoints('"+this.filename+"',"+t.lineno+","+t.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.debug'}, resume: function() {}}, '"+this.filename+"',"+t.lineno+","+t.col_offset+");","$susp.$blk = "+n+";","$susp.optional = true;","return $susp;","}"),this._jump(n),this.setBlock(n),this.u.doesSuspend=!0}switch(this.annotateSource(t),t.constructor){case Sk.astnodes.FunctionDef:this.cfunction(t,e);break;case Sk.astnodes.ClassDef:this.cclass(t);break;case Sk.astnodes.Return:if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'return' outside function",this.filename,t.lineno);n=t.value?this.vexpr(t.value):"Sk.builtin.none.none$",0==this.u.finallyBlocks.length?o("return ",n,";"):(o("$postfinally={returning:",n,"};"),this._jump(this.peekFinallyBlock().blk));break;case Sk.astnodes.Delete:this.vseqexpr(t.targets);break;case Sk.astnodes.Assign:var i=t.targets.length;for(n=this.vexpr(t.value),e=0;e"!==t.name.v){var e=t.name.$r().v;e=e.substring(1,e.length-1),o(t.scopename,".co_name=new Sk.builtins['str']('",e,"');"),this.stack.length&&"class"==this.u.ste.blockType&&o(t.scopename,".co_qualname=new Sk.builtins['str']('"+this.u.name.v+"."+e+"');")}for(var n in t.consts)t.consts.hasOwnProperty(n)&&(t.suffixCode+=n+" = "+t.consts[n]+";")},n.prototype.cbody=function(t,e){var n=0;const i=this.maybeCDocstringOfBody(t);for(null!==i&&(o("$loc.__doc__ = ",i,";"),n=1);n"),t,0,this.canSuspend),n=this.newBlock("module entry");if(this.u.prefixCode="var "+e+"=(function($forcegbl, $forceloc){",this.u.varDeclsCode="var $gbl = $forcegbl || {}, $blk="+n+",$exc=[],$loc=$forceloc || $gbl,$cell={},$err=undefined;var $ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.varDeclsCode+="var $waking=false; if ("+e+".$wakingSuspension!==undefined) { $wakeFromSuspension(); $waking=true; }if (Sk.retainGlobals) { if (Sk.globals) { $gbl = Sk.globals; Sk.globals = $gbl; $loc = $gbl; } else { Sk.globals = $gbl; }} else { Sk.globals = $gbl; }",this.u.switchCode="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}",this.u.suffixCode+="}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} } });",t.constructor===Sk.astnodes.Module)this.cbody(t.body),o("return $loc;");else Sk.asserts.fail("todo; unhandled case in compilerMod");return this.exitScope(),this.result.push(this.outputAllUnits()),e},Sk.compile=function(t,e,i,s){i=Sk.__future__,Sk.__future__=Object.create(Sk.__future__);var r=Sk.parse(e,t),o=Sk.astFromParse(r.cst,e,r.flags);return r=r.flags,s=(t=new n(e,Sk.symboltable(o,e),r,s,t)).cmod(o),Sk.__future__=i,{funcname:"$compiledmod",code:`var $compiledmod = function() {${t.result.join("")}\nreturn ${s};}();\n$compiledmod;`,filename:e}},Sk.exportSymbol("Sk.compile",Sk.compile),Sk.resetCompiler=function(){Sk.gensymcount=0},Sk.exportSymbol("Sk.resetCompiler",Sk.resetCompiler),Sk.fixReserved=s,Sk.exportSymbol("Sk.fixReserved",Sk.fixReserved),Sk.unfixReserved=function(t){return t.replace(/_\$rw\$$/,"")},Sk.exportSymbol("Sk.unfixReserved",Sk.unfixReserved),Sk.mangleName=r,Sk.exportSymbol("Sk.mangleName",Sk.mangleName),Sk.reservedWords_=a,Sk.exportSymbol("Sk.reservedWords_",Sk.reservedWords_)},function(t,e){Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.importSearchPathForName=function(t,e,n){var i=t.replace(/\./g,"/"),s=function(t,e){return Sk.misceval.chain(Sk.misceval.tryCatch((function(){return Sk.read(t)}),(function(t){})),(function(n){if(void 0!==n)return new Sk.misceval.Break({filename:t,code:n,packagePath:e})}))};return void 0===n&&(n=Sk.realsyspath),Sk.misceval.iterFor(n.tp$iter(),(function(t){return Sk.misceval.chain(s(t.v+"/"+i+e,!1),(function(n){return n||s(t.v+"/"+i+"/__init__"+e,t.v+"/"+i)}))}))},Sk.importSetUpPath=function(t){if(!Sk.realsyspath){var e=[new Sk.builtin.str("src/builtin"),new Sk.builtin.str("src/lib"),new Sk.builtin.str(".")];for(t=0;ti;++i)t+=" ";n[e-1]="/* "+t+e+" */ "+n[e-1]}return n.join("\n")}(r),Sk.debugout(r)}"$compiledmod"!==i.funcname&&(r+="\n"+i.funcname+";");var o=new Sk.builtin.str(n),l=new Sk.builtin.str(t);Sk.sysmodules.mp$ass_subscript(o,c),s&&s.tp$setattr(l,c);var u=Sk.global.eval(r);c.init$dict(o,Sk.builtin.none.none$),c.$d.__package__=i.packagePath?o:m?new Sk.builtin.str(_+m):h||Sk.builtin.none.none$,i.packagePath&&(c.$d.__path__=new Sk.builtin.tuple([new Sk.builtin.str(i.packagePath)])),i.filename&&"$builtinmodule"!==i.funcname&&(c.$d.__file__=new Sk.builtin.str(i.filename));var p=s&&s.$initializing;return c.$initializing=!0,s&&!p&&(s.$initializing=!0),Sk.misceval.tryCatch((()=>Sk.misceval.chain(u(c.$d),(t=>(c.$initializing=!1,s&&!p&&(s.$initializing=!1),t)))),(t=>{try{Sk.abstr.objectDelItem(Sk.sysmodules,o)}catch(t){}if(s)try{s.tp$setattr(l,void 0)}catch(t){}throw c.$initializing=!1,s&&!p&&(s.$initializing=!1),t}))}}),(function(e){var n;if(void 0===e){if(r&&!p)return;throw new Sk.builtin.ModuleNotFoundError("No module named "+Sk.misceval.objectRepr(new Sk.builtin.str(t)))}if(e!==c.$d){for(n in c.$d)e[n]||(e[n]=c.$d[n]);c.$d=e}if(Sk.onAfterImport&&"function"==typeof Sk.onAfterImport)try{Sk.onAfterImport(t)}catch(t){}return p?(u.tp$setattr(new Sk.builtin.str(f[f.length-1]),c),p):c}))}));return o?g:Sk.misceval.retryOptionalSuspensionOrThrow(g)},Sk.importModule=function(t,e,n){return Sk.importModuleInternal_(t,e,void 0,void 0,void 0,!1,n)},Sk.importMain=function(t,e,n){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(t,e,"__main__",void 0,void 0,!1,n)},Sk.importMainWithBody=function(t,e,n,i){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(t,e,"__main__",n,void 0,!1,i)},Sk.importBuiltinWithBody=function(t,e,n,i){return Sk.importModuleInternal_(t,e,"__builtin__."+t,n,void 0,!1,i)},Sk.builtin.__import__=function(t,e,n,i,s){t=t.toString();var r,o=Sk.globals;if(null==s&&(s=Sk.__future__.absolute_import?0:-1),0!==s&&e.__package__&&e.__package__!==Sk.builtin.none.none$){if((r=e.__package__.v)&&0=e.length)throw new Sk.builtin.ImportError("Attempted relative import beyond toplevel package");e.length-=s-1,r=e.join(".")}var a=Sk.sysmodules.quick$lookup(new Sk.builtin.str(r))}if(0Sk.importModuleInternal_(s,void 0,void 0,void 0,n,!0,!0)))}return Sk.misceval.chain(...e,(function(){return Sk.asserts.assert(n),n}))}return e}),(function(t){return o!==Sk.globals&&(Sk.globals=o),t}))},Sk.importStar=function(t,e,n){if(n=t.tp$getattr(new Sk.builtin.str("__all__")))for(let i=Sk.abstr.iter(n),s=i.tp$iternext();void 0!==s;s=i.tp$iternext())e[s.v]=Sk.abstr.gattr(t,s);else{n=Object.getOwnPropertyNames(t.$d);for(let i in n)"_"!=n[i].charAt(0)&&(e[n[i]]=t.$d[n[i]])}},Sk.exportSymbol("Sk.importMain",Sk.importMain),Sk.exportSymbol("Sk.importMainWithBody",Sk.importMainWithBody),Sk.exportSymbol("Sk.importBuiltinWithBody",Sk.importBuiltinWithBody),Sk.exportSymbol("Sk.builtin.__import__",Sk.builtin.__import__),Sk.exportSymbol("Sk.importStar",Sk.importStar)},function(t,e){Sk.builtin.timSort=function(t,e){this.list=new Sk.builtin.list(t.v),this.MIN_GALLOP=7,this.listlength=e||t.sq$length()},Sk.builtin.timSort.prototype.lt=function(t,e){return Sk.misceval.richCompareBool(t,e,"Lt")},Sk.builtin.timSort.prototype.le=function(t,e){return!this.lt(e,t)},Sk.builtin.timSort.prototype.setitem=function(t,e){this.list.v[t]=e},Sk.builtin.timSort.prototype.binary_sort=function(t,e){var n;for(n=t.base+e;n>1);this.lt(e,t.getitem(r))?s=r:i=r+1}for(Sk.asserts.assert(i===s),r=n;r>i;r--)t.setitem(r,t.getitem(r-1));t.setitem(i,e)}},Sk.builtin.timSort.prototype.count_run=function(t){var e;if(1>=t.len)var n=t.len,i=!1;else if(n=2,this.lt(t.getitem(t.base+1),t.getitem(t.base)))for(i=!0,e=t.base+2;ee.len)){for(this.merge_init(),t=this.merge_compute_minrun(e.len);0s&&(l=s),a+=n,l+=n}else{for(s=n+1;ls&&(l=s),o=n-a,a=n-l,l=o}for(Sk.asserts.assert(-1<=a>1),i(e.getitem(e.base+n),t)?a=n+1:l=n;return Sk.asserts.assert(a==l),l},Sk.builtin.timSort.prototype.merge_init=function(){this.min_gallop=this.MIN_GALLOP,this.pending=[]},Sk.builtin.timSort.prototype.merge_lo=function(t,e){var n,i,s;Sk.asserts.assert(0=r)break}else{if(this.setitem(o,t.popleft()),o++,1==t.len)return;if(i=0,++n>=r)break}for(r+=1;;){for(this.min_gallop=r-=1=t.len)return;if(this.setitem(o,e.popleft()),o++,0===e.len)return;for(i=this.gallop(t.getitem(t.base),e,0,!1),s=e.base;s=r)break}else{if(o--,this.setitem(o,l),e.len--,1==e.len)return;if(n=0,++i>=r)break}}for(r+=1;;){this.min_gallop=r-=1t.base+u-1;s--)o--,this.setitem(o,t.getitem(s));if(t.len-=n,0===t.len)return;if(o--,this.setitem(o,e.popright()),1==e.len)return;for(a=t.getitem(t.base+t.len-1),u=this.gallop(a,e,e.len-1,!1),i=e.len-u,s=e.base+e.len-1;s>e.base+u-1;s--)o--,this.setitem(o,e.getitem(s));if(e.len-=i,1>=e.len)return;if(o--,this.setitem(o,t.popright()),0===t.len)return;if(nt.base-1;s--)o--,this.setitem(o,t.getitem(s));for(s=e.base+e.len-1;s>e.base-1;s--)o--,this.setitem(o,e.getitem(s))}},Sk.builtin.timSort.prototype.merge_at=function(t){0>t&&(t=this.pending.length+t);var e=this.pending[t],n=this.pending[t+1];Sk.asserts.assert(0>=1;return t+e},Sk.builtin.listSlice=function(t,e,n){this.list=t,this.base=e,this.len=n},Sk.builtin.listSlice.prototype.copyitems=function(){var t=this.base,e=this.base+this.len;return Sk.asserts.assert(0<=t<=e),new Sk.builtin.listSlice(new Sk.builtin.list(this.list.v.slice(t,e)),0,this.len)},Sk.builtin.listSlice.prototype.advance=function(t){this.base+=t,this.len-=t,Sk.asserts.assert(this.base<=this.list.sq$length())},Sk.builtin.listSlice.prototype.getitem=function(t){return this.list.v[t]},Sk.builtin.listSlice.prototype.setitem=function(t,e){this.list.v[t]=e},Sk.builtin.listSlice.prototype.popleft=function(){var t=this.list.v[this.base];return this.base++,this.len--,t},Sk.builtin.listSlice.prototype.popright=function(){return this.len--,this.list.v[this.base+this.len]},Sk.builtin.listSlice.prototype.reverse=function(){for(var t,e,n=this.list,i=this.base,s=i+this.len-1;i same as super(__class__, )\nsuper(type) -> unbound super object\nsuper(type, obj) -> bound super object; requires isinstance(obj, type)\nsuper(type, type2) -> bound super object; requires issubclass(type2, type)\nTypical use to call a cooperative superclass method:\nclass C(B):\n def meth(self, arg):\n super().meth(arg)\nThis works for class methods too:\nclass C(B):\n @classmethod\n def cmeth(cls, arg):\n super().cmeth(arg)\n",tp$new:Sk.generic.new,tp$init(t,e){if(Sk.abstr.checkNoKwargs("super",e),Sk.abstr.checkArgsLen("super",t,1,2),e=t[0],t=t[1],!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("must be type, not "+Sk.abstr.typeName(e));this.obj=t,this.type=e,null!=this.obj&&(this.obj_type=this.$supercheck(e,this.obj))},$r(){return this.obj?new Sk.builtin.str(", <"+Sk.abstr.typeName(this.obj)+" object>>"):new Sk.builtin.str(", NULL>")},tp$getattr(t,e){let n=this.obj_type;if(null==n)return Sk.generic.getAttr.call(this,t,e);var i=n.prototype.tp$mro;const s=i.length;if(t===Sk.builtin.str.$class)return Sk.generic.getAttr.call(this,t,e);let r,o;for(r=0;r+1=s)return Sk.generic.getAttr.call(this,t,e);for(t=t.$mangled;r(Sk.abstr.checkNoKwargs("GenericAlias",e),Sk.abstr.checkArgsLen("GenericAlias",t,2,2),new Sk.builtin.GenericAlias(t[0],t[1])),tp$getattr(t,e){return Sk.builtin.checkString(t)&&!this.attr$exc.includes(t)?this.$origin.tp$getattr(t,e):Sk.generic.getAttr.call(this,t,e)},$r(){const t=this.ga$repr(this.$origin);let e="";return this.$args.v.forEach(((t,n)=>{e+=0{this.is$typevar(e)&&0>this.tuple$index(t,e)&&t.push(e)})),this.$params=new Sk.builtin.tuple(t)},tuple$index:(t,e)=>t.indexOf(e),is$typevar(t){if("TypeVar"!==t.tp$name)return!1;if(void 0===(t=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$module)))throw Sk.builtin.RuntimeError("found object withought a __module__");return"typing"===t.toString()},ga$repr(t){if(t===Sk.builtin.Ellipsis)return"...";if(Sk.abstr.lookupSpecial(t,this.str$orig)&&Sk.abstr.lookupSpecial(t,this.str$args))return Sk.misceval.objectRepr(t);const e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$qualname);if(void 0===e)return Sk.misceval.objectRepr(t);const n=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$module);return void 0===n||Sk.builtin.checkNone(n)?Sk.misceval.objectRepr(t):"builtins"===n.toString()?e.toString():n.toString()+"."+e.toString()},str$orig:new Sk.builtin.str("__origin__"),str$args:new Sk.builtin.str("__args__"),attr$exc:"__origin__ __args__ __parameters__ __mro_entries__ __reduce_ex__ __reduce__".split(" ").map((t=>new Sk.builtin.str(t)))}})},function(t,e){function n(t,e){let n;if(void 0===t||Sk.builtin.checkNone(t))t=void 0;else{if(!(t instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError(e+" must be a dict or None, not "+Sk.abstr.typeName(t));n={},t.$items().forEach((t=>{var[e,i]=t;Sk.builtin.checkString(e)&&(n[e.$mangled]=i)}))}return n}function i(t,e){if(void 0!==t&&!Sk.builtin.checkNone(t))for(let n in e)t.mp$ass_subscript(new Sk.builtin.str(Sk.unfixReserved(n)),e[n])}Sk.builtins={round:null,len:null,min:null,max:null,sum:null,abs:null,fabs:null,ord:null,chr:null,hex:null,oct:null,bin:null,dir:null,repr:null,open:null,isinstance:null,hash:null,getattr:null,hasattr:null,id:null,sorted:null,any:null,all:null,enumerate:Sk.builtin.enumerate,filter:Sk.builtin.filter_,map:Sk.builtin.map_,range:Sk.builtin.range_,reversed:Sk.builtin.reversed,zip:Sk.builtin.zip_,BaseException:Sk.builtin.BaseException,AttributeError:Sk.builtin.AttributeError,ValueError:Sk.builtin.ValueError,Exception:Sk.builtin.Exception,ZeroDivisionError:Sk.builtin.ZeroDivisionError,AssertionError:Sk.builtin.AssertionError,ImportError:Sk.builtin.ImportError,ModuleNotFoundError:Sk.builtin.ModuleNotFoundError,IndentationError:Sk.builtin.IndentationError,IndexError:Sk.builtin.IndexError,LookupError:Sk.builtin.LookupError,KeyError:Sk.builtin.KeyError,TypeError:Sk.builtin.TypeError,UnicodeDecodeError:Sk.builtin.UnicodeDecodeError,UnicodeEncodeError:Sk.builtin.UnicodeEncodeError,NameError:Sk.builtin.NameError,UnboundLocalError:Sk.builtin.UnboundLocalError,IOError:Sk.builtin.IOError,NotImplementedError:Sk.builtin.NotImplementedError,SystemExit:Sk.builtin.SystemExit,OverflowError:Sk.builtin.OverflowError,OperationError:Sk.builtin.OperationError,NegativePowerError:Sk.builtin.NegativePowerError,RuntimeError:Sk.builtin.RuntimeError,RecursionError:Sk.builtin.RecursionError,StopIteration:Sk.builtin.StopIteration,SyntaxError:Sk.builtin.SyntaxError,SystemError:Sk.builtin.SystemError,KeyboardInterrupt:Sk.builtin.KeyboardInterrupt,float_$rw$:Sk.builtin.float_,int_$rw$:Sk.builtin.int_,bool:Sk.builtin.bool,complex:Sk.builtin.complex,dict:Sk.builtin.dict,file:Sk.builtin.file,frozenset:Sk.builtin.frozenset,function:Sk.builtin.func,generator:Sk.builtin.generator,list:Sk.builtin.list,long_$rw$:Sk.builtin.lng,method:Sk.builtin.method,object:Sk.builtin.object,slice:Sk.builtin.slice,str:Sk.builtin.str,set:Sk.builtin.set,tuple:Sk.builtin.tuple,type:Sk.builtin.type,input:null,raw_input:new Sk.builtin.func(Sk.builtin.raw_input),setattr:null,jseval:Sk.builtin.jseval,jsmillis:Sk.builtin.jsmillis,quit:new Sk.builtin.func(Sk.builtin.quit),exit:new Sk.builtin.func(Sk.builtin.quit),print:null,divmod:null,format:null,globals:null,issubclass:null,iter:null,execfile:Sk.builtin.execfile,help:Sk.builtin.help,memoryview:Sk.builtin.memoryview,reload:Sk.builtin.reload,super_$rw$:Sk.builtin.super_,unichr:new Sk.builtin.func(Sk.builtin.unichr),vars:Sk.builtin.vars,apply_$rw$:Sk.builtin.apply_,buffer:Sk.builtin.buffer,coerce:Sk.builtin.coerce,intern:Sk.builtin.intern,property:Sk.builtin.property,classmethod:Sk.builtin.classmethod,staticmethod:Sk.builtin.staticmethod,Ellipsis:Sk.builtin.Ellipsis},t=Sk.builtin.none.none$,e=new Sk.builtin.tuple;const s=new Sk.builtin.int_(0);Sk.abstr.setUpModuleMethods("builtins",Sk.builtins,{__import__:{$meth(t,e,i,s,r){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__import__() argument 1 must be str, not "+t.tp$name);if(t===Sk.builtin.str.$empty&&0===r.v)throw new Sk.builtin.ValueError("Empty module name");return e=n(e,"globals")||{},s=Sk.ffi.remapToJs(s),r=Sk.ffi.remapToJs(r),Sk.builtin.__import__(t,e,void 0,s,r)},$flags:{NamedArgs:["name","globals","locals","fromlist","level"],Defaults:[t,t,e,s]},$textsig:null,$doc:"__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module\n\nImport a module. Because this function is meant for use by the Python\ninterpreter and not for general use, it is better to use\nimportlib.import_module() to programmatically import a module.\n\nThe globals argument is only used to determine the context;\nthey are not modified. The locals argument is unused. The fromlist\nshould be a list of names to emulate ``from name import ...'', or an\nempty list to emulate ``import name''.\nWhen importing a module from a package, note that __import__('A.B', ...)\nreturns package A when fromlist is empty, but its submodule B when\nfromlist is not empty. The level argument is used to determine whether to\nperform absolute or relative imports: 0 is absolute, while a positive number\nis the number of parent directories to search relative to the current module."},abs:{$meth:Sk.builtin.abs,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the argument."},all:{$meth:Sk.builtin.all,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for all values x in the iterable.\n\nIf the iterable is empty, return True."},any:{$meth:Sk.builtin.any,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for any x in the iterable.\n\nIf the iterable is empty, return False."},ascii:{$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},bin:{$meth:Sk.builtin.bin,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the binary representation of an integer.\n\n >>> bin(2796202)\n '0b1010101010101010101010'"},callable:{$meth:Sk.builtin.callable,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return whether the object is callable (i.e., some kind of function).\n\nNote that classes are callable, as are instances of classes with a\n__call__() method."},chr:{$meth:Sk.builtin.chr,$flags:{OneArg:!0},$textsig:"($module, i, /)",$doc:"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."},compile:{$meth:Sk.builtin.compile,$flags:{MinArgs:3,MaxArgs:6},$textsig:"($module, /, source, filename, mode, flags=0,\n dont_inherit=False, optimize=-1)",$doc:"Compile source into a code object that can be executed by exec() or eval().\n\nThe source code may represent a Python module, statement or expression.\nThe filename will be used for run-time error messages.\nThe mode must be 'exec' to compile a module, 'single' to compile a\nsingle (interactive) statement, or 'eval' to compile an expression.\nThe flags argument, if present, controls which future statements influence\nthe compilation of the code.\nThe dont_inherit argument, if true, stops the compilation inheriting\nthe effects of any future statements in effect in the code calling\ncompile; if absent or false these statements do influence the compilation,\nin addition to any features explicitly specified."},delattr:{$meth:Sk.builtin.delattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Deletes the named attribute from the given object.\n\ndelattr(x, 'y') is equivalent to ``del x.y''"},dir:{$meth:Sk.builtin.dir,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"dir([object]) -> list of strings\n\nIf called without an argument, return the names in the current scope.\nElse, return an alphabetized list of names comprising (some of) the attributes\nof the given object, and of attributes reachable from it.\nIf the object supplies a method named __dir__, it will be used; otherwise\nthe default dir() logic is used and returns:\n for a module object: the module's attributes.\n for a class object: its attributes, and recursively the attributes\n of its bases.\n for any other object: its attributes, its class's attributes, and\n recursively the attributes of its class's base classes."},divmod:{$meth:Sk.builtin.divmod,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return the tuple (x//y, x%y). Invariant: div*y + mod == x."},eval_$rw$:{$name:"eval",$meth:function(t,e,s){const r=n(e,"globals"),o=n(s,"locals");return Sk.misceval.chain(Sk.builtin.eval(t,r,o),(t=>(i(e,r),i(s,o),t)))},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Evaluate the given source in the context of globals and locals.\n\nThe source may be a string representing a Python expression\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},exec:{$meth:function(t,e,s){const r=n(e,"globals"),o=n(s,"locals");return Sk.misceval.chain(Sk.builtin.exec(t,r,o),(t=>(i(e,r),i(s,o),Sk.builtin.none.none$)))},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Execute the given source in the context of globals and locals.\n\nThe source may be a string representing one or more Python statements\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},format:{$meth:Sk.builtin.format,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, value, format_spec='', /)",$doc:"Return value.__format__(format_spec)\n\nformat_spec defaults to the empty string.\nSee the Format Specification Mini-Language section of help('FORMATTING') for\ndetails."},getattr:{$meth:Sk.builtin.getattr,$flags:{MinArgs:2,MaxArgs:3},$textsig:null,$doc:"getattr(object, name[, default]) -> value\n\nGet a named attribute from an object; getattr(x, 'y') is equivalent to x.y.\nWhen a default argument is given, it is returned when the attribute doesn't\nexist; without it, an exception is raised in that case."},globals:{$meth:Sk.builtin.globals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return the dictionary containing the current scope's global variables.\n\nNOTE: Updates to this dictionary *will* affect name lookups in the current\nglobal scope and vice-versa."},hasattr:{$meth:Sk.builtin.hasattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Return whether the object has an attribute with the given name.\n\nThis is done by calling getattr(obj, name) and catching AttributeError."},hash:{$meth:Sk.builtin.hash,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the hash value for the given object.\n\nTwo objects that compare equal must also have the same hash value, but the\nreverse is not necessarily true."},hex:{$meth:Sk.builtin.hex,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the hexadecimal representation of an integer.\n\n >>> hex(12648430)\n '0xc0ffee'"},id:{$meth:Sk.builtin.id,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the identity of an object.\n\nThis is guaranteed to be unique among simultaneously existing objects.\n(CPython uses the object's memory address.)"},input:{$meth:Sk.builtin.input,$flags:{MinArgs:0,MaxArgs:1},$textsig:"($module, prompt=None, /)",$doc:"Read a string from standard input. The trailing newline is stripped.\n\nThe prompt string, if given, is printed to standard output without a\ntrailing newline before reading input.\n\nIf the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.\nOn *nix systems, readline is used if available."},isinstance:{$meth:Sk.builtin.isinstance,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, class_or_tuple, /)",$doc:"Return whether an object is an instance of a class or of a subclass thereof.\n\nA tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\nor ...`` etc."},issubclass:{$meth:Sk.builtin.issubclass,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, cls, class_or_tuple, /)",$doc:"Return whether 'cls' is a derived from another class or is the same class.\n\nA tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\nor ...`` etc."},iter:{$meth:Sk.builtin.iter,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, iterable /)",$doc:"iter(iterable) -> iterator\niter(callable, sentinel) -> iterator\n\nGet an iterator from an object. In the first form, the argument must\nsupply its own iterator, or be a sequence.\nIn the second form, the callable is called until it returns the sentinel."},len:{$meth:Sk.builtin.len,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the number of items in a container."},locals:{$meth:Sk.builtin.locals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return a dictionary containing the current scope's local variables.\n\nNOTE: Whether or not updates to this dictionary will affect name lookups in\nthe local scope and vice-versa is *implementation dependent* and not\ncovered by any backwards compatibility guarantees."},max:{$meth:Sk.builtin.max,$flags:{FastCall:!0},$textsig:null,$doc:"max(iterable, *[, default=obj, key=func]) -> value\nmax(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its biggest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the largest argument."},min:{$meth:Sk.builtin.min,$flags:{FastCall:!0},$textsig:null,$doc:"min(iterable, *[, default=obj, key=func]) -> value\nmin(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its smallest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the smallest argument."},next:{$name:"next",$meth:Sk.builtin.next_,$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"next(iterator[, default])\n\nReturn the next item from the iterator. If default is given and the iterator\nis exhausted, it is returned instead of raising StopIteration."},oct:{$meth:Sk.builtin.oct,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the octal representation of an integer.\n\n >>> oct(342391)\n '0o1234567'"},open:{$meth:Sk.builtin.open,$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"open(name[, mode[, buffering]]) -> file object\n\nOpen a file using the file() type, returns a file object. This is the\npreferred way to open a file. See file.__doc__ for further information."},ord:{$meth:Sk.builtin.ord,$flags:{OneArg:!0},$textsig:"($module, c, /)",$doc:"Return the Unicode code point for a one-character string."},pow:{$meth:Sk.builtin.pow,$flags:{MinArgs:2,MaxArgs:3},$textsig:"($module, x, y, z=None, /)",$doc:"Equivalent to x**y (with two arguments) or x**y % z (with three arguments)\n\nSome types, such as ints, are able to use a more efficient algorithm when\ninvoked using the three argument form."},print:{$meth:Sk.builtin.print,$flags:{FastCall:!0},$textsig:null,$doc:"print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile: a file-like object (stream); defaults to the current sys.stdout.\nsep: string inserted between values, default a space.\nend: string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream."},repr:{$meth:Sk.builtin.repr,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the canonical string representation of the object.\n\nFor many object types, including most builtins, eval(repr(obj)) == obj."},round:{$meth:Sk.builtin.round,$flags:{NamedArgs:["number","ndigits"]},$textsig:"($module, /, number, ndigits=None)",$doc:"Round a number to a given precision in decimal digits.\n\nThe return value is an integer if ndigits is omitted or None. Otherwise\nthe return value has the same type as the number. ndigits may be negative."},setattr:{$meth:Sk.builtin.setattr,$flags:{MinArgs:3,MaxArgs:3},$textsig:"($module, obj, name, value, /)",$doc:"Sets the named attribute on the given object to the specified value.\n\nsetattr(x, 'y', v) is equivalent to ``x.y = v''"},sorted:{$meth:Sk.builtin.sorted,$flags:{NamedArgs:[null,"cmp","key","reverse"],Defaults:[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]},$textsig:"($module, iterable, /, *, key=None, reverse=False)",$doc:"Return a new list containing all items from the iterable in ascending order.\n\nA custom key function can be supplied to customize the sort order, and the\nreverse flag can be set to request the result in descending order."},sum:{$meth:Sk.builtin.sum,$flags:{NamedArgs:[null,"start"],Defaults:[new Sk.builtin.int_(0)]},$textsig:"($module, iterable, /, start=0)",$doc:"Return the sum of a 'start' value (default: 0) plus an iterable of numbers\n\nWhen the iterable is empty, return the start value.\nThis function is intended specifically for use with numeric values and may\nreject non-numeric types."},vars:{$meth:Sk.builtin.vars,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"vars([object]) -> dictionary\n\nWithout arguments, equivalent to locals().\nWith an argument, equivalent to object.__dict__."}}),Sk.setupObjects=function(t){t?(Sk.builtins.filter=Sk.builtin.filter_,Sk.builtins.map=Sk.builtin.map_,Sk.builtins.zip=Sk.builtin.zip_,Sk.builtins.range=Sk.builtin.range_,delete Sk.builtins.reduce,delete Sk.builtins.xrange,delete Sk.builtins.StandardError,delete Sk.builtins.unicode,delete Sk.builtins.basestring,delete Sk.builtins.long_$rw$,Sk.builtin.int_.prototype.$r=function(){return new Sk.builtin.str(this.v.toString())},delete Sk.builtin.int_.prototype.tp$str,delete Sk.builtin.bool.prototype.tp$str,delete Sk.builtins.raw_input,delete Sk.builtins.unichr,delete Sk.builtin.str.prototype.decode,Sk.builtins.bytes=Sk.builtin.bytes,Sk.builtins.ascii=new Sk.builtin.sk_method({$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},null,"builtins")):(Sk.builtins.range=new Sk.builtin.sk_method({$meth:Sk.builtin.range,$name:"range",$flags:{MinArgs:1,MaxArgs:3}},void 0,"builtins"),Sk.builtins.xrange=new Sk.builtin.sk_method({$meth:Sk.builtin.xrange,$name:"xrange",$flags:{MinArgs:1,MaxArgs:3}},null,"builtins"),Sk.builtins.reduce=new Sk.builtin.sk_method({$meth:Sk.builtin.reduce,$name:"reduce",$flags:{MinArgs:2,MaxArgs:3}},null,"builtins"),Sk.builtins.filter=new Sk.builtin.func(Sk.builtin.filter),Sk.builtins.map=new Sk.builtin.func(Sk.builtin.map),Sk.builtins.zip=new Sk.builtin.func(Sk.builtin.zip),Sk.builtins.StandardError=Sk.builtin.Exception,Sk.builtins.unicode=Sk.builtin.str,Sk.builtins.basestring=Sk.builtin.str,Sk.builtins.long_$rw$=Sk.builtin.lng,Sk.builtin.int_.prototype.$r=function(){const t=this.v;return"number"==typeof t?new Sk.builtin.str(t.toString()):new Sk.builtin.str(t.toString()+"L")},Sk.builtin.int_.prototype.tp$str=function(){return new Sk.builtin.str(this.v.toString())},Sk.builtin.bool.prototype.tp$str=function(){return this.$r()},Sk.builtins.raw_input=new Sk.builtin.func(Sk.builtin.raw_input),Sk.builtins.unichr=new Sk.builtin.func(Sk.builtin.unichr),Sk.builtin.str.prototype.decode=Sk.builtin.str.$py2decode,delete Sk.builtins.bytes,delete Sk.builtins.ascii)},Sk.exportSymbol("Sk.setupObjects",Sk.setupObjects),Sk.exportSymbol("Sk.builtins",Sk.builtins)},function(t,e){Sk.builtin.str.$empty=new Sk.builtin.str(""),Sk.builtin.str.$emptystr=Sk.builtin.str.$empty,Sk.builtin.str.$utf8=new Sk.builtin.str("utf-8"),Sk.builtin.str.$ascii=new Sk.builtin.str("ascii"),Sk.builtin.str.$default_factory=new Sk.builtin.str("default_factory"),Sk.builtin.str.$imag=new Sk.builtin.str("imag"),Sk.builtin.str.$real=new Sk.builtin.str("real"),Sk.builtin.str.$abs=new Sk.builtin.str("__abs__"),Sk.builtin.str.$bases=new Sk.builtin.str("__bases__"),Sk.builtin.str.$bytes=new Sk.builtin.str("__bytes__"),Sk.builtin.str.$call=new Sk.builtin.str("__call__"),Sk.builtin.str.$class=new Sk.builtin.str("__class__"),Sk.builtin.str.$class_getitem=new Sk.builtin.str("__class_getitem__"),Sk.builtin.str.$cmp=new Sk.builtin.str("__cmp__"),Sk.builtin.str.$complex=new Sk.builtin.str("__complex__"),Sk.builtin.str.$contains=new Sk.builtin.str("__contains__"),Sk.builtin.str.$copy=new Sk.builtin.str("__copy__"),Sk.builtin.str.$dict=new Sk.builtin.str("__dict__"),Sk.builtin.str.$dir=new Sk.builtin.str("__dir__"),Sk.builtin.str.$doc=new Sk.builtin.str("__doc__"),Sk.builtin.str.$enter=new Sk.builtin.str("__enter__"),Sk.builtin.str.$eq=new Sk.builtin.str("__eq__"),Sk.builtin.str.$exit=new Sk.builtin.str("__exit__"),Sk.builtin.str.$index=new Sk.builtin.str("__index__"),Sk.builtin.str.$init=new Sk.builtin.str("__init__"),Sk.builtin.str.$initsubclass=new Sk.builtin.str("__init_subclass__"),Sk.builtin.str.$int_=new Sk.builtin.str("__int__"),Sk.builtin.str.$iter=new Sk.builtin.str("__iter__"),Sk.builtin.str.$file=new Sk.builtin.str("__file__"),Sk.builtin.str.$float_=new Sk.builtin.str("__float__"),Sk.builtin.str.$format=new Sk.builtin.str("__format__"),Sk.builtin.str.$ge=new Sk.builtin.str("__ge__"),Sk.builtin.str.$getattr=new Sk.builtin.str("__getattr__"),Sk.builtin.str.$getattribute=new Sk.builtin.str("__getattribute__"),Sk.builtin.str.$getitem=new Sk.builtin.str("__getitem__"),Sk.builtin.str.$gt=new Sk.builtin.str("__gt__"),Sk.builtin.str.$keys=new Sk.builtin.str("keys"),Sk.builtin.str.$le=new Sk.builtin.str("__le__"),Sk.builtin.str.$len=new Sk.builtin.str("__len__"),Sk.builtin.str.$length_hint=new Sk.builtin.str("__length_hint__"),Sk.builtin.str.$loader=new Sk.builtin.str("__loader__"),Sk.builtin.str.$lt=new Sk.builtin.str("__lt__"),Sk.builtin.str.$module=new Sk.builtin.str("__module__"),Sk.builtin.str.$missing=new Sk.builtin.str("__missing__"),Sk.builtin.str.$name=new Sk.builtin.str("__name__"),Sk.builtin.str.$ne=new Sk.builtin.str("__ne__"),Sk.builtin.str.$new=new Sk.builtin.str("__new__"),Sk.builtin.str.$next=new Sk.builtin.str("__next__"),Sk.builtin.str.$path=new Sk.builtin.str("__path__"),Sk.builtin.str.$prepare=new Sk.builtin.str("__prepare__"),Sk.builtin.str.$qualname=new Sk.builtin.str("__qualname__"),Sk.builtin.str.$repr=new Sk.builtin.str("__repr__"),Sk.builtin.str.$reversed=new Sk.builtin.str("__reversed__"),Sk.builtin.str.$round=new Sk.builtin.str("__round__"),Sk.builtin.str.$setattr=new Sk.builtin.str("__setattr__"),Sk.builtin.str.$setitem=new Sk.builtin.str("__setitem__"),Sk.builtin.str.$slots=new Sk.builtin.str("__slots__"),Sk.builtin.str.$str=new Sk.builtin.str("__str__"),Sk.builtin.str.$setname=new Sk.builtin.str("__set_name__"),Sk.builtin.str.$trunc=new Sk.builtin.str("__trunc__"),Sk.builtin.str.$write=new Sk.builtin.str("write"),Sk.misceval.op2method_={Eq:Sk.builtin.str.$eq,NotEq:Sk.builtin.str.$ne,Gt:Sk.builtin.str.$gt,GtE:Sk.builtin.str.$ge,Lt:Sk.builtin.str.$lt,LtE:Sk.builtin.str.$le}},function(t,e,n){function i(t,e,n,i,s){this.type=t,this.string=e,this.start=n,this.end=i,this.line=s}function s(t){return"("+Array.prototype.slice.call(arguments).join("|")+")"}function r(t){return s.apply(null,arguments)+"?"}function o(t,e){for(var n=t.length;n--;)if(t[n]===e)return!0;return!1}function a(t){return t=t.normalize("NFKC"),E.test(t)}function l(){return" FR RF Br BR Fr r B R b bR f rb rB F Rf U rF u RB br fR fr rf Rb".split(" ")}function u(t){t?delete Sk.token.EXACT_TOKEN_TYPES["<>"]:Sk.token.EXACT_TOKEN_TYPES["<>"]=Sk.token.tokens.T_NOTEQUAL,I=Object.keys(Sk.token.EXACT_TOKEN_TYPES).sort(),A=s.apply(this,I.reverse().map((function(t){return t&&d.test(t)?t.replace(_,"\\$&"):t}))),O=s("\\r?\\n",A)}n.r(e),(t={Cc:"\\0-\\x1F\\x7F-\\x9F",Cf:"\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB",Co:"\\uE000-\\uF8FF",Cs:"\\uD800-\\uDFFF",Ll:"a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0529\\u052B\\u052D\\u052F\\u0560-\\u0588\\u10D0-\\u10FA\\u10FD-\\u10FF\\u13F8-\\u13FD\\u1C80-\\u1C88\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA699\\uA69B\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793-\\uA795\\uA797\\uA799\\uA79B\\uA79D\\uA79F\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7AF\\uA7B5\\uA7B7\\uA7B9\\uA7BB\\uA7BD\\uA7BF\\uA7C3\\uA7C8\\uA7CA\\uA7F6\\uA7FA\\uAB30-\\uAB5A\\uAB60-\\uAB68\\uAB70-\\uABBF\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A",Lm:"\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uAB69\\uFF70\\uFF9E\\uFF9F",Lo:"\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1100-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAAE0-\\uAAEA\\uAAF2\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Lt:"\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC",Lu:"A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0528\\u052A\\u052C\\u052E\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u13A0-\\u13F5\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA698\\uA69A\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA796\\uA798\\uA79A\\uA79C\\uA79E\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA-\\uA7AE\\uA7B0-\\uA7B4\\uA7B6\\uA7B8\\uA7BA\\uA7BC\\uA7BE\\uA7C2\\uA7C4-\\uA7C7\\uA7C9\\uA7F5\\uFF21-\\uFF3A",M:"\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Mc:"\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\u302E\\u302F\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uAA7D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC",Me:"\\u0488\\u0489\\u1ABE\\u20DD-\\u20E0\\u20E2-\\u20E4\\uA670-\\uA672",Mn:"\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Nd:"0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19",Nl:"\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF",No:"\\xB2\\xB3\\xB9\\xBC-\\xBE\\u09F4-\\u09F9\\u0B72-\\u0B77\\u0BF0-\\u0BF2\\u0C78-\\u0C7E\\u0D58-\\u0D5E\\u0D70-\\u0D78\\u0F2A-\\u0F33\\u1369-\\u137C\\u17F0-\\u17F9\\u19DA\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u215F\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA830-\\uA835",Pc:"_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F",Pd:"\\-\\u058A\\u05BE\\u1400\\u1806\\u2010-\\u2015\\u2E17\\u2E1A\\u2E3A\\u2E3B\\u2E40\\u301C\\u3030\\u30A0\\uFE31\\uFE32\\uFE58\\uFE63\\uFF0D",Pe:"\\)\\]\\}\\u0F3B\\u0F3D\\u169C\\u2046\\u207E\\u208E\\u2309\\u230B\\u232A\\u2769\\u276B\\u276D\\u276F\\u2771\\u2773\\u2775\\u27C6\\u27E7\\u27E9\\u27EB\\u27ED\\u27EF\\u2984\\u2986\\u2988\\u298A\\u298C\\u298E\\u2990\\u2992\\u2994\\u2996\\u2998\\u29D9\\u29DB\\u29FD\\u2E23\\u2E25\\u2E27\\u2E29\\u3009\\u300B\\u300D\\u300F\\u3011\\u3015\\u3017\\u3019\\u301B\\u301E\\u301F\\uFD3E\\uFE18\\uFE36\\uFE38\\uFE3A\\uFE3C\\uFE3E\\uFE40\\uFE42\\uFE44\\uFE48\\uFE5A\\uFE5C\\uFE5E\\uFF09\\uFF3D\\uFF5D\\uFF60\\uFF63",Pf:"\\xBB\\u2019\\u201D\\u203A\\u2E03\\u2E05\\u2E0A\\u2E0D\\u2E1D\\u2E21",Pi:"\\xAB\\u2018\\u201B\\u201C\\u201F\\u2039\\u2E02\\u2E04\\u2E09\\u2E0C\\u2E1C\\u2E20",Po:"!-#%-'\\*,\\.\\/:;\\?@\\xA1\\xA7\\xB6\\xB7\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u166E\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u1805\\u1807-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2016\\u2017\\u2020-\\u2027\\u2030-\\u2038\\u203B-\\u203E\\u2041-\\u2043\\u2047-\\u2051\\u2053\\u2055-\\u205E\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00\\u2E01\\u2E06-\\u2E08\\u2E0B\\u2E0E-\\u2E16\\u2E18\\u2E19\\u2E1B\\u2E1E\\u2E1F\\u2E2A-\\u2E2E\\u2E30-\\u2E39\\u2E3C-\\u2E3F\\u2E41\\u2E43-\\u2E4F\\u2E52\\u3001-\\u3003\\u303D\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFE10-\\uFE16\\uFE19\\uFE30\\uFE45\\uFE46\\uFE49-\\uFE4C\\uFE50-\\uFE52\\uFE54-\\uFE57\\uFE5F-\\uFE61\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF07\\uFF0A\\uFF0C\\uFF0E\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3C\\uFF61\\uFF64\\uFF65",Ps:"\\(\\[\\{\\u0F3A\\u0F3C\\u169B\\u201A\\u201E\\u2045\\u207D\\u208D\\u2308\\u230A\\u2329\\u2768\\u276A\\u276C\\u276E\\u2770\\u2772\\u2774\\u27C5\\u27E6\\u27E8\\u27EA\\u27EC\\u27EE\\u2983\\u2985\\u2987\\u2989\\u298B\\u298D\\u298F\\u2991\\u2993\\u2995\\u2997\\u29D8\\u29DA\\u29FC\\u2E22\\u2E24\\u2E26\\u2E28\\u2E42\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\u3016\\u3018\\u301A\\u301D\\uFD3F\\uFE17\\uFE35\\uFE37\\uFE39\\uFE3B\\uFE3D\\uFE3F\\uFE41\\uFE43\\uFE47\\uFE59\\uFE5B\\uFE5D\\uFF08\\uFF3B\\uFF5B\\uFF5F\\uFF62",Sc:"\\$\\xA2-\\xA5\\u058F\\u060B\\u07FE\\u07FF\\u09F2\\u09F3\\u09FB\\u0AF1\\u0BF9\\u0E3F\\u17DB\\u20A0-\\u20BF\\uA838\\uFDFC\\uFE69\\uFF04\\uFFE0\\uFFE1\\uFFE5\\uFFE6",Sk:"\\^`\\xA8\\xAF\\xB4\\xB8\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u309B\\u309C\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uAB5B\\uAB6A\\uAB6B\\uFBB2-\\uFBC1\\uFF3E\\uFF40\\uFFE3",Sm:"\\+<->\\|~\\xAC\\xB1\\xD7\\xF7\\u03F6\\u0606-\\u0608\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u2118\\u2140-\\u2144\\u214B\\u2190-\\u2194\\u219A\\u219B\\u21A0\\u21A3\\u21A6\\u21AE\\u21CE\\u21CF\\u21D2\\u21D4\\u21F4-\\u22FF\\u2320\\u2321\\u237C\\u239B-\\u23B3\\u23DC-\\u23E1\\u25B7\\u25C1\\u25F8-\\u25FF\\u266F\\u27C0-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u27FF\\u2900-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2AFF\\u2B30-\\u2B44\\u2B47-\\u2B4C\\uFB29\\uFE62\\uFE64-\\uFE66\\uFF0B\\uFF1C-\\uFF1E\\uFF5C\\uFF5E\\uFFE2\\uFFE9-\\uFFEC",So:"\\xA6\\xA9\\xAE\\xB0\\u0482\\u058D\\u058E\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u09FA\\u0B70\\u0BF3-\\u0BF8\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u214A\\u214C\\u214D\\u214F\\u218A\\u218B\\u2195-\\u2199\\u219C-\\u219F\\u21A1\\u21A2\\u21A4\\u21A5\\u21A7-\\u21AD\\u21AF-\\u21CD\\u21D0\\u21D1\\u21D3\\u21D5-\\u21F3\\u2300-\\u2307\\u230C-\\u231F\\u2322-\\u2328\\u232B-\\u237B\\u237D-\\u239A\\u23B4-\\u23DB\\u23E2-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u25B6\\u25B8-\\u25C0\\u25C2-\\u25F7\\u2600-\\u266E\\u2670-\\u2767\\u2794-\\u27BF\\u2800-\\u28FF\\u2B00-\\u2B2F\\u2B45\\u2B46\\u2B4D-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA828-\\uA82B\\uA836\\uA837\\uA839\\uAA77-\\uAA79\\uFDFD\\uFFE4\\uFFE8\\uFFED\\uFFEE\\uFFFC\\uFFFD",Zl:"\\u2028",Zp:"\\u2029",Zs:" \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000"}).C=t.Cc+t.Cf+t.Cs+t.Co,t.L=t.Lu+t.Ll+t.Lt+t.Lm+t.Mn+t.Lo,t.LC=t.Lu+t.Ll+t.Lt,t.M=t.Mn+t.Mc+t.Me,t.N=t.Nd+t.Nl+t.No,t.P=t.Pc+t.Pd+t.Ps+t.Pe+t.Pi+t.Pf+t.Po,t.S=t.Sm+t.Sc+t.Sk+t.So,t.Z=t.Zs+t.Zl+t.Zp,t.w="_"+t.L+t.N,t.b="(?:["+t.w+"](?:[^"+t.w+"]|$)|(?:^|[^"+t.w+"])["+t.w+"])",t.bOut="(?=[^"+t.w+"]|$)",t.bIn="(?:^|[^"+t.w+"])",t.bInCapture="(?:^|([^"+t.w+"]))",t.B="(?:["+t.w+"]["+t.w+"]|[^"+t.w+"][^"+t.w+"])",t.d=t.N;var c=Sk.token.tokens;const p=Sk.builtin.SyntaxError,h=Sk.builtin.SyntaxError;i.prototype.exact_type=function(){return this.type==c.T_OP&&this.string in Sk.token.EXACT_TOKEN_TYPES?Sk.token.EXACT_TOKEN_TYPES[this.string]:this.type};var _=/[\\^$.*+?()[\]{}|]/g,d=RegExp(_.source);const{Lu:f,Ll:m,Lt:g,Lm:b,Lo:S,Nl:k,Mn:y,Mc:T,Nd:v,Pc:$}=t,w="["+(t=f+m+g+b+S+k+"_\\u1885-\\u1886\\u2118\\u212E\\u309B-\\u309C")+"]+["+(t+y+T+v+$)+"\\u00B7\\u0387\\u1369-\\u1371\\u19DA]*",E=new RegExp("^"+w+"$");Sk.token.isIdentifier=a,function(t){s.apply(null,arguments)}("\\\\\\r?\\n[ \\f\\t]*"),r("#[^\\r\\n]*"),t=s("[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?","\\.[0-9](?:_?[0-9])*")+r("[eE][-+]?[0-9](?:_?[0-9])*");var I,A,O,M=s(t,"[0-9](?:_?[0-9])*[eE][-+]?[0-9](?:_?[0-9])*"),C=s("[0-9](?:_?[0-9])*[jJ]",M+"[jJ]");t=s.apply(null,l()),e=s(t+"'''",t+'"""'),s(t+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'",t+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*"'),u(!0),Sk.token.setupTokens=u;var R=s(t+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*"+s("'","\\\\\\r?\\n"),t+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*'+s('"',"\\\\\\r?\\n")),x=s("\\\\\\r?\\n|$","#[^\\r\\n]*",e),N={};t=l();for(let e of t)N[e+"'"]="^[^'\\\\]*(?:\\\\.[^'\\\\]*)*'",N[e+'"']='^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"',N[e+"'''"]="^[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''",N[e+'"""']='^[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';let L=[],D=[];for(let e of t)L.push(e+'"'),L.push(e+"'"),D.push(e+'"""'),D.push(e+"'''");Sk._tokenize=function(t,e,n,r){var l=Sk.__future__.python3?"":"(?:L?)";l=s("0[xX](?:_?[0-9a-fA-F])+"+l,"0[bB](?:_?[01])+"+l,Sk.__future__.silent_octal_literal?"0([oO]?)(?:_?[0-7])+"+l:"0([oO])(?:_?[0-7])+"+l,"(?:0(?:_?0)*|[1-9](?:_?[0-9])*)"+l),l=s(C,M,l),l="[ \\f\\t]*"+s(x,l,O,R,w),l=new RegExp(l);var u,_,d,f=0,m=0,g=0,b="",S=0,k=null,y=[0],T=void 0,v=void 0;void 0!==n&&("utf-8-sig"==n&&(n="utf-8"),r(new i(c.T_ENCODING,n,[0,0],[0,0],"")));for(var $=n="";;){try{n=$,$=e()}catch(t){$=""}f+=1;var E=0,I=$.length;if(b){if(!$)throw new p("EOF in multi-line string",t,v[0],v[1]);T.lastIndex=0;var A=T.exec($);if(!A){S&&"\\\n"!==$.substring($.length-2)&&"\\\r\n"!==$.substring($.length-3)?(r(new i(c.T_ERRORTOKEN,b+$,v,[f,$.length],k)),b="",k=null):(b+=$,k+=$);continue}E=_=A[0].length,r(new i(c.T_STRING,b+$.substring(0,_),v,[f,_],k+$)),b="",S=0,k=null}else if(0!=m||g){if(!$)throw new p("EOF in multi-line statement",t,f,0);g=0}else{if(!$)break;for(u=0;Ey[y.length-1]&&(y.push(u),r(new i(c.T_INDENT,$.substring(E),[f,0],[f,E],$)));u{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{controls_type:()=>nt,controls_typeLists:()=>it,lists_zip:()=>st,lists_zip_container:()=>rt,lists_zip_item:()=>ot,unpack_iterable_object:()=>at,variables_change:()=>tt,variables_get:()=>Q,variables_global:()=>et,variables_set:()=>Z});var e={};n.r(e),n.d(e,{base_setup:()=>ct,controls_delay:()=>pt,controls_end_program:()=>ht,controls_except:()=>wt,controls_finally:()=>Et,controls_flow_statements:()=>bt,controls_for:()=>St,controls_forEach:()=>ft,controls_for_range:()=>kt,controls_if:()=>_t,controls_if_else:()=>vt,controls_if_elseif:()=>Tt,controls_if_if:()=>yt,controls_lambda:()=>At,controls_main:()=>ut,controls_pass:()=>Ot,controls_range:()=>dt,controls_repeat_ext:()=>It,controls_thread:()=>Mt,controls_try:()=>$t,controls_try_finally:()=>gt,controls_whileUntil:()=>mt,datetime_fromtimestamp:()=>Dt,do_while:()=>Ct,garbage_collection:()=>Rt,get_mem_alloc:()=>xt,get_mem_free:()=>Nt,get_unique_identifier:()=>Lt});var i={};n.r(i),n.d(i,{base_map:()=>ie,math_arithmetic:()=>Ut,math_bit:()=>jt,math_constant:()=>Bt,math_constant_mp:()=>Vt,math_constrain:()=>Jt,math_dec:()=>Xt,math_indexer_number:()=>Qt,math_map:()=>Kt,math_max_min:()=>qt,math_number:()=>Pt,math_number_base_conversion:()=>zt,math_random:()=>Wt,math_random_seed:()=>Zt,math_round:()=>te,math_selfcalcu:()=>Yt,math_to_int:()=>Ht,math_trig:()=>Gt,text_to_number:()=>ee,text_to_number_skulpt:()=>ne,turn_to_int:()=>se});var s={};n.r(s),n.d(s,{ascii_to_char:()=>ce,char_to_ascii:()=>pe,number_to_text:()=>he,os_system:()=>Fe,text:()=>oe,text_capital:()=>ye,text_center:()=>Te,text_char:()=>le,text_char_at:()=>fe,text_char_at2:()=>de,text_char_at3:()=>xe,text_compareTo:()=>Re,text_compare_to:()=>ke,text_create_with_container:()=>Oe,text_create_with_item:()=>Me,text_encode:()=>Le,text_equals_starts_ends:()=>Se,text_eval:()=>De,text_find:()=>ve,text_format:()=>Ae,text_format_noreturn:()=>Ne,text_join:()=>ue,text_join_seq:()=>$e,text_length:()=>_e,text_random_char:()=>me,text_replace:()=>we,text_split:()=>Ee,text_strip:()=>Ie,text_substring:()=>be,text_substring2:()=>ge,text_substring3:()=>Ce,text_textarea:()=>ae});var r={};n.r(r),n.d(r,{ENUMERATE:()=>kn,enumerate:()=>yn,list_many_input:()=>an,list_tolist:()=>pn,list_tolist2:()=>Sn,list_trig:()=>sn,lists_2d_get_col_row_data:()=>Ye,lists_2d_get_data_with_col_row:()=>Ue,lists_append_extend:()=>ze,lists_change_to:()=>on,lists_change_to_general:()=>un,lists_clear:()=>Ze,lists_create_with:()=>je,lists_create_with2:()=>hn,lists_create_with_container:()=>Xe,lists_create_with_item:()=>He,lists_create_with_noreturn:()=>ln,lists_create_with_text:()=>Ge,lists_create_with_text2:()=>_n,lists_del_general:()=>cn,lists_find:()=>nn,lists_getIndex3:()=>dn,lists_getSublist3:()=>fn,lists_get_index:()=>Be,lists_get_random_item:()=>We,lists_get_random_sublist:()=>Je,lists_get_sublist:()=>Ve,lists_insert_value:()=>Ke,lists_insert_value2:()=>gn,lists_pop:()=>en,lists_remove_at:()=>tn,lists_remove_at2:()=>bn,lists_reverse:()=>Qe,lists_setIndex3:()=>mn,lists_set_index:()=>qe,lists_sort:()=>rn});var o={};n.r(o),n.d(o,{dicts_add_change_del:()=>Fn,dicts_add_or_change:()=>On,dicts_clear:()=>Rn,dicts_create_with:()=>vn,dicts_create_with_container:()=>$n,dicts_create_with_item:()=>wn,dicts_create_with_noreturn:()=>Vn,dicts_deldict:()=>Dn,dicts_delete:()=>Mn,dicts_get:()=>In,dicts_get_default:()=>An,dicts_items:()=>xn,dicts_keys:()=>En,dicts_length:()=>Ln,dicts_pop:()=>Pn,dicts_setdefault:()=>Bn,dicts_to_json:()=>Yn,dicts_todict:()=>Un,dicts_update:()=>Cn,dicts_values:()=>Nn,json_to_dicts:()=>jn});var a={};n.r(a),n.d(a,{logic_boolean:()=>Wn,logic_compare:()=>Xn,logic_compare_continous:()=>Hn,logic_is:()=>Zn,logic_is_in:()=>Qn,logic_negate:()=>zn,logic_null:()=>Jn,logic_operation:()=>qn,logic_tobool:()=>ti,logic_true_or_false:()=>Kn});var l={};n.r(l),n.d(l,{sdcard_mount:()=>vi,sdcard_use_spi_init:()=>Ti,storage_can_write_ornot:()=>ui,storage_change_dir:()=>ki,storage_close_file:()=>pi,storage_delete_file:()=>_i,storage_file_seek:()=>mi,storage_file_tell:()=>fi,storage_file_write:()=>ri,storage_fileopen:()=>ni,storage_fileopen_new:()=>ii,storage_fileopen_new_encoding:()=>si,storage_get_a_line:()=>li,storage_get_contents:()=>ai,storage_get_contents_without_para:()=>oi,storage_get_current_dir:()=>gi,storage_get_file_size:()=>di,storage_get_filename:()=>ci,storage_is_file:()=>yi,storage_list_all_files:()=>hi,storage_make_dir:()=>bi,storage_open_file_with_os:()=>ei,storage_rename:()=>Si});var u={};n.r(u),n.d(u,{procedures_callnoreturn:()=>Ai,procedures_callreturn:()=>Oi,procedures_defnoreturn:()=>$i,procedures_defreturn:()=>wi,procedures_ifreturn:()=>Mi,procedures_mutatorarg:()=>Ii,procedures_mutatorcontainer:()=>Ei,procedures_return:()=>Ci});var c={};n.r(c),n.d(c,{tuple_change_to:()=>ji,tuple_create_with:()=>xi,tuple_create_with_container:()=>Ni,tuple_create_with_item:()=>Li,tuple_create_with_noreturn:()=>qi,tuple_create_with_text2:()=>Di,tuple_create_with_text_return:()=>Fi,tuple_del:()=>Vi,tuple_find:()=>Gi,tuple_getIndex:()=>Pi,tuple_getSublist:()=>Hi,tuple_get_random_item:()=>Wi,tuple_get_sublist:()=>zi,tuple_join:()=>Ui,tuple_length:()=>Bi,tuple_max:()=>Yi,tuple_totuple:()=>Ji,tuple_trig:()=>Xi});var p={};n.r(p),n.d(p,{set_add_discard:()=>os,set_clear:()=>is,set_create_with:()=>Qi,set_create_with_container:()=>Zi,set_create_with_item:()=>ts,set_create_with_text_return:()=>us,set_length:()=>es,set_operate:()=>ss,set_operate_update:()=>rs,set_pop:()=>ns,set_sub:()=>as,set_toset:()=>cs,set_update:()=>ls});var h={};n.r(h),n.d(h,{html_content:()=>fs,html_content_more:()=>ms,html_document:()=>hs,html_form:()=>bs,html_head_body:()=>ds,html_style:()=>gs,html_style_color:()=>ks,html_style_content:()=>Ss,html_text:()=>ys,html_title:()=>_s});var _={};n.r(_),n.d(_,{attribute_access:()=>Ls,function_call:()=>Rs,function_call_container:()=>xs,function_call_item:()=>Ns,raw_block:()=>$s,raw_empty:()=>Es,raw_expression:()=>ws,raw_table:()=>vs,text_comment:()=>Is,text_print_multiple:()=>Os,text_print_multiple_container:()=>Ms,text_print_multiple_item:()=>Cs,type_check:()=>As});var d={};n.r(d),n.d(d,{algorithm_add_path:()=>Ys,algorithm_add_school:()=>Ps,algorithm_all_books:()=>sr,algorithm_all_books_sequence:()=>rr,algorithm_book_scale:()=>gr,algorithm_check_feet:()=>Ar,algorithm_chick_calculate:()=>Ir,algorithm_color_seclet:()=>Hr,algorithm_current_school:()=>zs,algorithm_del_path:()=>js,algorithm_delete_book:()=>_r,algorithm_delete_books:()=>dr,algorithm_delete_books2:()=>fr,algorithm_divide_books:()=>pr,algorithm_find_path:()=>Bs,algorithm_first_book:()=>or,algorithm_fz_calc:()=>Rr,algorithm_fz_calc_first_min:()=>xr,algorithm_fz_compare:()=>Nr,algorithm_fz_move:()=>Dr,algorithm_fz_set_min:()=>Lr,algorithm_get_book_num:()=>yr,algorithm_get_current_location:()=>Gr,algorithm_get_half_books:()=>hr,algorithm_hxdb_add:()=>Ur,algorithm_hxdb_init_soldier:()=>Pr,algorithm_hxdb_last_line:()=>Vr,algorithm_hxdb_result:()=>Yr,algorithm_hxdb_stand_in_line:()=>Br,algorithm_init_fzsf:()=>Cr,algorithm_init_hxdb:()=>Fr,algorithm_init_jttl:()=>$r,algorithm_move_recent:()=>Qs,algorithm_new_path:()=>Vs,algorithm_next_book:()=>ur,algorithm_no_left:()=>Xs,algorithm_no_path:()=>Ws,algorithm_no_ring2:()=>ar,algorithm_not_home:()=>Zs,algorithm_not_school:()=>tr,algorithm_number_add:()=>Sr,algorithm_number_zero:()=>br,algorithm_prepare:()=>Fs,algorithm_prepare2:()=>qs,algorithm_prepare_2_1:()=>Js,algorithm_prepare_2_2:()=>Ks,algorithm_print_book2:()=>mr,algorithm_print_divide:()=>vr,algorithm_print_jttl_answer:()=>Or,algorithm_print_number:()=>kr,algorithm_print_path:()=>Hs,algorithm_print_path2:()=>er,algorithm_print_sequence:()=>Tr,algorithm_rabbit_add:()=>Mr,algorithm_rabbit_number_in_range:()=>Er,algorithm_rabbit_zero:()=>wr,algorithm_return_path:()=>Gs,algorithm_set_path:()=>Us,algorithm_two_left:()=>cr,algorithm_void_path:()=>Xr,algorithm_yes_ring2:()=>lr,hanoi_init:()=>nr,hanoi_init_offline:()=>jr,hanoi_move:()=>ir});var f={};n.r(f),n.d(f,{factory_block:()=>io,factory_block_return:()=>so,factory_block_return_with_textarea:()=>oo,factory_block_with_textarea:()=>ro,factory_callMethod_noreturn:()=>eo,factory_callMethod_return:()=>no,factory_create_with_container:()=>Kr,factory_create_with_item:()=>Qr,factory_declare:()=>to,factory_from_import:()=>zr,factory_function_noreturn:()=>Jr,factory_function_return:()=>Zr,factory_import:()=>Wr});var m={};n.r(m),n.d(m,{array_create:()=>$o,array_toarray:()=>Po,dataframe_create:()=>co,dataframe_create_from_index:()=>ho,dataframe_create_from_one_index:()=>po,dataframe_get:()=>Lo,numpy_trig:()=>Ro,pandas_readcsv:()=>No,pl_axes:()=>ko,pl_bar:()=>Ao,pl_hist:()=>Mo,pl_label:()=>vo,pl_legend:()=>yo,pl_pie:()=>Oo,pl_plot:()=>bo,pl_plot_bar:()=>wo,pl_plot_easy:()=>go,pl_plot_scatter:()=>Eo,pl_plot_xy:()=>Io,pl_savefig:()=>Do,pl_show:()=>So,pl_subplot:()=>xo,pl_text:()=>Fo,pl_ticks:()=>Co,pl_title:()=>To,plot_axes:()=>Yo,plot_bar:()=>Wo,plot_hist:()=>Ko,plot_label:()=>Xo,plot_legend:()=>jo,plot_pie:()=>Jo,plot_plot:()=>Vo,plot_plot_bar:()=>Ho,plot_plot_easy:()=>Bo,plot_plot_scatter:()=>qo,plot_plot_xy:()=>zo,plot_savefig:()=>ta,plot_show:()=>Uo,plot_subplot:()=>Zo,plot_text:()=>ea,plot_ticks:()=>Qo,plot_title:()=>Go,series_create:()=>lo,series_create_from_index:()=>uo,series_create_from_text:()=>_o,series_get_num:()=>mo,series_index_value:()=>fo});var g={};n.r(g),n.d(g,{inout_input:()=>ia,inout_print:()=>sa,inout_print_container:()=>ua,inout_print_end:()=>oa,inout_print_inline:()=>ra,inout_print_item:()=>ca,inout_print_many:()=>la,inout_type_input:()=>aa});var b={};n.r(b),n.d(b,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Ea,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>wa,IOT_EMQX_PING:()=>va,IOT_FORMATTING:()=>ya,IOT_FORMAT_STRING:()=>Ta,IOT_MIXIO_NTP:()=>$a,IOT_MIXIO_PUBLISH:()=>_a,IOT_MIXIO_SUBSCRIBE:()=>da,IOT_MIXIO_UNSUBSCRIBE:()=>fa,iot_mixio_check:()=>ba,iot_mixio_connect:()=>ha,iot_mixio_connect_only:()=>ga,iot_mixio_disconnect:()=>ma,iot_mixio_format_msg:()=>ka,iot_mixio_format_topic:()=>Sa,iot_mixly_key:()=>Ia,iot_mixly_key_py:()=>Aa});var S={};n.r(S),n.d(S,{Panic_with_status_code:()=>xa,base_delay:()=>Ma,controls_millis:()=>Ca,controls_mstimer2:()=>La,controls_mstimer2_start:()=>Da,controls_mstimer2_stop:()=>Fa,reset:()=>Na,time_localtime:()=>Ra,time_sleep:()=>Pa});var k={};n.r(k),n.d(k,{turtle_bgcolor:()=>rl,turtle_bgcolor_hex:()=>dl,turtle_bgcolor_hex_new:()=>ul,turtle_circle:()=>nl,turtle_circle_advanced:()=>il,turtle_clear:()=>Ja,turtle_clone:()=>ll,turtle_color:()=>hl,turtle_color_hex:()=>_l,turtle_color_seclet:()=>$l,turtle_create:()=>Va,turtle_done:()=>Ua,turtle_exitonclick:()=>Ya,turtle_fill:()=>Qa,turtle_fillcolor:()=>al,turtle_fillcolor_hex:()=>ml,turtle_fillcolor_hex_new:()=>pl,turtle_getscreen:()=>wl,turtle_goto:()=>qa,turtle_listen:()=>Ol,turtle_move:()=>ja,turtle_numinput:()=>Sl,turtle_onclick:()=>Il,turtle_onkey:()=>El,turtle_ontimer:()=>Al,turtle_pencolor:()=>ol,turtle_pencolor_hex:()=>fl,turtle_pencolor_hex_new:()=>cl,turtle_penup:()=>Ka,turtle_pos_shape:()=>Wa,turtle_rotate:()=>Ga,turtle_screen_delay:()=>Ha,turtle_screen_savefig:()=>Ml,turtle_setheading:()=>Xa,turtle_setxy:()=>za,turtle_shape:()=>gl,turtle_shapesize:()=>bl,turtle_size:()=>tl,turtle_size_speed:()=>Za,turtle_speed:()=>el,turtle_textinput:()=>kl,turtle_visible:()=>sl,turtle_write:()=>yl,turtle_write_format:()=>Tl,turtle_write_format_skulpt:()=>vl});var y={};n.r(y),n.d(y,{controls_type:()=>Ll,controls_typeLists:()=>Dl,lists_zip:()=>Fl,unpack_iterable_object:()=>Pl,variables_change:()=>xl,variables_get:()=>Cl,variables_global:()=>Nl,variables_set:()=>Rl});var T={};n.r(T),n.d(T,{Panic_with_status_code:()=>zl,base_setup:()=>Vl,controls_delay:()=>ql,controls_flow_statements:()=>Hl,controls_for:()=>jl,controls_forEach:()=>Zl,controls_for_range:()=>Gl,controls_if:()=>Ul,controls_interrupts:()=>Kl,controls_lambda:()=>eu,controls_main:()=>Bl,controls_millis:()=>Wl,controls_nointerrupts:()=>Ql,controls_pass:()=>iu,controls_range:()=>tu,controls_repeat:()=>pu,controls_repeat_ext:()=>ou,controls_thread:()=>su,controls_try_finally:()=>Yl,controls_whileUntil:()=>Xl,datetime_fromtimestamp:()=>hu,do_while:()=>ru,garbage_collection:()=>au,get_mem_alloc:()=>lu,get_mem_free:()=>uu,get_unique_identifier:()=>cu,reset:()=>Jl,time_sleep:()=>nu});var v={};n.r(v),n.d(v,{base_map:()=>xu,math_arithmetic:()=>gu,math_bit:()=>mu,math_constant:()=>du,math_constant_mp:()=>fu,math_constrain:()=>Eu,math_dec:()=>yu,math_indexer_number:()=>Ou,math_map:()=>wu,math_max_min:()=>vu,math_number:()=>_u,math_number_base_conversion:()=>Iu,math_random:()=>$u,math_random_seed:()=>Au,math_round:()=>Mu,math_selfcalcu:()=>bu,math_single:()=>Su,math_to_int:()=>Tu,math_trig:()=>ku,text_to_number:()=>Cu,text_to_number_skulpt:()=>Ru,turn_to_int:()=>Nu});var w={};n.r(w),n.d(w,{ascii_to_char:()=>Bu,char_to_ascii:()=>Vu,number_to_text:()=>Uu,os_system:()=>cc,text:()=>Lu,text_capital:()=>Ju,text_center:()=>Ku,text_char:()=>Fu,text_char_at:()=>Gu,text_char_at2:()=>ju,text_char_at3:()=>ac,text_compareTo:()=>oc,text_compare_to:()=>qu,text_encode:()=>lc,text_equals_starts_ends:()=>Hu,text_eval:()=>uc,text_find:()=>Qu,text_format:()=>ic,text_format_noreturn:()=>sc,text_join:()=>Pu,text_join_seq:()=>Zu,text_length:()=>Yu,text_random_char:()=>Xu,text_replace:()=>tc,text_split:()=>ec,text_strip:()=>nc,text_substring:()=>Wu,text_substring2:()=>zu,text_substring3:()=>rc,text_textarea:()=>Du});var E={};n.r(E),n.d(E,{enumerate:()=>jc,list_many_input:()=>Mc,list_tolist:()=>Uc,list_tolist2:()=>Yc,list_trig:()=>Ic,lists_2d_get_col_row_data:()=>_c,lists_2d_get_data_with_col_row:()=>hc,lists_append_extend:()=>bc,lists_change_to:()=>Oc,lists_change_to_general:()=>Rc,lists_clear:()=>vc,lists_create_with:()=>dc,lists_create_with2:()=>Nc,lists_create_with_noreturn:()=>Cc,lists_create_with_text:()=>fc,lists_create_with_text2:()=>Lc,lists_del_general:()=>xc,lists_find:()=>$c,lists_getIndex3:()=>Dc,lists_getSublist3:()=>Fc,lists_get_index:()=>mc,lists_get_random_item:()=>Sc,lists_get_random_sublist:()=>kc,lists_get_sublist:()=>pc,lists_insert_value:()=>yc,lists_insert_value2:()=>Bc,lists_pop:()=>Ec,lists_remove_at:()=>wc,lists_remove_at2:()=>Vc,lists_reverse:()=>Tc,lists_setIndex3:()=>Pc,lists_set_index:()=>gc,lists_sort:()=>Ac});var I={};n.r(I),n.d(I,{dicts_add_change_del:()=>np,dicts_add_or_change:()=>zc,dicts_clear:()=>Kc,dicts_create_with:()=>Gc,dicts_create_with_noreturn:()=>rp,dicts_deldict:()=>ep,dicts_delete:()=>Wc,dicts_get:()=>Hc,dicts_get_default:()=>qc,dicts_items:()=>Qc,dicts_keys:()=>Xc,dicts_length:()=>tp,dicts_pop:()=>ip,dicts_setdefault:()=>sp,dicts_to_json:()=>ap,dicts_todict:()=>op,dicts_update:()=>Jc,dicts_values:()=>Zc,json_to_dicts:()=>lp});var A={};n.r(A),n.d(A,{logic_boolean:()=>_p,logic_compare:()=>up,logic_compare_continous:()=>cp,logic_is:()=>gp,logic_is_in:()=>mp,logic_negate:()=>hp,logic_null:()=>dp,logic_operation:()=>pp,logic_tobool:()=>bp,logic_true_or_false:()=>fp});var O={};n.r(O),n.d(O,{sdcard_mount:()=>Up,sdcard_use_spi_init:()=>Vp,storage_can_write_ornot:()=>Ip,storage_change_dir:()=>Lp,storage_close_file:()=>Op,storage_delete_file:()=>Cp,storage_file_seek:()=>Np,storage_file_tell:()=>xp,storage_file_write:()=>vp,storage_fileopen:()=>kp,storage_fileopen_new:()=>yp,storage_fileopen_new_encoding:()=>Tp,storage_get_a_line:()=>Ep,storage_get_contents:()=>wp,storage_get_contents_without_para:()=>$p,storage_get_current_dir:()=>Dp,storage_get_file_size:()=>Rp,storage_get_filename:()=>Ap,storage_is_file:()=>Bp,storage_list_all_files:()=>Mp,storage_make_dir:()=>Fp,storage_open_file_with_os:()=>Sp,storage_rename:()=>Pp});var M={};n.r(M),n.d(M,{procedures_callnoreturn:()=>Xp,procedures_callreturn:()=>Gp,procedures_defnoreturn:()=>jp,procedures_defreturn:()=>Yp,procedures_ifreturn:()=>Hp,procedures_return:()=>qp});var C={};n.r(C),n.d(C,{tuple_change_to:()=>nh,tuple_create_with:()=>zp,tuple_create_with_noreturn:()=>oh,tuple_create_with_text2:()=>Wp,tuple_create_with_text_return:()=>Jp,tuple_del:()=>Zp,tuple_find:()=>ih,tuple_getIndex:()=>Kp,tuple_getSublist:()=>rh,tuple_get_random_item:()=>lh,tuple_get_sublist:()=>ah,tuple_join:()=>th,tuple_length:()=>Qp,tuple_max:()=>eh,tuple_totuple:()=>uh,tuple_trig:()=>sh});var R={};n.r(R),n.d(R,{set_add_discard:()=>mh,set_clear:()=>_h,set_create_with:()=>ch,set_create_with_text_return:()=>Sh,set_length:()=>ph,set_operate:()=>dh,set_operate_update:()=>fh,set_pop:()=>hh,set_sub:()=>gh,set_toset:()=>kh,set_update:()=>bh});var x={};n.r(x),n.d(x,{html_content:()=>$h,html_content_more:()=>wh,html_document:()=>yh,html_form:()=>Ih,html_head_body:()=>vh,html_style:()=>Eh,html_style_content:()=>Ah,html_text:()=>Oh,html_title:()=>Th});var N={};n.r(N),n.d(N,{attribute_access:()=>Dh,function_call:()=>Lh,raw_block:()=>Mh,raw_empty:()=>Rh,raw_expression:()=>Ch,raw_table:()=>xh,type_check:()=>Nh});var L={};n.r(L),n.d(L,{algorithm_add_path:()=>Yh,algorithm_add_school:()=>Ph,algorithm_all_books:()=>r_,algorithm_all_books_sequence:()=>s_,algorithm_book_scale:()=>f_,algorithm_check_feet:()=>v_,algorithm_chick_calculate:()=>T_,algorithm_color_seclet:()=>V_,algorithm_current_school:()=>zh,algorithm_del_path:()=>jh,algorithm_delete_book:()=>__,algorithm_divide_books:()=>p_,algorithm_find_path:()=>Bh,algorithm_first_book:()=>o_,algorithm_fz_calc:()=>I_,algorithm_fz_compare:()=>A_,algorithm_fz_move:()=>M_,algorithm_fz_set_min:()=>O_,algorithm_get_current_location:()=>P_,algorithm_get_half_books:()=>h_,algorithm_hxdb_add:()=>L_,algorithm_hxdb_init_soldier:()=>R_,algorithm_hxdb_last_line:()=>N_,algorithm_hxdb_result:()=>D_,algorithm_hxdb_stand_in_line:()=>x_,algorithm_init_fzsf:()=>E_,algorithm_init_hxdb:()=>C_,algorithm_init_jttl:()=>S_,algorithm_move_recent:()=>Qh,algorithm_new_path:()=>Vh,algorithm_next_book:()=>u_,algorithm_no_left:()=>Xh,algorithm_no_path:()=>Wh,algorithm_no_ring2:()=>a_,algorithm_not_home:()=>Zh,algorithm_not_school:()=>t_,algorithm_number_add:()=>g_,algorithm_number_zero:()=>m_,algorithm_prepare:()=>Fh,algorithm_prepare2:()=>qh,algorithm_prepare_2_1:()=>Jh,algorithm_prepare_2_2:()=>Kh,algorithm_print_book2:()=>d_,algorithm_print_jttl_answer:()=>$_,algorithm_print_number:()=>b_,algorithm_print_path:()=>Hh,algorithm_print_path2:()=>e_,algorithm_rabbit_add:()=>w_,algorithm_rabbit_number_in_range:()=>y_,algorithm_rabbit_zero:()=>k_,algorithm_return_path:()=>Gh,algorithm_set_path:()=>Uh,algorithm_two_left:()=>c_,algorithm_void_path:()=>B_,algorithm_yes_ring2:()=>l_,hanoi_init:()=>n_,hanoi_init_offline:()=>F_,hanoi_move:()=>i_});var D={};n.r(D),n.d(D,{factory_block:()=>z_,factory_block_return:()=>W_,factory_block_return_with_textarea:()=>K_,factory_block_with_textarea:()=>J_,factory_callMethod_noreturn:()=>H_,factory_callMethod_return:()=>q_,factory_declare:()=>X_,factory_from_import:()=>U_,factory_function_noreturn:()=>j_,factory_function_return:()=>G_,factory_import:()=>Y_});var F={};n.r(F),n.d(F,{array_create:()=>_d,array_toarray:()=>Id,dataframe_create:()=>td,dataframe_create_from_index:()=>ed,dataframe_create_from_one_index:()=>nd,dataframe_get:()=>$d,numpy_trig:()=>yd,pandas_readcsv:()=>vd,pl_axes:()=>ad,pl_bar:()=>gd,pl_hist:()=>Sd,pl_label:()=>hd,pl_legend:()=>cd,pl_pie:()=>bd,pl_plot:()=>ud,pl_plot_bar:()=>dd,pl_plot_easy:()=>ld,pl_plot_scatter:()=>fd,pl_plot_xy:()=>md,pl_savefig:()=>wd,pl_show:()=>od,pl_subplot:()=>Td,pl_text:()=>Ed,pl_ticks:()=>kd,pl_title:()=>pd,plot_axes:()=>Od,plot_bar:()=>Pd,plot_hist:()=>Vd,plot_label:()=>Nd,plot_legend:()=>Rd,plot_pie:()=>Bd,plot_plot:()=>Cd,plot_plot_bar:()=>Ld,plot_plot_easy:()=>Md,plot_plot_scatter:()=>Dd,plot_plot_xy:()=>Fd,plot_savefig:()=>jd,plot_show:()=>Ad,plot_subplot:()=>Yd,plot_text:()=>Gd,plot_ticks:()=>Ud,plot_title:()=>xd,series_create:()=>Q_,series_create_from_index:()=>Z_,series_create_from_text:()=>id,series_get_num:()=>rd,series_index_value:()=>sd});var P={};n.r(P),n.d(P,{inout_input:()=>Xd,inout_print:()=>Hd,inout_print_end:()=>zd,inout_print_inline:()=>qd,inout_print_many:()=>Jd,inout_type_input:()=>Wd});var B={};n.r(B),n.d(B,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>uf,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>pf,IOT_EMQX_PING:()=>hf,IOT_FORMATTING:()=>af,IOT_FORMAT_STRING:()=>lf,IOT_MIXIO_PUBLISH:()=>Qd,IOT_MIXIO_SUBSCRIBE:()=>Zd,IOT_MIXIO_UNSUBSCRIBE:()=>tf,iot_mixio_check:()=>sf,iot_mixio_connect:()=>Kd,iot_mixio_connect_only:()=>nf,iot_mixio_disconnect:()=>ef,iot_mixio_format_msg:()=>of,iot_mixio_format_topic:()=>rf,iot_mixly_key:()=>cf,iot_mixly_key_py:()=>_f});var V={};n.r(V),n.d(V,{controls_end_program:()=>ff,controls_millis:()=>df,time_localtime:()=>mf});var U={};n.r(U),n.d(U,{turtle_bgcolor:()=>Df,turtle_bgcolor_hex:()=>Vf,turtle_bgcolor_hex_new:()=>jf,turtle_circle:()=>Rf,turtle_circle_advanced:()=>Nf,turtle_clear:()=>Ef,turtle_clone:()=>Bf,turtle_color:()=>qf,turtle_color_hex:()=>Hf,turtle_color_seclet:()=>em,turtle_create:()=>gf,turtle_done:()=>bf,turtle_exitonclick:()=>Sf,turtle_fill:()=>Af,turtle_fillcolor:()=>Pf,turtle_fillcolor_hex:()=>Yf,turtle_fillcolor_hex_new:()=>Xf,turtle_getscreen:()=>nm,turtle_goto:()=>$f,turtle_listen:()=>om,turtle_move:()=>kf,turtle_numinput:()=>Kf,turtle_onclick:()=>sm,turtle_onkey:()=>im,turtle_ontimer:()=>rm,turtle_pencolor:()=>Ff,turtle_pencolor_hex:()=>Uf,turtle_pencolor_hex_new:()=>Gf,turtle_penup:()=>If,turtle_pos_shape:()=>wf,turtle_rotate:()=>yf,turtle_screen_delay:()=>vf,turtle_screen_savefig:()=>am,turtle_setheading:()=>Tf,turtle_setxy:()=>xf,turtle_shape:()=>zf,turtle_shapesize:()=>Wf,turtle_size:()=>Mf,turtle_size_speed:()=>Of,turtle_speed:()=>Cf,turtle_textinput:()=>Jf,turtle_visible:()=>Lf,turtle_write:()=>Qf,turtle_write_format:()=>Zf,turtle_write_format_skulpt:()=>tm});const Y=Blockly,j=Mixly,G={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&&(o+=i)):n=o}else n="i";return n}},X=G,H={};H.NAME_TYPE=Y.PROCEDURE_CATEGORY_NAME,H.allProcedures=function(t){for(var e=t.getAllBlocks(!1),n=[],i=[],s=0;s0?e.join("\n")+"\n"+i.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+r.join("")+o.join("\n"):e.join("\n")+"\n"+i.join("\n")+"\n"+s.join("")+"\n"+t+o.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 yt={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}},Tt={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=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 Ft={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(new Y.FieldTextInput("0",Y.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MATH_NUMBER_TOOLTIP)}},Pt={init:function(){this.setColour(Dt);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]}))}},Bt={init:function(){this.setColour(Dt);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]}))}},Vt={init:function(){this.setColour(Dt),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]}))}},Ut={init:function(){this.setColour(Dt),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]}))}},Yt={init:function(){this.setColour(Dt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Y.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},jt={init:function(){this.setColour(Dt),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]}))}},Gt={init:function(){var t=[[Y.Msg.MATH_BIN,"bin"],[Y.Msg.MATH_OCT,"oct"],[Y.Msg.MATH_HEX,"hex"]];this.setColour(Dt),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]}))}},Xt={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(Dt),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]}))}},Ht={init:function(){var t=[[Y.Msg.MIXLY_MAX,"max"],[Y.Msg.MIXLY_MIN,"min"]];this.setColour(Dt),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]}))}},qt={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(Dt),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]}))}},zt={init:function(){var t=[[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Dt),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]}))}},Wt={init:function(){this.setColour(Dt),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)}},Jt={init:function(){this.setColour(Dt),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)}},Kt={init:function(){this.setColour(Dt),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)}},Qt={init:function(){this.setColour(Dt),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)}},Zt={init:function(){this.setColour(Dt),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)}},te={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(Dt),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]}))}},ee={init:function(){var t=[[Y.Msg.MIXLY_TO_INT,"int"],[Y.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Dt),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]}))}},ne=Jt,ie={init:function(){this.setColour(Dt),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)}},se=160,re={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Y.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Y.Msg.TEXT_TEXT_TOOLTIP)},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 Y.FieldImage(e,12,12,'"')}},oe={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Y.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Y.Msg.TEXT_LINES_TOOLTIP)},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 Y.FieldImage(e,12,12,'"')}};Y.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ae={init:function(){this.setColour(se),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,'"')}},le={init:function(){this.setColour(se),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)}},ue={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(Number).appendField(Y.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ce={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String).appendField(Y.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},pe={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},he={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},_e={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(se),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)}},de={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),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)}},fe={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Y.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Y.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},me={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(se),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"))}},ge={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),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)}},be={init:function(){var t=[[Y.Msg.MIXLY_EQUALS,"==="],[Y.Msg.MIXLY_STARTSWITH,"startswith"],[Y.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Y.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Se={init:function(){this.setColour(se),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)}},ke={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(se),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]}))}},ye={init:function(){var t=[[Y.Msg.TEXT_LJUST,"ljust"],[Y.Msg.TEXT_CENTER,"center"],[Y.Msg.TEXT_RJUST,"rjust"]];this.setColour(se),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)}},Te={init:function(){this.setColour(se),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)}},ve={init:function(){this.setColour(se),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)}},$e={init:function(){this.setColour(se),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)}},we={init:function(){this.setColour(se),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)}},Ee={init:function(){var t=[[Y.Msg.TEXT_TRIM_BOTH,"strip"],[Y.Msg.TEXT_TRIM_LEFT,"lstrip"],[Y.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(se),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]}))}},Ie={init:function(){this.setColour(se),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")}},yn={init:function(){this.setColour(Sn),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Tn={init:function(){this.setColour(Sn),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}},vn={init:function(){this.setColour(Sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_KEYS),this.setTooltip(Y.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},$n={init:function(){this.setColour(Sn),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)}},wn={init:function(){this.setColour(Sn),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)}},En={init:function(){this.setColour(Sn),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)}},In={init:function(){this.setColour(Sn),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)}},An={init:function(){this.setColour(Sn),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)}},On={init:function(){this.setColour(Sn),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)}},Mn={init:function(){this.setColour(Sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_ITEMS),this.setTooltip(Y.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Cn={init:function(){this.setColour(Sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_VALUES),this.setTooltip(Y.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Rn={init:function(){this.setColour(Sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_LENGTH),this.setTooltip(Y.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},xn={init:function(){this.setColour(Sn),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)}},Nn={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(Sn),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")}},Ln={init:function(){this.setColour(Sn),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)}},Dn={init:function(){this.setColour(Sn),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)}},Fn={init:function(){this.setColour(Sn),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")}},Pn={init:function(){this.setColour(Sn),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Bn={init:function(){this.setColour(Sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_TO_JSON),this.setTooltip(Y.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Vn={init:function(){this.setColour(Sn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Y.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Un=210,Yn={init:function(){var t=Y.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Un),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]}},jn={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(Un),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)}},Gn={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(Un),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]}))}},Xn={init:function(){this.setColour(Un),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Y.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Y.Msg.LOGIC_NEGATE_TOOLTIP)}},Hn={init:function(){var t=[[Y.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Y.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Un),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Y.FieldDropdown(t),"BOOL"),this.setTooltip(Y.Msg.LOGIC_BOOLEAN_TOOLTIP)}},qn={init:function(){this.setColour(Un),this.setOutput(!0),this.appendDummyInput().appendField(Y.Msg.LOGIC_NULL),this.setTooltip(Y.Msg.LOGIC_NULL_TOOLTIP)}},zn={init:function(){this.setColour(Un),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)}},Wn={init:function(){var t=[[Y.Msg.TEXT_APPEND_TO,"in"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Un),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)}},Jn={init:function(){var t=[[Y.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Un),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)}},Kn={init:function(){this.setColour(Un),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Qn={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)}},Zn={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")}},ti={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}))}},ei={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}))}},ni={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)}},ii={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)}},si={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}))}},ri={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)}},oi={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)}},ai={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)}},li={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)}},ui={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 ci={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)}},pi={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)}},hi={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)}},_i={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}))}},di={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)}},fi={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]}))}},mi={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)}},gi={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)}},bi={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]}))}},Si={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)}},ki={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()}},yi={init:function(){var t=q.findLegalName("",this),e=new Y.FieldTextInput(t,q.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)}},ds={init:function(){this.setColour(ls),this.appendDummyInput().appendField(Y.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},fs={init:function(){this.setColour(ls),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)}},ms={init:function(){this.setColour(ls),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(ls),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bs={init:function(){this.setColour(ls),this.appendDummyInput().appendField(Y.Msg.HTML_TEXT).appendField(new Y.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ss=160,ks={init:function(){this.setColour(Ss),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Y.FieldTable(""),"TEXT")}},ys={init:function(){this.setColour(Ss),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT")}},Ts={init:function(){this.setColour(Ss),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},vs={init:function(){this.setColour(Ss),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},$s={init:function(){this.setColour(Ss),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Y.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},ws={init:function(){this.setColour(Ss),this.appendValueInput("VALUE").appendField(Y.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Es={init:function(){this.setColour(Ss),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)}},mo={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},go={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bo={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},So={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ko={init:function(){this.setColour(so);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)}},yo={init:function(){this.setColour(so),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)}},To={init:function(){this.setColour(so);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]}))}},vo={init:function(){this.setColour(so);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("")}},$o={init:function(){this.setColour(so);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)}},wo={init:function(){this.setColour(so);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)}},Eo={init:function(){this.setColour(so);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)}},Io={init:function(){this.setColour(so),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)}},Ao={init:function(){this.setColour(so);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)}},Oo={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(so),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)}},Mo={init:function(){this.setColour(so),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)}},Co={init:function(){this.setColour(so),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")}},Ro={init:function(){this.setColour(so),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)}},xo={init:function(){this.setColour(so),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)}},No={init:function(){this.setColour(so);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)}},Lo={init:function(){this.setColour(so),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},Do={init:function(){this.setColour(so),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)}},Fo={init:function(){this.setColour(so);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)}},Po={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bo={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vo={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Uo={init:function(){this.setColour(so),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yo={init:function(){this.setColour(so);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)}},jo={init:function(){this.setColour(so);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]}))}},Go={init:function(){this.setColour(so);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("")}},Xo={init:function(){this.setColour(so);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)}},Ho={init:function(){this.setColour(so);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)}},qo={init:function(){this.setColour(so);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)}},zo={init:function(){this.setColour(so),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)}},Wo={init:function(){this.setColour(so);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)}},Jo={init:function(){this.setColour(so),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)}},Ko={init:function(){this.setColour(so),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)}},Qo={init:function(){this.setColour(so);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)}},Zo=20,ta={init:function(){this.setColour(Zo),this.appendValueInput("VAR").appendField(Y.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Y.Msg.INOUT_input_TOOLTIP)}},ea={init:function(){this.setColour(Zo),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.BLOCKPY_PRINT_TOOLTIP)}},na={init:function(){this.setColour(Zo),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)}},ia={init:function(){this.setColour(Zo),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)}},sa={init:function(){var t=[[Y.Msg.LANG_MATH_STRING,"str"],[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Zo),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]}))}},ra={init:function(){this.setColour(Zo),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 op=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]},ap=function(t,e){var n=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",n)||"False"),n]},lp=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},up=function(t,e){return["None",e.ORDER_ATOMIC]},cp=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]},pp=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]},hp=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]},_p=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},dp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},fp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},mp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},gp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},bp=function(t,e){var n=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+n+")\n"},Sp=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"()",e.ORDER_ATOMIC]},kp=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]},yp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Tp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},vp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},$p=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},wp=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Ep=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ip=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ap=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Op=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"},Mp=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Cp=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Rp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},xp=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"},Np=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]},Lp=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"},Dp=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"},Fp=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]},gh=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},Sh=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},kh=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]},Th=function(t,e){return'"},vh=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},$h=function(){return this.getFieldValue("TEXT")+"\n"},wh=function(t){return t.getFieldValue("TEXT")+"\n"},Eh=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Ih=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Ah=function(){return""},Oh=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Mh=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'},zh=function(t,e){return["name[now] != '小科家'",e.ORDER_ATOMIC]},Wh=function(t,e){return["name[now] != '学校'",e.ORDER_ATOMIC]},Jh=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},Kh=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},Qh=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`},Zh=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"},e_=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"},n_=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]},i_=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]},s_=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")},r_=function(t,e){return["len(list)>=2",e.ORDER_ATOMIC]},o_=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"},l_=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"},u_=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`},p_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},h_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},__=function(t,e){e.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},d_=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"},f_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},m_=function(t,e){return["_rabbit < _head",e.ORDER_ATOMIC]},g_=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]},S_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},k_=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"},T_=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"},v_=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]},$_=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`},w_=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"},E_=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"},I_=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`},A_=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`},O_=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]},M_=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"},C_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},R_=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],sm.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__:sm.python3}),sm.builtins.value=new sm.builtin.func((function(){return sm.ffi.remapToPy(void 0===om?5:om)})),sm.builtins.set_value=new sm.builtin.func((function(t){om=t.v})),sm.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!==rm[t])return sm.misceval.promiseToSuspension(fetch(rm[t]).then((t=>t.text())));if(void 0===sm.builtinFiles||void 0===sm.builtinFiles.files[t])throw"File not found: '"+t+"'";return sm.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(){sm.execLimit=Number.POSITIVE_INFINITY,sm.TurtleGraphics.reset&&sm.TurtleGraphics.reset()}kill(){window.SPRITE.kill(),sm.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(sm.TurtleGraphics.target),this.programStatus.running=!0,sm.misceval.asyncToPromise((()=>sm.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=sm.afterSingleExecution,sm.afterSingleExecution=void 0,sm.builtins.get_output=new sm.builtin.func((function(){return sm.builtin.pyCheckArgs("get_output",arguments,0,0),sm.ffi.remapToPy(r.execution.output())})),sm.builtins.reset_output=new sm.builtin.func((function(){sm.builtin.pyCheckArgs("reset_output",arguments,0,0),r.execution.output.removeAll()})),sm.builtins.log=new sm.builtin.func((function(t){sm.builtin.pyCheckArgs("log",arguments,1,1),console.log(t)})),sm.builtins._trace=e,sm.builtins._final_values=s,sm.builtins.code=sm.ffi.remapToPy(t),sm.builtins.set_success=this.instructor_module.set_success,sm.builtins.set_feedback=this.instructor_module.set_feedback,sm.builtins.set_finished=this.instructor_module.set_finished,sm.builtins.count_components=this.instructor_module.count_components,sm.builtins.no_nonlist_nums=this.instructor_module.no_nonlist_nums,sm.builtins.only_printing_properties=this.instructor_module.only_printing_properties,sm.builtins.calls_function=this.instructor_module.calls_function,sm.builtins.get_property=this.instructor_module.get_property,sm.builtins.get_value_by_name=this.instructor_module.get_value_by_name,sm.builtins.get_value_by_type=this.instructor_module.get_value_by_type,sm.builtins.parse_json=this.instructor_module.parse_json,sm.skip_drawing=!0,r.settings.mute_printer(!0)}disposeEnvironment(){sm.afterSingleExecution=this._backup_execution,sm.builtins.get_output=void 0,sm.builtins.reset_output=void 0,sm.builtins.log=void 0,sm.builtins._trace=void 0,sm.builtins.trace=void 0,sm.builtins.code=void 0,sm.builtins.set_success=void 0,sm.builtins.set_feedback=void 0,sm.builtins.set_finished=void 0,sm.builtins.count_components=void 0,sm.builtins.calls_function=void 0,sm.builtins.get_property=void 0,sm.builtins.get_value_by_name=void 0,sm.builtins.get_value_by_type=void 0,sm.builtins.no_nonlist_nums=void 0,sm.builtins.only_printing_properties=void 0,sm.builtins.parse_json=void 0,sm.skip_drawing=!1,om=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==sm.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 sm.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 sm.builtin.module:return null;case sm.builtin.str:return{name:t,type:"String",value:e.$r().v};case sm.builtin.none:return{name:t,type:"None",value:"None"};case sm.builtin.bool:return{name:t,type:"Boolean",value:e.$r().v};case sm.builtin.nmber:return{name:t,type:"int"==e.skType?"Integer":"Float",value:e.$r().v};case sm.builtin.int_:return{name:t,type:"Integer",value:e.$r().v};case sm.builtin.float_:return{name:t,type:"Float",value:e.$r().v};case sm.builtin.tuple:return{name:t,type:"Tuple",value:e.$r().v};case sm.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 sm.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 lm=$;var um=n.n(lm);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("images","images","图像"),t.changeTo("output")}}constructor(){super();const t=um()(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(um()(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 pm=cm;class hm{static{this.pythonShell=null,this.init=async function(){pm.init(),this.pythonShell=new hm},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 _m=hm,dm={init:function(){_m.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:()=>{_m.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:()=>{_m.stop().catch(j.Debug.error)},scopeType:j.Nav.Scope.LEFT,weight:5})}};dm.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,y,T,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"+i.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+r.join("")+o.join("\n"):e.join("\n")+"\n"+i.join("\n")+"\n"+s.join("")+"\n"+t+o.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 yt={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}},Tt={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=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 Pt={init:function(){this.setColour(Ft),this.appendDummyInput().appendField(new Y.FieldTextInput("0",Y.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MATH_NUMBER_TOOLTIP)}},Bt={init:function(){this.setColour(Ft);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]}))}},Vt={init:function(){this.setColour(Ft);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]}))}},Ut={init:function(){this.setColour(Ft),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]}))}},Yt={init:function(){this.setColour(Ft),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]}))}},jt={init:function(){this.setColour(Ft),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Y.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Gt={init:function(){this.setColour(Ft),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]}))}},Xt={init:function(){var t=[[Y.Msg.MATH_BIN,"bin"],[Y.Msg.MATH_OCT,"oct"],[Y.Msg.MATH_HEX,"hex"]];this.setColour(Ft),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]}))}},Ht={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(Ft),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]}))}},qt={init:function(){var t=[[Y.Msg.MIXLY_MAX,"max"],[Y.Msg.MIXLY_MIN,"min"]];this.setColour(Ft),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]}))}},zt={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(Ft),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]}))}},Wt={init:function(){var t=[[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Ft),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]}))}},Jt={init:function(){this.setColour(Ft),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)}},Kt={init:function(){this.setColour(Ft),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)}},Qt={init:function(){this.setColour(Ft),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)}},Zt={init:function(){this.setColour(Ft),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)}},te={init:function(){this.setColour(Ft),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)}},ee={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(Ft),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]}))}},ne={init:function(){var t=[[Y.Msg.MIXLY_TO_INT,"int"],[Y.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Ft),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]}))}},ie=Kt,se={init:function(){this.setColour(Ft),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)}},re=160,oe={init:function(){this.setColour(re),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Y.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Y.Msg.TEXT_TEXT_TOOLTIP)},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 Y.FieldImage(e,12,12,'"')}},ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Y.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(Y.Msg.TEXT_LINES_TOOLTIP)},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 Y.FieldImage(e,12,12,'"')}};Y.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 le={init:function(){this.setColour(re),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,'"')}},ue={init:function(){this.setColour(re),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)}},ce={init:function(){this.setColour(re),this.appendValueInput("VAR").setCheck(Number).appendField(Y.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},pe={init:function(){this.setColour(re),this.appendValueInput("VAR").setCheck(String).appendField(Y.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},he={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},_e={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},de={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(re),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)}},fe={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(re),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)}},me={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(re),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Y.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Y.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ge={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(re),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"))}},be={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(re),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)}},Se={init:function(){var t=[[Y.Msg.MIXLY_EQUALS,"==="],[Y.Msg.MIXLY_STARTSWITH,"startswith"],[Y.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(re),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Y.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ke={init:function(){this.setColour(re),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)}},ye={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(re),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]}))}},Te={init:function(){var t=[[Y.Msg.TEXT_LJUST,"ljust"],[Y.Msg.TEXT_CENTER,"center"],[Y.Msg.TEXT_RJUST,"rjust"]];this.setColour(re),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)}},ve={init:function(){this.setColour(re),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)}},$e={init:function(){this.setColour(re),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)}},we={init:function(){this.setColour(re),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)}},Ee={init:function(){this.setColour(re),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)}},Ie={init:function(){var t=[[Y.Msg.TEXT_TRIM_BOTH,"strip"],[Y.Msg.TEXT_TRIM_LEFT,"lstrip"],[Y.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(re),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]}))}},Ae={init:function(){this.setColour(re),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")}},$n={init:function(){this.setColour(Tn),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},wn={init:function(){this.setColour(Tn),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}},En={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_KEYS),this.setTooltip(Y.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(Tn),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)}},An={init:function(){this.setColour(Tn),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)}},On={init:function(){this.setColour(Tn),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)}},Mn={init:function(){this.setColour(Tn),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)}},Cn={init:function(){this.setColour(Tn),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)}},Rn={init:function(){this.setColour(Tn),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)}},xn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_ITEMS),this.setTooltip(Y.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Nn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_VALUES),this.setTooltip(Y.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Ln={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_LENGTH),this.setTooltip(Y.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Dn={init:function(){this.setColour(Tn),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)}},Fn={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(Tn),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")}},Pn={init:function(){this.setColour(Tn),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)}},Bn={init:function(){this.setColour(Tn),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)}},Vn={init:function(){this.setColour(Tn),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")}},Un={init:function(){this.setColour(Tn),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Yn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_TO_JSON),this.setTooltip(Y.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},jn={init:function(){this.setColour(Tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Y.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Gn=210,Xn={init:function(){var t=Y.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Gn),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]}},Hn={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(Gn),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)}},qn={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(Gn),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]}))}},zn={init:function(){this.setColour(Gn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Y.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Y.Msg.LOGIC_NEGATE_TOOLTIP)}},Wn={init:function(){var t=[[Y.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Y.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Gn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Y.FieldDropdown(t),"BOOL"),this.setTooltip(Y.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Jn={init:function(){this.setColour(Gn),this.setOutput(!0),this.appendDummyInput().appendField(Y.Msg.LOGIC_NULL),this.setTooltip(Y.Msg.LOGIC_NULL_TOOLTIP)}},Kn={init:function(){this.setColour(Gn),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)}},Qn={init:function(){var t=[[Y.Msg.TEXT_APPEND_TO,"in"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Gn),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)}},Zn={init:function(){var t=[[Y.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Gn),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)}},ti={init:function(){this.setColour(Gn),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},ei={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)}},ni={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")}},ii={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}))}},si={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}))}},ri={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)}},oi={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)}},ai={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}))}},li={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)}},ui={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)}},ci={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)}},pi={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)}},hi={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 _i={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)}},di={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)}},fi={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)}},mi={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}))}},gi={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)}},bi={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]}))}},Si={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)}},ki={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)}},yi={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]}))}},Ti={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)}},vi={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()}},$i={init:function(){var t=q.findLegalName("",this),e=new Y.FieldTextInput(t,q.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)}},gs={init:function(){this.setColour(ps),this.appendDummyInput().appendField(Y.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},bs={init:function(){this.setColour(ps),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)}},Ss={init:function(){this.setColour(ps),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(ps),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ys={init:function(){this.setColour(ps),this.appendDummyInput().appendField(Y.Msg.HTML_TEXT).appendField(new Y.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ts=160,vs={init:function(){this.setColour(Ts),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Y.FieldTable(""),"TEXT")}},$s={init:function(){this.setColour(Ts),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT")}},ws={init:function(){this.setColour(Ts),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Es={init:function(){this.setColour(Ts),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Is={init:function(){this.setColour(Ts),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Y.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},As={init:function(){this.setColour(Ts),this.appendValueInput("VALUE").appendField(Y.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Os={init:function(){this.setColour(Ts),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)}},So={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ko={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yo={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},To={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vo={init:function(){this.setColour(ao);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)}},$o={init:function(){this.setColour(ao),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)}},wo={init:function(){this.setColour(ao);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]}))}},Eo={init:function(){this.setColour(ao);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("")}},Io={init:function(){this.setColour(ao);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)}},Ao={init:function(){this.setColour(ao);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)}},Oo={init:function(){this.setColour(ao);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)}},Mo={init:function(){this.setColour(ao),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)}},Co={init:function(){this.setColour(ao);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)}},Ro={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(ao),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)}},xo={init:function(){this.setColour(ao),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)}},No={init:function(){this.setColour(ao),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")}},Lo={init:function(){this.setColour(ao),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)}},Do={init:function(){this.setColour(ao),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)}},Fo={init:function(){this.setColour(ao);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)}},Po={init:function(){this.setColour(ao),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},Bo={init:function(){this.setColour(ao),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)}},Vo={init:function(){this.setColour(ao);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)}},Uo={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yo={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jo={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Go={init:function(){this.setColour(ao),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xo={init:function(){this.setColour(ao);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)}},Ho={init:function(){this.setColour(ao);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]}))}},qo={init:function(){this.setColour(ao);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("")}},zo={init:function(){this.setColour(ao);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)}},Wo={init:function(){this.setColour(ao);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)}},Jo={init:function(){this.setColour(ao);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)}},Ko={init:function(){this.setColour(ao),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)}},Qo={init:function(){this.setColour(ao);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)}},Zo={init:function(){this.setColour(ao),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)}},ta={init:function(){this.setColour(ao),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)}},ea={init:function(){this.setColour(ao);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)}},na=20,ia={init:function(){this.setColour(na),this.appendValueInput("VAR").appendField(Y.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Y.Msg.INOUT_input_TOOLTIP)}},sa={init:function(){this.setColour(na),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.BLOCKPY_PRINT_TOOLTIP)}},ra={init:function(){this.setColour(na),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)}},oa={init:function(){this.setColour(na),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)}},aa={init:function(){var t=[[Y.Msg.LANG_MATH_STRING,"str"],[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(na),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]}))}},la={init:function(){this.setColour(na),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 pp=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]},hp=function(t,e){var n=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",n)||"False"),n]},_p=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},dp=function(t,e){return["None",e.ORDER_ATOMIC]},fp=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]},mp=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]},gp=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]},bp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Sp=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},kp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},yp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Tp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},vp=function(t,e){var n=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+n+")\n"},$p=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"()",e.ORDER_ATOMIC]},wp=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]},Ep=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ip=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ap=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Op=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Mp=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Cp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Rp=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},xp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Np=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"},Lp=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Dp=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Fp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Pp=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"},Bp=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]},Vp=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"},Up=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"},Yp=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]},Th=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"\n"+n+"\n"},vh=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},$h=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},wh=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]},Ih=function(t,e){return'"},Ah=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Oh=function(){return this.getFieldValue("TEXT")+"\n"},Mh=function(t){return t.getFieldValue("TEXT")+"\n"},Ch=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Rh=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},xh=function(){return""},Nh=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Lh=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'},Zh=function(t,e){return["name[now] != '小科家'",e.ORDER_ATOMIC]},t_=function(t,e){return["name[now] != '学校'",e.ORDER_ATOMIC]},e_=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},n_=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},i_=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`},s_=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"},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=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"},o_=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"},a_=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]},l_=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]},u_=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")},c_=function(t,e){return["len(list)>=2",e.ORDER_ATOMIC]},p_=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},h_=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"},__=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"},d_=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"},f_=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`},m_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},g_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},b_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},S_=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"},k_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},y_=function(t,e){return["_rabbit < _head",e.ORDER_ATOMIC]},T_=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"},v_=function(t,e){return["_rabbit*4 + _chick*2 == _foot",e.ORDER_ATOMIC]},$_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},w_=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"},E_=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"},I_=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"},A_=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]},O_=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`},M_=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"},C_=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"},R_=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`},x_=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`},N_=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]},L_=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"},D_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},F_=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],um.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__:um.python3}),um.builtins.value=new um.builtin.func((function(){return um.ffi.remapToPy(void 0===pm?5:pm)})),um.builtins.set_value=new um.builtin.func((function(t){pm=t.v})),um.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!==cm[t])return um.misceval.promiseToSuspension(fetch(cm[t]).then((t=>t.text())));if(void 0===um.builtinFiles||void 0===um.builtinFiles.files[t])throw"File not found: '"+t+"'";return um.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(){um.execLimit=Number.POSITIVE_INFINITY,um.TurtleGraphics.reset&&um.TurtleGraphics.reset()}kill(){window.SPRITE.kill(),um.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(um.TurtleGraphics.target),this.programStatus.running=!0,um.misceval.asyncToPromise((()=>um.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=um.afterSingleExecution,um.afterSingleExecution=void 0,um.builtins.get_output=new um.builtin.func((function(){return um.builtin.pyCheckArgs("get_output",arguments,0,0),um.ffi.remapToPy(r.execution.output())})),um.builtins.reset_output=new um.builtin.func((function(){um.builtin.pyCheckArgs("reset_output",arguments,0,0),r.execution.output.removeAll()})),um.builtins.log=new um.builtin.func((function(t){um.builtin.pyCheckArgs("log",arguments,1,1),console.log(t)})),um.builtins._trace=e,um.builtins._final_values=s,um.builtins.code=um.ffi.remapToPy(t),um.builtins.set_success=this.instructor_module.set_success,um.builtins.set_feedback=this.instructor_module.set_feedback,um.builtins.set_finished=this.instructor_module.set_finished,um.builtins.count_components=this.instructor_module.count_components,um.builtins.no_nonlist_nums=this.instructor_module.no_nonlist_nums,um.builtins.only_printing_properties=this.instructor_module.only_printing_properties,um.builtins.calls_function=this.instructor_module.calls_function,um.builtins.get_property=this.instructor_module.get_property,um.builtins.get_value_by_name=this.instructor_module.get_value_by_name,um.builtins.get_value_by_type=this.instructor_module.get_value_by_type,um.builtins.parse_json=this.instructor_module.parse_json,um.skip_drawing=!0,r.settings.mute_printer(!0)}disposeEnvironment(){um.afterSingleExecution=this._backup_execution,um.builtins.get_output=void 0,um.builtins.reset_output=void 0,um.builtins.log=void 0,um.builtins._trace=void 0,um.builtins.trace=void 0,um.builtins.code=void 0,um.builtins.set_success=void 0,um.builtins.set_feedback=void 0,um.builtins.set_finished=void 0,um.builtins.count_components=void 0,um.builtins.calls_function=void 0,um.builtins.get_property=void 0,um.builtins.get_value_by_name=void 0,um.builtins.get_value_by_type=void 0,um.builtins.no_nonlist_nums=void 0,um.builtins.only_printing_properties=void 0,um.builtins.parse_json=void 0,um.skip_drawing=!1,pm=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==um.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 um.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 um.builtin.module:return null;case um.builtin.str:return{name:t,type:"String",value:e.$r().v};case um.builtin.none:return{name:t,type:"None",value:"None"};case um.builtin.bool:return{name:t,type:"Boolean",value:e.$r().v};case um.builtin.nmber:return{name:t,type:"int"==e.skType?"Integer":"Float",value:e.$r().v};case um.builtin.int_:return{name:t,type:"Integer",value:e.$r().v};case um.builtin.float_:return{name:t,type:"Float",value:e.$r().v};case um.builtin.tuple:return{name:t,type:"Tuple",value:e.$r().v};case um.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 um.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 _m=$;var dm=n.n(_m);class fm 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"],fm);const t=j.Workspace.getMain().getStatusBarsManager();t.add("images","images","图像"),t.changeTo("output")}}constructor(){super();const t=dm()(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(dm()(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 mm=fm;class gm{static{this.pythonShell=null,this.init=async function(){mm.init(),this.pythonShell=new gm},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 bm=gm,Sm={init:function(){bm.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:()=>{bm.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:()=>{bm.stop().catch(j.Debug.error)},scopeType:j.Nav.Scope.LEFT,weight:5})}};Sm.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,y,T,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/main.bundle.js b/boards/default/python_skulpt_car/main.bundle.js index b4100535..0dfacf3f 100644 --- a/boards/default/python_skulpt_car/main.bundle.js +++ b/boards/default/python_skulpt_car/main.bundle.js @@ -1,4 +1,4 @@ -(()=>{"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:()=>at,controls_if_else:()=>Mt,controls_if_elseif:()=>Et,controls_if_if:()=>Ot,controls_lambda:()=>gt,controls_main:()=>st,controls_pass:()=>Lt,controls_range:()=>ut,controls_repeat_ext:()=>At,controls_thread:()=>Ct,controls_try:()=>ct,controls_try_finally:()=>Tt,controls_whileUntil:()=>rt,do_while:()=>St,garbage_collection:()=>Dt,get_mem_alloc:()=>Nt,get_mem_free:()=>Pt,get_unique_identifier:()=>ft});var n={};t.r(n),t.d(n,{base_map:()=>Zt,math_arithmetic:()=>yt,math_bit:()=>kt,math_constant:()=>Vt,math_constant_mp:()=>Yt,math_constrain:()=>Ht,math_dec:()=>Xt,math_indexer_number:()=>Kt,math_map:()=>Wt,math_max_min:()=>xt,math_number:()=>vt,math_number_base_conversion:()=>Gt,math_random:()=>wt,math_random_seed:()=>jt,math_round:()=>qt,math_selfcalcu:()=>bt,math_to_int:()=>Bt,math_trig:()=>Ut,text_to_number:()=>Qt,text_to_number_skulpt:()=>Jt,turn_to_int:()=>zt});var s={};t.r(s),t.d(s,{ascii_to_char:()=>se,char_to_ascii:()=>oe,number_to_text:()=>_e,os_system:()=>Fe,text:()=>te,text_capital:()=>he,text_center:()=>Oe,text_char:()=>ie,text_char_at:()=>ue,text_char_at2:()=>ae,text_char_at3:()=>De,text_compareTo:()=>Se,text_compare_to:()=>Ie,text_create_with_container:()=>ge,text_create_with_item:()=>Le,text_encode:()=>Pe,text_equals_starts_ends:()=>de,text_eval:()=>fe,text_find:()=>Ee,text_format:()=>Ae,text_format_noreturn:()=>Ne,text_join:()=>ne,text_join_seq:()=>Me,text_length:()=>pe,text_random_char:()=>le,text_replace:()=>ce,text_split:()=>Re,text_strip:()=>me,text_substring:()=>Te,text_substring2:()=>re,text_substring3:()=>Ce,text_textarea:()=>ee});var o={};t.r(o),t.d(o,{list_many_input:()=>ti,list_tolist:()=>si,list_tolist2:()=>Ti,list_trig:()=>Ze,lists_2d_get_col_row_data:()=>be,lists_2d_get_data_with_col_row:()=>ye,lists_append_extend:()=>Ge,lists_change_to:()=>$e,lists_change_to_general:()=>ii,lists_clear:()=>je,lists_create_with:()=>ke,lists_create_with2:()=>oi,lists_create_with_container:()=>Xe,lists_create_with_item:()=>Be,lists_create_with_noreturn:()=>ei,lists_create_with_text:()=>Ue,lists_create_with_text2:()=>_i,lists_del_general:()=>ni,lists_find:()=>Je,lists_getIndex3:()=>pi,lists_getSublist3:()=>ai,lists_get_index:()=>Ve,lists_get_random_item:()=>we,lists_get_random_sublist:()=>He,lists_get_sublist:()=>Ye,lists_insert_value:()=>We,lists_insert_value2:()=>li,lists_pop:()=>Qe,lists_remove_at:()=>qe,lists_remove_at2:()=>ri,lists_reverse:()=>Ke,lists_setIndex3:()=>ui,lists_set_index:()=>xe,lists_sort:()=>ze});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Ni,dicts_add_or_change:()=>Ri,dicts_clear:()=>gi,dicts_create_with:()=>Ii,dicts_create_with_container:()=>hi,dicts_create_with_item:()=>Oi,dicts_create_with_noreturn:()=>Fi,dicts_deldict:()=>Di,dicts_delete:()=>mi,dicts_get:()=>Mi,dicts_get_default:()=>ci,dicts_items:()=>Li,dicts_keys:()=>Ei,dicts_length:()=>Si,dicts_pop:()=>Pi,dicts_setdefault:()=>fi,dicts_to_json:()=>Vi,dicts_todict:()=>vi,dicts_update:()=>Ai,dicts_values:()=>Ci,json_to_dicts:()=>Yi});var p={};t.r(p),t.d(p,{logic_boolean:()=>Bi,logic_compare:()=>bi,logic_compare_continous:()=>ki,logic_is:()=>Hi,logic_is_in:()=>wi,logic_negate:()=>Xi,logic_null:()=>xi,logic_operation:()=>Ui,logic_tobool:()=>Wi,logic_true_or_false:()=>Gi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>hn,sdcard_use_spi_init:()=>In,storage_can_write_ornot:()=>tn,storage_change_dir:()=>Tn,storage_close_file:()=>nn,storage_delete_file:()=>on,storage_file_seek:()=>an,storage_file_tell:()=>pn,storage_file_write:()=>Ji,storage_fileopen:()=>ji,storage_fileopen_new:()=>qi,storage_fileopen_new_encoding:()=>Qi,storage_get_a_line:()=>$i,storage_get_contents:()=>zi,storage_get_contents_without_para:()=>Zi,storage_get_current_dir:()=>un,storage_get_file_size:()=>_n,storage_get_filename:()=>en,storage_is_file:()=>dn,storage_list_all_files:()=>sn,storage_make_dir:()=>ln,storage_open_file_with_os:()=>Ki,storage_rename:()=>rn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Rn,procedures_callreturn:()=>mn,procedures_defnoreturn:()=>On,procedures_defreturn:()=>En,procedures_ifreturn:()=>An,procedures_mutatorarg:()=>cn,procedures_mutatorcontainer:()=>Mn,procedures_return:()=>gn});var l={};t.r(l),t.d(l,{tuple_change_to:()=>yn,tuple_create_with:()=>Cn,tuple_create_with_container:()=>Sn,tuple_create_with_item:()=>Dn,tuple_create_with_noreturn:()=>Xn,tuple_create_with_text2:()=>Nn,tuple_create_with_text_return:()=>Pn,tuple_del:()=>vn,tuple_find:()=>bn,tuple_getIndex:()=>fn,tuple_getSublist:()=>Un,tuple_get_random_item:()=>xn,tuple_get_sublist:()=>Bn,tuple_join:()=>Vn,tuple_length:()=>Fn,tuple_max:()=>Yn,tuple_totuple:()=>Gn,tuple_trig:()=>kn});var r={};t.r(r),t.d(r,{set_add_discard:()=>zn,set_clear:()=>Qn,set_create_with:()=>Hn,set_create_with_container:()=>Wn,set_create_with_item:()=>Kn,set_create_with_text_return:()=>es,set_length:()=>jn,set_operate:()=>Jn,set_operate_update:()=>Zn,set_pop:()=>qn,set_sub:()=>$n,set_toset:()=>is,set_update:()=>ts});var T={};t.r(T),t.d(T,{html_content:()=>ps,html_content_more:()=>as,html_document:()=>ss,html_form:()=>ls,html_head_body:()=>_s,html_style:()=>us,html_style_color:()=>Ts,html_style_content:()=>rs,html_text:()=>ds,html_title:()=>os});var d={};t.r(d),t.d(d,{attribute_access:()=>Ds,function_call:()=>Ls,function_call_container:()=>Cs,function_call_item:()=>Ss,raw_block:()=>Os,raw_empty:()=>Ms,raw_expression:()=>Es,raw_table:()=>hs,text_comment:()=>cs,text_print_multiple:()=>ms,text_print_multiple_container:()=>As,text_print_multiple_item:()=>gs,type_check:()=>Rs});var I={};t.r(I),t.d(I,{array_create:()=>Hs,array_toarray:()=>so,dataframe_create:()=>Fs,dataframe_create_from_index:()=>Vs,dataframe_create_from_one_index:()=>vs,dataframe_get:()=>eo,numpy_trig:()=>zs,pandas_readcsv:()=>to,pl_axes:()=>Bs,pl_bar:()=>qs,pl_hist:()=>Js,pl_label:()=>ws,pl_legend:()=>xs,pl_pie:()=>Qs,pl_plot:()=>Us,pl_plot_bar:()=>Ws,pl_plot_easy:()=>ks,pl_plot_scatter:()=>Ks,pl_plot_xy:()=>js,pl_savefig:()=>io,pl_show:()=>Xs,pl_subplot:()=>$s,pl_text:()=>no,pl_ticks:()=>Zs,pl_title:()=>Gs,plot_axes:()=>ao,plot_bar:()=>Oo,plot_hist:()=>Mo,plot_label:()=>ro,plot_legend:()=>uo,plot_pie:()=>Eo,plot_plot:()=>_o,plot_plot_bar:()=>To,plot_plot_easy:()=>oo,plot_plot_scatter:()=>Io,plot_plot_xy:()=>ho,plot_savefig:()=>mo,plot_show:()=>po,plot_subplot:()=>Ro,plot_text:()=>Ao,plot_ticks:()=>co,plot_title:()=>lo,series_create:()=>Ps,series_create_from_index:()=>fs,series_create_from_text:()=>Ys,series_get_num:()=>bs,series_index_value:()=>ys});var h={};t.r(h),t.d(h,{inout_input:()=>Lo,inout_print:()=>Co,inout_print_container:()=>fo,inout_print_end:()=>Do,inout_print_inline:()=>So,inout_print_item:()=>Fo,inout_print_many:()=>Po,inout_type_input:()=>No});var O={};t.r(O),t.d(O,{Panic_with_status_code:()=>bo,base_delay:()=>Vo,controls_millis:()=>Yo,controls_mstimer2:()=>Uo,controls_mstimer2_start:()=>Xo,controls_mstimer2_stop:()=>Bo,reset:()=>ko,time_localtime:()=>yo,time_sleep:()=>xo});var E={};t.r(E),t.d(E,{turtle_bgcolor:()=>a_,turtle_bgcolor_hex:()=>E_,turtle_bgcolor_hex_new:()=>T_,turtle_circle:()=>o_,turtle_circle_advanced:()=>__,turtle_clear:()=>$o,turtle_clone:()=>r_,turtle_color:()=>h_,turtle_color_hex:()=>O_,turtle_color_seclet:()=>D_,turtle_create:()=>wo,turtle_done:()=>Ho,turtle_exitonclick:()=>Wo,turtle_fill:()=>e_,turtle_fillcolor:()=>l_,turtle_fillcolor_hex:()=>c_,turtle_fillcolor_hex_new:()=>I_,turtle_getscreen:()=>N_,turtle_goto:()=>Jo,turtle_listen:()=>v_,turtle_move:()=>Ko,turtle_numinput:()=>A_,turtle_onclick:()=>f_,turtle_onkey:()=>P_,turtle_ontimer:()=>F_,turtle_pencolor:()=>u_,turtle_pencolor_hex:()=>M_,turtle_pencolor_hex_new:()=>d_,turtle_penup:()=>t_,turtle_pos_shape:()=>zo,turtle_rotate:()=>jo,turtle_screen_delay:()=>Qo,turtle_screen_savefig:()=>V_,turtle_setheading:()=>qo,turtle_setxy:()=>Zo,turtle_shape:()=>R_,turtle_shapesize:()=>m_,turtle_size:()=>n_,turtle_size_speed:()=>i_,turtle_speed:()=>s_,turtle_textinput:()=>g_,turtle_visible:()=>p_,turtle_write:()=>L_,turtle_write_format:()=>C_,turtle_write_format_skulpt:()=>S_});var M={};t.r(M),t.d(M,{Turn:()=>w_,addOil:()=>op,game_get_character_img:()=>Z_,game_get_local_img:()=>j_,game_get_path_img:()=>Q_,game_init:()=>x_,get_actor_point:()=>$_,initSettedMap_1:()=>Y_,initSettedMap_2:()=>y_,initSettedMap_3:()=>b_,initSettedMap_4:()=>k_,initSettedMap_5:()=>U_,initSettedMap_6:()=>X_,initSettedMap_7:()=>B_,initialize:()=>z_,isBarrier:()=>tp,isCirculationRight:()=>_p,isDone:()=>H_,isLightGreen:()=>np,isLightRed:()=>sp,isOilFull:()=>ip,isPath:()=>W_,move_direction_steps:()=>G_,place_item:()=>J_,randomOil:()=>ep,set_map:()=>K_,set_pathtype:()=>q_});var c={};t.r(c),t.d(c,{controls_type:()=>rp,controls_typeLists:()=>Tp,lists_zip:()=>dp,unpack_iterable_object:()=>Ip,variables_change:()=>up,variables_get:()=>pp,variables_global:()=>lp,variables_set:()=>ap});var R={};t.r(R),t.d(R,{Panic_with_status_code:()=>Lp,base_setup:()=>Op,controls_delay:()=>gp,controls_flow_statements:()=>Ap,controls_for:()=>cp,controls_forEach:()=>Pp,controls_for_range:()=>Rp,controls_if:()=>Ep,controls_interrupts:()=>Dp,controls_lambda:()=>Fp,controls_main:()=>hp,controls_millis:()=>Cp,controls_nointerrupts:()=>Np,controls_pass:()=>Vp,controls_range:()=>fp,controls_repeat:()=>xp,controls_repeat_ext:()=>bp,controls_thread:()=>Yp,controls_try_finally:()=>Mp,controls_whileUntil:()=>mp,do_while:()=>yp,garbage_collection:()=>kp,get_mem_alloc:()=>Up,get_mem_free:()=>Xp,get_unique_identifier:()=>Bp,reset:()=>Sp,time_sleep:()=>vp});var m={};t.r(m),t.d(m,{base_map:()=>aa,math_arithmetic:()=>Kp,math_bit:()=>Wp,math_constant:()=>wp,math_constant_mp:()=>Hp,math_constrain:()=>ea,math_dec:()=>Jp,math_indexer_number:()=>sa,math_map:()=>ta,math_max_min:()=>zp,math_number:()=>Gp,math_number_base_conversion:()=>ia,math_random:()=>$p,math_random_seed:()=>na,math_round:()=>oa,math_selfcalcu:()=>jp,math_single:()=>qp,math_to_int:()=>Zp,math_trig:()=>Qp,text_to_number:()=>_a,text_to_number_skulpt:()=>pa,turn_to_int:()=>ua});var A={};t.r(A),t.d(A,{ascii_to_char:()=>Ia,char_to_ascii:()=>ha,number_to_text:()=>Oa,os_system:()=>Xa,text:()=>la,text_capital:()=>Ca,text_center:()=>Sa,text_char:()=>Ta,text_char_at:()=>ca,text_char_at2:()=>Ma,text_char_at3:()=>ba,text_compareTo:()=>ya,text_compare_to:()=>Aa,text_encode:()=>ka,text_equals_starts_ends:()=>ma,text_eval:()=>Ua,text_find:()=>Da,text_format:()=>va,text_format_noreturn:()=>Va,text_join:()=>da,text_join_seq:()=>Na,text_length:()=>Ea,text_random_char:()=>Ra,text_replace:()=>Pa,text_split:()=>fa,text_strip:()=>Fa,text_substring:()=>La,text_substring2:()=>ga,text_substring3:()=>Ya,text_textarea:()=>ra});var g={};t.r(g),t.d(g,{list_many_input:()=>ou,list_tolist:()=>Ou,list_tolist2:()=>Eu,list_trig:()=>iu,lists_2d_get_col_row_data:()=>Ga,lists_2d_get_data_with_col_row:()=>xa,lists_append_extend:()=>ja,lists_change_to:()=>su,lists_change_to_general:()=>pu,lists_clear:()=>za,lists_create_with:()=>wa,lists_create_with2:()=>uu,lists_create_with_noreturn:()=>_u,lists_create_with_text:()=>Ha,lists_create_with_text2:()=>lu,lists_del_general:()=>au,lists_find:()=>$a,lists_getIndex3:()=>ru,lists_getSublist3:()=>Tu,lists_get_index:()=>Wa,lists_get_random_item:()=>qa,lists_get_random_sublist:()=>Qa,lists_get_sublist:()=>Ba,lists_insert_value:()=>Ja,lists_insert_value2:()=>Iu,lists_pop:()=>eu,lists_remove_at:()=>tu,lists_remove_at2:()=>hu,lists_reverse:()=>Za,lists_setIndex3:()=>du,lists_set_index:()=>Ka,lists_sort:()=>nu});var L={};t.r(L),t.d(L,{dicts_add_change_del:()=>fu,dicts_add_or_change:()=>Au,dicts_clear:()=>Cu,dicts_create_with:()=>Mu,dicts_create_with_noreturn:()=>Vu,dicts_deldict:()=>Pu,dicts_delete:()=>gu,dicts_get:()=>Ru,dicts_get_default:()=>mu,dicts_items:()=>Su,dicts_keys:()=>cu,dicts_length:()=>Nu,dicts_pop:()=>Fu,dicts_setdefault:()=>vu,dicts_to_json:()=>yu,dicts_todict:()=>Yu,dicts_update:()=>Lu,dicts_values:()=>Du,json_to_dicts:()=>bu});var C={};t.r(C),t.d(C,{logic_boolean:()=>xu,logic_compare:()=>ku,logic_compare_continous:()=>Uu,logic_is:()=>Wu,logic_is_in:()=>Hu,logic_negate:()=>Bu,logic_null:()=>Gu,logic_operation:()=>Xu,logic_tobool:()=>Ku,logic_true_or_false:()=>wu});var S={};t.r(S),t.d(S,{sdcard_mount:()=>hl,sdcard_use_spi_init:()=>Il,storage_can_write_ornot:()=>el,storage_change_dir:()=>ul,storage_close_file:()=>nl,storage_delete_file:()=>ol,storage_file_seek:()=>al,storage_file_tell:()=>pl,storage_file_write:()=>Zu,storage_fileopen:()=>qu,storage_fileopen_new:()=>Qu,storage_fileopen_new_encoding:()=>Ju,storage_get_a_line:()=>tl,storage_get_contents:()=>$u,storage_get_contents_without_para:()=>zu,storage_get_current_dir:()=>ll,storage_get_file_size:()=>_l,storage_get_filename:()=>il,storage_is_file:()=>dl,storage_list_all_files:()=>sl,storage_make_dir:()=>rl,storage_open_file_with_os:()=>ju,storage_rename:()=>Tl});var D={};t.r(D),t.d(D,{procedures_callnoreturn:()=>cl,procedures_callreturn:()=>Ml,procedures_defnoreturn:()=>El,procedures_defreturn:()=>Ol,procedures_ifreturn:()=>Rl,procedures_return:()=>ml});var N={};t.r(N),t.d(N,{tuple_change_to:()=>fl,tuple_create_with:()=>Al,tuple_create_with_noreturn:()=>Yl,tuple_create_with_text2:()=>gl,tuple_create_with_text_return:()=>Ll,tuple_del:()=>Dl,tuple_find:()=>Fl,tuple_getIndex:()=>Cl,tuple_getSublist:()=>Vl,tuple_get_random_item:()=>bl,tuple_get_sublist:()=>yl,tuple_join:()=>Nl,tuple_length:()=>Sl,tuple_max:()=>Pl,tuple_totuple:()=>kl,tuple_trig:()=>vl});var P={};t.r(P),t.d(P,{set_add_discard:()=>Hl,set_clear:()=>xl,set_create_with:()=>Ul,set_create_with_text_return:()=>jl,set_length:()=>Xl,set_operate:()=>Gl,set_operate_update:()=>wl,set_pop:()=>Bl,set_sub:()=>Wl,set_toset:()=>ql,set_update:()=>Kl});var f={};t.r(f),t.d(f,{html_content:()=>zl,html_content_more:()=>$l,html_document:()=>Ql,html_form:()=>er,html_head_body:()=>Zl,html_style:()=>tr,html_style_content:()=>ir,html_text:()=>nr,html_title:()=>Jl});var F={};t.r(F),t.d(F,{attribute_access:()=>lr,function_call:()=>ur,raw_block:()=>sr,raw_empty:()=>_r,raw_expression:()=>or,raw_table:()=>pr,type_check:()=>ar});var v={};t.r(v),t.d(v,{array_create:()=>Sr,array_toarray:()=>Br,dataframe_create:()=>dr,dataframe_create_from_index:()=>Ir,dataframe_create_from_one_index:()=>hr,dataframe_get:()=>kr,numpy_trig:()=>Yr,pandas_readcsv:()=>br,pl_axes:()=>Rr,pl_bar:()=>fr,pl_hist:()=>vr,pl_label:()=>Cr,pl_legend:()=>gr,pl_pie:()=>Fr,pl_plot:()=>Ar,pl_plot_bar:()=>Dr,pl_plot_easy:()=>mr,pl_plot_scatter:()=>Nr,pl_plot_xy:()=>Pr,pl_savefig:()=>Ur,pl_show:()=>cr,pl_subplot:()=>yr,pl_text:()=>Xr,pl_ticks:()=>Vr,pl_title:()=>Lr,plot_axes:()=>Gr,plot_bar:()=>Zr,plot_hist:()=>$r,plot_label:()=>jr,plot_legend:()=>Wr,plot_pie:()=>zr,plot_plot:()=>Hr,plot_plot_bar:()=>qr,plot_plot_easy:()=>wr,plot_plot_scatter:()=>Qr,plot_plot_xy:()=>Jr,plot_savefig:()=>iT,plot_show:()=>xr,plot_subplot:()=>eT,plot_text:()=>nT,plot_ticks:()=>tT,plot_title:()=>Kr,series_create:()=>rr,series_create_from_index:()=>Tr,series_create_from_text:()=>Or,series_get_num:()=>Mr,series_index_value:()=>Er});var V={};t.r(V),t.d(V,{inout_input:()=>sT,inout_print:()=>oT,inout_print_end:()=>pT,inout_print_inline:()=>_T,inout_print_many:()=>uT,inout_type_input:()=>aT});var Y={};t.r(Y),t.d(Y,{controls_end_program:()=>rT,controls_millis:()=>lT,time_localtime:()=>TT});var y={};t.r(y),t.d(y,{turtle_bgcolor:()=>vT,turtle_bgcolor_hex:()=>bT,turtle_bgcolor_hex_new:()=>XT,turtle_circle:()=>NT,turtle_circle_advanced:()=>fT,turtle_clear:()=>AT,turtle_clone:()=>yT,turtle_color:()=>wT,turtle_color_hex:()=>GT,turtle_color_seclet:()=>ZT,turtle_create:()=>dT,turtle_done:()=>IT,turtle_exitonclick:()=>hT,turtle_fill:()=>LT,turtle_fillcolor:()=>YT,turtle_fillcolor_hex:()=>UT,turtle_fillcolor_hex_new:()=>xT,turtle_getscreen:()=>zT,turtle_goto:()=>RT,turtle_listen:()=>id,turtle_move:()=>OT,turtle_numinput:()=>jT,turtle_onclick:()=>td,turtle_onkey:()=>$T,turtle_ontimer:()=>ed,turtle_pencolor:()=>VT,turtle_pencolor_hex:()=>kT,turtle_pencolor_hex_new:()=>BT,turtle_penup:()=>gT,turtle_pos_shape:()=>mT,turtle_rotate:()=>ET,turtle_screen_delay:()=>cT,turtle_screen_savefig:()=>nd,turtle_setheading:()=>MT,turtle_setxy:()=>PT,turtle_shape:()=>HT,turtle_shapesize:()=>WT,turtle_size:()=>ST,turtle_size_speed:()=>CT,turtle_speed:()=>DT,turtle_textinput:()=>KT,turtle_visible:()=>FT,turtle_write:()=>qT,turtle_write_format:()=>QT,turtle_write_format_skulpt:()=>JT});var b={};t.r(b),t.d(b,{Turn:()=>dd,addOil:()=>Pd,game_get_character_img:()=>cd,game_get_local_img:()=>Ed,game_get_path_img:()=>Ad,game_init:()=>sd,get_actor_point:()=>Od,initSettedMap_1:()=>_d,initSettedMap_2:()=>pd,initSettedMap_3:()=>ad,initSettedMap_4:()=>ud,initSettedMap_5:()=>ld,initSettedMap_6:()=>rd,initSettedMap_7:()=>Td,initialize:()=>Rd,isBarrier:()=>Ld,isCirculationRight:()=>fd,isDone:()=>Id,isLightGreen:()=>Dd,isLightRed:()=>Nd,isOilFull:()=>Sd,isPath:()=>hd,move_direction_steps:()=>od,place_item:()=>md,randomOil:()=>Cd,set_map:()=>Md,set_pathtype:()=>gd});const k=Blockly,U=Mixly,X={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}},B=X,x={};x.NAME_TYPE=k.PROCEDURE_CATEGORY_NAME,x.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],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:()=>at,controls_if_else:()=>Mt,controls_if_elseif:()=>Et,controls_if_if:()=>Ot,controls_lambda:()=>gt,controls_main:()=>st,controls_pass:()=>Lt,controls_range:()=>ut,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,get_mem_alloc:()=>Nt,get_mem_free:()=>Pt,get_unique_identifier:()=>ft});var n={};t.r(n),t.d(n,{base_map:()=>zt,math_arithmetic:()=>bt,math_bit:()=>Ut,math_constant:()=>Yt,math_constant_mp:()=>yt,math_constrain:()=>Wt,math_dec:()=>Bt,math_indexer_number:()=>jt,math_map:()=>Kt,math_max_min:()=>Gt,math_number:()=>Vt,math_number_base_conversion:()=>wt,math_random:()=>Ht,math_random_seed:()=>qt,math_round:()=>Qt,math_selfcalcu:()=>kt,math_to_int:()=>xt,math_trig:()=>Xt,text_to_number:()=>Jt,text_to_number_skulpt:()=>Zt,turn_to_int:()=>$t});var s={};t.r(s),t.d(s,{ascii_to_char:()=>oe,char_to_ascii:()=>_e,number_to_text:()=>pe,os_system:()=>ve,text:()=>ee,text_capital:()=>Oe,text_center:()=>Ee,text_char:()=>ne,text_char_at:()=>le,text_char_at2:()=>ue,text_char_at3:()=>Ne,text_compareTo:()=>De,text_compare_to:()=>he,text_create_with_container:()=>Le,text_create_with_item:()=>Ce,text_encode:()=>fe,text_equals_starts_ends:()=>Ie,text_eval:()=>Fe,text_find:()=>Me,text_format:()=>ge,text_format_noreturn:()=>Pe,text_join:()=>se,text_join_seq:()=>ce,text_length:()=>ae,text_random_char:()=>re,text_replace:()=>Re,text_split:()=>me,text_strip:()=>Ae,text_substring:()=>de,text_substring2:()=>Te,text_substring3:()=>Se,text_textarea:()=>ie});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Ii,enumerate:()=>hi,list_many_input:()=>ei,list_tolist:()=>oi,list_tolist2:()=>di,list_trig:()=>ze,lists_2d_get_col_row_data:()=>ke,lists_2d_get_data_with_col_row:()=>be,lists_append_extend:()=>we,lists_change_to:()=>ti,lists_change_to_general:()=>ni,lists_clear:()=>qe,lists_create_with:()=>Ue,lists_create_with2:()=>_i,lists_create_with_container:()=>Be,lists_create_with_item:()=>xe,lists_create_with_noreturn:()=>ii,lists_create_with_text:()=>Xe,lists_create_with_text2:()=>pi,lists_del_general:()=>si,lists_find:()=>Ze,lists_getIndex3:()=>ai,lists_getSublist3:()=>ui,lists_get_index:()=>Ye,lists_get_random_item:()=>He,lists_get_random_sublist:()=>We,lists_get_sublist:()=>ye,lists_insert_value:()=>Ke,lists_insert_value2:()=>ri,lists_pop:()=>Je,lists_remove_at:()=>Qe,lists_remove_at2:()=>Ti,lists_reverse:()=>je,lists_setIndex3:()=>li,lists_set_index:()=>Ge,lists_sort:()=>$e});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Fi,dicts_add_or_change:()=>gi,dicts_clear:()=>Si,dicts_create_with:()=>Ei,dicts_create_with_container:()=>Mi,dicts_create_with_item:()=>ci,dicts_create_with_noreturn:()=>Yi,dicts_deldict:()=>fi,dicts_delete:()=>Li,dicts_get:()=>mi,dicts_get_default:()=>Ai,dicts_items:()=>Di,dicts_keys:()=>Ri,dicts_length:()=>Pi,dicts_pop:()=>vi,dicts_setdefault:()=>Vi,dicts_to_json:()=>bi,dicts_todict:()=>yi,dicts_update:()=>Ci,dicts_values:()=>Ni,json_to_dicts:()=>ki});var p={};t.r(p),t.d(p,{logic_boolean:()=>wi,logic_compare:()=>Xi,logic_compare_continous:()=>Bi,logic_is:()=>ji,logic_is_in:()=>Ki,logic_negate:()=>Gi,logic_null:()=>Hi,logic_operation:()=>xi,logic_tobool:()=>qi,logic_true_or_false:()=>Wi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Mn,sdcard_use_spi_init:()=>En,storage_can_write_ornot:()=>sn,storage_change_dir:()=>hn,storage_close_file:()=>_n,storage_delete_file:()=>an,storage_file_seek:()=>rn,storage_file_tell:()=>ln,storage_file_write:()=>$i,storage_fileopen:()=>Ji,storage_fileopen_new:()=>Zi,storage_fileopen_new_encoding:()=>zi,storage_get_a_line:()=>nn,storage_get_contents:()=>en,storage_get_contents_without_para:()=>tn,storage_get_current_dir:()=>Tn,storage_get_file_size:()=>un,storage_get_filename:()=>on,storage_is_file:()=>On,storage_list_all_files:()=>pn,storage_make_dir:()=>dn,storage_open_file_with_os:()=>Qi,storage_rename:()=>In});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>gn,procedures_callreturn:()=>Ln,procedures_defnoreturn:()=>cn,procedures_defreturn:()=>Rn,procedures_ifreturn:()=>Cn,procedures_mutatorarg:()=>An,procedures_mutatorcontainer:()=>mn,procedures_return:()=>Sn});var l={};t.r(l),t.d(l,{tuple_change_to:()=>Un,tuple_create_with:()=>Nn,tuple_create_with_container:()=>Pn,tuple_create_with_item:()=>fn,tuple_create_with_noreturn:()=>Gn,tuple_create_with_text2:()=>Fn,tuple_create_with_text_return:()=>vn,tuple_del:()=>yn,tuple_find:()=>Xn,tuple_getIndex:()=>Vn,tuple_getSublist:()=>xn,tuple_get_random_item:()=>Hn,tuple_get_sublist:()=>wn,tuple_join:()=>bn,tuple_length:()=>Yn,tuple_max:()=>kn,tuple_totuple:()=>Wn,tuple_trig:()=>Bn});var r={};t.r(r),t.d(r,{set_add_discard:()=>es,set_clear:()=>zn,set_create_with:()=>jn,set_create_with_container:()=>qn,set_create_with_item:()=>Qn,set_create_with_text_return:()=>ss,set_length:()=>Jn,set_operate:()=>$n,set_operate_update:()=>ts,set_pop:()=>Zn,set_sub:()=>is,set_toset:()=>os,set_update:()=>ns});var T={};t.r(T),t.d(T,{html_content:()=>ls,html_content_more:()=>rs,html_document:()=>ps,html_form:()=>ds,html_head_body:()=>us,html_style:()=>Ts,html_style_color:()=>hs,html_style_content:()=>Is,html_text:()=>Os,html_title:()=>as});var d={};t.r(d),t.d(d,{attribute_access:()=>fs,function_call:()=>Ds,function_call_container:()=>Ns,function_call_item:()=>Ps,raw_block:()=>cs,raw_empty:()=>ms,raw_expression:()=>Rs,raw_table:()=>Ms,text_comment:()=>As,text_print_multiple:()=>Ls,text_print_multiple_container:()=>Cs,text_print_multiple_item:()=>Ss,type_check:()=>gs});var I={};t.r(I),t.d(I,{array_create:()=>js,array_toarray:()=>po,dataframe_create:()=>Ys,dataframe_create_from_index:()=>bs,dataframe_create_from_one_index:()=>ys,dataframe_get:()=>so,numpy_trig:()=>eo,pandas_readcsv:()=>no,pl_axes:()=>ws,pl_bar:()=>Zs,pl_hist:()=>$s,pl_label:()=>Ks,pl_legend:()=>Hs,pl_pie:()=>zs,pl_plot:()=>xs,pl_plot_bar:()=>qs,pl_plot_easy:()=>Bs,pl_plot_scatter:()=>Qs,pl_plot_xy:()=>Js,pl_savefig:()=>oo,pl_show:()=>Gs,pl_subplot:()=>io,pl_text:()=>_o,pl_ticks:()=>to,pl_title:()=>Ws,plot_axes:()=>ro,plot_bar:()=>co,plot_hist:()=>mo,plot_label:()=>ho,plot_legend:()=>To,plot_pie:()=>Ro,plot_plot:()=>uo,plot_plot_bar:()=>Oo,plot_plot_easy:()=>ao,plot_plot_scatter:()=>Eo,plot_plot_xy:()=>Mo,plot_savefig:()=>Lo,plot_show:()=>lo,plot_subplot:()=>go,plot_text:()=>Co,plot_ticks:()=>Ao,plot_title:()=>Io,series_create:()=>vs,series_create_from_index:()=>Vs,series_create_from_text:()=>ks,series_get_num:()=>Xs,series_index_value:()=>Us});var h={};t.r(h),t.d(h,{inout_input:()=>Do,inout_print:()=>No,inout_print_container:()=>Vo,inout_print_end:()=>fo,inout_print_inline:()=>Po,inout_print_item:()=>Yo,inout_print_many:()=>vo,inout_type_input:()=>Fo});var O={};t.r(O),t.d(O,{Panic_with_status_code:()=>Xo,base_delay:()=>bo,controls_millis:()=>ko,controls_mstimer2:()=>xo,controls_mstimer2_start:()=>Go,controls_mstimer2_stop:()=>wo,reset:()=>Bo,time_localtime:()=>Uo,time_sleep:()=>Ho});var E={};t.r(E),t.d(E,{turtle_bgcolor:()=>r_,turtle_bgcolor_hex:()=>R_,turtle_bgcolor_hex_new:()=>h_,turtle_circle:()=>a_,turtle_circle_advanced:()=>u_,turtle_clear:()=>i_,turtle_clone:()=>I_,turtle_color:()=>M_,turtle_color_hex:()=>c_,turtle_color_seclet:()=>f_,turtle_create:()=>Ko,turtle_done:()=>jo,turtle_exitonclick:()=>qo,turtle_fill:()=>s_,turtle_fillcolor:()=>d_,turtle_fillcolor_hex:()=>A_,turtle_fillcolor_hex_new:()=>E_,turtle_getscreen:()=>F_,turtle_goto:()=>$o,turtle_listen:()=>y_,turtle_move:()=>Qo,turtle_numinput:()=>C_,turtle_onclick:()=>V_,turtle_onkey:()=>v_,turtle_ontimer:()=>Y_,turtle_pencolor:()=>T_,turtle_pencolor_hex:()=>m_,turtle_pencolor_hex_new:()=>O_,turtle_penup:()=>n_,turtle_pos_shape:()=>e_,turtle_rotate:()=>Jo,turtle_screen_delay:()=>zo,turtle_screen_savefig:()=>b_,turtle_setheading:()=>Zo,turtle_setxy:()=>t_,turtle_shape:()=>g_,turtle_shapesize:()=>L_,turtle_size:()=>__,turtle_size_speed:()=>o_,turtle_speed:()=>p_,turtle_textinput:()=>S_,turtle_visible:()=>l_,turtle_write:()=>D_,turtle_write_format:()=>N_,turtle_write_format_skulpt:()=>P_});var M={};t.r(M),t.d(M,{Turn:()=>K_,addOil:()=>ap,game_get_character_img:()=>tp,game_get_local_img:()=>J_,game_get_path_img:()=>z_,game_init:()=>H_,get_actor_point:()=>ip,initSettedMap_1:()=>k_,initSettedMap_2:()=>U_,initSettedMap_3:()=>X_,initSettedMap_4:()=>B_,initSettedMap_5:()=>x_,initSettedMap_6:()=>G_,initSettedMap_7:()=>w_,initialize:()=>ep,isBarrier:()=>np,isCirculationRight:()=>up,isDone:()=>j_,isLightGreen:()=>_p,isLightRed:()=>pp,isOilFull:()=>op,isPath:()=>q_,move_direction_steps:()=>W_,place_item:()=>$_,randomOil:()=>sp,set_map:()=>Q_,set_pathtype:()=>Z_});var c={};t.r(c),t.d(c,{controls_type:()=>Ip,controls_typeLists:()=>hp,lists_zip:()=>Op,unpack_iterable_object:()=>Ep,variables_change:()=>Tp,variables_get:()=>lp,variables_global:()=>dp,variables_set:()=>rp});var R={};t.r(R),t.d(R,{Panic_with_status_code:()=>Dp,base_setup:()=>cp,controls_delay:()=>Sp,controls_flow_statements:()=>Cp,controls_for:()=>Ap,controls_forEach:()=>vp,controls_for_range:()=>gp,controls_if:()=>Rp,controls_interrupts:()=>fp,controls_lambda:()=>Yp,controls_main:()=>Mp,controls_millis:()=>Np,controls_nointerrupts:()=>Fp,controls_pass:()=>bp,controls_range:()=>Vp,controls_repeat:()=>Hp,controls_repeat_ext:()=>Xp,controls_thread:()=>kp,controls_try_finally:()=>mp,controls_whileUntil:()=>Lp,datetime_fromtimestamp:()=>Wp,do_while:()=>Up,garbage_collection:()=>Bp,get_mem_alloc:()=>xp,get_mem_free:()=>Gp,get_unique_identifier:()=>wp,reset:()=>Pp,time_sleep:()=>yp});var m={};t.r(m),t.d(m,{base_map:()=>Ta,math_arithmetic:()=>Jp,math_bit:()=>Qp,math_constant:()=>jp,math_constant_mp:()=>qp,math_constrain:()=>oa,math_dec:()=>ta,math_indexer_number:()=>aa,math_map:()=>sa,math_max_min:()=>ia,math_number:()=>Kp,math_number_base_conversion:()=>_a,math_random:()=>na,math_random_seed:()=>pa,math_round:()=>ua,math_selfcalcu:()=>Zp,math_single:()=>zp,math_to_int:()=>ea,math_trig:()=>$p,text_to_number:()=>la,text_to_number_skulpt:()=>ra,turn_to_int:()=>da});var A={};t.r(A),t.d(A,{ascii_to_char:()=>Ma,char_to_ascii:()=>ca,number_to_text:()=>Ra,os_system:()=>wa,text:()=>Ia,text_capital:()=>Pa,text_center:()=>fa,text_char:()=>Oa,text_char_at:()=>ga,text_char_at2:()=>Aa,text_char_at3:()=>Ba,text_compareTo:()=>Xa,text_compare_to:()=>Sa,text_encode:()=>xa,text_equals_starts_ends:()=>Ca,text_eval:()=>Ga,text_find:()=>Fa,text_format:()=>ba,text_format_noreturn:()=>ka,text_join:()=>Ea,text_join_seq:()=>va,text_length:()=>ma,text_random_char:()=>La,text_replace:()=>Va,text_split:()=>Ya,text_strip:()=>ya,text_substring:()=>Na,text_substring2:()=>Da,text_substring3:()=>Ua,text_textarea:()=>ha});var g={};t.r(g),t.d(g,{enumerate:()=>Au,list_many_input:()=>uu,list_tolist:()=>Ru,list_tolist2:()=>mu,list_trig:()=>_u,lists_2d_get_col_row_data:()=>Ka,lists_2d_get_data_with_col_row:()=>Wa,lists_append_extend:()=>Za,lists_change_to:()=>au,lists_change_to_general:()=>ru,lists_clear:()=>iu,lists_create_with:()=>ja,lists_create_with2:()=>du,lists_create_with_noreturn:()=>lu,lists_create_with_text:()=>qa,lists_create_with_text2:()=>Iu,lists_del_general:()=>Tu,lists_find:()=>nu,lists_getIndex3:()=>hu,lists_getSublist3:()=>Ou,lists_get_index:()=>Qa,lists_get_random_item:()=>za,lists_get_random_sublist:()=>$a,lists_get_sublist:()=>Ha,lists_insert_value:()=>tu,lists_insert_value2:()=>Mu,lists_pop:()=>ou,lists_remove_at:()=>su,lists_remove_at2:()=>cu,lists_reverse:()=>eu,lists_setIndex3:()=>Eu,lists_set_index:()=>Ja,lists_sort:()=>pu});var L={};t.r(L),t.d(L,{dicts_add_change_del:()=>yu,dicts_add_or_change:()=>Du,dicts_clear:()=>fu,dicts_create_with:()=>gu,dicts_create_with_noreturn:()=>Uu,dicts_deldict:()=>Yu,dicts_delete:()=>Nu,dicts_get:()=>Cu,dicts_get_default:()=>Su,dicts_items:()=>Fu,dicts_keys:()=>Lu,dicts_length:()=>Vu,dicts_pop:()=>bu,dicts_setdefault:()=>ku,dicts_to_json:()=>Bu,dicts_todict:()=>Xu,dicts_update:()=>Pu,dicts_values:()=>vu,json_to_dicts:()=>xu});var C={};t.r(C),t.d(C,{logic_boolean:()=>Ku,logic_compare:()=>Gu,logic_compare_continous:()=>wu,logic_is:()=>Ju,logic_is_in:()=>Qu,logic_negate:()=>Wu,logic_null:()=>ju,logic_operation:()=>Hu,logic_tobool:()=>Zu,logic_true_or_false:()=>qu});var S={};t.r(S),t.d(S,{sdcard_mount:()=>Rl,sdcard_use_spi_init:()=>cl,storage_can_write_ornot:()=>_l,storage_change_dir:()=>Il,storage_close_file:()=>al,storage_delete_file:()=>ll,storage_file_seek:()=>dl,storage_file_tell:()=>Tl,storage_file_write:()=>il,storage_fileopen:()=>$u,storage_fileopen_new:()=>tl,storage_fileopen_new_encoding:()=>el,storage_get_a_line:()=>ol,storage_get_contents:()=>sl,storage_get_contents_without_para:()=>nl,storage_get_current_dir:()=>hl,storage_get_file_size:()=>rl,storage_get_filename:()=>pl,storage_is_file:()=>Ml,storage_list_all_files:()=>ul,storage_make_dir:()=>Ol,storage_open_file_with_os:()=>zu,storage_rename:()=>El});var D={};t.r(D),t.d(D,{procedures_callnoreturn:()=>Ll,procedures_callreturn:()=>gl,procedures_defnoreturn:()=>Al,procedures_defreturn:()=>ml,procedures_ifreturn:()=>Cl,procedures_return:()=>Sl});var N={};t.r(N),t.d(N,{tuple_change_to:()=>yl,tuple_create_with:()=>Dl,tuple_create_with_noreturn:()=>Xl,tuple_create_with_text2:()=>Nl,tuple_create_with_text_return:()=>Pl,tuple_del:()=>vl,tuple_find:()=>bl,tuple_getIndex:()=>fl,tuple_getSublist:()=>Ul,tuple_get_random_item:()=>xl,tuple_get_sublist:()=>Bl,tuple_join:()=>Vl,tuple_length:()=>Fl,tuple_max:()=>Yl,tuple_totuple:()=>Gl,tuple_trig:()=>kl});var P={};t.r(P),t.d(P,{set_add_discard:()=>Ql,set_clear:()=>Kl,set_create_with:()=>wl,set_create_with_text_return:()=>zl,set_length:()=>Hl,set_operate:()=>jl,set_operate_update:()=>ql,set_pop:()=>Wl,set_sub:()=>Jl,set_toset:()=>$l,set_update:()=>Zl});var f={};t.r(f),t.d(f,{html_content:()=>nr,html_content_more:()=>sr,html_document:()=>tr,html_form:()=>_r,html_head_body:()=>ir,html_style:()=>or,html_style_content:()=>pr,html_text:()=>ar,html_title:()=>er});var F={};t.r(F),t.d(F,{attribute_access:()=>hr,function_call:()=>Ir,raw_block:()=>ur,raw_empty:()=>rr,raw_expression:()=>lr,raw_table:()=>Tr,type_check:()=>dr});var v={};t.r(v),t.d(v,{array_create:()=>Fr,array_toarray:()=>Wr,dataframe_create:()=>Mr,dataframe_create_from_index:()=>cr,dataframe_create_from_one_index:()=>Rr,dataframe_get:()=>Gr,numpy_trig:()=>Xr,pandas_readcsv:()=>xr,pl_axes:()=>Cr,pl_bar:()=>yr,pl_hist:()=>kr,pl_label:()=>fr,pl_legend:()=>Nr,pl_pie:()=>br,pl_plot:()=>Dr,pl_plot_bar:()=>vr,pl_plot_easy:()=>Sr,pl_plot_scatter:()=>Vr,pl_plot_xy:()=>Yr,pl_savefig:()=>wr,pl_show:()=>Lr,pl_subplot:()=>Br,pl_text:()=>Hr,pl_ticks:()=>Ur,pl_title:()=>Pr,plot_axes:()=>jr,plot_bar:()=>iT,plot_hist:()=>sT,plot_label:()=>zr,plot_legend:()=>Jr,plot_pie:()=>nT,plot_plot:()=>Qr,plot_plot_bar:()=>$r,plot_plot_easy:()=>qr,plot_plot_scatter:()=>tT,plot_plot_xy:()=>eT,plot_savefig:()=>pT,plot_show:()=>Kr,plot_subplot:()=>_T,plot_text:()=>aT,plot_ticks:()=>oT,plot_title:()=>Zr,series_create:()=>Or,series_create_from_index:()=>Er,series_create_from_text:()=>mr,series_get_num:()=>gr,series_index_value:()=>Ar});var V={};t.r(V),t.d(V,{inout_input:()=>uT,inout_print:()=>lT,inout_print_end:()=>TT,inout_print_inline:()=>rT,inout_print_many:()=>IT,inout_type_input:()=>dT});var Y={};t.r(Y),t.d(Y,{controls_end_program:()=>OT,controls_millis:()=>hT,time_localtime:()=>ET});var y={};t.r(y),t.d(y,{turtle_bgcolor:()=>kT,turtle_bgcolor_hex:()=>xT,turtle_bgcolor_hex_new:()=>HT,turtle_circle:()=>VT,turtle_circle_advanced:()=>yT,turtle_clear:()=>DT,turtle_clone:()=>BT,turtle_color:()=>qT,turtle_color_hex:()=>jT,turtle_color_seclet:()=>id,turtle_create:()=>MT,turtle_done:()=>cT,turtle_exitonclick:()=>RT,turtle_fill:()=>PT,turtle_fillcolor:()=>XT,turtle_fillcolor_hex:()=>wT,turtle_fillcolor_hex_new:()=>KT,turtle_getscreen:()=>nd,turtle_goto:()=>CT,turtle_listen:()=>pd,turtle_move:()=>mT,turtle_numinput:()=>zT,turtle_onclick:()=>od,turtle_onkey:()=>sd,turtle_ontimer:()=>_d,turtle_pencolor:()=>UT,turtle_pencolor_hex:()=>GT,turtle_pencolor_hex_new:()=>WT,turtle_penup:()=>NT,turtle_pos_shape:()=>ST,turtle_rotate:()=>AT,turtle_screen_delay:()=>LT,turtle_screen_savefig:()=>ad,turtle_setheading:()=>gT,turtle_setxy:()=>YT,turtle_shape:()=>QT,turtle_shapesize:()=>JT,turtle_size:()=>FT,turtle_size_speed:()=>fT,turtle_speed:()=>vT,turtle_textinput:()=>ZT,turtle_visible:()=>bT,turtle_write:()=>$T,turtle_write_format:()=>td,turtle_write_format_skulpt:()=>ed});var b={};t.r(b),t.d(b,{Turn:()=>Md,addOil:()=>Yd,game_get_character_img:()=>Ld,game_get_local_img:()=>Ad,game_get_path_img:()=>Dd,game_init:()=>ud,get_actor_point:()=>md,initSettedMap_1:()=>rd,initSettedMap_2:()=>Td,initSettedMap_3:()=>dd,initSettedMap_4:()=>Id,initSettedMap_5:()=>hd,initSettedMap_6:()=>Od,initSettedMap_7:()=>Ed,initialize:()=>Cd,isBarrier:()=>Pd,isCirculationRight:()=>yd,isDone:()=>cd,isLightGreen:()=>vd,isLightRed:()=>Vd,isOilFull:()=>Fd,isPath:()=>Rd,move_direction_steps:()=>ld,place_item:()=>Sd,randomOil:()=>fd,set_map:()=>gd,set_pathtype:()=>Nd});const k=Blockly,U=Mixly,X={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}},B=X,x={};x.NAME_TYPE=k.PROCEDURE_CATEGORY_NAME,x.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.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")}},ut={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 Ot={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}},Et={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=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 vt={init:function(){this.setColour(Ft),this.appendDummyInput().appendField(new k.FieldTextInput("0",k.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(k.Msg.MATH_NUMBER_TOOLTIP)}},Vt={init:function(){this.setColour(Ft);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]}))}},Yt={init:function(){this.setColour(Ft);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]}))}},yt={init:function(){this.setColour(Ft),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]}))}},bt={init:function(){this.setColour(Ft),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]}))}},kt={init:function(){this.setColour(Ft),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new k.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ut={init:function(){this.setColour(Ft),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]}))}},Xt={init:function(){var t=[[k.Msg.MATH_BIN,"bin"],[k.Msg.MATH_OCT,"oct"],[k.Msg.MATH_HEX,"hex"]];this.setColour(Ft),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]}))}},Bt={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(Ft),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]}))}},xt={init:function(){var t=[[k.Msg.MIXLY_MAX,"max"],[k.Msg.MIXLY_MIN,"min"]];this.setColour(Ft),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]}))}},Gt={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(Ft),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(Ft),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]}))}},Ht={init:function(){this.setColour(Ft),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)}},Wt={init:function(){this.setColour(Ft),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)}},Kt={init:function(){this.setColour(Ft),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)}},jt={init:function(){this.setColour(Ft),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)}},qt={init:function(){this.setColour(Ft),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)}},Qt={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(Ft),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]}))}},Jt={init:function(){var t=[[k.Msg.MIXLY_TO_INT,"int"],[k.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Ft),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]}))}},Zt=Wt,zt={init:function(){this.setColour(Ft),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)}},$t=160,te={init:function(){this.setColour($t),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_TEXT_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}},ee={init:function(){this.setColour($t),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_LINES_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}};k.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ie={init:function(){this.setColour($t),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,'"')}},ne={init:function(){this.setColour($t),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)}},se={init:function(){this.setColour($t),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},oe={init:function(){this.setColour($t),this.appendValueInput("VAR").setCheck(String).appendField(k.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},_e={init:function(){this.setColour($t),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},pe={init:function(){this.setColour($t),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ae={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($t),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)}},ue={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour($t),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)}},le={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour($t),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(k.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(k.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},re={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($t),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"))}},Te={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour($t),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)}},de={init:function(){var t=[[k.Msg.MIXLY_EQUALS,"==="],[k.Msg.MIXLY_STARTSWITH,"startswith"],[k.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour($t),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new k.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ie={init:function(){this.setColour($t),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)}},he={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($t),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]}))}},Oe={init:function(){var t=[[k.Msg.TEXT_LJUST,"ljust"],[k.Msg.TEXT_CENTER,"center"],[k.Msg.TEXT_RJUST,"rjust"]];this.setColour($t),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)}},Ee={init:function(){this.setColour($t),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)}},Me={init:function(){this.setColour($t),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)}},ce={init:function(){this.setColour($t),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)}},Re={init:function(){this.setColour($t),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)}},me={init:function(){var t=[[k.Msg.TEXT_TRIM_BOTH,"strip"],[k.Msg.TEXT_TRIM_LEFT,"lstrip"],[k.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour($t),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]}))}},Ae={init:function(){this.setColour($t),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")}},hi={init:function(){this.setColour(di),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Oi={init:function(){this.setColour(di),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}},Ei={init:function(){this.setColour(di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_KEYS),this.setTooltip(k.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Mi={init:function(){this.setColour(di),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)}},ci={init:function(){this.setColour(di),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)}},Ri={init:function(){this.setColour(di),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)}},mi={init:function(){this.setColour(di),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)}},Ai={init:function(){this.setColour(di),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)}},gi={init:function(){this.setColour(di),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)}},Li={init:function(){this.setColour(di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_ITEMS),this.setTooltip(k.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ci={init:function(){this.setColour(di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_VALUES),this.setTooltip(k.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Si={init:function(){this.setColour(di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_LENGTH),this.setTooltip(k.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Di={init:function(){this.setColour(di),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)}},Ni={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(di),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")}},Pi={init:function(){this.setColour(di),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)}},fi={init:function(){this.setColour(di),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)}},Fi={init:function(){this.setColour(di),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")}},vi={init:function(){this.setColour(di),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Vi={init:function(){this.setColour(di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Yi={init:function(){this.setColour(di),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},yi=210,bi={init:function(){var t=k.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(yi),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]}},ki={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(yi),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)}},Ui={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(yi),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]}))}},Xi={init:function(){this.setColour(yi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(k.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(k.Msg.LOGIC_NEGATE_TOOLTIP)}},Bi={init:function(){var t=[[k.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[k.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(yi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new k.FieldDropdown(t),"BOOL"),this.setTooltip(k.Msg.LOGIC_BOOLEAN_TOOLTIP)}},xi={init:function(){this.setColour(yi),this.setOutput(!0),this.appendDummyInput().appendField(k.Msg.LOGIC_NULL),this.setTooltip(k.Msg.LOGIC_NULL_TOOLTIP)}},Gi={init:function(){this.setColour(yi),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)}},wi={init:function(){var t=[[k.Msg.TEXT_APPEND_TO,"in"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(yi),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)}},Hi={init:function(){var t=[[k.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(yi),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)}},Wi={init:function(){this.setColour(yi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Ki={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)}},ji={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")}},qi={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+_}))}},Qi={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+_}))}},Ji={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)}},Zi={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)}},zi={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}))}},$i={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)}},tn={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)}},en={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)}},nn={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)}},sn={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 on={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)}},_n={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)}},pn={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)}},an={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}))}},un={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)}},ln={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]}))}},rn={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)}},Tn={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)}},dn={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]}))}},In={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)}},hn={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()}},On={init:function(){var t=G.findLegalName("",this),e=new k.FieldTextInput(t,G.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)}},us={init:function(){this.setColour(ns),this.appendDummyInput().appendField(k.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ls={init:function(){this.setColour(ns),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)}},rs={init:function(){this.setColour(ns),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ts={init:function(){this.setColour(ns),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ds={init:function(){this.setColour(ns),this.appendDummyInput().appendField(k.Msg.HTML_TEXT).appendField(new k.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Is=160,hs={init:function(){this.setColour(Is),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new k.FieldTable(""),"TEXT")}},Os={init:function(){this.setColour(Is),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT")}},Es={init:function(){this.setColour(Is),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ms={init:function(){this.setColour(Is),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},cs={init:function(){this.setColour(Is),this.appendDummyInput().appendTitle("Comment:").appendTitle(new k.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Rs={init:function(){this.setColour(Is),this.appendValueInput("VALUE").appendField(k.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ms={init:function(){this.setColour(Is),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)}},Xs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Ns);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)}},Hs={init:function(){this.setColour(Ns),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)}},Ws={init:function(){this.setColour(Ns);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]}))}},Ks={init:function(){this.setColour(Ns);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("")}},js={init:function(){this.setColour(Ns);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)}},qs={init:function(){this.setColour(Ns);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)}},Qs={init:function(){this.setColour(Ns);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)}},Js={init:function(){this.setColour(Ns),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)}},Zs={init:function(){this.setColour(Ns);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)}},zs={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(Ns),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)}},$s={init:function(){this.setColour(Ns),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)}},to={init:function(){this.setColour(Ns),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")}},eo={init:function(){this.setColour(Ns),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(Ns),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)}},no={init:function(){this.setColour(Ns);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)}},so={init:function(){this.setColour(Ns),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(Ns),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)}},_o={init:function(){this.setColour(Ns);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)}},po={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ao={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uo={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},lo={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ro={init:function(){this.setColour(Ns);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)}},To={init:function(){this.setColour(Ns);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]}))}},Io={init:function(){this.setColour(Ns);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("")}},ho={init:function(){this.setColour(Ns);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)}},Oo={init:function(){this.setColour(Ns);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)}},Eo={init:function(){this.setColour(Ns);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)}},Mo={init:function(){this.setColour(Ns),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)}},co={init:function(){this.setColour(Ns);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)}},Ro={init:function(){this.setColour(Ns),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)}},mo={init:function(){this.setColour(Ns),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)}},Ao={init:function(){this.setColour(Ns);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)}},go=20,Lo={init:function(){this.setColour(go),this.appendValueInput("VAR").appendField(k.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(k.Msg.INOUT_input_TOOLTIP)}},Co={init:function(){this.setColour(go),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.BLOCKPY_PRINT_TOOLTIP)}},So={init:function(){this.setColour(go),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},Do={init:function(){this.setColour(go),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)}},No={init:function(){var t=[[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(go),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]}))}},Po={init:function(){this.setColour(go),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:[["'无可用地图'","'无可用地图'"]]}},q_={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("")}},Q_={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:[["'无可用路径'","'无可用路径'"]]}},J_={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 k.FieldDropdown([["障碍","'wall'"],["金币","'coin'"]]),"item"),this.setTooltip("")}},Z_={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:[["'无可用角色'","'无可用角色'"]]}},z_={init:function(){this.setColour(290),this.appendValueInput("character").setCheck(null).appendField("初始化角色为"),this.appendDummyInput().appendField("面朝").appendField(new k.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},$_={init:function(){this.setColour(290),this.appendDummyInput().appendField("获取⻆⾊所获分数"),this.setOutput(!0,Number),this.setTooltip("")}},tp={init:function(){this.appendDummyInput().appendField(new k.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.appendDummyInput().appendField("侧有障碍"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ep={init:function(){this.appendDummyInput().appendField("随机生成小车油量"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},ip={init:function(){this.appendDummyInput().appendField("需要加油"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},np={init:function(){this.appendDummyInput().appendField("信号灯为绿灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},sp={init:function(){this.appendDummyInput().appendField("信号灯为红灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},op={init:function(){this.appendDummyInput().appendField("进加油站加油"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},_p={init:function(){this.appendDummyInput().appendField("检查程序循环数目是否正确"),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},pp=function(t,e){return[e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE),e.ORDER_ATOMIC]},ap=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"},up=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]},lp=function(t,e){return"global "+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"None")+"\n"},rp=function(t,e){return["type("+(e.valueToCode(this,"DATA",e.ORDER_ATOMIC)||"None")+")",e.ORDER_ATOMIC]},Tp=function(t,e){return[this.getFieldValue("type"),e.ORDER_ATOMIC]},dp=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 "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+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 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]},Bu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},xu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Gu=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]},Hu=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]},Ku=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},ju=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},qu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Qu=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]},Zu=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},zu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},$u=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]},tl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},el=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},il=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},nl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},sl=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ol=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},_l=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},al=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"},ul=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ll=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},rl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Tl=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"},dl=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]},Il=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"},hl=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"},Ol=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]},Jl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Zl=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},zl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},$l=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},tr=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},er=function(t,e){return'"},ir=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},nr=function(){return this.getFieldValue("TEXT")+"\n"},sr=function(t){return t.getFieldValue("TEXT")+"\n"},or=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},_r=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},pr=function(){return""},ar=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;o=0&&(n[s]=n[s].replace(" ",""));i="";for(s=0;s0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.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")}},ut={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 Ot={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}},Et={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=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 Vt={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]}))}},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_MP_TOOLTIP,e:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},bt={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]}))}},kt={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("位运算")}},Xt={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]}))}},Gt={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]}))}},wt={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]}))}},Ht={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]}))}},Wt={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)}},Kt={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)}},jt={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)}},Qt={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)}},Jt={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]}))}},zt=Kt,$t={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)}},te=160,ee={init:function(){this.setColour(te),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_TEXT_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}},ie={init:function(){this.setColour(te),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_LINES_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}};k.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ne={init:function(){this.setColour(te),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,'"')}},se={init:function(){this.setColour(te),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)}},oe={init:function(){this.setColour(te),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},_e={init:function(){this.setColour(te),this.appendValueInput("VAR").setCheck(String).appendField(k.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},pe={init:function(){this.setColour(te),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ae={init:function(){this.setColour(te),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ue={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(te),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)}},le={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(te),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)}},re={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(te),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(k.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(k.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Te={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(te),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"))}},de={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(te),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)}},Ie={init:function(){var t=[[k.Msg.MIXLY_EQUALS,"==="],[k.Msg.MIXLY_STARTSWITH,"startswith"],[k.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(te),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new k.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},he={init:function(){this.setColour(te),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)}},Oe={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(te),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]}))}},Ee={init:function(){var t=[[k.Msg.TEXT_LJUST,"ljust"],[k.Msg.TEXT_CENTER,"center"],[k.Msg.TEXT_RJUST,"rjust"]];this.setColour(te),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)}},Me={init:function(){this.setColour(te),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)}},ce={init:function(){this.setColour(te),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)}},Re={init:function(){this.setColour(te),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)}},me={init:function(){this.setColour(te),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)}},Ae={init:function(){var t=[[k.Msg.TEXT_TRIM_BOTH,"strip"],[k.Msg.TEXT_TRIM_LEFT,"lstrip"],[k.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(te),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]}))}},ge={init:function(){this.setColour(te),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")}},Mi={init:function(){this.setColour(Oi),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},ci={init:function(){this.setColour(Oi),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}},Ri={init:function(){this.setColour(Oi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_KEYS),this.setTooltip(k.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},mi={init:function(){this.setColour(Oi),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)}},Ai={init:function(){this.setColour(Oi),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)}},gi={init:function(){this.setColour(Oi),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)}},Li={init:function(){this.setColour(Oi),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)}},Ci={init:function(){this.setColour(Oi),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)}},Si={init:function(){this.setColour(Oi),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)}},Di={init:function(){this.setColour(Oi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_ITEMS),this.setTooltip(k.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ni={init:function(){this.setColour(Oi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_VALUES),this.setTooltip(k.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Pi={init:function(){this.setColour(Oi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_LENGTH),this.setTooltip(k.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},fi={init:function(){this.setColour(Oi),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)}},Fi={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(Oi),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")}},vi={init:function(){this.setColour(Oi),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)}},Vi={init:function(){this.setColour(Oi),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)}},Yi={init:function(){this.setColour(Oi),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")}},yi={init:function(){this.setColour(Oi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},bi={init:function(){this.setColour(Oi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ki={init:function(){this.setColour(Oi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Ui=210,Xi={init:function(){var t=k.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Ui),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]}},Bi={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(Ui),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)}},xi={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(Ui),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]}))}},Gi={init:function(){this.setColour(Ui),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(k.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(k.Msg.LOGIC_NEGATE_TOOLTIP)}},wi={init:function(){var t=[[k.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[k.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Ui),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new k.FieldDropdown(t),"BOOL"),this.setTooltip(k.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Hi={init:function(){this.setColour(Ui),this.setOutput(!0),this.appendDummyInput().appendField(k.Msg.LOGIC_NULL),this.setTooltip(k.Msg.LOGIC_NULL_TOOLTIP)}},Wi={init:function(){this.setColour(Ui),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)}},Ki={init:function(){var t=[[k.Msg.TEXT_APPEND_TO,"in"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Ui),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)}},ji={init:function(){var t=[[k.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Ui),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)}},qi={init:function(){this.setColour(Ui),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Qi={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)}},Ji={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")}},Zi={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+_}))}},zi={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+_}))}},$i={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)}},tn={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)}},en={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}))}},nn={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)}},sn={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)}},on={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)}},_n={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)}},pn={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 an={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)}},un={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)}},ln={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)}},rn={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}))}},Tn={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)}},dn={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]}))}},In={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)}},hn={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)}},On={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]}))}},En={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)}},Mn={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()}},cn={init:function(){var t=G.findLegalName("",this),e=new k.FieldTextInput(t,G.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)}},Ts={init:function(){this.setColour(_s),this.appendDummyInput().appendField(k.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ds={init:function(){this.setColour(_s),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)}},Is={init:function(){this.setColour(_s),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hs={init:function(){this.setColour(_s),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(_s),this.appendDummyInput().appendField(k.Msg.HTML_TEXT).appendField(new k.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Es=160,Ms={init:function(){this.setColour(Es),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new k.FieldTable(""),"TEXT")}},cs={init:function(){this.setColour(Es),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT")}},Rs={init:function(){this.setColour(Es),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},ms={init:function(){this.setColour(Es),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},As={init:function(){this.setColour(Es),this.appendDummyInput().appendTitle("Comment:").appendTitle(new k.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},gs={init:function(){this.setColour(Es),this.appendValueInput("VALUE").appendField(k.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Ls={init:function(){this.setColour(Es),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)}},Gs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(Fs);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)}},js={init:function(){this.setColour(Fs),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)}},qs={init:function(){this.setColour(Fs);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]}))}},Qs={init:function(){this.setColour(Fs);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("")}},Js={init:function(){this.setColour(Fs);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)}},Zs={init:function(){this.setColour(Fs);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)}},zs={init:function(){this.setColour(Fs);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)}},$s={init:function(){this.setColour(Fs),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)}},to={init:function(){this.setColour(Fs);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)}},eo={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(Fs),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)}},io={init:function(){this.setColour(Fs),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)}},no={init:function(){this.setColour(Fs),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")}},so={init:function(){this.setColour(Fs),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)}},oo={init:function(){this.setColour(Fs),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)}},_o={init:function(){this.setColour(Fs);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)}},po={init:function(){this.setColour(Fs),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},ao={init:function(){this.setColour(Fs),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)}},uo={init:function(){this.setColour(Fs);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)}},lo={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ro={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},To={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Io={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ho={init:function(){this.setColour(Fs);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)}},Oo={init:function(){this.setColour(Fs);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]}))}},Eo={init:function(){this.setColour(Fs);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("")}},Mo={init:function(){this.setColour(Fs);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)}},co={init:function(){this.setColour(Fs);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)}},Ro={init:function(){this.setColour(Fs);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)}},mo={init:function(){this.setColour(Fs),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)}},Ao={init:function(){this.setColour(Fs);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)}},go={init:function(){this.setColour(Fs),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)}},Lo={init:function(){this.setColour(Fs),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)}},Co={init:function(){this.setColour(Fs);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)}},So=20,Do={init:function(){this.setColour(So),this.appendValueInput("VAR").appendField(k.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(k.Msg.INOUT_input_TOOLTIP)}},No={init:function(){this.setColour(So),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.BLOCKPY_PRINT_TOOLTIP)}},Po={init:function(){this.setColour(So),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},fo={init:function(){this.setColour(So),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)}},Fo={init:function(){var t=[[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(So),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]}))}},vo={init:function(){this.setColour(So),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:[["'无可用地图'","'无可用地图'"]]}},Z_={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("")}},z_={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:[["'无可用路径'","'无可用路径'"]]}},$_={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 k.FieldDropdown([["障碍","'wall'"],["金币","'coin'"]]),"item"),this.setTooltip("")}},tp={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:[["'无可用角色'","'无可用角色'"]]}},ep={init:function(){this.setColour(290),this.appendValueInput("character").setCheck(null).appendField("初始化角色为"),this.appendDummyInput().appendField("面朝").appendField(new k.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},ip={init:function(){this.setColour(290),this.appendDummyInput().appendField("获取⻆⾊所获分数"),this.setOutput(!0,Number),this.setTooltip("")}},np={init:function(){this.appendDummyInput().appendField(new k.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.appendDummyInput().appendField("侧有障碍"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},sp={init:function(){this.appendDummyInput().appendField("随机生成小车油量"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},op={init:function(){this.appendDummyInput().appendField("需要加油"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},_p={init:function(){this.appendDummyInput().appendField("信号灯为绿灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},pp={init:function(){this.appendDummyInput().appendField("信号灯为红灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ap={init:function(){this.appendDummyInput().appendField("进加油站加油"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},up={init:function(){this.appendDummyInput().appendField("检查程序循环数目是否正确"),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},lp=function(t,e){return[e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE),e.ORDER_ATOMIC]},rp=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"},Tp=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]},dp=function(t,e){return"global "+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"None")+"\n"},Ip=function(t,e){return["type("+(e.valueToCode(this,"DATA",e.ORDER_ATOMIC)||"None")+")",e.ORDER_ATOMIC]},hp=function(t,e){return[this.getFieldValue("type"),e.ORDER_ATOMIC]},Op=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 "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+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 Hu=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]},Wu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Ku=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},ju=function(t,e){return["None",e.ORDER_ATOMIC]},qu=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]},Qu=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]},Ju=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]},Zu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},zu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},$u=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},tl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},el=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},il=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},nl=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},sl=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]},ol=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},_l=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},pl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},al=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ul=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ll=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},rl=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Tl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},dl=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"},Il=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},hl=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Ol=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},El=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"},Ml=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]},cl=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"},Rl=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"},ml=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]},er=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},ir=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},nr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},sr=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},or=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},_r=function(t,e){return'"},pr=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},ar=function(){return this.getFieldValue("TEXT")+"\n"},ur=function(t){return t.getFieldValue("TEXT")+"\n"},lr=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},rr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Tr=function(){return""},dr=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Ir=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:()=>It,controls_for:()=>dt,controls_forEach:()=>lt,controls_for_range:()=>ht,controls_if:()=>at,controls_if_else:()=>Mt,controls_if_elseif:()=>Ot,controls_if_if:()=>Et,controls_lambda:()=>gt,controls_main:()=>st,controls_pass:()=>Lt,controls_range:()=>ut,controls_repeat_ext:()=>At,controls_thread:()=>Ct,controls_try:()=>ct,controls_try_finally:()=>Tt,controls_whileUntil:()=>rt,do_while:()=>St,garbage_collection:()=>Dt,get_mem_alloc:()=>Nt,get_mem_free:()=>Pt,get_unique_identifier:()=>ft});var n={};t.r(n),t.d(n,{base_map:()=>Zt,math_arithmetic:()=>yt,math_bit:()=>kt,math_constant:()=>Vt,math_constant_mp:()=>Yt,math_constrain:()=>Ht,math_dec:()=>Ut,math_indexer_number:()=>Kt,math_map:()=>Wt,math_max_min:()=>Bt,math_number:()=>vt,math_number_base_conversion:()=>xt,math_random:()=>wt,math_random_seed:()=>jt,math_round:()=>qt,math_selfcalcu:()=>bt,math_to_int:()=>Gt,math_trig:()=>Xt,text_to_number:()=>Qt,text_to_number_skulpt:()=>Jt,turn_to_int:()=>zt});var s={};t.r(s),t.d(s,{ascii_to_char:()=>se,char_to_ascii:()=>oe,number_to_text:()=>_e,os_system:()=>Fe,text:()=>te,text_capital:()=>he,text_center:()=>Ee,text_char:()=>ie,text_char_at:()=>ue,text_char_at2:()=>ae,text_char_at3:()=>De,text_compareTo:()=>Se,text_compare_to:()=>de,text_create_with_container:()=>ge,text_create_with_item:()=>Le,text_encode:()=>Pe,text_equals_starts_ends:()=>Ie,text_eval:()=>fe,text_find:()=>Oe,text_format:()=>Ae,text_format_noreturn:()=>Ne,text_join:()=>ne,text_join_seq:()=>Me,text_length:()=>pe,text_random_char:()=>le,text_replace:()=>ce,text_split:()=>Re,text_strip:()=>me,text_substring:()=>Te,text_substring2:()=>re,text_substring3:()=>Ce,text_textarea:()=>ee});var o={};t.r(o),t.d(o,{list_many_input:()=>ti,list_tolist:()=>si,list_tolist2:()=>Ti,list_trig:()=>Ze,lists_2d_get_col_row_data:()=>be,lists_2d_get_data_with_col_row:()=>ye,lists_append_extend:()=>xe,lists_change_to:()=>$e,lists_change_to_general:()=>ii,lists_clear:()=>je,lists_create_with:()=>ke,lists_create_with2:()=>oi,lists_create_with_container:()=>Ue,lists_create_with_item:()=>Ge,lists_create_with_noreturn:()=>ei,lists_create_with_text:()=>Xe,lists_create_with_text2:()=>_i,lists_del_general:()=>ni,lists_find:()=>Je,lists_getIndex3:()=>pi,lists_getSublist3:()=>ai,lists_get_index:()=>Ve,lists_get_random_item:()=>we,lists_get_random_sublist:()=>He,lists_get_sublist:()=>Ye,lists_insert_value:()=>We,lists_insert_value2:()=>li,lists_pop:()=>Qe,lists_remove_at:()=>qe,lists_remove_at2:()=>ri,lists_reverse:()=>Ke,lists_setIndex3:()=>ui,lists_set_index:()=>Be,lists_sort:()=>ze});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Ni,dicts_add_or_change:()=>Ri,dicts_clear:()=>gi,dicts_create_with:()=>di,dicts_create_with_container:()=>hi,dicts_create_with_item:()=>Ei,dicts_create_with_noreturn:()=>Fi,dicts_deldict:()=>Di,dicts_delete:()=>mi,dicts_get:()=>Mi,dicts_get_default:()=>ci,dicts_items:()=>Li,dicts_keys:()=>Oi,dicts_length:()=>Si,dicts_pop:()=>Pi,dicts_setdefault:()=>fi,dicts_to_json:()=>Vi,dicts_todict:()=>vi,dicts_update:()=>Ai,dicts_values:()=>Ci,json_to_dicts:()=>Yi});var p={};t.r(p),t.d(p,{logic_boolean:()=>Gi,logic_compare:()=>bi,logic_compare_continous:()=>ki,logic_is:()=>Hi,logic_is_in:()=>wi,logic_negate:()=>Ui,logic_null:()=>Bi,logic_operation:()=>Xi,logic_tobool:()=>Wi,logic_true_or_false:()=>xi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>hn,sdcard_use_spi_init:()=>dn,storage_can_write_ornot:()=>tn,storage_change_dir:()=>Tn,storage_close_file:()=>nn,storage_delete_file:()=>on,storage_file_seek:()=>an,storage_file_tell:()=>pn,storage_file_write:()=>Ji,storage_fileopen:()=>ji,storage_fileopen_new:()=>qi,storage_fileopen_new_encoding:()=>Qi,storage_get_a_line:()=>$i,storage_get_contents:()=>zi,storage_get_contents_without_para:()=>Zi,storage_get_current_dir:()=>un,storage_get_file_size:()=>_n,storage_get_filename:()=>en,storage_is_file:()=>In,storage_list_all_files:()=>sn,storage_make_dir:()=>ln,storage_open_file_with_os:()=>Ki,storage_rename:()=>rn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Rn,procedures_callreturn:()=>mn,procedures_defnoreturn:()=>En,procedures_defreturn:()=>On,procedures_ifreturn:()=>An,procedures_mutatorarg:()=>cn,procedures_mutatorcontainer:()=>Mn,procedures_return:()=>gn});var l={};t.r(l),t.d(l,{tuple_change_to:()=>yn,tuple_create_with:()=>Cn,tuple_create_with_container:()=>Sn,tuple_create_with_item:()=>Dn,tuple_create_with_noreturn:()=>Un,tuple_create_with_text2:()=>Nn,tuple_create_with_text_return:()=>Pn,tuple_del:()=>vn,tuple_find:()=>bn,tuple_getIndex:()=>fn,tuple_getSublist:()=>Xn,tuple_get_random_item:()=>Bn,tuple_get_sublist:()=>Gn,tuple_join:()=>Vn,tuple_length:()=>Fn,tuple_max:()=>Yn,tuple_totuple:()=>xn,tuple_trig:()=>kn});var r={};t.r(r),t.d(r,{set_add_discard:()=>zn,set_clear:()=>Qn,set_create_with:()=>Hn,set_create_with_container:()=>Wn,set_create_with_item:()=>Kn,set_create_with_text_return:()=>es,set_length:()=>jn,set_operate:()=>Jn,set_operate_update:()=>Zn,set_pop:()=>qn,set_sub:()=>$n,set_toset:()=>is,set_update:()=>ts});var T={};t.r(T),t.d(T,{html_content:()=>ps,html_content_more:()=>as,html_document:()=>ss,html_form:()=>ls,html_head_body:()=>_s,html_style:()=>us,html_style_color:()=>Ts,html_style_content:()=>rs,html_text:()=>Is,html_title:()=>os});var I={};t.r(I),t.d(I,{attribute_access:()=>Ds,function_call:()=>Ls,function_call_container:()=>Cs,function_call_item:()=>Ss,raw_block:()=>Es,raw_empty:()=>Ms,raw_expression:()=>Os,raw_table:()=>hs,text_comment:()=>cs,text_print_multiple:()=>ms,text_print_multiple_container:()=>As,text_print_multiple_item:()=>gs,type_check:()=>Rs});var d={};t.r(d),t.d(d,{array_create:()=>Hs,array_toarray:()=>so,dataframe_create:()=>Fs,dataframe_create_from_index:()=>Vs,dataframe_create_from_one_index:()=>vs,dataframe_get:()=>eo,numpy_trig:()=>zs,pandas_readcsv:()=>to,pl_axes:()=>Gs,pl_bar:()=>qs,pl_hist:()=>Js,pl_label:()=>ws,pl_legend:()=>Bs,pl_pie:()=>Qs,pl_plot:()=>Xs,pl_plot_bar:()=>Ws,pl_plot_easy:()=>ks,pl_plot_scatter:()=>Ks,pl_plot_xy:()=>js,pl_savefig:()=>io,pl_show:()=>Us,pl_subplot:()=>$s,pl_text:()=>no,pl_ticks:()=>Zs,pl_title:()=>xs,plot_axes:()=>ao,plot_bar:()=>Eo,plot_hist:()=>Mo,plot_label:()=>ro,plot_legend:()=>uo,plot_pie:()=>Oo,plot_plot:()=>_o,plot_plot_bar:()=>To,plot_plot_easy:()=>oo,plot_plot_scatter:()=>Io,plot_plot_xy:()=>ho,plot_savefig:()=>mo,plot_show:()=>po,plot_subplot:()=>Ro,plot_text:()=>Ao,plot_ticks:()=>co,plot_title:()=>lo,series_create:()=>Ps,series_create_from_index:()=>fs,series_create_from_text:()=>Ys,series_get_num:()=>bs,series_index_value:()=>ys});var h={};t.r(h),t.d(h,{inout_input:()=>Lo,inout_print:()=>Co,inout_print_container:()=>fo,inout_print_end:()=>Do,inout_print_inline:()=>So,inout_print_item:()=>Fo,inout_print_many:()=>Po,inout_type_input:()=>No});var E={};t.r(E),t.d(E,{Panic_with_status_code:()=>bo,base_delay:()=>Vo,controls_millis:()=>Yo,controls_mstimer2:()=>Xo,controls_mstimer2_start:()=>Uo,controls_mstimer2_stop:()=>Go,reset:()=>ko,time_localtime:()=>yo,time_sleep:()=>Bo});var O={};t.r(O),t.d(O,{turtle_bgcolor:()=>a_,turtle_bgcolor_hex:()=>O_,turtle_bgcolor_hex_new:()=>T_,turtle_circle:()=>o_,turtle_circle_advanced:()=>__,turtle_clear:()=>$o,turtle_clone:()=>r_,turtle_color:()=>h_,turtle_color_hex:()=>E_,turtle_color_seclet:()=>D_,turtle_create:()=>wo,turtle_done:()=>Ho,turtle_exitonclick:()=>Wo,turtle_fill:()=>e_,turtle_fillcolor:()=>l_,turtle_fillcolor_hex:()=>c_,turtle_fillcolor_hex_new:()=>d_,turtle_getscreen:()=>N_,turtle_goto:()=>Jo,turtle_listen:()=>v_,turtle_move:()=>Ko,turtle_numinput:()=>A_,turtle_onclick:()=>f_,turtle_onkey:()=>P_,turtle_ontimer:()=>F_,turtle_pencolor:()=>u_,turtle_pencolor_hex:()=>M_,turtle_pencolor_hex_new:()=>I_,turtle_penup:()=>t_,turtle_pos_shape:()=>zo,turtle_rotate:()=>jo,turtle_screen_delay:()=>Qo,turtle_screen_savefig:()=>V_,turtle_setheading:()=>qo,turtle_setxy:()=>Zo,turtle_shape:()=>R_,turtle_shapesize:()=>m_,turtle_size:()=>n_,turtle_size_speed:()=>i_,turtle_speed:()=>s_,turtle_textinput:()=>g_,turtle_visible:()=>p_,turtle_write:()=>L_,turtle_write_format:()=>C_,turtle_write_format_skulpt:()=>S_});var M={};t.r(M),t.d(M,{Turn:()=>U_,addOil:()=>np,checkMarker:()=>op,find_books_by_dichotomy:()=>up,find_books_by_sequence:()=>lp,game_get_character_img:()=>Q_,game_get_local_img:()=>W_,game_get_path_img:()=>j_,game_init:()=>b_,getMarkerNum:()=>_p,get_actor_point:()=>Z_,initSettedMap:()=>y_,initialize:()=>J_,isBarrier:()=>z_,isCirculationRight:()=>sp,isDone:()=>G_,isLightGreen:()=>ip,isOilFull:()=>ep,isPath:()=>B_,is_Related_Barrier:()=>$_,is_Related_Path:()=>x_,move_direction_steps:()=>k_,move_related_to_spirite:()=>X_,place_item:()=>q_,randomOil:()=>tp,randomPlaceBarrier:()=>pp,set_map:()=>H_,set_map_bg:()=>w_,set_pathtype:()=>K_,settedSimpleMap:()=>ap});var c={};t.r(c),t.d(c,{controls_type:()=>hp,controls_typeLists:()=>Ep,lists_zip:()=>Op,unpack_iterable_object:()=>Mp,variables_change:()=>Ip,variables_get:()=>rp,variables_global:()=>dp,variables_set:()=>Tp});var R={};t.r(R),t.d(R,{Panic_with_status_code:()=>Np,base_setup:()=>Rp,controls_delay:()=>Dp,controls_flow_statements:()=>Sp,controls_for:()=>gp,controls_forEach:()=>Vp,controls_for_range:()=>Lp,controls_if:()=>mp,controls_interrupts:()=>Fp,controls_lambda:()=>yp,controls_main:()=>cp,controls_millis:()=>Pp,controls_nointerrupts:()=>vp,controls_pass:()=>kp,controls_range:()=>Yp,controls_repeat:()=>Wp,controls_repeat_ext:()=>Gp,controls_thread:()=>Xp,controls_try_finally:()=>Ap,controls_whileUntil:()=>Cp,do_while:()=>Up,garbage_collection:()=>Bp,get_mem_alloc:()=>xp,get_mem_free:()=>wp,get_unique_identifier:()=>Hp,reset:()=>fp,time_sleep:()=>bp});var m={};t.r(m),t.d(m,{base_map:()=>Ta,math_arithmetic:()=>Jp,math_bit:()=>Qp,math_constant:()=>jp,math_constant_mp:()=>qp,math_constrain:()=>oa,math_dec:()=>ta,math_indexer_number:()=>aa,math_map:()=>sa,math_max_min:()=>ia,math_number:()=>Kp,math_number_base_conversion:()=>_a,math_random:()=>na,math_random_seed:()=>pa,math_round:()=>ua,math_selfcalcu:()=>Zp,math_single:()=>zp,math_to_int:()=>ea,math_trig:()=>$p,text_to_number:()=>la,text_to_number_skulpt:()=>ra,turn_to_int:()=>Ia});var A={};t.r(A),t.d(A,{ascii_to_char:()=>Ma,char_to_ascii:()=>ca,number_to_text:()=>Ra,os_system:()=>wa,text:()=>da,text_capital:()=>Pa,text_center:()=>fa,text_char:()=>Ea,text_char_at:()=>ga,text_char_at2:()=>Aa,text_char_at3:()=>Ga,text_compareTo:()=>Ua,text_compare_to:()=>Sa,text_encode:()=>Ba,text_equals_starts_ends:()=>Ca,text_eval:()=>xa,text_find:()=>Fa,text_format:()=>ba,text_format_noreturn:()=>ka,text_join:()=>Oa,text_join_seq:()=>va,text_length:()=>ma,text_random_char:()=>La,text_replace:()=>Va,text_split:()=>Ya,text_strip:()=>ya,text_substring:()=>Na,text_substring2:()=>Da,text_substring3:()=>Xa,text_textarea:()=>ha});var g={};t.r(g),t.d(g,{list_many_input:()=>uu,list_tolist:()=>Ru,list_tolist2:()=>mu,list_trig:()=>_u,lists_2d_get_col_row_data:()=>Ka,lists_2d_get_data_with_col_row:()=>Wa,lists_append_extend:()=>Za,lists_change_to:()=>au,lists_change_to_general:()=>ru,lists_clear:()=>iu,lists_create_with:()=>ja,lists_create_with2:()=>Iu,lists_create_with_noreturn:()=>lu,lists_create_with_text:()=>qa,lists_create_with_text2:()=>du,lists_del_general:()=>Tu,lists_find:()=>nu,lists_getIndex3:()=>hu,lists_getSublist3:()=>Eu,lists_get_index:()=>Qa,lists_get_random_item:()=>za,lists_get_random_sublist:()=>$a,lists_get_sublist:()=>Ha,lists_insert_value:()=>tu,lists_insert_value2:()=>Mu,lists_pop:()=>ou,lists_remove_at:()=>su,lists_remove_at2:()=>cu,lists_reverse:()=>eu,lists_setIndex3:()=>Ou,lists_set_index:()=>Ja,lists_sort:()=>pu});var L={};t.r(L),t.d(L,{dicts_add_change_del:()=>Yu,dicts_add_or_change:()=>Su,dicts_clear:()=>Pu,dicts_create_with:()=>Au,dicts_create_with_noreturn:()=>ku,dicts_deldict:()=>Vu,dicts_delete:()=>Du,dicts_get:()=>Lu,dicts_get_default:()=>Cu,dicts_items:()=>fu,dicts_keys:()=>gu,dicts_length:()=>vu,dicts_pop:()=>yu,dicts_setdefault:()=>bu,dicts_to_json:()=>Uu,dicts_todict:()=>Xu,dicts_update:()=>Nu,dicts_values:()=>Fu,json_to_dicts:()=>Gu});var C={};t.r(C),t.d(C,{logic_boolean:()=>Wu,logic_compare:()=>Bu,logic_compare_continous:()=>xu,logic_is:()=>Qu,logic_is_in:()=>qu,logic_negate:()=>Hu,logic_null:()=>Ku,logic_operation:()=>wu,logic_tobool:()=>Ju,logic_true_or_false:()=>ju});var S={};t.r(S),t.d(S,{sdcard_mount:()=>cl,sdcard_use_spi_init:()=>Ml,storage_can_write_ornot:()=>ol,storage_change_dir:()=>Il,storage_close_file:()=>pl,storage_delete_file:()=>ul,storage_file_seek:()=>Tl,storage_file_tell:()=>rl,storage_file_write:()=>el,storage_fileopen:()=>zu,storage_fileopen_new:()=>$u,storage_fileopen_new_encoding:()=>tl,storage_get_a_line:()=>sl,storage_get_contents:()=>nl,storage_get_contents_without_para:()=>il,storage_get_current_dir:()=>dl,storage_get_file_size:()=>ll,storage_get_filename:()=>_l,storage_is_file:()=>Ol,storage_list_all_files:()=>al,storage_make_dir:()=>hl,storage_open_file_with_os:()=>Zu,storage_rename:()=>El});var D={};t.r(D),t.d(D,{procedures_callnoreturn:()=>gl,procedures_callreturn:()=>Al,procedures_defnoreturn:()=>ml,procedures_defreturn:()=>Rl,procedures_ifreturn:()=>Ll,procedures_return:()=>Cl});var N={};t.r(N),t.d(N,{tuple_change_to:()=>Yl,tuple_create_with:()=>Sl,tuple_create_with_noreturn:()=>Xl,tuple_create_with_text2:()=>Dl,tuple_create_with_text_return:()=>Nl,tuple_del:()=>Fl,tuple_find:()=>yl,tuple_getIndex:()=>Pl,tuple_getSublist:()=>kl,tuple_get_random_item:()=>Gl,tuple_get_sublist:()=>Ul,tuple_join:()=>vl,tuple_length:()=>fl,tuple_max:()=>Vl,tuple_totuple:()=>Bl,tuple_trig:()=>bl});var P={};t.r(P),t.d(P,{set_add_discard:()=>ql,set_clear:()=>Wl,set_create_with:()=>xl,set_create_with_text_return:()=>Zl,set_length:()=>wl,set_operate:()=>Kl,set_operate_update:()=>jl,set_pop:()=>Hl,set_sub:()=>Ql,set_toset:()=>zl,set_update:()=>Jl});var f={};t.r(f),t.d(f,{html_content:()=>ir,html_content_more:()=>nr,html_document:()=>$l,html_form:()=>or,html_head_body:()=>er,html_style:()=>sr,html_style_content:()=>_r,html_text:()=>pr,html_title:()=>tr});var F={};t.r(F),t.d(F,{attribute_access:()=>dr,function_call:()=>Ir,raw_block:()=>ar,raw_empty:()=>lr,raw_expression:()=>ur,raw_table:()=>rr,type_check:()=>Tr});var v={};t.r(v),t.d(v,{array_create:()=>fr,array_toarray:()=>Hr,dataframe_create:()=>Or,dataframe_create_from_index:()=>Mr,dataframe_create_from_one_index:()=>cr,dataframe_get:()=>Br,numpy_trig:()=>Xr,pandas_readcsv:()=>Gr,pl_axes:()=>Lr,pl_bar:()=>Yr,pl_hist:()=>br,pl_label:()=>Pr,pl_legend:()=>Dr,pl_pie:()=>yr,pl_plot:()=>Sr,pl_plot_bar:()=>Fr,pl_plot_easy:()=>Cr,pl_plot_scatter:()=>vr,pl_plot_xy:()=>Vr,pl_savefig:()=>xr,pl_show:()=>gr,pl_subplot:()=>Ur,pl_text:()=>wr,pl_ticks:()=>kr,pl_title:()=>Nr,plot_axes:()=>Kr,plot_bar:()=>eT,plot_hist:()=>nT,plot_label:()=>Zr,plot_legend:()=>Qr,plot_pie:()=>iT,plot_plot:()=>qr,plot_plot_bar:()=>zr,plot_plot_easy:()=>jr,plot_plot_scatter:()=>$r,plot_plot_xy:()=>tT,plot_savefig:()=>_T,plot_show:()=>Wr,plot_subplot:()=>oT,plot_text:()=>pT,plot_ticks:()=>sT,plot_title:()=>Jr,series_create:()=>hr,series_create_from_index:()=>Er,series_create_from_text:()=>Rr,series_get_num:()=>Ar,series_index_value:()=>mr});var V={};t.r(V),t.d(V,{inout_input:()=>aT,inout_print:()=>uT,inout_print_end:()=>rT,inout_print_inline:()=>lT,inout_print_many:()=>IT,inout_type_input:()=>TT});var Y={};t.r(Y),t.d(Y,{controls_end_program:()=>hT,controls_millis:()=>dT,time_localtime:()=>ET});var y={};t.r(y),t.d(y,{turtle_bgcolor:()=>bT,turtle_bgcolor_hex:()=>GT,turtle_bgcolor_hex_new:()=>wT,turtle_circle:()=>vT,turtle_circle_advanced:()=>YT,turtle_clear:()=>ST,turtle_clone:()=>UT,turtle_color:()=>jT,turtle_color_hex:()=>KT,turtle_color_seclet:()=>eI,turtle_create:()=>OT,turtle_done:()=>MT,turtle_exitonclick:()=>cT,turtle_fill:()=>NT,turtle_fillcolor:()=>XT,turtle_fillcolor_hex:()=>xT,turtle_fillcolor_hex_new:()=>WT,turtle_getscreen:()=>iI,turtle_goto:()=>LT,turtle_listen:()=>_I,turtle_move:()=>RT,turtle_numinput:()=>ZT,turtle_onclick:()=>sI,turtle_onkey:()=>nI,turtle_ontimer:()=>oI,turtle_pencolor:()=>kT,turtle_pencolor_hex:()=>BT,turtle_pencolor_hex_new:()=>HT,turtle_penup:()=>DT,turtle_pos_shape:()=>CT,turtle_rotate:()=>mT,turtle_screen_delay:()=>gT,turtle_screen_savefig:()=>pI,turtle_setheading:()=>AT,turtle_setxy:()=>VT,turtle_shape:()=>qT,turtle_shapesize:()=>QT,turtle_size:()=>fT,turtle_size_speed:()=>PT,turtle_speed:()=>FT,turtle_textinput:()=>JT,turtle_visible:()=>yT,turtle_write:()=>zT,turtle_write_format:()=>$T,turtle_write_format_skulpt:()=>tI});var b={};t.r(b),t.d(b,{Turn:()=>TI,addOil:()=>fI,checkMarker:()=>vI,find_books_by_dichotomy:()=>bI,find_books_by_sequence:()=>kI,game_get_character_img:()=>RI,game_get_local_img:()=>OI,game_get_path_img:()=>gI,game_init:()=>aI,getMarkerNum:()=>VI,get_actor_point:()=>EI,initSettedMap:()=>rI,initialize:()=>mI,isBarrier:()=>CI,isCirculationRight:()=>FI,isDone:()=>II,isLightGreen:()=>PI,isOilFull:()=>NI,isPath:()=>dI,is_Related_Barrier:()=>SI,is_Related_Path:()=>hI,move_direction_steps:()=>uI,move_related_to_spirite:()=>lI,place_item:()=>AI,randomOil:()=>DI,randomPlaceBarrier:()=>YI,set_map:()=>MI,set_map_bg:()=>cI,set_pathtype:()=>LI,settedSimpleMap:()=>yI});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;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:()=>ct,controls_finally:()=>mt,controls_flow_statements:()=>It,controls_for:()=>dt,controls_forEach:()=>lt,controls_for_range:()=>ht,controls_if:()=>at,controls_if_else:()=>Mt,controls_if_elseif:()=>Ot,controls_if_if:()=>Et,controls_lambda:()=>gt,controls_main:()=>st,controls_pass:()=>Lt,controls_range:()=>ut,controls_repeat_ext:()=>At,controls_thread:()=>Ct,controls_try:()=>Rt,controls_try_finally:()=>Tt,controls_whileUntil:()=>rt,datetime_fromtimestamp:()=>Ft,do_while:()=>St,garbage_collection:()=>Dt,get_mem_alloc:()=>Nt,get_mem_free:()=>Pt,get_unique_identifier:()=>ft});var n={};t.r(n),t.d(n,{base_map:()=>zt,math_arithmetic:()=>bt,math_bit:()=>Xt,math_constant:()=>Yt,math_constant_mp:()=>yt,math_constrain:()=>Wt,math_dec:()=>Gt,math_indexer_number:()=>jt,math_map:()=>Kt,math_max_min:()=>xt,math_number:()=>Vt,math_number_base_conversion:()=>wt,math_random:()=>Ht,math_random_seed:()=>qt,math_round:()=>Qt,math_selfcalcu:()=>kt,math_to_int:()=>Bt,math_trig:()=>Ut,text_to_number:()=>Jt,text_to_number_skulpt:()=>Zt,turn_to_int:()=>$t});var s={};t.r(s),t.d(s,{ascii_to_char:()=>oe,char_to_ascii:()=>_e,number_to_text:()=>pe,os_system:()=>ve,text:()=>ee,text_capital:()=>Ee,text_center:()=>Oe,text_char:()=>ne,text_char_at:()=>le,text_char_at2:()=>ue,text_char_at3:()=>Ne,text_compareTo:()=>De,text_compare_to:()=>he,text_create_with_container:()=>Le,text_create_with_item:()=>Ce,text_encode:()=>fe,text_equals_starts_ends:()=>de,text_eval:()=>Fe,text_find:()=>Me,text_format:()=>ge,text_format_noreturn:()=>Pe,text_join:()=>se,text_join_seq:()=>Re,text_length:()=>ae,text_random_char:()=>re,text_replace:()=>ce,text_split:()=>me,text_strip:()=>Ae,text_substring:()=>Ie,text_substring2:()=>Te,text_substring3:()=>Se,text_textarea:()=>ie});var o={};t.r(o),t.d(o,{ENUMERATE:()=>di,enumerate:()=>hi,list_many_input:()=>ei,list_tolist:()=>oi,list_tolist2:()=>Ii,list_trig:()=>ze,lists_2d_get_col_row_data:()=>ke,lists_2d_get_data_with_col_row:()=>be,lists_append_extend:()=>we,lists_change_to:()=>ti,lists_change_to_general:()=>ni,lists_clear:()=>qe,lists_create_with:()=>Xe,lists_create_with2:()=>_i,lists_create_with_container:()=>Ge,lists_create_with_item:()=>Be,lists_create_with_noreturn:()=>ii,lists_create_with_text:()=>Ue,lists_create_with_text2:()=>pi,lists_del_general:()=>si,lists_find:()=>Ze,lists_getIndex3:()=>ai,lists_getSublist3:()=>ui,lists_get_index:()=>Ye,lists_get_random_item:()=>He,lists_get_random_sublist:()=>We,lists_get_sublist:()=>ye,lists_insert_value:()=>Ke,lists_insert_value2:()=>ri,lists_pop:()=>Je,lists_remove_at:()=>Qe,lists_remove_at2:()=>Ti,lists_reverse:()=>je,lists_setIndex3:()=>li,lists_set_index:()=>xe,lists_sort:()=>$e});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>Fi,dicts_add_or_change:()=>gi,dicts_clear:()=>Si,dicts_create_with:()=>Oi,dicts_create_with_container:()=>Mi,dicts_create_with_item:()=>Ri,dicts_create_with_noreturn:()=>Yi,dicts_deldict:()=>fi,dicts_delete:()=>Li,dicts_get:()=>mi,dicts_get_default:()=>Ai,dicts_items:()=>Di,dicts_keys:()=>ci,dicts_length:()=>Pi,dicts_pop:()=>vi,dicts_setdefault:()=>Vi,dicts_to_json:()=>bi,dicts_todict:()=>yi,dicts_update:()=>Ci,dicts_values:()=>Ni,json_to_dicts:()=>ki});var p={};t.r(p),t.d(p,{logic_boolean:()=>wi,logic_compare:()=>Ui,logic_compare_continous:()=>Gi,logic_is:()=>ji,logic_is_in:()=>Ki,logic_negate:()=>xi,logic_null:()=>Hi,logic_operation:()=>Bi,logic_tobool:()=>qi,logic_true_or_false:()=>Wi});var a={};t.r(a),t.d(a,{sdcard_mount:()=>Mn,sdcard_use_spi_init:()=>On,storage_can_write_ornot:()=>sn,storage_change_dir:()=>hn,storage_close_file:()=>_n,storage_delete_file:()=>an,storage_file_seek:()=>rn,storage_file_tell:()=>ln,storage_file_write:()=>$i,storage_fileopen:()=>Ji,storage_fileopen_new:()=>Zi,storage_fileopen_new_encoding:()=>zi,storage_get_a_line:()=>nn,storage_get_contents:()=>en,storage_get_contents_without_para:()=>tn,storage_get_current_dir:()=>Tn,storage_get_file_size:()=>un,storage_get_filename:()=>on,storage_is_file:()=>En,storage_list_all_files:()=>pn,storage_make_dir:()=>In,storage_open_file_with_os:()=>Qi,storage_rename:()=>dn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>gn,procedures_callreturn:()=>Ln,procedures_defnoreturn:()=>Rn,procedures_defreturn:()=>cn,procedures_ifreturn:()=>Cn,procedures_mutatorarg:()=>An,procedures_mutatorcontainer:()=>mn,procedures_return:()=>Sn});var l={};t.r(l),t.d(l,{tuple_change_to:()=>Xn,tuple_create_with:()=>Nn,tuple_create_with_container:()=>Pn,tuple_create_with_item:()=>fn,tuple_create_with_noreturn:()=>xn,tuple_create_with_text2:()=>Fn,tuple_create_with_text_return:()=>vn,tuple_del:()=>yn,tuple_find:()=>Un,tuple_getIndex:()=>Vn,tuple_getSublist:()=>Bn,tuple_get_random_item:()=>Hn,tuple_get_sublist:()=>wn,tuple_join:()=>bn,tuple_length:()=>Yn,tuple_max:()=>kn,tuple_totuple:()=>Wn,tuple_trig:()=>Gn});var r={};t.r(r),t.d(r,{set_add_discard:()=>es,set_clear:()=>zn,set_create_with:()=>jn,set_create_with_container:()=>qn,set_create_with_item:()=>Qn,set_create_with_text_return:()=>ss,set_length:()=>Jn,set_operate:()=>$n,set_operate_update:()=>ts,set_pop:()=>Zn,set_sub:()=>is,set_toset:()=>os,set_update:()=>ns});var T={};t.r(T),t.d(T,{html_content:()=>ls,html_content_more:()=>rs,html_document:()=>ps,html_form:()=>Is,html_head_body:()=>us,html_style:()=>Ts,html_style_color:()=>hs,html_style_content:()=>ds,html_text:()=>Es,html_title:()=>as});var I={};t.r(I),t.d(I,{attribute_access:()=>fs,function_call:()=>Ds,function_call_container:()=>Ns,function_call_item:()=>Ps,raw_block:()=>Rs,raw_empty:()=>ms,raw_expression:()=>cs,raw_table:()=>Ms,text_comment:()=>As,text_print_multiple:()=>Ls,text_print_multiple_container:()=>Cs,text_print_multiple_item:()=>Ss,type_check:()=>gs});var d={};t.r(d),t.d(d,{array_create:()=>js,array_toarray:()=>po,dataframe_create:()=>Ys,dataframe_create_from_index:()=>bs,dataframe_create_from_one_index:()=>ys,dataframe_get:()=>so,numpy_trig:()=>eo,pandas_readcsv:()=>no,pl_axes:()=>ws,pl_bar:()=>Zs,pl_hist:()=>$s,pl_label:()=>Ks,pl_legend:()=>Hs,pl_pie:()=>zs,pl_plot:()=>Bs,pl_plot_bar:()=>qs,pl_plot_easy:()=>Gs,pl_plot_scatter:()=>Qs,pl_plot_xy:()=>Js,pl_savefig:()=>oo,pl_show:()=>xs,pl_subplot:()=>io,pl_text:()=>_o,pl_ticks:()=>to,pl_title:()=>Ws,plot_axes:()=>ro,plot_bar:()=>Ro,plot_hist:()=>mo,plot_label:()=>ho,plot_legend:()=>To,plot_pie:()=>co,plot_plot:()=>uo,plot_plot_bar:()=>Eo,plot_plot_easy:()=>ao,plot_plot_scatter:()=>Oo,plot_plot_xy:()=>Mo,plot_savefig:()=>Lo,plot_show:()=>lo,plot_subplot:()=>go,plot_text:()=>Co,plot_ticks:()=>Ao,plot_title:()=>Io,series_create:()=>vs,series_create_from_index:()=>Vs,series_create_from_text:()=>ks,series_get_num:()=>Us,series_index_value:()=>Xs});var h={};t.r(h),t.d(h,{inout_input:()=>Do,inout_print:()=>No,inout_print_container:()=>Vo,inout_print_end:()=>fo,inout_print_inline:()=>Po,inout_print_item:()=>Yo,inout_print_many:()=>vo,inout_type_input:()=>Fo});var E={};t.r(E),t.d(E,{Panic_with_status_code:()=>Uo,base_delay:()=>bo,controls_millis:()=>ko,controls_mstimer2:()=>Bo,controls_mstimer2_start:()=>xo,controls_mstimer2_stop:()=>wo,reset:()=>Go,time_localtime:()=>Xo,time_sleep:()=>Ho});var O={};t.r(O),t.d(O,{turtle_bgcolor:()=>r_,turtle_bgcolor_hex:()=>c_,turtle_bgcolor_hex_new:()=>h_,turtle_circle:()=>a_,turtle_circle_advanced:()=>u_,turtle_clear:()=>i_,turtle_clone:()=>d_,turtle_color:()=>M_,turtle_color_hex:()=>R_,turtle_color_seclet:()=>f_,turtle_create:()=>Ko,turtle_done:()=>jo,turtle_exitonclick:()=>qo,turtle_fill:()=>s_,turtle_fillcolor:()=>I_,turtle_fillcolor_hex:()=>A_,turtle_fillcolor_hex_new:()=>O_,turtle_getscreen:()=>F_,turtle_goto:()=>$o,turtle_listen:()=>y_,turtle_move:()=>Qo,turtle_numinput:()=>C_,turtle_onclick:()=>V_,turtle_onkey:()=>v_,turtle_ontimer:()=>Y_,turtle_pencolor:()=>T_,turtle_pencolor_hex:()=>m_,turtle_pencolor_hex_new:()=>E_,turtle_penup:()=>n_,turtle_pos_shape:()=>e_,turtle_rotate:()=>Jo,turtle_screen_delay:()=>zo,turtle_screen_savefig:()=>b_,turtle_setheading:()=>Zo,turtle_setxy:()=>t_,turtle_shape:()=>g_,turtle_shapesize:()=>L_,turtle_size:()=>__,turtle_size_speed:()=>o_,turtle_speed:()=>p_,turtle_textinput:()=>S_,turtle_visible:()=>l_,turtle_write:()=>D_,turtle_write_format:()=>N_,turtle_write_format_skulpt:()=>P_});var M={};t.r(M),t.d(M,{Turn:()=>x_,addOil:()=>_p,checkMarker:()=>ap,find_books_by_dichotomy:()=>Tp,find_books_by_sequence:()=>Ip,game_get_character_img:()=>z_,game_get_local_img:()=>q_,game_get_path_img:()=>J_,game_init:()=>U_,getMarkerNum:()=>up,get_actor_point:()=>tp,initSettedMap:()=>X_,initialize:()=>$_,isBarrier:()=>ep,isCirculationRight:()=>pp,isDone:()=>w_,isLightGreen:()=>op,isOilFull:()=>sp,isPath:()=>H_,is_Related_Barrier:()=>ip,is_Related_Path:()=>W_,move_direction_steps:()=>G_,move_related_to_spirite:()=>B_,place_item:()=>Z_,randomOil:()=>np,randomPlaceBarrier:()=>lp,set_map:()=>j_,set_map_bg:()=>K_,set_pathtype:()=>Q_,settedSimpleMap:()=>rp});var R={};t.r(R),t.d(R,{controls_type:()=>Mp,controls_typeLists:()=>Rp,lists_zip:()=>cp,unpack_iterable_object:()=>mp,variables_change:()=>Ep,variables_get:()=>dp,variables_global:()=>Op,variables_set:()=>hp});var c={};t.r(c),t.d(c,{Panic_with_status_code:()=>Fp,base_setup:()=>gp,controls_delay:()=>fp,controls_flow_statements:()=>Pp,controls_for:()=>Sp,controls_forEach:()=>bp,controls_for_range:()=>Dp,controls_if:()=>Lp,controls_interrupts:()=>Yp,controls_lambda:()=>Xp,controls_main:()=>Ap,controls_millis:()=>vp,controls_nointerrupts:()=>yp,controls_pass:()=>Gp,controls_range:()=>kp,controls_repeat:()=>qp,controls_repeat_ext:()=>wp,controls_thread:()=>Bp,controls_try_finally:()=>Cp,controls_whileUntil:()=>Np,datetime_fromtimestamp:()=>Qp,do_while:()=>xp,garbage_collection:()=>Hp,get_mem_alloc:()=>Wp,get_mem_free:()=>Kp,get_unique_identifier:()=>jp,reset:()=>Vp,time_sleep:()=>Up});var m={};t.r(m),t.d(m,{base_map:()=>Ea,math_arithmetic:()=>ta,math_bit:()=>$p,math_constant:()=>Zp,math_constant_mp:()=>zp,math_constrain:()=>ua,math_dec:()=>sa,math_indexer_number:()=>Ta,math_map:()=>aa,math_max_min:()=>_a,math_number:()=>Jp,math_number_base_conversion:()=>la,math_random:()=>pa,math_random_seed:()=>ra,math_round:()=>Ia,math_selfcalcu:()=>ea,math_single:()=>ia,math_to_int:()=>oa,math_trig:()=>na,text_to_number:()=>da,text_to_number_skulpt:()=>ha,turn_to_int:()=>Oa});var A={};t.r(A),t.d(A,{ascii_to_char:()=>Aa,char_to_ascii:()=>ga,number_to_text:()=>La,os_system:()=>ja,text:()=>Ma,text_capital:()=>Va,text_center:()=>Ya,text_char:()=>ca,text_char_at:()=>Da,text_char_at2:()=>Sa,text_char_at3:()=>Ha,text_compareTo:()=>wa,text_compare_to:()=>fa,text_encode:()=>Wa,text_equals_starts_ends:()=>Pa,text_eval:()=>Ka,text_find:()=>ya,text_format:()=>Ga,text_format_noreturn:()=>Ba,text_join:()=>ma,text_join_seq:()=>ba,text_length:()=>Ca,text_random_char:()=>Na,text_replace:()=>ka,text_split:()=>Xa,text_strip:()=>Ua,text_substring:()=>va,text_substring2:()=>Fa,text_substring3:()=>xa,text_textarea:()=>Ra});var g={};t.r(g),t.d(g,{enumerate:()=>Su,list_many_input:()=>Iu,list_tolist:()=>Lu,list_tolist2:()=>Cu,list_trig:()=>lu,lists_2d_get_col_row_data:()=>Ja,lists_2d_get_data_with_col_row:()=>Qa,lists_append_extend:()=>eu,lists_change_to:()=>Tu,lists_change_to_general:()=>hu,lists_clear:()=>_u,lists_create_with:()=>Za,lists_create_with2:()=>Ou,lists_create_with_noreturn:()=>du,lists_create_with_text:()=>za,lists_create_with_text2:()=>Mu,lists_del_general:()=>Eu,lists_find:()=>pu,lists_getIndex3:()=>Ru,lists_getSublist3:()=>cu,lists_get_index:()=>$a,lists_get_random_item:()=>iu,lists_get_random_sublist:()=>nu,lists_get_sublist:()=>qa,lists_insert_value:()=>su,lists_insert_value2:()=>Au,lists_pop:()=>uu,lists_remove_at:()=>au,lists_remove_at2:()=>gu,lists_reverse:()=>ou,lists_setIndex3:()=>mu,lists_set_index:()=>tu,lists_sort:()=>ru});var L={};t.r(L),t.d(L,{dicts_add_change_del:()=>Uu,dicts_add_or_change:()=>Fu,dicts_clear:()=>Yu,dicts_create_with:()=>Du,dicts_create_with_noreturn:()=>xu,dicts_deldict:()=>Xu,dicts_delete:()=>vu,dicts_get:()=>Pu,dicts_get_default:()=>fu,dicts_items:()=>yu,dicts_keys:()=>Nu,dicts_length:()=>ku,dicts_pop:()=>Gu,dicts_setdefault:()=>Bu,dicts_to_json:()=>Hu,dicts_todict:()=>wu,dicts_update:()=>Vu,dicts_values:()=>bu,json_to_dicts:()=>Wu});var C={};t.r(C),t.d(C,{logic_boolean:()=>Ju,logic_compare:()=>Ku,logic_compare_continous:()=>ju,logic_is:()=>tl,logic_is_in:()=>$u,logic_negate:()=>Qu,logic_null:()=>Zu,logic_operation:()=>qu,logic_tobool:()=>el,logic_true_or_false:()=>zu});var S={};t.r(S),t.d(S,{sdcard_mount:()=>Ll,sdcard_use_spi_init:()=>gl,storage_can_write_ornot:()=>ll,storage_change_dir:()=>Ml,storage_close_file:()=>Tl,storage_delete_file:()=>dl,storage_file_seek:()=>Ol,storage_file_tell:()=>El,storage_file_write:()=>_l,storage_fileopen:()=>nl,storage_fileopen_new:()=>sl,storage_fileopen_new_encoding:()=>ol,storage_get_a_line:()=>ul,storage_get_contents:()=>al,storage_get_contents_without_para:()=>pl,storage_get_current_dir:()=>Rl,storage_get_file_size:()=>hl,storage_get_filename:()=>rl,storage_is_file:()=>Al,storage_list_all_files:()=>Il,storage_make_dir:()=>cl,storage_open_file_with_os:()=>il,storage_rename:()=>ml});var D={};t.r(D),t.d(D,{procedures_callnoreturn:()=>Nl,procedures_callreturn:()=>Dl,procedures_defnoreturn:()=>Sl,procedures_defreturn:()=>Cl,procedures_ifreturn:()=>Pl,procedures_return:()=>fl});var N={};t.r(N),t.d(N,{tuple_change_to:()=>Ul,tuple_create_with:()=>Fl,tuple_create_with_noreturn:()=>wl,tuple_create_with_text2:()=>vl,tuple_create_with_text_return:()=>Vl,tuple_del:()=>bl,tuple_find:()=>Gl,tuple_getIndex:()=>Yl,tuple_getSublist:()=>xl,tuple_get_random_item:()=>Wl,tuple_get_sublist:()=>Hl,tuple_join:()=>kl,tuple_length:()=>yl,tuple_max:()=>Xl,tuple_totuple:()=>Kl,tuple_trig:()=>Bl});var P={};t.r(P),t.d(P,{set_add_discard:()=>$l,set_clear:()=>Jl,set_create_with:()=>jl,set_create_with_text_return:()=>ir,set_length:()=>ql,set_operate:()=>Zl,set_operate_update:()=>zl,set_pop:()=>Ql,set_sub:()=>tr,set_toset:()=>nr,set_update:()=>er});var f={};t.r(f),t.d(f,{html_content:()=>pr,html_content_more:()=>ar,html_document:()=>sr,html_form:()=>lr,html_head_body:()=>_r,html_style:()=>ur,html_style_content:()=>rr,html_text:()=>Tr,html_title:()=>or});var F={};t.r(F),t.d(F,{attribute_access:()=>Rr,function_call:()=>Mr,raw_block:()=>Ir,raw_empty:()=>hr,raw_expression:()=>dr,raw_table:()=>Er,type_check:()=>Or});var v={};t.r(v),t.d(v,{array_create:()=>yr,array_toarray:()=>Qr,dataframe_create:()=>Ar,dataframe_create_from_index:()=>gr,dataframe_create_from_one_index:()=>Lr,dataframe_get:()=>Kr,numpy_trig:()=>wr,pandas_readcsv:()=>Wr,pl_axes:()=>Pr,pl_bar:()=>Ur,pl_hist:()=>Br,pl_label:()=>Yr,pl_legend:()=>vr,pl_pie:()=>Gr,pl_plot:()=>Fr,pl_plot_bar:()=>br,pl_plot_easy:()=>fr,pl_plot_scatter:()=>kr,pl_plot_xy:()=>Xr,pl_savefig:()=>jr,pl_show:()=>Nr,pl_subplot:()=>Hr,pl_text:()=>qr,pl_ticks:()=>xr,pl_title:()=>Vr,plot_axes:()=>Zr,plot_bar:()=>_T,plot_hist:()=>aT,plot_label:()=>iT,plot_legend:()=>tT,plot_pie:()=>pT,plot_plot:()=>$r,plot_plot_bar:()=>nT,plot_plot_easy:()=>zr,plot_plot_scatter:()=>sT,plot_plot_xy:()=>oT,plot_savefig:()=>rT,plot_show:()=>Jr,plot_subplot:()=>lT,plot_text:()=>TT,plot_ticks:()=>uT,plot_title:()=>eT,series_create:()=>cr,series_create_from_index:()=>mr,series_create_from_text:()=>Cr,series_get_num:()=>Dr,series_index_value:()=>Sr});var V={};t.r(V),t.d(V,{inout_input:()=>IT,inout_print:()=>dT,inout_print_end:()=>ET,inout_print_inline:()=>hT,inout_print_many:()=>MT,inout_type_input:()=>OT});var Y={};t.r(Y),t.d(Y,{controls_end_program:()=>cT,controls_millis:()=>RT,time_localtime:()=>mT});var y={};t.r(y),t.d(y,{turtle_bgcolor:()=>BT,turtle_bgcolor_hex:()=>WT,turtle_bgcolor_hex_new:()=>qT,turtle_circle:()=>kT,turtle_circle_advanced:()=>UT,turtle_clear:()=>FT,turtle_clone:()=>HT,turtle_color:()=>zT,turtle_color_hex:()=>ZT,turtle_color_seclet:()=>_I,turtle_create:()=>AT,turtle_done:()=>gT,turtle_exitonclick:()=>LT,turtle_fill:()=>VT,turtle_fillcolor:()=>wT,turtle_fillcolor_hex:()=>jT,turtle_fillcolor_hex_new:()=>JT,turtle_getscreen:()=>pI,turtle_goto:()=>PT,turtle_listen:()=>rI,turtle_move:()=>CT,turtle_numinput:()=>iI,turtle_onclick:()=>uI,turtle_onkey:()=>aI,turtle_ontimer:()=>lI,turtle_pencolor:()=>xT,turtle_pencolor_hex:()=>KT,turtle_pencolor_hex_new:()=>QT,turtle_penup:()=>vT,turtle_pos_shape:()=>fT,turtle_rotate:()=>ST,turtle_screen_delay:()=>NT,turtle_screen_savefig:()=>TI,turtle_setheading:()=>DT,turtle_setxy:()=>XT,turtle_shape:()=>$T,turtle_shapesize:()=>tI,turtle_size:()=>yT,turtle_size_speed:()=>YT,turtle_speed:()=>bT,turtle_textinput:()=>eI,turtle_visible:()=>GT,turtle_write:()=>nI,turtle_write_format:()=>sI,turtle_write_format_skulpt:()=>oI});var b={};t.r(b),t.d(b,{Turn:()=>OI,addOil:()=>yI,checkMarker:()=>kI,find_books_by_dichotomy:()=>BI,find_books_by_sequence:()=>xI,game_get_character_img:()=>CI,game_get_local_img:()=>AI,game_get_path_img:()=>NI,game_init:()=>II,getMarkerNum:()=>XI,get_actor_point:()=>mI,initSettedMap:()=>EI,initialize:()=>SI,isBarrier:()=>fI,isCirculationRight:()=>bI,isDone:()=>MI,isLightGreen:()=>YI,isOilFull:()=>VI,isPath:()=>RI,is_Related_Barrier:()=>FI,is_Related_Path:()=>cI,move_direction_steps:()=>dI,move_related_to_spirite:()=>hI,place_item:()=>DI,randomOil:()=>vI,randomPlaceBarrier:()=>UI,set_map:()=>gI,set_map_bg:()=>LI,set_pathtype:()=>PI,settedSimpleMap:()=>GI});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")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.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")}},ut={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")}},It={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)}}},dt={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"]],It.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=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 vt={init:function(){this.setColour(Ft),this.appendDummyInput().appendField(new k.FieldTextInput("0",k.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(k.Msg.MATH_NUMBER_TOOLTIP)}},Vt={init:function(){this.setColour(Ft);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]}))}},Yt={init:function(){this.setColour(Ft);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]}))}},yt={init:function(){this.setColour(Ft),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]}))}},bt={init:function(){this.setColour(Ft),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]}))}},kt={init:function(){this.setColour(Ft),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new k.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Xt={init:function(){this.setColour(Ft),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]}))}},Ut={init:function(){var t=[[k.Msg.MATH_BIN,"bin"],[k.Msg.MATH_OCT,"oct"],[k.Msg.MATH_HEX,"hex"]];this.setColour(Ft),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]}))}},Gt={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(Ft),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]}))}},Bt={init:function(){var t=[[k.Msg.MIXLY_MAX,"max"],[k.Msg.MIXLY_MIN,"min"]];this.setColour(Ft),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]}))}},xt={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(Ft),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(Ft),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]}))}},Ht={init:function(){this.setColour(Ft),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)}},Wt={init:function(){this.setColour(Ft),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)}},Kt={init:function(){this.setColour(Ft),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)}},jt={init:function(){this.setColour(Ft),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)}},qt={init:function(){this.setColour(Ft),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)}},Qt={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(Ft),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]}))}},Jt={init:function(){var t=[[k.Msg.MIXLY_TO_INT,"int"],[k.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Ft),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]}))}},Zt=Wt,zt={init:function(){this.setColour(Ft),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)}},$t=160,te={init:function(){this.setColour($t),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_TEXT_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}},ee={init:function(){this.setColour($t),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_LINES_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}};k.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ie={init:function(){this.setColour($t),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,'"')}},ne={init:function(){this.setColour($t),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)}},se={init:function(){this.setColour($t),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},oe={init:function(){this.setColour($t),this.appendValueInput("VAR").setCheck(String).appendField(k.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},_e={init:function(){this.setColour($t),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},pe={init:function(){this.setColour($t),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ae={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($t),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)}},ue={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour($t),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)}},le={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour($t),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(k.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(k.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},re={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($t),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"))}},Te={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour($t),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)}},Ie={init:function(){var t=[[k.Msg.MIXLY_EQUALS,"==="],[k.Msg.MIXLY_STARTSWITH,"startswith"],[k.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour($t),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new k.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},de={init:function(){this.setColour($t),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)}},he={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($t),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]}))}},Ee={init:function(){var t=[[k.Msg.TEXT_LJUST,"ljust"],[k.Msg.TEXT_CENTER,"center"],[k.Msg.TEXT_RJUST,"rjust"]];this.setColour($t),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)}},Oe={init:function(){this.setColour($t),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)}},Me={init:function(){this.setColour($t),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)}},ce={init:function(){this.setColour($t),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)}},Re={init:function(){this.setColour($t),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)}},me={init:function(){var t=[[k.Msg.TEXT_TRIM_BOTH,"strip"],[k.Msg.TEXT_TRIM_LEFT,"lstrip"],[k.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour($t),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]}))}},Ae={init:function(){this.setColour($t),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")}},hi={init:function(){this.setColour(Ii),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ei={init:function(){this.setColour(Ii),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}},Oi={init:function(){this.setColour(Ii),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_KEYS),this.setTooltip(k.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Mi={init:function(){this.setColour(Ii),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)}},ci={init:function(){this.setColour(Ii),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)}},Ri={init:function(){this.setColour(Ii),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)}},mi={init:function(){this.setColour(Ii),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)}},Ai={init:function(){this.setColour(Ii),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)}},gi={init:function(){this.setColour(Ii),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)}},Li={init:function(){this.setColour(Ii),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_ITEMS),this.setTooltip(k.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ci={init:function(){this.setColour(Ii),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_VALUES),this.setTooltip(k.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Si={init:function(){this.setColour(Ii),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_LENGTH),this.setTooltip(k.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Di={init:function(){this.setColour(Ii),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)}},Ni={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(Ii),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")}},Pi={init:function(){this.setColour(Ii),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)}},fi={init:function(){this.setColour(Ii),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)}},Fi={init:function(){this.setColour(Ii),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")}},vi={init:function(){this.setColour(Ii),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Vi={init:function(){this.setColour(Ii),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Yi={init:function(){this.setColour(Ii),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},yi=210,bi={init:function(){var t=k.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(yi),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]}},ki={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(yi),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)}},Xi={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(yi),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]}))}},Ui={init:function(){this.setColour(yi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(k.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(k.Msg.LOGIC_NEGATE_TOOLTIP)}},Gi={init:function(){var t=[[k.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[k.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(yi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new k.FieldDropdown(t),"BOOL"),this.setTooltip(k.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Bi={init:function(){this.setColour(yi),this.setOutput(!0),this.appendDummyInput().appendField(k.Msg.LOGIC_NULL),this.setTooltip(k.Msg.LOGIC_NULL_TOOLTIP)}},xi={init:function(){this.setColour(yi),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)}},wi={init:function(){var t=[[k.Msg.TEXT_APPEND_TO,"in"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(yi),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)}},Hi={init:function(){var t=[[k.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(yi),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)}},Wi={init:function(){this.setColour(yi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Ki={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)}},ji={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")}},qi={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+_}))}},Qi={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+_}))}},Ji={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)}},Zi={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)}},zi={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}))}},$i={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)}},tn={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)}},en={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)}},nn={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)}},sn={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 on={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)}},_n={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)}},pn={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)}},an={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}))}},un={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)}},ln={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]}))}},rn={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)}},Tn={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)}},In={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]}))}},dn={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)}},hn={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()}},En={init:function(){var t=x.findLegalName("",this),e=new k.FieldTextInput(t,x.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)}},us={init:function(){this.setColour(ns),this.appendDummyInput().appendField(k.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ls={init:function(){this.setColour(ns),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)}},rs={init:function(){this.setColour(ns),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ts={init:function(){this.setColour(ns),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Is={init:function(){this.setColour(ns),this.appendDummyInput().appendField(k.Msg.HTML_TEXT).appendField(new k.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ds=160,hs={init:function(){this.setColour(ds),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new k.FieldTable(""),"TEXT")}},Es={init:function(){this.setColour(ds),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT")}},Os={init:function(){this.setColour(ds),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ms={init:function(){this.setColour(ds),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},cs={init:function(){this.setColour(ds),this.appendDummyInput().appendTitle("Comment:").appendTitle(new k.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Rs={init:function(){this.setColour(ds),this.appendValueInput("VALUE").appendField(k.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ms={init:function(){this.setColour(ds),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)}},Us={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Ns);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)}},Hs={init:function(){this.setColour(Ns),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)}},Ws={init:function(){this.setColour(Ns);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]}))}},Ks={init:function(){this.setColour(Ns);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("")}},js={init:function(){this.setColour(Ns);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)}},qs={init:function(){this.setColour(Ns);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)}},Qs={init:function(){this.setColour(Ns);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)}},Js={init:function(){this.setColour(Ns),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)}},Zs={init:function(){this.setColour(Ns);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)}},zs={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(Ns),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)}},$s={init:function(){this.setColour(Ns),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)}},to={init:function(){this.setColour(Ns),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")}},eo={init:function(){this.setColour(Ns),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(Ns),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)}},no={init:function(){this.setColour(Ns);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)}},so={init:function(){this.setColour(Ns),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(Ns),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)}},_o={init:function(){this.setColour(Ns);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)}},po={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ao={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uo={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},lo={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ro={init:function(){this.setColour(Ns);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)}},To={init:function(){this.setColour(Ns);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]}))}},Io={init:function(){this.setColour(Ns);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("")}},ho={init:function(){this.setColour(Ns);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)}},Eo={init:function(){this.setColour(Ns);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)}},Oo={init:function(){this.setColour(Ns);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)}},Mo={init:function(){this.setColour(Ns),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)}},co={init:function(){this.setColour(Ns);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)}},Ro={init:function(){this.setColour(Ns),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)}},mo={init:function(){this.setColour(Ns),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)}},Ao={init:function(){this.setColour(Ns);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)}},go=20,Lo={init:function(){this.setColour(go),this.appendValueInput("VAR").appendField(k.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(k.Msg.INOUT_input_TOOLTIP)}},Co={init:function(){this.setColour(go),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.BLOCKPY_PRINT_TOOLTIP)}},So={init:function(){this.setColour(go),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},Do={init:function(){this.setColour(go),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)}},No={init:function(){var t=[[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(go),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]}))}},Po={init:function(){this.setColour(go),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:[["'无可用地图'","'无可用地图'"]]}},K_={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("")}},j_={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:[["'无可用路径'","'无可用路径'"]]}},q_={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("")}},Q_={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:[["'无可用角色'","'无可用角色'"]]}},J_={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("")}},Z_={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_GETPOINT),this.setOutput(!0,Number),this.setTooltip("")}},z_={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("")}},$_={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("")}},tp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_RANDOMCAROIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},ep={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_NEEDOIL),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ip={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISGREEN),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},np={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ADDOIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},sp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_CHECKCIRCURIGHT),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},op={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("")}},_p={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("")}},pp={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("")}},ap={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("")}},up={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("")}},lp={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("")}},rp=function(t,e){return[e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE),e.ORDER_ATOMIC]},Tp=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"},Ip=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]},dp=function(t,e){return"global "+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"None")+"\n"},hp=function(t,e){return["type("+(e.valueToCode(this,"DATA",e.ORDER_ATOMIC)||"None")+")",e.ORDER_ATOMIC]},Ep=function(t,e){return[this.getFieldValue("type"),e.ORDER_ATOMIC]},Op=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 "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+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 wu=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]},Hu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Wu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Ku=function(t,e){return["None",e.ORDER_ATOMIC]},ju=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]},qu=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]},Qu=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]},Ju=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Zu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},zu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},$u=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},tl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},el=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},il=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},nl=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]},sl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ol=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},_l=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"},al=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ul=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ll=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},rl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Tl=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"},Il=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},dl=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},hl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},El=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"},Ol=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]},Ml=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"},cl=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"),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]},tr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},er=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},ir=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},nr=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},sr=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},or=function(t,e){return'"},_r=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},pr=function(){return this.getFieldValue("TEXT")+"\n"},ar=function(t){return t.getFieldValue("TEXT")+"\n"},ur=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},lr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},rr=function(){return""},Tr=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Ir=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;s0?e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+"while True:\n"+o.join("")+_.join("\n"):e.join("\n")+"\n"+n.join("\n")+"\n"+s.join("")+"\n"+t+_.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")}},ut={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")}},It={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)}}},dt={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"]],It.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}},Rt={init:function(){this.setColour(nt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ct={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=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 Vt={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]}))}},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_MP_TOOLTIP,e:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},bt={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]}))}},kt={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]}))}},Xt={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("位运算")}},Ut={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]}))}},Gt={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]}))}},Bt={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]}))}},xt={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]}))}},wt={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]}))}},Ht={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]}))}},Wt={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)}},Kt={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)}},jt={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)}},Qt={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)}},Jt={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]}))}},zt=Kt,$t={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)}},te=160,ee={init:function(){this.setColour(te),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_TEXT_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}},ie={init:function(){this.setColour(te),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldMultilineInput("Hello\nMixly"),"VALUE").appendField(this.newQuote_(!1)),this.setOutput(!0,String),this.setTooltip(k.Msg.TEXT_LINES_TOOLTIP)},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 k.FieldImage(e,12,12,'"')}};k.FieldTextInput.char_validator=function(t){if(t.length>1&&"\\"===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 ne={init:function(){this.setColour(te),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,'"')}},se={init:function(){this.setColour(te),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)}},oe={init:function(){this.setColour(te),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},_e={init:function(){this.setColour(te),this.appendValueInput("VAR").setCheck(String).appendField(k.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},pe={init:function(){this.setColour(te),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ae={init:function(){this.setColour(te),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ue={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(te),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)}},le={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(te),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)}},re={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(te),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(k.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(k.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Te={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(te),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"))}},Ie={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(te),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)}},de={init:function(){var t=[[k.Msg.MIXLY_EQUALS,"==="],[k.Msg.MIXLY_STARTSWITH,"startswith"],[k.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(te),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new k.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},he={init:function(){this.setColour(te),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)}},Ee={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(te),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]}))}},Oe={init:function(){var t=[[k.Msg.TEXT_LJUST,"ljust"],[k.Msg.TEXT_CENTER,"center"],[k.Msg.TEXT_RJUST,"rjust"]];this.setColour(te),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)}},Me={init:function(){this.setColour(te),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)}},Re={init:function(){this.setColour(te),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)}},ce={init:function(){this.setColour(te),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)}},me={init:function(){this.setColour(te),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)}},Ae={init:function(){var t=[[k.Msg.TEXT_TRIM_BOTH,"strip"],[k.Msg.TEXT_TRIM_LEFT,"lstrip"],[k.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(te),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]}))}},ge={init:function(){this.setColour(te),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")}},Mi={init:function(){this.setColour(Ei),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ri={init:function(){this.setColour(Ei),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(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_KEYS),this.setTooltip(k.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},mi={init:function(){this.setColour(Ei),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)}},Ai={init:function(){this.setColour(Ei),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)}},gi={init:function(){this.setColour(Ei),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)}},Li={init:function(){this.setColour(Ei),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)}},Ci={init:function(){this.setColour(Ei),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)}},Si={init:function(){this.setColour(Ei),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)}},Di={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_ITEMS),this.setTooltip(k.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ni={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_VALUES),this.setTooltip(k.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Pi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_LENGTH),this.setTooltip(k.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},fi={init:function(){this.setColour(Ei),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)}},Fi={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(Ei),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")}},vi={init:function(){this.setColour(Ei),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)}},Vi={init:function(){this.setColour(Ei),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)}},Yi={init:function(){this.setColour(Ei),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")}},yi={init:function(){this.setColour(Ei),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},bi={init:function(){this.setColour(Ei),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ki={init:function(){this.setColour(Ei),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Xi=210,Ui={init:function(){var t=k.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Xi),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]}},Gi={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(Xi),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)}},Bi={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(Xi),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]}))}},xi={init:function(){this.setColour(Xi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(k.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(k.Msg.LOGIC_NEGATE_TOOLTIP)}},wi={init:function(){var t=[[k.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[k.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Xi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new k.FieldDropdown(t),"BOOL"),this.setTooltip(k.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Hi={init:function(){this.setColour(Xi),this.setOutput(!0),this.appendDummyInput().appendField(k.Msg.LOGIC_NULL),this.setTooltip(k.Msg.LOGIC_NULL_TOOLTIP)}},Wi={init:function(){this.setColour(Xi),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)}},Ki={init:function(){var t=[[k.Msg.TEXT_APPEND_TO,"in"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Xi),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)}},ji={init:function(){var t=[[k.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Xi),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)}},qi={init:function(){this.setColour(Xi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Qi={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)}},Ji={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")}},Zi={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+_}))}},zi={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+_}))}},$i={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)}},tn={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)}},en={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}))}},nn={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)}},sn={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)}},on={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)}},_n={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)}},pn={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 an={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)}},un={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)}},ln={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)}},rn={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}))}},Tn={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)}},In={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]}))}},dn={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)}},hn={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)}},En={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]}))}},On={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)}},Mn={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()}},Rn={init:function(){var t=x.findLegalName("",this),e=new k.FieldTextInput(t,x.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)}},Ts={init:function(){this.setColour(_s),this.appendDummyInput().appendField(k.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Is={init:function(){this.setColour(_s),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)}},ds={init:function(){this.setColour(_s),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hs={init:function(){this.setColour(_s),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Es={init:function(){this.setColour(_s),this.appendDummyInput().appendField(k.Msg.HTML_TEXT).appendField(new k.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os=160,Ms={init:function(){this.setColour(Os),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new k.FieldTable(""),"TEXT")}},Rs={init:function(){this.setColour(Os),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT")}},cs={init:function(){this.setColour(Os),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},ms={init:function(){this.setColour(Os),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},As={init:function(){this.setColour(Os),this.appendDummyInput().appendTitle("Comment:").appendTitle(new k.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},gs={init:function(){this.setColour(Os),this.appendValueInput("VALUE").appendField(k.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Ls={init:function(){this.setColour(Os),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)}},xs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hs={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(Fs);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)}},js={init:function(){this.setColour(Fs),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)}},qs={init:function(){this.setColour(Fs);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]}))}},Qs={init:function(){this.setColour(Fs);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("")}},Js={init:function(){this.setColour(Fs);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)}},Zs={init:function(){this.setColour(Fs);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)}},zs={init:function(){this.setColour(Fs);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)}},$s={init:function(){this.setColour(Fs),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)}},to={init:function(){this.setColour(Fs);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)}},eo={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(Fs),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)}},io={init:function(){this.setColour(Fs),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)}},no={init:function(){this.setColour(Fs),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")}},so={init:function(){this.setColour(Fs),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)}},oo={init:function(){this.setColour(Fs),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)}},_o={init:function(){this.setColour(Fs);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)}},po={init:function(){this.setColour(Fs),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},ao={init:function(){this.setColour(Fs),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)}},uo={init:function(){this.setColour(Fs);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)}},lo={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ro={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},To={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Io={init:function(){this.setColour(Fs),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ho={init:function(){this.setColour(Fs);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(Fs);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]}))}},Oo={init:function(){this.setColour(Fs);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("")}},Mo={init:function(){this.setColour(Fs);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)}},Ro={init:function(){this.setColour(Fs);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)}},co={init:function(){this.setColour(Fs);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)}},mo={init:function(){this.setColour(Fs),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)}},Ao={init:function(){this.setColour(Fs);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)}},go={init:function(){this.setColour(Fs),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)}},Lo={init:function(){this.setColour(Fs),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)}},Co={init:function(){this.setColour(Fs);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)}},So=20,Do={init:function(){this.setColour(So),this.appendValueInput("VAR").appendField(k.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(k.Msg.INOUT_input_TOOLTIP)}},No={init:function(){this.setColour(So),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.BLOCKPY_PRINT_TOOLTIP)}},Po={init:function(){this.setColour(So),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},fo={init:function(){this.setColour(So),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)}},Fo={init:function(){var t=[[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(So),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]}))}},vo={init:function(){this.setColour(So),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:[["'无可用地图'","'无可用地图'"]]}},Q_={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("")}},J_={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:[["'无可用路径'","'无可用路径'"]]}},Z_={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("")}},z_={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:[["'无可用角色'","'无可用角色'"]]}},$_={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("")}},tp={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_GETPOINT),this.setOutput(!0,Number),this.setTooltip("")}},ep={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("")}},ip={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("")}},np={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_RANDOMCAROIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},sp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_NEEDOIL),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},op={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISGREEN),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},_p={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ADDOIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},pp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_CHECKCIRCURIGHT),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},ap={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("")}},up={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("")}},lp={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("")}},rp={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("")}},Tp={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("")}},Ip={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("")}},dp=function(t,e){return[e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE),e.ORDER_ATOMIC]},hp=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"},Ep=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]},Op=function(t,e){return"global "+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"None")+"\n"},Mp=function(t,e){return["type("+(e.valueToCode(this,"DATA",e.ORDER_ATOMIC)||"None")+")",e.ORDER_ATOMIC]},Rp=function(t,e){return[this.getFieldValue("type"),e.ORDER_ATOMIC]},cp=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 "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+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 qu=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]},Qu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Ju=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Zu=function(t,e){return["None",e.ORDER_ATOMIC]},zu=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]},$u=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]},tl=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]},il=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},nl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},sl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ol=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},_l=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},pl=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},al=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]},ul=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]},rl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Tl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Il=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"},hl=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},El=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Ol=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"},Ml=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Rl=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},cl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},ml=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"},Al=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]},gl=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"},Ll=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"},Cl=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]},or=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},_r=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},pr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},ar=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},ur=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},lr=function(t,e){return'"},rr=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Tr=function(){return this.getFieldValue("TEXT")+"\n"},Ir=function(t){return t.getFieldValue("TEXT")+"\n"},dr=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},hr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Er=function(){return""},Or=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Mr=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