diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..dc864ba
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+# Logs
+logs
+*.log
+yarn-debug.log*
+yarn-error.log*
+
+# Modules
+node_modules/
+
+# Yarn
+.yarn-integrity
+.yarn/*
+!.yarn/patches
+!.yarn/releases
+!.yarn/plugins
+!.yarn/sdks
+!.yarn/versions
+.pnp.*
+
+# Develop
+dist
+build
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0361c23
--- /dev/null
+++ b/README.md
@@ -0,0 +1,42 @@
+# bddjr toolbox v2
+重写 nhjrToolBox 。
+
+***
+## 文档
+(待制作)
+
+***
+## 拉取并打包
+(待验证)
+
+演示环境:Windows 的 powershell
+
+请新建空白文件夹后,在对应目录打开 powershell ,再执行如下操作。
+
+1、使用 git 从 github 仓库拉取内容,然后删除多余的 .git 文件夹。
+> 如果你需要提交 Pull Request ,请 fork 为自己的仓库,再从自己的仓库拉取。
+```
+git clone https://github.com/bddjr/clipcc-extension-bddjr_toolbox_v2
+```
+
+2、(非必要)删除 .git 文件夹
+> 如果你需要提交 Pull Request ,请不要执行这个
+```
+rm .git
+```
+
+3、使用 nodejs 的 npm 全局安装 yarn
+```
+npm -g install yarn
+```
+
+4、使用 yarn 安装前置插件
+```
+yarn install
+yarn install clipcc-extension
+```
+
+5、使用 yarn 打包
+```
+yarn build
+```
diff --git a/assets/icon.webp b/assets/icon.webp
new file mode 100644
index 0000000..fb9f77f
Binary files /dev/null and b/assets/icon.webp differ
diff --git a/assets/inset_icon.svg b/assets/inset_icon.svg
new file mode 100644
index 0000000..384007e
--- /dev/null
+++ b/assets/inset_icon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/categorys/array.js b/categorys/array.js
new file mode 100644
index 0000000..3459745
--- /dev/null
+++ b/categorys/array.js
@@ -0,0 +1,719 @@
+const { type, api } = require('clipcc-extension');
+
+const {
+ my_log_block_error,
+ returnType,
+ for_json_get_keys,
+} = require('../myjs/tools.js');
+
+const {
+ myTypeMenu,
+ make_menus,
+ keymodeMenu
+} = require('../myjs/menus.js');
+
+
+function get_value_for_sort( thisjson, keymode, key ){
+ // 不包含的keymode会抛出错误
+ let keyslist = for_json_get_keys( keymode, key );
+
+ if( typeof keyslist === 'number' ){
+ return thisjson[ keyslist ];
+ }
+
+ if( keymode === 'Array' ){
+ for( let i of keyslist ){
+ if( (+i)<0 && Array.isArray(thisjson) ){
+ // 兼容数组负数下标取值
+ i = thisjson.length + (+i);
+ }
+ thisjson = thisjson[ i ];
+ }
+
+ }else{ // keymode === '.'
+ if( Array.isArray( keyslist ) ){
+ for( let i of keyslist ){
+ if( Array.isArray( i ) ){
+ if( Array.isArray(thisjson) && (+i[0])<0 ){
+ // 兼容数组负数下标取值
+ i[0] = thisjson.length + (+i[0]);
+ }
+ thisjson = thisjson[ i[0] ];
+ if( i[1] ==='?.' && !thisjson )
+ break;
+ }else{
+ if( Array.isArray(thisjson) && (+i)<0 ){
+ // 兼容数组负数下标取值
+ i = thisjson.length + (+i);
+ }
+ thisjson = thisjson[ i ];
+ }
+ }
+ }else{ // typeof keyslist === 'string'
+ if( Array.isArray(thisjson) && (+keyslist)<0 ){
+ // 兼容数组负数下标取值
+ keyslist = thisjson.length + (+keyslist);
+ }
+ thisjson = thisjson[ keyslist ];
+ }
+ }
+ return thisjson
+}
+
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.push`,
+ messageId: `${category_id}.push`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"doge"'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ v1.push(v2)
+ return returnType( v1, args.return_type );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.length`,
+ messageId: `${category_id}.length`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ return v1.length;
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.indexOf`,
+ messageId: `${category_id}.indexOf`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"banana"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return v1.indexOf(v2);
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.lastIndexOf`,
+ messageId: `${category_id}.lastIndexOf`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat","apple"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"apple"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return v1.lastIndexOf(v2);
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.includes`,
+ messageId: `${category_id}.includes`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"apple"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return v1.includes(v2);
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.slice`,
+ messageId: `${category_id}.slice`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '0'
+ },
+ n2: {
+ type: type.ParameterType.NUMBER,
+ default: '-1'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ return returnType(
+ v1.slice(
+ args.n1 ,
+ args.n2==='' ? undefined : args.n2
+ ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.deduplication`,
+ messageId: `${category_id}.deduplication`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","apple","banana","banana","cat","cat"]'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ return returnType(
+ Array.from( new Set(v1) ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.max_or_min`,
+ messageId: `${category_id}.max_or_min`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '[999,123,456,654,15,30,664]'
+ },
+ mxx: {
+ type: type.ParameterType.STRING,
+ default: 'max',
+ menu: make_menus(
+ `${category_id}.max_or_min.menu`,
+ 'max',
+ 'min'
+ )
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !['max', 'min'].includes( args.mxx ) )
+ throw 'Not allowed function name!';
+
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ return returnType(
+ Math[ args.mxx ].apply( null, v1 ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.reverse`,
+ messageId: `${category_id}.reverse`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '[999,123,456,654,15,30,664]'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ return returnType(
+ v1.reverse(),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.flat`,
+ messageId: `${category_id}.flat`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '[["apple"], ["banana", ["cat"]]]'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '1'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ return returnType(
+ v1.flat( args.n1==='' ? undefined : args.n1 ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.fill`,
+ messageId: `${category_id}.fill`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"clipcc"'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '0'
+ },
+ n2: {
+ type: type.ParameterType.NUMBER,
+ default: '2'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return returnType(
+ v1.fill(
+ v2,
+ args.n1==='' ? undefined : args.n1 ,
+ args.n2==='' ? undefined : args.n2 ,
+ ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.splice`,
+ messageId: `${category_id}.splice`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '0'
+ },
+ n2: {
+ type: type.ParameterType.NUMBER,
+ default: '2'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"clipcc","yes"'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ if( typeof v2 === 'string' )
+ try{
+ v2 = JSON.parse( `[${v2}]` );
+ }catch{}
+
+ v1.splice(
+ args.n1, args.n2,
+ ...v2
+ )
+
+ return returnType(
+ v1,
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.concat`,
+ messageId: `${category_id}.concat`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '["clipcc","yes"],["sey","ccpilc"]'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' ){
+ if( typeof v2 === 'string' )
+ v2 = `[${v2}]`;
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+ }
+
+ return returnType(
+ v1.concat( ...v2 ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.join`,
+ messageId: `${category_id}.join`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '["apple","banana","cat"]'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '" "'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v1 = args.v1;
+ if( typeof v1 !== 'object' )
+ v1 = JSON.parse( v1 );
+
+ let v2 = args.v2;
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return v1.join( v2 );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.sort`,
+ messageId: `${category_id}.sort`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '[{"name":"XiaoMing","score":98},{"name":"XiaoHong","score":92},{"name":"LiHua","score":95}]'
+ },
+ type: {
+ type: type.ParameterType.STRING,
+ default: 'down',
+ menu: make_menus(
+ `${category_id}.sort.menu`,
+ 'null',
+ 'up',
+ 'down'
+ )
+ },
+ keymode: {
+ type: type.ParameterType.STRING,
+ default: '.',
+ menu: keymodeMenu
+ },
+ key: {
+ type: type.ParameterType.STRING,
+ default: 'score',
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v = args.v1;
+ if( typeof v !== 'object' )
+ v = JSON.parse( v );
+
+ switch( args.type ){
+ case 'null':
+ return returnType(
+ v.sort() ,
+ args.return_type
+ );
+
+ case 'up':
+ if(args.key === ''){
+ return returnType(
+ v.sort((a,b)=>{
+ return a-b;
+ }) ,
+ args.return_type
+ );
+ }
+ return returnType(
+ v.sort((a,b)=>{
+ return (
+ get_value_for_sort( a, args.keymode, args.key )
+ -
+ get_value_for_sort( b, args.keymode, args.key )
+ );
+ }) ,
+ args.return_type
+ );
+
+ case 'down':
+ if(args.key === ''){
+ return returnType(
+ v.sort((a,b)=>{
+ return b-a;
+ }) ,
+ args.return_type
+ );
+ }
+ return returnType(
+ v.sort((a,b)=>{
+ return (
+ get_value_for_sort( b, args.keymode, args.key )
+ -
+ get_value_for_sort( a, args.keymode, args.key )
+ );
+ }) ,
+ args.return_type
+ );
+ }
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+
+]);}
diff --git a/categorys/codingExtensionDebug.js b/categorys/codingExtensionDebug.js
new file mode 100644
index 0000000..5bc4d58
--- /dev/null
+++ b/categorys/codingExtensionDebug.js
@@ -0,0 +1,55 @@
+// 写扩展时测试用的
+
+const { type, api } = require('clipcc-extension');
+const vm = api.getVmInstance();
+
+const {
+ my_log_block_error
+} = require('../myjs/tools.js');
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.printvm`,
+ messageId: `print vm`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ function: (args,util)=>{
+ console.log('vm')
+ console.log( api.getVmInstance() )
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.printutil`,
+ messageId: `print util`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ function: (args,util)=>{
+ console.log('util')
+ console.log(util)
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.eval`,
+ messageId: `eval[v]`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v:{
+ type: type.ParameterType.STRING,
+ default: ' '
+ }
+ },
+ function: (args,util)=>{
+ try{
+ return eval(args.v)
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+
+]);}
diff --git a/categorys/convenient.js b/categorys/convenient.js
new file mode 100644
index 0000000..c0ba44b
--- /dev/null
+++ b/categorys/convenient.js
@@ -0,0 +1,977 @@
+const { type, api } = require('clipcc-extension');
+
+/**@type {any}*/
+const vm = api.getVmInstance();
+
+const {
+ my_log_block_error,
+ returnType,
+ to_scratch_boolean,
+ get_var_obj_from_sprite_name,
+ to_scratch_type,
+ get_sprite_target,
+} = require('../myjs/tools.js');
+
+const {
+ sprite_type_menu,
+ scratch_var_type_menu,
+ setOperatorMenu,
+ sprite_info_menu,
+ allowed_sprite_info_names,
+ set_sprite_info_menu,
+ allowed_set_sprite_info_names,
+ sprite_effect_names,
+ sprite_effect_names_menu,
+ sprite_costume_info_names_menu,
+ sprite_costume_info_names,
+ sprite_sound_info_names_menu,
+ sprite_sound_info_names,
+ sprites_name_menu
+} = require('../myjs/menus.js');
+
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.ternary_operator`,
+ messageId: `${category_id}.ternary_operator`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ b: {
+ type: type.ParameterType.BOOLEAN
+ },
+ t: {
+ type: type.ParameterType.STRING,
+ default: 'is true'
+ },
+ f: {
+ type: type.ParameterType.STRING,
+ default: 'is false'
+ },
+ },
+ function: (args,util)=> to_scratch_boolean(args.b) ? args.t : args.f
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.clipboard_writeText`,
+ messageId: `${category_id}.clipboard_writeText`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ // 仅表示成功创建对象。由于该函数是异步执行,所以无法直接返回是否成功复制。
+ return !!window.navigator?.clipboard?.writeText( String(args.v1) );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.none_cmd_block`,
+ messageId: `${category_id}.none_cmd_block`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: ' '
+ },
+ },
+ function: undefined //特性
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.never_gonna_give_you_start`,
+ messageId: `${category_id}.never_gonna_give_you_start`,
+ categoryId: category_id,
+ type: type.BlockType.HAT,
+ function: ()=>false
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.never_gonna_let_you_stop`,
+ messageId: `${category_id}.never_gonna_let_you_stop`,
+ categoryId: category_id,
+ type: type.BlockType.HAT,
+ function: undefined //特性
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.hat_when_is_true`,
+ messageId: `${category_id}.hat_when_is_true`,
+ categoryId: category_id,
+ type: type.BlockType.HAT,
+ param:{
+ b: {
+ type: type.ParameterType.BOOLEAN
+ },
+ },
+ function: (args,util)=> to_scratch_boolean(args.b)
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.hat_when_becomes_true`,
+ messageId: `${category_id}.hat_when_becomes_true`,
+ categoryId: category_id,
+ type: type.BlockType.HAT,
+ param:{
+ b: {
+ type: type.ParameterType.BOOLEAN
+ },
+ },
+ function: (args,util)=>{
+ try{
+ const block = util.target.blocks._blocks[ util.currentBlock.id ];
+ //修复直接在积木栏单击会报错的问题
+ if (block === undefined) return;
+
+ let bool = to_scratch_boolean( args.b );
+
+ if(bool !== block.bddjr_toolbox_v2_HatOldValue){
+ // 如果不存在,会返回undefined,因此只需把这个放在前面,无需检查是否存在这个键。
+ if( block.bddjr_toolbox_v2_HatOldValue === false ){
+ block.bddjr_toolbox_v2_HatOldValue = bool;
+ return true;
+ }
+ block.bddjr_toolbox_v2_HatOldValue = bool;
+ }
+ }catch(e){
+ my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ return false;
+ }
+ },
+//===========================================================
+ {//2.0.0 bug:如果值不断变化,并不会不断触发。不打算修复。
+ opcode: `${category_id}.hat_when_change`,
+ messageId: `${category_id}.hat_when_change`,
+ categoryId: category_id,
+ type: type.BlockType.HAT,
+ param:{
+ v: {
+ type: type.ParameterType.STRING,
+ default: ' '
+ },
+ },
+ function: (args,util)=>{
+ try{
+ const block = util.target.blocks._blocks[ util.currentBlock.id ];
+ //修复直接在积木栏单击会报错的问题
+ if (block === undefined) return;
+
+ if( args.v !== block.bddjr_toolbox_v2_HatOldValue ){
+ // 原值也可能是 undefined ,所以要真正判断是否存在
+ if(block.hasOwnProperty("bddjr_toolbox_v2_HatOldValue")){
+ block.bddjr_toolbox_v2_HatOldValue = args.v;
+ return true;
+ }
+ block.bddjr_toolbox_v2_HatOldValue = args.v;
+ }
+ }catch(e){
+ my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ return false;
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.timestamp`,
+ messageId: `${category_id}.timestamp`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: ()=> Date.now()
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.userAgent`,
+ messageId: `${category_id}.userAgent`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: ()=> navigator.userAgent
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.html_language`,
+ messageId: `${category_id}.html_language`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: ()=> navigator.language
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.onLine`,
+ messageId: `${category_id}.onLine`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ function: ()=> navigator.onLine
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.block_id`,
+ messageId: `${category_id}.block_id`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: (args,util)=> util.currentBlock.id
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.isStage`,
+ messageId: `${category_id}.isStage`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ function: (args,util)=> util.target.isStage
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.clone_number`,
+ messageId: `${category_id}.clone_number`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: (args,util) => {
+ // 角色本体始终在0的位置
+ if( util.target.isOriginal ){
+ return 0
+ }
+ // 这个不能缓存,会出bug
+ const Clones = util.target.sprite.clones;
+ for(let i in Clones){
+ if (Clones[i].id === util.target.id){
+ return i
+ }
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.sprite_clone_counter`,
+ messageId: `${category_id}.sprite_clone_counter`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ },
+ function: (args,util) => {
+ try{
+ return get_sprite_target( util, args.sprite_type, args.sprite_name ).sprite.clones.length -1
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.project_clone_counter`,
+ messageId: `${category_id}.project_clone_counter`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: (args,util)=> util.runtime._cloneCounter
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.isOriginal`,
+ messageId: `${category_id}.isOriginal`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ function: (args,util)=> util.target.isOriginal
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.is_clone`,
+ messageId: `${category_id}.is_clone`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ function: (args,util)=> !util.target.isOriginal
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.change_broadcast_msg_name`,
+ messageId: `${category_id}.change_broadcast_msg_name`,
+ categoryId: category_id,
+ type: undefined,
+ param:{
+ v1:{
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: ()=>{
+ const a = [];
+ for( let i of Object.values(vm.runtime.targets[0].variables) ){
+ if(i.type === 'broadcast_msg'){
+ a.push([i.name, i.id])
+ }
+ }
+
+ if( a.length <1 ){
+ return [['','']];
+ }
+ return a;
+ }
+ },
+ v2:{
+ type: type.ParameterType.STRING,
+ default: 'msg_name',
+ }
+ },
+ function: (args,util)=>{
+ let var_obj = util.runtime.targets[0].variables[ args.v1 ];
+ let v2 = String(args.v2);
+ if(
+ var_obj !== undefined //这个消息存在
+ &&
+ v2 !== '' //v2不是空字符串
+ &&
+ var_obj.type === 'broadcast_msg' //防止错误输入造成风险
+ &&
+ window.confirm("你确定要修改广播名称吗?") //弹窗确认
+ ){
+ var_obj.value = var_obj.name = v2;
+ return true;
+ }
+ return false;
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_scratch_var`,
+ messageId: `${category_id}.get_scratch_var`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ type: {
+ type: type.ParameterType.STRING,
+ default: 'var',
+ menu: scratch_var_type_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let a;
+ switch( args.type ){
+ case 'list':
+ a = get_var_obj_from_sprite_name(
+ util,
+ args.sprite_type,
+ args.sprite_name,
+ 'list',
+ args.name
+ );
+ if( a === undefined )
+ throw `Can not get list from sprite_type:${args.sprite_type} sprite_name:${args.sprite_name} name:${args.name}`;
+ return JSON.stringify(a.value);
+ case 'var':
+ a = get_var_obj_from_sprite_name(
+ util,
+ args.sprite_type,
+ args.sprite_name,
+ '',
+ args.name
+ );
+ if( a === undefined )
+ throw `Can not get variable from sprite_type:${args.sprite_type} sprite_name:${args.sprite_name} name:${args.name}`;
+ return a.value;
+ }
+ throw 'Not allowed variable type!';
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.set_scratch_var`,
+ messageId: `${category_id}.set_scratch_var`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ operator: {
+ type: type.ParameterType.STRING,
+ default: '=',
+ menu: setOperatorMenu
+ },
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'value'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let a = get_var_obj_from_sprite_name(
+ util,
+ args.sprite_type,
+ args.sprite_name,
+ '',
+ args.name
+ );
+ if( a === undefined ){
+ throw `Can not set variable from sprite_type:${args.sprite_type} sprite_name:${args.sprite_name} name:${args.name}`;
+ }
+
+ let v = a.value;
+ switch( args.operator ){
+ case '=':
+ v = args.v;
+ break;
+ case '+=':
+ v += args.v;
+ break;
+ case '-=':
+ v -= args.v;
+ break;
+ case '*=':
+ v *= args.v;
+ break;
+ case '/=':
+ v /= args.v;
+ break;
+ case '%=':
+ v %= args.v;
+ break;
+ }
+
+ a.value = to_scratch_type( v );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.set_scratch_list`,
+ messageId: `${category_id}.set_scratch_list`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'list name'
+ },
+ v: {
+ type: type.ParameterType.STRING,
+ default: '["hello","world"]'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let a = get_var_obj_from_sprite_name(
+ util,
+ args.sprite_type,
+ args.sprite_name,
+ 'list',
+ args.name
+ );
+ if( a === undefined )
+ throw `Can not set variable from sprite_type:${args.sprite_type} sprite_name:${args.sprite_name} name:${args.name}`;
+
+ let input_value = args.v;
+ if( typeof input_value !== 'object' )
+ input_value = JSON.parse(input_value);
+
+ const set_value = [];
+ for(let i of input_value){
+ set_value.push(
+ to_scratch_type( i )
+ );
+ }
+
+ a.value = set_value;
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_info`,
+ messageId: `${category_id}.get_sprite_info`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ info_name: {
+ type: type.ParameterType.STRING,
+ default: 'id',
+ menu: sprite_info_menu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !allowed_sprite_info_names.includes(args.info_name) ){
+ throw `Not allowed info name ${args.info_name}`;
+ }
+
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+
+ if( args.info_name === 'name' ){
+ return target.sprite.name;
+ }
+ return target[ args.info_name ];
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_info_clone`,
+ messageId: `${category_id}.get_sprite_info_clone`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ clone_number: {
+ type: type.ParameterType.NUMBER,
+ default: '0',
+ },
+ info_name: {
+ type: type.ParameterType.STRING,
+ default: 'id',
+ menu: sprite_info_menu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !allowed_sprite_info_names.includes(args.info_name) ){
+ throw `Not allowed info name ${args.info_name}`;
+ }
+
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name ).sprite.clones[ args.clone_number ];
+
+ if( args.info_name === 'name' ){
+ return target.sprite.name;
+ }
+ if( args.info_name === 'effects' ){
+ return JSON.stringify( target.effects );
+ }
+ return target[ args.info_name ];
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.set_sprite_info`,
+ messageId: `${category_id}.set_sprite_info`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ info_name: {
+ type: type.ParameterType.STRING,
+ default: 'size',
+ menu: set_sprite_info_menu
+ },
+ operator: {
+ type: type.ParameterType.STRING,
+ default: '=',
+ menu: setOperatorMenu
+ },
+ set: {
+ type: type.ParameterType.STRING,
+ default: '100',
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !allowed_set_sprite_info_names.includes(args.info_name) ){
+ throw `Not allowed info name ${args.info_name}`;
+ }
+
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+ let IN = args.info_name;
+ let SET = args.set;
+
+ if( ['draggable', 'visible'].includes( IN ) ){
+ // 布尔值
+ target[ IN ] = to_scratch_boolean( SET );
+ }else if( ['direction', 'size', 'tempo', 'volume', 'x', 'y'].includes( IN ) ){
+ // 数
+ switch( args.operator ){
+ case '=':
+ target[ IN ] = (+SET);
+ break;
+ case '+=':
+ target[ IN ] += (+SET);
+ break;
+ case '-=':
+ target[ IN ] -= (+SET);
+ break;
+ case '*=':
+ target[ IN ] *= (+SET);
+ break;
+ case '/=':
+ target[ IN ] /= (+SET);
+ break;
+ case '%=':
+ target[ IN ] %= (+SET);
+ break;
+ }
+ }else if( IN === 'effects' ){
+ // 特效
+ if( typeof SET !== 'object' ){
+ SET = JSON.parse( SET );
+ }
+ for( let i of sprite_effect_names ){
+ if( SET[i] !== undefined ){
+ target.effects[i] = Number( SET[i] );
+ }
+ }
+ }
+
+ target.updateAllDrawableProperties(); //让scratch更新渲染
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_effect`,
+ messageId: `${category_id}.get_sprite_effect`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ effect_name: {
+ type: type.ParameterType.STRING,
+ default: 'color',
+ menu: sprite_effect_names_menu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !sprite_effect_names.includes( args.effect_name ) ){
+ throw `Not allowed info name ${args.effect_name}`;
+ }
+ return get_sprite_target( util, args.sprite_type, args.sprite_name ).effects[ args.effect_name ];
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.set_sprite_effect`,
+ messageId: `${category_id}.set_sprite_effect`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ effect_name: {
+ type: type.ParameterType.STRING,
+ default: 'color',
+ menu: sprite_effect_names_menu
+ },
+ operator: {
+ type: type.ParameterType.STRING,
+ default: '=',
+ menu: setOperatorMenu
+ },
+ set: {
+ type: type.ParameterType.STRING,
+ default: '100',
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !sprite_effect_names.includes( args.effect_name ) ){
+ throw `Not allowed info name ${args.effect_name}`;
+ }
+
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+ switch( args.operator ){
+ case '=':
+ target.effects[ args.effect_name ] = Number(args.set);
+ break;
+ case '+=':
+ target.effects[ args.effect_name ] += Number(args.set);
+ break;
+ case '-=':
+ target.effects[ args.effect_name ] -= Number(args.set);
+ break;
+ case '*=':
+ target.effects[ args.effect_name ] *= Number(args.set);
+ break;
+ case '/=':
+ target.effects[ args.effect_name ] /= Number(args.set);
+ break;
+ case '%=':
+ target.effects[ args.effect_name ] %= Number(args.set);
+ break;
+ }
+
+ target.updateAllDrawableProperties(); //让scratch更新渲染
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_costume_info`,
+ messageId: `${category_id}.get_sprite_costume_info`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ n: {
+ type: type.ParameterType.NUMBER,
+ default: '1',
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'size',
+ menu: sprite_costume_info_names_menu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( !sprite_costume_info_names.includes( args.name ) ){
+ throw `Not allowed info name ${args.name}`;
+ }
+
+ let r = get_sprite_target( util, args.sprite_type, args.sprite_name ).sprite.costumes_[ args.n -1 ][ args.name ];
+ if( typeof r === 'object' ){
+ return JSON.stringify(r)
+ }
+ return r
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_costumes_counter`,
+ messageId: `${category_id}.get_sprite_costumes_counter`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ },
+ function: (args,util) => {
+ try{
+ return get_sprite_target( util, args.sprite_type, args.sprite_name ).sprite.costumes_.length
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_sound_info`,
+ messageId: `${category_id}.get_sprite_sound_info`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param:{
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ n: {
+ type: type.ParameterType.NUMBER,
+ default: '1',
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'duration',
+ menu: sprite_sound_info_names_menu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let sprite = get_sprite_target( util, args.sprite_type, args.sprite_name ).sprite;
+ let sound = sprite.sounds[ args.n -1 ];
+
+ if( sprite_sound_info_names[0].includes( args.name ) ){
+ return sound[ args.name ]
+ }
+
+ let SP = sprite.soundBank.soundPlayers[ sound.soundId ];
+ if( sprite_sound_info_names[1].includes( args.name ) ){
+ return SP.buffer[ args.name ]
+ }
+ if( sprite_sound_info_names[2].includes( args.name ) ){
+ return SP[ args.name ]
+ }
+
+ throw `Not allowed info name ${args.name}`;
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_sounds_counter`,
+ messageId: `${category_id}.get_sprite_sounds_counter`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'stage',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ },
+ function: (args,util) => {
+ try{
+ return get_sprite_target( util, args.sprite_type, args.sprite_name ).sprite.sounds.length
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+
+]);}
diff --git a/categorys/debug.js b/categorys/debug.js
new file mode 100644
index 0000000..5c12e70
--- /dev/null
+++ b/categorys/debug.js
@@ -0,0 +1,76 @@
+const { type, api } = require('clipcc-extension');
+/**@type {any}*/
+const vm = api.getVmInstance();
+
+const {
+ err_msg
+} = require('../myjs/tools');
+
+const {
+ make_menus
+} = require('../myjs/menus');
+
+/**@param {string} category_id*/
+module.exports = ( category_id )=>{ api.addBlocks([
+ {//2.0.0
+ opcode: `${category_id}.err_msg`,
+ messageId: `${category_id}.err_msg`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: (args,util)=> err_msg[0]
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.vm_toJSON`,
+ messageId: `${category_id}.vm_toJSON`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ function: (args,util)=> vm.toJSON()
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.console`,
+ messageId: `${category_id}.console`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ type: {
+ type: type.ParameterType.STRING,
+ default: 'log',
+ menu: make_menus(
+ '', //`${category_id}.console.menu`,
+ 'log',
+ 'error',
+ 'debug',
+ 'info',
+ 'warn'
+ )
+ },
+ v: {
+ type: type.ParameterType.STRING,
+ default: '"%cHello World!","color: green"'
+ }
+ },
+ function: (args,util)=>{
+ if( ![
+ 'log',
+ 'error',
+ 'debug',
+ 'info',
+ 'warn'
+ ].includes( args.type ) ){
+ return
+ }
+
+ let v = args.v;
+ if( typeof v !== 'object' ){
+ try{
+ v = JSON.parse(`[${v}]`);
+ }catch{}
+ }
+
+ console[ args.type ]( ...v );
+ }
+ },
+
+]);}
diff --git a/categorys/help.js b/categorys/help.js
new file mode 100644
index 0000000..c8490bd
--- /dev/null
+++ b/categorys/help.js
@@ -0,0 +1,17 @@
+const { type, api } = require('clipcc-extension');
+
+/**@param {string} category_id*/
+module.exports = ( category_id )=>{ api.addBlocks([
+ // 创建一个不能被程序触发的积木,点击它就会直接跳转到github仓库地址。
+ {//2.0.0
+ opcode: `${category_id}.jumptogithub`,
+ messageId: `${category_id}.jumptogithub`,
+ categoryId: category_id,
+ type: undefined,
+ function: (args,util)=>{
+ if(window.confirm("你确定要跳转到github吗?")){ //弹窗确认
+ window.open("https://github.com/bddjr/clipcc-extension-bddjr_toolbox_v2");
+ }
+ },
+ },
+]);}
diff --git a/categorys/json.js b/categorys/json.js
new file mode 100644
index 0000000..f85a79e
--- /dev/null
+++ b/categorys/json.js
@@ -0,0 +1,402 @@
+const { type, api } = require('clipcc-extension');
+
+const {
+ my_log_block_error,
+ for_json_get_keys,
+ returnType,
+} = require('../myjs/tools.js');
+
+const {
+ keymodeMenu,
+ myTypeMenu,
+ setOperatorMenu,
+ make_menus
+} = require('../myjs/menus.js');
+
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+ {//2.0.0
+ opcode: `${category_id}.get`,
+ messageId: `${category_id}.get`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '{"key":{"key2":"value"}}'
+ },
+ keymode: {
+ type: type.ParameterType.STRING,
+ default: '.',
+ menu: keymodeMenu
+ },
+ key: {
+ type: type.ParameterType.STRING,
+ default: 'key.key2',
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let thisjson = args.v1;
+ if( typeof thisjson !== 'object' )
+ thisjson = JSON.parse( thisjson );
+ let lastkey;
+ let lastjson;
+
+ // 不包含的keymode会抛出错误
+ let keyslist = for_json_get_keys( args.keymode, args.key );
+
+ if( typeof keyslist === 'number' ){
+ lastkey = keyslist;
+ lastjson = thisjson;
+ thisjson = thisjson[ keyslist ];
+ }else if( args.keymode === 'Array' ){
+ for( let i of keyslist ){
+ if( (+i)<0 && Array.isArray(thisjson) ){
+ // 兼容数组负数下标取值
+ i = thisjson.length + (+i);
+ }
+ lastkey = i;
+ lastjson = thisjson;
+ thisjson = thisjson[ i ];
+ }
+
+ }else{ // args.keymode === '.'
+ if( Array.isArray( keyslist ) ){
+ for( let i of keyslist ){
+ if( Array.isArray( i ) ){
+ if( Array.isArray(thisjson) && (+i[0])<0 ){
+ // 兼容数组负数下标取值
+ i[0] = thisjson.length + (+i[0]);
+ }
+ lastkey = i[0];
+ lastjson = thisjson;
+ thisjson = thisjson[ i[0] ];
+ if( i[1] ==='?.' && !thisjson )
+ break;
+ }else{
+ if( Array.isArray(thisjson) && (+i)<0 ){
+ // 兼容数组负数下标取值
+ i = thisjson.length + (+i);
+ }
+ lastkey = i;
+ lastjson = thisjson;
+ thisjson = thisjson[ i ];
+ }
+ }
+ }else{ // typeof keyslist === 'string'
+ if( Array.isArray(thisjson) && (+keyslist)<0 ){
+ // 兼容数组负数下标取值
+ keyslist = thisjson.length + (+keyslist);
+ }
+ lastkey = keyslist;
+ lastjson = thisjson;
+ thisjson = thisjson[ keyslist ];
+ }
+ }
+
+ return returnType(
+ // 防止返回prototype里的函数
+ lastjson.hasOwnProperty(lastkey) ? thisjson : undefined ,
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+//======================================================================================================================
+ {//2.0.0
+ opcode: `${category_id}.set_value`,
+ messageId: `${category_id}.set_value`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '{"key":{"key2":"value"}}'
+ },
+ keymode: {
+ type: type.ParameterType.STRING,
+ default: '.',
+ menu: keymodeMenu
+ },
+ key: {
+ type: type.ParameterType.STRING,
+ default: 'key.key2',
+ },
+ operator: {
+ type: type.ParameterType.STRING,
+ default: '=',
+ menu: setOperatorMenu
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"Hello World!"',
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let thisjson = args.v1;
+ if( typeof thisjson !== 'object' )
+ thisjson = JSON.parse( thisjson );
+ let globaljson = thisjson;
+
+ // 不包含的keymode会抛出错误
+ let keyslist = for_json_get_keys( args.keymode, args.key );
+
+ let setValue = args.v2;
+ if( typeof setValue === 'string' ){
+ try{
+ setValue = JSON.parse( setValue );
+ }catch{}
+ }
+
+ let setKey;
+
+ if( typeof keyslist === 'number' )
+ setKey = keyslist;
+ else if( args.keymode === 'Array' ){
+ for( let i=0 ; i< keyslist.length-1 ; i++ ){
+ thisjson = thisjson[ keyslist[i] ];
+ }
+ setKey = keyslist.slice(-1);
+ }else{ // args.keymode === '.'
+ if( Array.isArray( keyslist ) ){
+ for( let i of keyslist ){
+ if( Array.isArray( i ) ){
+ thisjson = thisjson[ i[0] ];
+ if( i[1] ==='?.' && !thisjson )
+ break;
+ }else{
+ setKey = i ;
+ }
+ }
+ }else{ // typeof keyslist === 'string'
+ setKey = keyslist;
+ }
+ }
+ switch( args.operator ){
+ case '=':
+ thisjson[setKey] = setValue;
+ break;
+ case '+=':
+ thisjson[setKey] += setValue;
+ break;
+ case '-=':
+ thisjson[setKey] -= setValue;
+ break;
+ case '*=':
+ thisjson[setKey] *= setValue;
+ break;
+ case '/=':
+ thisjson[setKey] /= setValue;
+ break;
+ case '%=':
+ thisjson[setKey] %= setValue;
+ break;
+ default:
+ throw 'Not allowed operator!';
+ }
+ return returnType( globaljson, args.return_type );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+//======================================================================================================================
+ {//2.0.0
+ opcode: `${category_id}.get_keys`,
+ messageId: `${category_id}.get_keys`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '{"k1":"v1","k2":"v2"}'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'keys',
+ menu: make_menus(
+ `${category_id}.get_keys.menu`,
+ 'keys',
+ 'values',
+ 'entries'
+ )
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if(
+ ![
+ 'keys',
+ 'values',
+ 'entries'
+ ].includes(args.v2)
+ ) throw 'Not allowed function name!';
+
+ let thisjson = args.v1;
+ if( typeof thisjson !== 'object' )
+ thisjson = JSON.parse( thisjson );
+ return returnType( Object[ args.v2 ]( thisjson ), args.return_type );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+//======================================================================================================================
+ {//2.0.0
+ opcode: `${category_id}.hasOwnProperty`,
+ messageId: `${category_id}.hasOwnProperty`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '{"key":"value"}'
+ },
+ key: {
+ type: type.ParameterType.STRING,
+ default: 'key'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let thisjson = args.v1;
+ if( typeof thisjson !== 'object' )
+ thisjson = JSON.parse( thisjson );
+ return thisjson.hasOwnProperty( args.key );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+//======================================================================================================================
+ {//2.0.0
+ opcode: `${category_id}.deleteProperty`,
+ messageId: `${category_id}.deleteProperty`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '{"key":{"key2":"value"}}'
+ },
+ keymode: {
+ type: type.ParameterType.STRING,
+ default: '.',
+ menu: keymodeMenu
+ },
+ key: {
+ type: type.ParameterType.STRING,
+ default: 'key.key2',
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let thisjson = args.v1;
+ if( typeof thisjson !== 'object' )
+ thisjson = JSON.parse( thisjson );
+ let globaljson = thisjson;
+
+ // 不包含的keymode会抛出错误
+ let keyslist = for_json_get_keys( args.keymode, args.key );
+
+ let setKey;
+
+ if( typeof keyslist === 'number' )
+ setKey = keyslist;
+ else if( args.keymode === 'Array' ){
+ for( let i=0 ; i< keyslist.length-1 ; i++ ){
+ thisjson = thisjson[ keyslist[i] ];
+ }
+ setKey = keyslist.slice(-1);
+ }else{ // args.keymode === '.'
+ if( Array.isArray( keyslist ) ){
+ for( let i of keyslist ){
+ if( Array.isArray( i ) ){
+ thisjson = thisjson[ i[0] ];
+ if( i[1] ==='?.' && !thisjson )
+ break;
+ }else{
+ setKey = i ;
+ }
+ }
+ }else{ // typeof keyslist === 'string'
+ setKey = keyslist;
+ }
+ }
+ Reflect.deleteProperty( thisjson, setKey );
+ return returnType( globaljson, args.return_type );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+//======================================================================================================================
+ {//2.0.0
+ opcode: `${category_id}.parse`,
+ messageId: `${category_id}.parse`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '{"key":"value"}'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return JSON.parse( args.v1 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+//======================================================================================================================
+ {//2.0.0
+ opcode: `${category_id}.stringify`,
+ messageId: `${category_id}.stringify`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return JSON.stringify( args.v1 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ },
+ },
+
+]);}
diff --git a/categorys/reg_exp.js b/categorys/reg_exp.js
new file mode 100644
index 0000000..a261476
--- /dev/null
+++ b/categorys/reg_exp.js
@@ -0,0 +1,340 @@
+const { type, api } = require('clipcc-extension');
+
+const {
+ my_log_block_error,
+ returnType,
+} = require('../myjs/tools.js');
+
+const {
+ myTypeMenu, make_menus
+} = require('../myjs/menus.js');
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+ {//2.0.0
+ opcode: `${category_id}.new_RegExp`,
+ messageId: `${category_id}.new_RegExp`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: '^#[0-9a-fA-F]{6}$'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'g'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return new RegExp( args.v1, args.v2 ) ;
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.test`,
+ messageId: `${category_id}.test`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: undefined,
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '#00a5e6'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return args.v1.test( args.v2 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.exec`,
+ messageId: `${category_id}.exec`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined,
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '#00a5e6'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'string',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return returnType(
+ args.v1.exec( args.v2 ),
+ args.return_type,
+ false
+ );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.search`,
+ messageId: `${category_id}.search`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'World'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ return args.v1.search( args.v2 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.replace`,
+ messageId: `${category_id}.replace`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World! Hello World!'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'World'
+ },
+ v3: {
+ type: type.ParameterType.STRING,
+ default: 'ClipCC'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ return args.v1.replace( args.v2, args.v3 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.replaceAll`,
+ messageId: `${category_id}.replaceAll`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World! Hello World!'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'World'
+ },
+ v3: {
+ type: type.ParameterType.STRING,
+ default: 'ClipCC'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ return args.v1.replaceAll( args.v2, args.v3 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.split`,
+ messageId: `${category_id}.split`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'apple banana cat'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '" "'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v2 = args.v2;
+ if( typeof v2 === 'string' ){
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+ }
+
+ return returnType(
+ args.v1.split( v2 ),
+ args.return_type
+ );
+
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.match`,
+ messageId: `${category_id}.match`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: '#00a5e6#00a5e6#00a5e6'
+ },
+ type: {
+ type: type.ParameterType.STRING,
+ default: 'match',
+ menu: make_menus(
+ `${category_id}.match.menu`,
+ 'match',
+ 'begin',
+ 'ending',
+ 'begin&ending',
+ 'match&begin',
+ 'match&ending',
+ 'match&begin&ending'
+ )
+ },
+ RegExp: {
+ type: type.ParameterType.STRING,
+ default: '#00a5e6'
+ },
+ max_length: {
+ type: type.ParameterType.NUMBER,
+ default: 'Infinity'
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v = String(args.v);
+
+ let ML = args.max_length;
+ if( ML ==='' ){
+ ML = Infinity;
+ }else{
+ ML = (+ML);
+ if( ML<0 || Number.isNaN(ML) ){
+ ML = Infinity;
+ }
+ }
+
+ let RE = args.RegExp;
+
+ const MATCH = v.match( RE );
+ if( args.type === 'match' ){
+ return returnType(
+ MATCH ? MATCH.slice(0, ML) : [] ,
+ args.return_type
+ );
+ }
+
+ let RETURN = [];
+
+ let i = 0;
+ switch( args.type ){
+ case 'begin':
+ while( RE.test(v) && i{ api.addBlocks([
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.new_Set`,
+ messageId: `${category_id}.new_Set`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'strings'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return new Set(args.v1);
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.size`,
+ messageId: `${category_id}.size`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return args.v1.size;
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.add`,
+ messageId: `${category_id}.add`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"apple"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ args.v1.add(v2);
+ return args.v1;
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.clear`,
+ messageId: `${category_id}.clear`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined
+ },
+ },
+ function: (args,util)=>{
+ try{
+ args.v1.clear();
+ return args.v1;
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.delete`,
+ messageId: `${category_id}.delete`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"apple"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ args.v1.delete(v2);
+ return args.v1;
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.delete_success`,
+ messageId: `${category_id}.delete_success`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: undefined
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"apple"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return args.v1.delete(v2);
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.has`,
+ messageId: `${category_id}.has`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: undefined
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: '"apple"'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let v2 = args.v2;
+ if( typeof v2 !== 'object' )
+ try{
+ v2 = JSON.parse( v2 );
+ }catch{}
+
+ return args.v1.has(v2);
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.to_array`,
+ messageId: `${category_id}.to_array`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return returnType(
+ Array.from( args.v1 ),
+ args.return_type
+ );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.entries_to_array`,
+ messageId: `${category_id}.entries_to_array`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v1: {
+ type: undefined
+ },
+ return_type: {
+ type: type.ParameterType.STRING,
+ default: 'ScratchType',
+ menu: myTypeMenu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ return returnType(
+ Array.from( args.v1.entries() ),
+ args.return_type
+ );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+
+]);}
diff --git a/categorys/string_and_type.js b/categorys/string_and_type.js
new file mode 100644
index 0000000..96d68b1
--- /dev/null
+++ b/categorys/string_and_type.js
@@ -0,0 +1,546 @@
+const { type, api } = require('clipcc-extension');
+
+const {
+ my_log_block_error,
+ to_scratch_type,
+ to_scratch_boolean,
+} = require('../myjs/tools.js');
+
+const {
+ make_menus
+} = require('../myjs/menus.js');
+
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+ {//2.0.0
+ opcode: `${category_id}.double_quotation_marks`,
+ messageId: `${category_id}.double_quotation_marks`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ return JSON.stringify( String(args.v) );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode , e );
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.remove_double_quotes`,
+ messageId: `${category_id}.remove_double_quotes`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: '"Hello\\nWorld!"'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ return String( JSON.parse( String(args.v) ) );
+ }catch{
+ return String(args.v);
+ }
+ },
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.typeof`,
+ messageId: `${category_id}.typeof`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: undefined,
+ }
+ },
+ function: (args,util)=> typeof args.v
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.is_array`,
+ messageId: `${category_id}.is_array`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v: {
+ type: undefined,
+ }
+ },
+ function: (args,util)=> Array.isArray( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.is_NaN`,
+ messageId: `${category_id}.is_NaN`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v: {
+ type: type.ParameterType.NUMBER,
+ default: '0'
+ }
+ },
+ function: (args,util)=> Number.isNaN( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.string`,
+ messageId: `${category_id}.string`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'string'
+ }
+ },
+ function: (args,util)=> String( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.number`,
+ messageId: `${category_id}.number`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: '123456'
+ }
+ },
+ function: (args,util)=> Number( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.to_scratch_allowed_type`,
+ messageId: `${category_id}.to_scratch_allowed_type`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: ' '
+ }
+ },
+ function: (args,util)=> to_scratch_type( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.string_slice`,
+ messageId: `${category_id}.string_slice`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '0'
+ },
+ n2: {
+ type: type.ParameterType.NUMBER,
+ default: '-1'
+ },
+ },
+ function: (args,util)=> String( args.v ).slice(
+ args.n1 ,
+ args.n2==='' ? undefined : args.n2
+ )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.return_for_reporter`,
+ messageId: `${category_id}.return`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ }
+ },
+ function: (args,util)=> args.v
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.return_for_reporter_color`,
+ messageId: `${category_id}.return`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.COLOR,
+ default: '#4c97ff'
+ }
+ },
+ function: (args,util)=> args.v
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.return_for_boolean`,
+ messageId: `${category_id}.return`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ }
+ },
+ function: (args,util)=> args.v
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.to_scratch_boolean`,
+ messageId: `${category_id}.to_scratch_boolean`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'false'
+ }
+ },
+ function: (args,util)=> to_scratch_boolean( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.to_js_boolean`,
+ messageId: `${category_id}.to_js_boolean`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'false'
+ }
+ },
+ function: (args,util)=> Boolean( args.v )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.==`,
+ messageId: '[v1] == [v2]',
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'abc'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'ABC'
+ },
+ },
+ function: (args,util)=> ( args.v1 == args.v2 )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.!=`,
+ messageId: '[v1] != [v2]',
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'abc'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'ABC'
+ },
+ },
+ function: (args,util)=> ( args.v1 != args.v2 )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.===`,
+ messageId: '[v1] === [v2]',
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'abc'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'ABC'
+ },
+ },
+ function: (args,util)=> ( args.v1 === args.v2 )
+ },
+//===========================================================
+ {
+ opcode: `${category_id}.!==`,
+ messageId: '[v1] !== [v2]',
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ v1: {
+ type: type.ParameterType.STRING,
+ default: 'abc'
+ },
+ v2: {
+ type: type.ParameterType.STRING,
+ default: 'ABC'
+ },
+ },
+ function: (args,util)=> ( args.v1 !== args.v2 )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.integer_toString`,
+ messageId: `${category_id}.integer_toString`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: '500'
+ },
+ count: {
+ type: type.ParameterType.NUMBER,
+ default: '36'
+ },
+ },
+ function: (args,util)=> {
+ try{
+ return Number(args.v).toString( args.count );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.string_parseInt`,
+ messageId: `${category_id}.string_parseInt`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'dw'
+ },
+ count: {
+ type: type.ParameterType.NUMBER,
+ default: '36'
+ },
+ },
+ function: (args,util)=>{
+ if( args.count =='' ) return Number.parseInt( args.v );
+ return Number.parseInt( args.v, args.count )
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.string_trim`,
+ messageId: `${category_id}.string_trim`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: ' Hello World! '
+ },
+ menu: {
+ type: type.ParameterType.STRING,
+ default: 'trim',
+ menu: make_menus(
+ `${category_id}.string_trim.menu`,
+ 'trim',
+ 'trimStart',
+ 'trimEnd'
+ ),
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( ['trim', 'trimStart', 'trimEnd'].includes( args.menu ) ){
+ // @ts-ignore
+ return String( args.v )[ args.menu ]();
+ }
+ throw 'Not allowed function name';
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.text_to_url`,
+ messageId: `${category_id}.text_to_url`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'https://codingclip.com'
+ },
+ menu: {
+ type: type.ParameterType.STRING,
+ default: 'encodeURIComponent',
+ menu: make_menus(
+ `${category_id}.text_to_url.menu`,
+ 'encodeURIComponent',
+ 'escape',
+ 'encodeURI'
+ ),
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( ['encodeURIComponent', 'escape', 'encodeURI'].includes( args.menu ) ){
+ // @ts-ignore
+ return window[ args.menu ]( args.v );
+ }
+ throw 'Not allowed function name';
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.url_to_text`,
+ messageId: `${category_id}.url_to_text`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'https%3A%2F%2Fcodingclip.com'
+ },
+ menu: {
+ type: type.ParameterType.STRING,
+ default: 'decodeURIComponent',
+ menu: make_menus(
+ `${category_id}.url_to_text.menu`,
+ 'decodeURIComponent',
+ 'unescape',
+ 'decodeURI'
+ ),
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( ['decodeURIComponent', 'unescape', 'decodeURI'].includes( args.menu ) ){
+ // @ts-ignore
+ return window[ args.menu ]( args.v );
+ }
+ throw 'Not allowed function name';
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.to_upper_or_lower_case`,
+ messageId: `${category_id}.to_upper_or_lower_case`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ },
+ menu: {
+ type: type.ParameterType.STRING,
+ default: 'toUpperCase',
+ menu: make_menus(
+ `${category_id}.to_upper_or_lower_case.menu`,
+ 'toUpperCase',
+ 'toLowerCase'
+ ),
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( ['toUpperCase', 'toLowerCase'].includes( args.menu ) ){
+ // @ts-ignore
+ return String( args.v )[ args.menu ]();
+ }
+ throw 'Not allowed function name';
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.charCodeAt`,
+ messageId: `${category_id}.charCodeAt`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'Hello World!'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '0'
+ }
+ },
+ function: (args,util)=>{
+ try{
+ let n1 = Number( args.n1 );
+ if( n1 <0 ){
+ let s = String( args.v );
+ return s.charCodeAt( s.length + n1 );
+ }
+ return String( args.v ).charCodeAt( args.n1 );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e );
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.string_fromCharCode`,
+ messageId: `${category_id}.string_fromCharCode`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '97'
+ }
+ },
+ function: (args,util)=> String.fromCharCode( args.n1 )
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.repeat`,
+ messageId: `${category_id}.repeat`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ v: {
+ type: type.ParameterType.STRING,
+ default: '哦'
+ },
+ n1: {
+ type: type.ParameterType.NUMBER,
+ default: '2'
+ }
+ },
+ function: (args,util)=> String( args.v ).repeat( args.n1 )
+ },
+
+]);}
diff --git a/categorys/temp_var.js b/categorys/temp_var.js
new file mode 100644
index 0000000..2761807
--- /dev/null
+++ b/categorys/temp_var.js
@@ -0,0 +1,371 @@
+const { type, api } = require('clipcc-extension');
+
+const {
+ my_log_block_error,
+ get_sprite_target
+} = require('../myjs/tools');
+
+const {
+ setOperatorMenu,
+ sprite_type_menu,
+ sprites_name_menu
+} = require('../myjs/menus');
+
+
+//2.0.0
+function clear_all_var( util ){
+ util.bddjr_toolbox_v2_temp_var = {}
+}
+
+//2.0.0
+function if_undefined_clear( util ){
+ if( util.bddjr_toolbox_v2_temp_var === undefined ){
+ clear_all_var(util)
+ }
+}
+
+//2.0.0
+/**
+ *
+ * @param {string} sprite_type
+ * @param {string} sprite_name
+ */
+function clear_sprite_all( util, sprite_type, sprite_name ){
+ get_sprite_target( util, sprite_type, sprite_name ).bddjr_toolbox_v2_temp_var = {}
+}
+
+//2.0.0
+function if_undefined_clear_sprite( target ){
+ if( target.bddjr_toolbox_v2_temp_var === undefined ){
+ target.bddjr_toolbox_v2_temp_var = {}
+ }
+}
+
+
+
+/** @param {string} category_id */
+module.exports = ( category_id )=>{ api.addBlocks([
+ {//2.0.0
+ opcode: `${category_id}.clear_all`,
+ messageId: `${category_id}.clear_all`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ function: (args,util)=> clear_all_var(util)
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.set_value`,
+ messageId: `${category_id}.set_value`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ operator: {
+ type: type.ParameterType.STRING,
+ default: '=',
+ menu: setOperatorMenu
+ },
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'value'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if_undefined_clear(util);
+ switch( args.operator ){
+ case '=':
+ util.bddjr_toolbox_v2_temp_var[ args.name ] = args.v;
+ break;
+ case '+=':
+ util.bddjr_toolbox_v2_temp_var[ args.name ] += args.v;
+ break;
+ case '-=':
+ util.bddjr_toolbox_v2_temp_var[ args.name ] -= args.v;
+ break;
+ case '*=':
+ util.bddjr_toolbox_v2_temp_var[ args.name ] *= args.v;
+ break;
+ case '/=':
+ util.bddjr_toolbox_v2_temp_var[ args.name ] /= args.v;
+ break;
+ case '%=':
+ util.bddjr_toolbox_v2_temp_var[ args.name ] %= args.v;
+ break;
+ }
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_value`,
+ messageId: `${category_id}.get_value`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( util.bddjr_toolbox_v2_temp_var === undefined ){
+ return undefined
+ }
+ return util.bddjr_toolbox_v2_temp_var[ args.name ];
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.delete_var`,
+ messageId: `${category_id}.delete_var`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( util.bddjr_toolbox_v2_temp_var !== undefined ){
+ Reflect.deleteProperty(
+ util.bddjr_toolbox_v2_temp_var ,
+ args.name
+ );
+ }
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.var_exist`,
+ messageId: `${category_id}.var_exist`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ if( util.bddjr_toolbox_v2_temp_var === undefined ){
+ return false
+ }
+ return util.bddjr_toolbox_v2_temp_var.hasOwnProperty( args.name );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.clear_sprite_all`,
+ messageId: `${category_id}.clear_sprite_all`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'thisClone',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ },
+ function: (args,util)=>{
+ try{
+ clear_sprite_all( util, args.sprite_type, args.sprite_name );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.set_sprite_var_value`,
+ messageId: `${category_id}.set_sprite_var_value`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'thisClone',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ operator: {
+ type: type.ParameterType.STRING,
+ default: '=',
+ menu: setOperatorMenu
+ },
+ v: {
+ type: type.ParameterType.STRING,
+ default: 'value'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+ if_undefined_clear_sprite( target );
+ switch( args.operator ){
+ case '=':
+ target.bddjr_toolbox_v2_temp_var[ args.name ] = args.v;
+ break;
+ case '+=':
+ target.bddjr_toolbox_v2_temp_var[ args.name ] += args.v;
+ break;
+ case '-=':
+ target.bddjr_toolbox_v2_temp_var[ args.name ] -= args.v;
+ break;
+ case '*=':
+ target.bddjr_toolbox_v2_temp_var[ args.name ] *= args.v;
+ break;
+ case '/=':
+ target.bddjr_toolbox_v2_temp_var[ args.name ] /= args.v;
+ break;
+ case '%=':
+ target.bddjr_toolbox_v2_temp_var[ args.name ] %= args.v;
+ break;
+ }
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.get_sprite_var_value`,
+ messageId: `${category_id}.get_sprite_var_value`,
+ categoryId: category_id,
+ type: type.BlockType.REPORTER,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'thisClone',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+ if( target.bddjr_toolbox_v2_temp_var === undefined ){
+ return undefined
+ }
+ return target.bddjr_toolbox_v2_temp_var[ args.name ];
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.delete_sprite_var`,
+ messageId: `${category_id}.delete_sprite_var`,
+ categoryId: category_id,
+ type: type.BlockType.COMMAND,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'thisClone',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+ if( target.bddjr_toolbox_v2_temp_var !== undefined ){
+ Reflect.deleteProperty(
+ target.bddjr_toolbox_v2_temp_var ,
+ args.name
+ );
+ }
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+//===========================================================
+ {//2.0.0
+ opcode: `${category_id}.sprite_var_exist`,
+ messageId: `${category_id}.sprite_var_exist`,
+ categoryId: category_id,
+ type: type.BlockType.BOOLEAN,
+ param: {
+ sprite_type: {
+ type: type.ParameterType.STRING,
+ default: 'thisClone',
+ menu: sprite_type_menu
+ },
+ sprite_name: {
+ type: type.ParameterType.STRING,
+ default: '',
+ // @ts-ignore
+ menu: sprites_name_menu
+ },
+ name: {
+ type: type.ParameterType.STRING,
+ default: 'variable name'
+ },
+ },
+ function: (args,util)=>{
+ try{
+ let target = get_sprite_target( util, args.sprite_type, args.sprite_name );
+ if( target.bddjr_toolbox_v2_temp_var === undefined ){
+ return false
+ }
+ return target.bddjr_toolbox_v2_temp_var.hasOwnProperty( args.name );
+ }catch(e){
+ return my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ }
+ }
+ },
+
+]);}
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..a8dc34c
--- /dev/null
+++ b/index.js
@@ -0,0 +1,67 @@
+const { Extension, type, api } = require('clipcc-extension');
+//const gui = api.getGuiInstance();
+//const vm = api.getVmInstance();
+
+// 编辑器返回对象,播放器返回null
+//const Block = api.getBlockInstance();
+
+/**@type {string}*/
+const extension_id = require('./myjs/extension_id.js');
+
+/**
+ * require for import category
+ * @param {string} category_name
+ */
+function myRFIC( category_name ){//2.0.0
+ return require(`./categorys/${category_name}.js`);
+}
+
+const categorys = {//2.0.0
+ // 仅供编写扩展时的调试,请在写完后注释掉下面这行。
+ //codingExtensionDebug: myRFIC('codingExtensionDebug'),
+
+ help: myRFIC('help'),
+ string_and_type: myRFIC('string_and_type'),
+ json: myRFIC('json'),
+ array: myRFIC('array'),
+ reg_exp: myRFIC('reg_exp'),
+ convenient: myRFIC('convenient'),
+ temp_var: myRFIC('temp_var'),
+ set: myRFIC('set'),
+ debug: myRFIC('debug'),
+};
+
+
+/**@type {string[]}*/
+const categorys_id = [];//2.0.0
+for( let i of Object.keys(categorys) ){//2.0.0
+ categorys_id.push(`${extension_id}.${i}`);
+}
+
+
+function my_onUninit(){//2.0.0
+ for( let i of categorys_id ){
+ api.removeCategory( i );
+ }
+}
+
+module.exports = class extends Extension {
+ onUninit(){//2.0.0
+ my_onUninit();
+ }
+
+ onInit() {//2.0.0
+ // 修复再次加载作品导致积木重复的bug
+ my_onUninit();
+
+ for( let i in categorys ){
+ let category_id = `${extension_id}.${i}`;
+ api.addCategory({
+ categoryId: category_id,
+ messageId: category_id,
+ color: '#00a5e6',
+ });
+ categorys[i]( category_id );
+ }
+ }
+}
diff --git a/info.json b/info.json
new file mode 100644
index 0000000..87d7496
--- /dev/null
+++ b/info.json
@@ -0,0 +1,8 @@
+{
+ "id": "bddjr.toolbox_v2",
+ "author": "bddjr",
+ "version": "2.0.0.pre1",
+ "icon": "assets/icon.webp",
+ "inset_icon": "assets/inset_icon.svg",
+ "api": 1
+}
\ No newline at end of file
diff --git a/locales/en.json b/locales/en.json
new file mode 100644
index 0000000..ecbfd04
--- /dev/null
+++ b/locales/en.json
@@ -0,0 +1,245 @@
+{
+
+"name": "bddjr toolbox v2",
+"description": "bddjr toolbox v2",
+
+
+"typemenu.default": "⚠⚠Object⚠⚠ default",
+"typemenu.ScratchType": "ScratchType",
+"typemenu.string": "string",
+"typemenu.boolean": "boolean",
+"typemenu.number": "⚠⚠NaN⚠⚠ number",
+"typemenu.integer": "⚠⚠NaN⚠⚠ integer",
+"typemenu.ScratchBoolean": "ScratchBoolean",
+
+"sprite_type_menu.stage": "stage",
+"sprite_type_menu.sprite": "sprite",
+"sprite_type_menu.thisSprite": "thisSprite",
+"sprite_type_menu.thisClone": "thisClone",
+"sprite_type_menu.id": "id",
+"sprite_type_menu.drawableID": "drawableID",
+
+"scratch_var_type_menu.var": "variable",
+"scratch_var_type_menu.list": "list",
+
+"sprite_info_menu.name": "name",
+"sprite_info_menu.id": "id",
+"sprite_info_menu.drawableID": "drawableID",
+"sprite_info_menu.effects": "effects",
+"sprite_info_menu.direction": "direction",
+"sprite_info_menu.rotationStyle": "rotationStyle",
+"sprite_info_menu.size": "size",
+"sprite_info_menu.tempo": "tempo",
+"sprite_info_menu.volume": "volume",
+"sprite_info_menu.x": "x",
+"sprite_info_menu.y": "y",
+"sprite_info_menu.deprecatedCache": "deprecatedCache",
+"sprite_info_menu.draggable": "draggable",
+"sprite_info_menu.dragging": "dragging",
+"sprite_info_menu.isOriginal": "isOriginal",
+"sprite_info_menu.visible": "visible",
+"sprite_info_menu.isStage": "isStage",
+
+"sprite_effect_names_menu.color": "color",
+"sprite_effect_names_menu.fisheye": "fisheye",
+"sprite_effect_names_menu.whirl": "whirl",
+"sprite_effect_names_menu.pixelate": "pixelate",
+"sprite_effect_names_menu.mosaic": "mosaic",
+"sprite_effect_names_menu.brightness": "brightness",
+"sprite_effect_names_menu.ghost": "ghost",
+
+"keymodemenu.Array": "Array",
+
+"sprite_costume_info_names_menu.assetId": "assetId",
+"sprite_costume_info_names_menu.bitmapResolution": "bitmapResolution",
+"sprite_costume_info_names_menu.dataFormat": "dataFormat",
+"sprite_costume_info_names_menu.md5": "md5",
+"sprite_costume_info_names_menu.name": "name",
+"sprite_costume_info_names_menu.rotationCenterX": "rotationCenterX",
+"sprite_costume_info_names_menu.rotationCenterY": "rotationCenterY",
+"sprite_costume_info_names_menu.size": "size",
+"sprite_costume_info_names_menu.skinId": "skinId",
+
+"sprite_sound_info_names_menu.assetId": "assetId",
+"sprite_sound_info_names_menu.dataFormat": "dataFormat",
+"sprite_sound_info_names_menu.format": "format",
+"sprite_sound_info_names_menu.md5": "md5",
+"sprite_sound_info_names_menu.name": "name",
+"sprite_sound_info_names_menu.rate": "rate",
+"sprite_sound_info_names_menu.sampleCount": "sampleCount",
+"sprite_sound_info_names_menu.soundId": "soundId",
+"sprite_sound_info_names_menu.duration": "duration",
+"sprite_sound_info_names_menu.length": "length",
+"sprite_sound_info_names_menu.numberOfChannels": "numberOfChannels",
+"sprite_sound_info_names_menu.sampleRate" :"sampleRate",
+"sprite_sound_info_names_menu.initialized": "initialized",
+"sprite_sound_info_names_menu.isPlaying": "isPlaying",
+"sprite_sound_info_names_menu.playbackRate": "playbackRate",
+"sprite_sound_info_names_menu.startingUntil": "startingUntil",
+"sprite_sound_info_names_menu.isStarting": "isStarting",
+
+
+
+
+"help": "BTBv2 help",
+"help.jumptogithub": "Click here jump to github",
+
+
+"string_and_type": "BTBv2 string and type",
+"string_and_type.double_quotation_marks": "[v] to \"string\"",
+"string_and_type.remove_double_quotes": "\"string\" [v] to string",
+"string_and_type.typeof": "typeof [v]",
+"string_and_type.is_array": "[v] is array",
+"string_and_type.is_NaN": "[v] is NaN",
+"string_and_type.string": "string [v]",
+"string_and_type.number": "⚠⚠NaN⚠⚠ number [v]",
+"string_and_type.to_scratch_allowed_type": "[v] to Scratch allowed type",
+"string_and_type.string_slice": "string [v] slice [n1][n2]",
+"string_and_type.return": "return [v]",
+"string_and_type.to_scratch_boolean": "[v] to Scratch boolean",
+"string_and_type.to_js_boolean": "[v] to JS boolean",
+"string_and_type.integer_toString": "interger [v] toString [count]",
+"string_and_type.string_parseInt": "⚠⚠NaN⚠⚠ string [v] parseint [count]",
+"string_and_type.string_trim": "string [v][menu]",
+"string_and_type.string_trim.menu.trim": "trim",
+"string_and_type.string_trim.menu.trimStart": "trimStart",
+"string_and_type.string_trim.menu.trimEnd": "trimEnd",
+"string_and_type.text_to_url": "text to url [menu][v]",
+"string_and_type.text_to_url.menu.encodeURIComponent": "encodeURIComponent",
+"string_and_type.text_to_url.menu.escape": "escape",
+"string_and_type.text_to_url.menu.encodeURI": "encodeURI",
+"string_and_type.url_to_text": "url to text [menu][v]",
+"string_and_type.url_to_text.menu.decodeURIComponent": "decodeURIComponent",
+"string_and_type.url_to_text.menu.unescape": "unescape",
+"string_and_type.url_to_text.menu.decodeURI": "decodeURI",
+"string_and_type.to_upper_or_lower_case": "[v][menu]",
+"string_and_type.to_upper_or_lower_case.menu.toUpperCase": "toUpperCase",
+"string_and_type.to_upper_or_lower_case.menu.toLowerCase": "toLowerCase",
+"string_and_type.charCodeAt": "⚠⚠NaN⚠⚠ [v] get char code at [n1]",
+"string_and_type.string_fromCharCode": "char code [n1] to string",
+"string_and_type.repeat": "string [v] repeat [n1]",
+
+
+"json": "BTBv2 JSON",
+
+"json.get": "JSON [v1] from key [keymode][key] get value, return type [return_type]",
+"json.set_value": "JSON [v1] from key [keymode][key] set value [operator][v2], return type [return_type]",
+"json.get_keys": "JSON [v1] get [v2], return type [return_type]",
+"json.get_keys.menu.keys": "keys",
+"json.get_keys.menu.values": "values",
+"json.get_keys.menu.entries": "entries",
+"json.hasOwnProperty": "JSON [v1] has key [key]",
+"json.deleteProperty": "JSON [v1] delete property [keymode][key] , return type [return_type]",
+"json.parse": "⚠⚠Object⚠⚠ JSON.parse [v1]",
+"json.stringify": "JSON.stringify [v1]",
+
+
+"array": "BTBv2 array",
+"array.push": "Array [v1] push [v2] , return type [return_type]",
+"array.length": "Array [v1] length",
+"array.indexOf": "Array [v1] index of [v2]",
+"array.lastIndexOf": "Array [v1] last index of [v2]",
+"array.includes": "Array [v1] includes [v2]",
+"array.slice": "Array [v1] slice [n1][n2] , return type [return_type]",
+"array.deduplication": "Array [v1] deduplication , return type [return_type]",
+"array.max_or_min": "Array [v1] [mxx] item , return type [return_type]",
+"array.max_or_min.menu.max": "max",
+"array.max_or_min.menu.min": "min",
+"array.reverse": "Array [v1] reverse , return type [return_type]",
+"array.flat": "Array [v1] flat [n1] , return type [return_type]",
+"array.fill": "Array [v1] fill [v2][n1][n2] , return type [return_type]",
+"array.splice": "Array [v1] splice [n1][n2][v2] , return type [return_type]",
+"array.concat": "Array [v1] concat [v2] , return type [return_type]",
+"array.join": "Array [v1] join [v2]",
+"array.sort": "Array [v1] sort [type] key [keymode][key] , return type [return_type]",
+"array.sort.menu.null": "",
+"array.sort.menu.up": "up",
+"array.sort.menu.down": "down",
+
+
+"reg_exp": "BTBv2 reg exp",
+"reg_exp.new_RegExp": "⚠⚠Object⚠⚠ new RegExp [v1][v2]",
+"reg_exp.test": "[v1] test [v2]",
+"reg_exp.exec": "[v1] exec [v2] , return type [return_type]",
+"reg_exp.search": "[v1] search [v2]",
+"reg_exp.replace": "[v1] replace [v2][v3]",
+"reg_exp.replaceAll": "[v1] replaceAll [v2][v3]",
+"reg_exp.split": "[v1] split [v2] , return type [return_type]",
+"reg_exp.match": "[v][type][RegExp] , max length [max_length] , return type [return_type]",
+"reg_exp.match.menu.match": "match",
+"reg_exp.match.menu.begin": "begin",
+"reg_exp.match.menu.ending": "ending",
+"reg_exp.match.menu.begin&ending": "begin & ending",
+"reg_exp.match.menu.match&begin": "match & begin",
+"reg_exp.match.menu.match&ending": "match & ending",
+"reg_exp.match.menu.match&begin&ending": "match & begin & ending",
+
+
+"convenient": "BTBv2 convenient",
+"convenient.ternary_operator": "[b] ? [t] : [f]",
+"convenient.clipboard_writeText": "clipboard writeText [v1]",
+"convenient.none_cmd_block": "[v]",
+"convenient.never_gonna_give_you_start": "Never gonna give you start",
+"convenient.never_gonna_let_you_stop": "Never gonna let you stop",
+"convenient.hat_when_is_true": "⚠ when [b] is true",
+"convenient.hat_when_becomes_true": "when [b] becomes true",
+"convenient.hat_when_change": "⚠ when [v] change",
+"convenient.timestamp": "timestamp",
+"convenient.userAgent": "userAgent",
+"convenient.html_language": "html language",
+"convenient.onLine": "onLine",
+"convenient.block_id": "block id",
+"convenient.isStage": "isStage",
+"convenient.clone_number": "clone number",
+"convenient.sprite_clone_counter": "sprite [sprite_type][sprite_name] clone counter",
+"convenient.project_clone_counter": "project clone counter",
+"convenient.is_clone": "is clone",
+"convenient.isOriginal": "is original (not clone)",
+"convenient.change_broadcast_msg_name": "change broadcast msg name [v1][v2]",
+"convenient.get_scratch_var": "get scratch [sprite_type][sprite_name] [type][name]",
+"convenient.set_scratch_var": "set scratch [sprite_type][sprite_name] variable [name][operator][v]",
+"convenient.set_scratch_list": "set scratch [sprite_type][sprite_name] list [name] = [v]",
+"convenient.get_sprite_info": "get [sprite_type][sprite_name] [info_name]",
+"convenient.get_sprite_info_clone": "get [sprite_type][sprite_name] clone number [clone_number] [info_name]",
+"convenient.set_sprite_info": "set [sprite_type][sprite_name] [info_name] [operator][set]",
+"convenient.get_sprite_effect": "get [sprite_type][sprite_name] effect [effect_name]",
+"convenient.set_sprite_effect": "set [sprite_type][sprite_name] effect [effect_name][operator][set]",
+"convenient.get_sprite_costume_info": "get [sprite_type][sprite_name] costume number [n][name]",
+"convenient.get_sprite_costumes_counter": "sprite [sprite_type][sprite_name] costumes counter",
+"convenient.get_sprite_sound_info": "get [sprite_type][sprite_name] sound number [n][name]",
+"convenient.get_sprite_sounds_counter": "sprite [sprite_type][sprite_name] sounds counter",
+
+
+"set": "BTBv2 Set",
+"set.new_Set": "⚠⚠Object⚠⚠ new Set [v1]",
+"set.size": "Set [v1] size (length)",
+"set.add": "⚠⚠Object⚠⚠ Set [v1] add [v2]",
+"set.clear": "⚠⚠Object⚠⚠ Set [v1] clear",
+"set.delete": "⚠⚠Object⚠⚠ Set [v1] delete [v2]",
+"set.delete_success": "Set [v1] delete [v2] success",
+"set.has": "Set [v1] has [v2]",
+"set.to_array": "Set [v1] to Array , return type [return_type]",
+"set.entries_to_array": "Set [v1] entries to Array , return type [return_type]",
+
+
+"temp_var": "BTBv2 temp var",
+"temp_var.clear_all": "clear all global temp var",
+"temp_var.set_value": "set global temp var [name][operator][v]",
+"temp_var.get_value": "get global temp var [name]",
+"temp_var.delete_var": "delete global temp var [name]",
+"temp_var.var_exist": "global temp var [name] exist",
+
+"temp_var.clear_sprite_all": "clear [sprite_type][sprite_name] all temp var",
+"temp_var.set_sprite_var_value": "set [sprite_type][sprite_name] temp var [name][operator][v]",
+"temp_var.get_sprite_var_value": "get [sprite_type][sprite_name] temp var [name]",
+"temp_var.delete_sprite_var": "delete [sprite_type][sprite_name] temp var [name]",
+"temp_var.sprite_var_exist": "[sprite_type][sprite_name] temp var [name] exist",
+
+
+"debug": "BTBv2 debug",
+"debug.err_msg": "BTBv2 error massage",
+"debug.vm_toJSON": "vm.toJSON()",
+"debug.console": "console [type][v]"
+
+
+}
diff --git a/locales/zh-cn.json b/locales/zh-cn.json
new file mode 100644
index 0000000..4bbc76a
--- /dev/null
+++ b/locales/zh-cn.json
@@ -0,0 +1,213 @@
+{
+
+"name": "bddjr toolbox v2",
+"description": "bddjr toolbox v2",
+
+"typemenu.default": "⚠⚠Object⚠⚠ 默认",
+"typemenu.ScratchType": "Scratch类型",
+"typemenu.string": "字符串",
+"typemenu.boolean": "布尔值",
+"typemenu.number": "⚠⚠NaN⚠⚠ 数",
+"typemenu.integer": "⚠⚠NaN⚠⚠ 整数",
+"typemenu.ScratchBoolean": "Scratch布尔值",
+
+"sprite_type_menu.stage": "背景",
+"sprite_type_menu.sprite": "角色",
+"sprite_type_menu.thisSprite": "这个角色",
+"sprite_type_menu.thisClone": "这个克隆体",
+"sprite_type_menu.id": "id",
+"sprite_type_menu.drawableID": "drawableID",
+
+"scratch_var_type_menu.var": "变量",
+"scratch_var_type_menu.list": "列表",
+
+"sprite_info_menu.name": "名称 name",
+"sprite_info_menu.id": "id",
+"sprite_info_menu.drawableID": "绘制ID drawableID",
+"sprite_info_menu.effects": "特效 effects",
+"sprite_info_menu.direction": "角度 direction",
+"sprite_info_menu.rotationStyle": "旋转方式 rotationStyle",
+"sprite_info_menu.size": "大小 size",
+"sprite_info_menu.tempo": "演奏速度 tempo",
+"sprite_info_menu.volume": "音量 volume",
+"sprite_info_menu.x": "x",
+"sprite_info_menu.y": "y",
+"sprite_info_menu.deprecatedCache": "deprecatedCache",
+"sprite_info_menu.draggable": "允许拖动 draggable",
+"sprite_info_menu.dragging": "正在拖动 dragging",
+"sprite_info_menu.isOriginal": "是角色本体 isOriginal",
+"sprite_info_menu.visible": "显示 visible",
+
+"sprite_effect_names_menu.color": "颜色 color",
+"sprite_effect_names_menu.fisheye": "鱼眼 fisheye",
+"sprite_effect_names_menu.whirl": "旋涡 whirl",
+"sprite_effect_names_menu.pixelate": "像素画 pixelate",
+"sprite_effect_names_menu.mosaic": "马赛克 mosaic",
+"sprite_effect_names_menu.brightness": "亮度 brightness",
+"sprite_effect_names_menu.ghost": "虚像 ghost",
+
+"keymodemenu.Array": "数组",
+
+"sprite_costume_info_names_menu.assetId": "assetId",
+"sprite_costume_info_names_menu.bitmapResolution": "bitmapResolution",
+"sprite_costume_info_names_menu.dataFormat": "格式 dataFormat",
+"sprite_costume_info_names_menu.md5": "md5",
+"sprite_costume_info_names_menu.name": "名称 name",
+"sprite_costume_info_names_menu.rotationCenterX": "rotationCenterX",
+"sprite_costume_info_names_menu.rotationCenterY": "rotationCenterY",
+"sprite_costume_info_names_menu.size": "大小 size",
+"sprite_costume_info_names_menu.skinId": "造型编号 skinId",
+
+"sprite_sound_info_names_menu.assetId": "assetId",
+"sprite_sound_info_names_menu.dataFormat": "格式 dataFormat",
+"sprite_sound_info_names_menu.format": "format",
+"sprite_sound_info_names_menu.md5": "md5",
+"sprite_sound_info_names_menu.name": "名称 name",
+"sprite_sound_info_names_menu.rate": "速度 rate",
+"sprite_sound_info_names_menu.sampleCount": "sampleCount",
+"sprite_sound_info_names_menu.soundId": "声音编号 soundId",
+"sprite_sound_info_names_menu.duration": "时长 duration",
+"sprite_sound_info_names_menu.length": "length",
+"sprite_sound_info_names_menu.numberOfChannels": "numberOfChannels",
+"sprite_sound_info_names_menu.sampleRate" :"sampleRate",
+"sprite_sound_info_names_menu.initialized": "initialized",
+"sprite_sound_info_names_menu.isPlaying": "正在播放 isPlaying",
+"sprite_sound_info_names_menu.playbackRate": "playbackRate",
+"sprite_sound_info_names_menu.startingUntil": "startingUntil",
+"sprite_sound_info_names_menu.isStarting": "isStarting",
+
+
+
+"help": "BTBv2 帮助",
+"help.jumptogithub": "点此跳转到github",
+
+
+"string_and_type": "BTBv2 字符串和类型",
+"string_and_type.double_quotation_marks": "[v] 转成 \"字符串\"",
+"string_and_type.remove_double_quotes": "\"字符串\" [v] 转成 字符串",
+"string_and_type.typeof": "[v] 的类型",
+"string_and_type.is_array": "[v] 是数组",
+"string_and_type.is_NaN": "[v] 是NaN",
+"string_and_type.string": "字符串 [v]",
+"string_and_type.number": "⚠⚠NaN⚠⚠ 数 [v]",
+"string_and_type.to_scratch_allowed_type": "[v] 转成 Scratch 允许的类型",
+"string_and_type.string_slice": "字符串 [v] 截取 [n1][n2]",
+"string_and_type.return": "返回 [v]",
+"string_and_type.to_scratch_boolean": "[v] 转成 Scratch 布尔值",
+"string_and_type.to_js_boolean": "[v] 转成 JS 布尔值",
+"string_and_type.integer_toString": "整数 [v] toString [count]",
+"string_and_type.string_parseInt": "⚠⚠NaN⚠⚠ 字符串 [v] parseint [count]",
+"string_and_type.string_trim": "字符串 [v][menu]",
+"string_and_type.text_to_url": "文本转链接 [menu][v]",
+"string_and_type.url_to_text": "链接转文本 [menu][v]",
+"string_and_type.to_upper_or_lower_case.menu.toUpperCase": "转大写 (toUpperCase)",
+"string_and_type.to_upper_or_lower_case.menu.toLowerCase": "转小写 (toLowerCase)",
+"string_and_type.charCodeAt": "⚠⚠NaN⚠⚠ 字符串 [v] 第 [n1] 个字符的编码",
+"string_and_type.string_fromCharCode": "编码 [n1] 转字符",
+"string_and_type.repeat": "字符串 [v] 重复 [n1] 次",
+
+
+"json": "BTBv2 JSON",
+
+"json.get": "JSON [v1] 从键 [keymode][key] 取值, 返回类型 [return_type]",
+"json.set_value": "JSON [v1] 从键 [keymode][key] 设值 [operator][v2], 返回类型 [return_type]",
+"json.get_keys": "JSON [v1] 获取 [v2], 返回类型 [return_type]",
+"json.get_keys.menu.keys": "所有键 (keys)",
+"json.get_keys.menu.values": "所有值 (values)",
+"json.get_keys.menu.entries": "所有键值的二维列表 (entries)",
+"json.hasOwnProperty": "JSON [v1] 有键 [key]",
+"json.deleteProperty": "JSON [v1] 删除属性 [keymode][key] , 返回类型 [return_type]",
+
+
+"array": "BTBv2 数组",
+"array.push": "数组 [v1] 结尾加入 [v2], 返回类型 [return_type]",
+"array.length": "数组 [v1] 长度",
+"array.indexOf": "数组 [v1] 首个 [v2]",
+"array.lastIndexOf": "数组 [v1] 最后一个 [v2]",
+"array.includes": "数组 [v1] 含 [v2]",
+"array.slice": "数组 [v1] 截取 [n1][n2] , 返回类型 [return_type]",
+"array.deduplication": "数组 [v1] 去重 , 返回类型 [return_type]",
+"array.max_or_min": "数组 [v1] [mxx] 项 , 返回类型 [return_type]",
+"array.max_or_min.menu.max": "最大",
+"array.max_or_min.menu.min": "最小",
+"array.reverse": "数组 [v1] 倒序 , 返回类型 [return_type]",
+"array.flat": "数组 [v1] 扁平化 [n1] 层 , 返回类型 [return_type]",
+"array.fill": "数组 [v1] 填充 [v2][n1][n2] , 返回类型 [return_type]",
+"array.splice": "数组 [v1] splice [n1][n2][v2] , 返回类型 [return_type]",
+"array.concat": "数组 [v1] 连接 [v2] , 返回类型 [return_type]",
+"array.join": "数组 [v1] 用 [v2] 并为字符串",
+"array.sort": "数组 [v1] sort [type] 键 [keymode][key] , 返回类型 [return_type]",
+"array.sort.menu.up": "升序",
+"array.sort.menu.down": "降序",
+
+"reg_exp": "BTBv2 正则表达式",
+"reg_exp.exec": "[v1] exec [v2] , 返回类型 [return_type]",
+"reg_exp.split": "[v1] 用 [v2] 分成数组 , 返回类型 [return_type]",
+"reg_exp.match": "[v][type][RegExp] , 最大长度 [max_length] , 返回类型 [return_type]",
+"reg_exp.match.menu.match": "match",
+"reg_exp.match.menu.begin": "开头",
+"reg_exp.match.menu.ending": "结尾",
+"reg_exp.match.menu.begin&ending": "开头 & 结尾",
+"reg_exp.match.menu.match&begin": "match & 开头",
+"reg_exp.match.menu.match&ending": "match & 结尾",
+"reg_exp.match.menu.match&begin&ending": "match & 开头 & 结尾",
+
+
+"convenient": "BTBv2 便利积木",
+"convenient.clipboard_writeText": "剪贴板写入文本 [v1]",
+"convenient.hat_when_is_true": "⚠ 当 [b] 是成立",
+"convenient.hat_when_becomes_true": "当 [b] 变成立",
+"convenient.hat_when_change": "⚠ 当 [v] 变了",
+"convenient.timestamp": "时间戳",
+"convenient.html_language": "html语言",
+"convenient.block_id": "积木id",
+"convenient.isStage": "是背景",
+"convenient.clone_number": "克隆体编号",
+"convenient.sprite_clone_counter": "角色 [sprite_type][sprite_name] 克隆体总数",
+"convenient.project_clone_counter": "项目克隆体总数",
+"convenient.is_clone": "是克隆体",
+"convenient.isOriginal": "是原角色 (不是克隆体)",
+"convenient.change_broadcast_msg_name": "修改广播消息名称 [v1][v2]",
+"convenient.get_scratch_var": "获取 scratch [sprite_type][sprite_name] [type][name]",
+"convenient.set_scratch_var": "设 scratch [sprite_type][sprite_name] 变量 [name][operator][v]",
+"convenient.set_scratch_list": "设 scratch [sprite_type][sprite_name] 列表 [name] = [v]",
+"convenient.get_sprite_info": "获取 [sprite_type][sprite_name] 的 [info_name]",
+"convenient.get_sprite_info_clone": "获取 [sprite_type][sprite_name] 克隆体编号 [clone_number] 的 [info_name]",
+"convenient.set_sprite_info": "设 [sprite_type][sprite_name] [info_name] [operator][set]",
+"convenient.get_sprite_effect": "获取 [sprite_type][sprite_name] 特效 [effect_name]",
+"convenient.set_sprite_effect": "设 [sprite_type][sprite_name] 特效 [effect_name][operator][set]",
+"convenient.get_sprite_costume_info": "获取 [sprite_type][sprite_name] 造型编号 [n] 的 [name]",
+"convenient.get_sprite_costumes_counter": "角色 [sprite_type][sprite_name] 造型总数",
+"convenient.get_sprite_sound_info": "获取 [sprite_type][sprite_name] 声音编号 [n][name]",
+"convenient.get_sprite_sounds_counter": "角色 [sprite_type][sprite_name] 声音总数",
+
+
+"temp_var": "BTBv2 临时变量",
+"temp_var.clear_all": "清除所有全局临时变量",
+"temp_var.set_value": "设全局临时变量 [name][operator][v]",
+"temp_var.get_value": "获取全局临时变量 [name]",
+"temp_var.delete_var": "删除全局临时变量 [name]",
+"temp_var.var_exist": "全局临时变量 [name] 存在",
+
+"temp_var.clear_sprite_all": "清除 [sprite_type][sprite_name] 所有临时变量",
+"temp_var.set_sprite_var_value": "设 [sprite_type][sprite_name] 临时变量 [name][operator][v]",
+"temp_var.get_sprite_var_value": "获取 [sprite_type][sprite_name] 临时变量 [name]",
+"temp_var.delete_sprite_var": "删除 [sprite_type][sprite_name] 临时变量 [name]",
+"temp_var.sprite_var_exist": "[sprite_type][sprite_name] 临时变量 [name] 存在",
+
+
+"set.size": "Set [v1] 大小 (长度)",
+"set.add": "⚠⚠Object⚠⚠ Set [v1] 加入 [v2]",
+"set.clear": "⚠⚠Object⚠⚠ Set [v1] 清空",
+"set.delete": "⚠⚠Object⚠⚠ Set [v1] 删除 [v2]",
+"set.delete_success": "Set [v1] 删除 [v2] 成功",
+"set.has": "Set [v1] 含 [v2]",
+"set.to_array": "Set [v1] 转成数组 , 返回类型 [return_type]",
+"set.entries_to_array": "Set [v1] 键值对 转成数组 , 返回类型 [return_type]",
+
+
+"debug": "BTBv2 调试",
+"debug.err_msg": "BTBv2 错误消息"
+
+
+}
diff --git a/myjs/extension_id.js b/myjs/extension_id.js
new file mode 100644
index 0000000..1a8764f
--- /dev/null
+++ b/myjs/extension_id.js
@@ -0,0 +1,2 @@
+// 该文件无需手动修改,编译时自动填充来自 info.json 的 id 。
+module.exports="bddjr.toolbox_v2"
\ No newline at end of file
diff --git a/myjs/menus.js b/myjs/menus.js
new file mode 100644
index 0000000..dd95c8e
--- /dev/null
+++ b/myjs/menus.js
@@ -0,0 +1,283 @@
+/**@type {string}*/
+const extension_id = require('./extension_id.js');
+
+const { api } = require('clipcc-extension');
+
+/**@type {any}*/
+const vm = api.getVmInstance();
+
+// module.exports = {};
+
+//===========================================================
+//2.0.0
+
+/**
+ * 这是用来生成静态菜单的,动态菜单不能用这个格式生成!
+ * @param {string} id 'author.extension.block.menu'
+ */
+function make_menus( id, ...names ){
+ const a = [];
+ for( let i of names ){
+ if( i === undefined ) continue;
+ if( Array.isArray(i) ){
+ a.push({
+ messageId: i[0],
+ value: i[1]
+ });
+ }else{
+ a.push({
+ messageId: id ? `${id}.${i}` : i ,
+ value: i
+ });
+ }
+ }
+ return a;
+}
+
+module.exports.make_menus = make_menus;
+
+//===========================================================
+//2.0.0
+
+/**
+ * 获取角色名称列表的动态菜单。请直接将名称填入menu,而不要作为函数运行
+ */
+function sprites_name_menu(){
+ // 此处运用Set的特性,快速生成想要的数组
+ const names = new Set;
+ for(let i of vm.runtime.targets){
+ names.add( i.sprite.name );
+ }
+ return Array.from( names.entries() );
+}
+
+module.exports.sprites_name_menu = sprites_name_menu;
+
+//===========================================================
+//2.0.0
+
+const myTypeMenu = make_menus(
+ `${extension_id}.typemenu`,
+ 'default',
+ 'ScratchType',
+ 'string',
+ 'boolean',
+ 'number',
+ 'integer',
+ 'ScratchBoolean'
+);
+
+module.exports.myTypeMenu = myTypeMenu;
+
+//===========================================================
+//2.0.0
+
+const keymodeMenu = make_menus(
+ '',
+ '.',
+ [
+ `${extension_id}.keymodemenu.Array`,
+ 'Array'
+ ]
+);
+
+module.exports.keymodeMenu = keymodeMenu;
+
+//===========================================================
+//2.0.0
+
+const setOperatorMenu = make_menus(
+ '',
+ '=',
+ '+=',
+ '-=',
+ '*=',
+ '/=',
+ '%='
+);
+
+module.exports.setOperatorMenu = setOperatorMenu;
+
+//===========================================================
+//2.0.0
+
+const allowed_sprite_info_names = [
+ 'name',
+ 'id',
+ 'drawableID',
+ 'effects',
+ 'direction',
+ 'rotationStyle',
+ 'size',
+ 'tempo',
+ 'volume',
+ 'x',
+ 'y',
+ 'deprecatedCache',
+ 'draggable',
+ 'dragging',
+ 'isOriginal',
+ 'visible',
+ 'isStage'
+];
+
+module.exports.allowed_sprite_info_names = allowed_sprite_info_names;
+
+//===========================================================
+//2.0.0
+
+const sprite_info_menu = make_menus(
+ `${extension_id}.sprite_info_menu`,
+ ...allowed_sprite_info_names
+);
+
+module.exports.sprite_info_menu = sprite_info_menu;
+
+//===========================================================
+//2.0.0
+
+const allowed_set_sprite_info_names = [
+ 'effects',
+ 'direction',
+ 'rotationStyle',
+ 'size',
+ 'tempo',
+ 'volume',
+ 'x',
+ 'y',
+ 'draggable',
+ 'visible'
+];
+
+module.exports.allowed_set_sprite_info_names = allowed_set_sprite_info_names;
+
+//===========================================================
+//2.0.0
+
+const set_sprite_info_menu = make_menus(
+ `${extension_id}.sprite_info_menu`,
+ ...allowed_set_sprite_info_names
+);
+
+module.exports.set_sprite_info_menu = set_sprite_info_menu;
+
+//===========================================================
+//2.0.0
+
+const sprite_costume_info_names = [
+ "assetId",
+ "bitmapResolution",
+ "dataFormat",
+ "md5",
+ "name",
+ "rotationCenterX",
+ "rotationCenterY",
+ "size",
+ "skinId"
+];
+
+module.exports.sprite_costume_info_names = sprite_costume_info_names;
+
+//===========================================================
+//2.0.0
+
+const sprite_costume_info_names_menu = make_menus(
+ `${extension_id}.sprite_costume_info_names_menu`,
+ ...sprite_costume_info_names
+);
+
+module.exports.sprite_costume_info_names_menu = sprite_costume_info_names_menu;
+
+//===========================================================
+//2.0.0
+
+const sprite_sound_info_names = [
+ [ //target.sprite.sounds
+ "assetId",
+ "dataFormat",
+ "format",
+ "md5",
+ "name",
+ "rate",
+ "sampleCount",
+ "soundId"
+ ],
+ [ //target.sprite.soundBank.soundPlayers[ target.sprite.sounds[ args.n -1 ].soundId ].buffer
+ 'duration',
+ 'length',
+ 'numberOfChannels',
+ 'sampleRate'
+ ],
+ [ //target.sprite.soundBank.soundPlayers[ target.sprite.sounds[ args.n -1 ].soundId ]
+ 'initialized',
+ 'isPlaying',
+ 'playbackRate',
+ 'startingUntil',
+ 'isStarting'
+ ]
+];
+
+module.exports.sprite_sound_info_names = sprite_sound_info_names;
+//===========================================================
+//2.0.0
+
+const sprite_sound_info_names_menu = make_menus(
+ `${extension_id}.sprite_sound_info_names_menu`,
+ ...sprite_sound_info_names[0],
+ ...sprite_sound_info_names[1],
+ ...sprite_sound_info_names[2]
+);
+
+module.exports.sprite_sound_info_names_menu = sprite_sound_info_names_menu;
+
+//===========================================================
+//2.0.0
+
+const sprite_effect_names = [
+ "color",
+ "fisheye",
+ "whirl",
+ "pixelate",
+ "mosaic",
+ "brightness",
+ "ghost"
+];
+
+module.exports.sprite_effect_names = sprite_effect_names;
+
+//===========================================================
+//2.0.0
+
+const sprite_effect_names_menu = make_menus(
+ `${extension_id}.sprite_effect_names_menu`,
+ ...sprite_effect_names
+);
+
+module.exports.sprite_effect_names_menu = sprite_effect_names_menu;
+
+//===========================================================
+//2.0.0
+
+const sprite_type_menu = make_menus(
+ `${extension_id}.sprite_type_menu`,
+ 'stage',
+ 'sprite',
+ 'thisSprite',
+ 'thisClone',
+ 'id',
+ 'drawableID'
+);
+
+module.exports.sprite_type_menu = sprite_type_menu;
+
+//===========================================================
+//2.0.0
+
+const scratch_var_type_menu = make_menus(
+ `${extension_id}.scratch_var_type_menu`,
+ 'var',
+ 'list'
+);
+
+module.exports.scratch_var_type_menu = scratch_var_type_menu;
+
diff --git a/myjs/to_scratch_boolean.js b/myjs/to_scratch_boolean.js
new file mode 100644
index 0000000..18d9ad9
--- /dev/null
+++ b/myjs/to_scratch_boolean.js
@@ -0,0 +1,19 @@
+/** Copy from https://github.com/Clipteam/clipcc-vm/blob/master/src/util/cast.js#L49 */
+module.exports = (value)=>{
+ // Already a boolean?
+ if (typeof value === 'boolean') {
+ return value;
+ }
+ if (typeof value === 'string') {
+ // These specific strings are treated as false in Scratch.
+ if ((value === '') ||
+ (value === '0') ||
+ (value.toLowerCase() === 'false')) {
+ return false;
+ }
+ // All other strings treated as true.
+ return true;
+ }
+ // Coerce other values and numbers.
+ return Boolean(value);
+}
diff --git a/myjs/tools.js b/myjs/tools.js
new file mode 100644
index 0000000..25677be
--- /dev/null
+++ b/myjs/tools.js
@@ -0,0 +1,475 @@
+/**@type {string}*/
+const extension_id = require('./extension_id.js');
+
+const { api } = require('clipcc-extension');
+/**@type {any}*/
+const vm = api.getVmInstance();
+
+
+// module.exports = {};
+
+//===========================================================
+//2.0.0
+
+const to_scratch_boolean = require('./to_scratch_boolean.js');
+
+module.exports.to_scratch_boolean = to_scratch_boolean;
+
+//===========================================================
+//2.0.0
+
+/**
+ * 这个列表只会有一个字符串元素
+ * */
+var err_msg = [''];
+
+module.exports.err_msg = err_msg;
+
+//===========================================================
+//2.0.0
+
+/**
+ * my_log_block_error( util.currentBlock.id, util.currentBlock.opcode, e )
+ * @param {string} block_id
+ * @param {string} block_opcode
+ */
+function my_log_block_error(block_id, block_opcode, error){
+ const err_str =
+`ClipCCExtensionBlockError
+extension:${extension_id}
+blockid:${block_id}
+opcode:${block_opcode}
+time:${Date.now()}
+error:${error}`
+ ;
+ err_msg[0] = err_str;
+ console.error( err_str );
+ console.error( error );
+ return err_str;
+}
+
+module.exports.my_log_block_error = my_log_block_error;
+
+//===========================================================
+//2.0.0
+
+/** 目前已知 scratch 变量保存的内容仅接受字符串、布尔值、整数、浮点数 */
+function to_scratch_type(v){
+ switch( typeof v ){
+ case 'string':
+ return v;
+ case 'boolean':
+ return v;
+ case 'number':
+ if(Number.isFinite(v) || Number.isNaN(v))
+ return String(v);
+ return v;
+ case 'object':
+ try{
+ return JSON.stringify(v);
+ }catch{
+ return String(v);
+ }
+ }
+ return String(v);
+}
+
+module.exports.to_scratch_type = to_scratch_type;
+
+//===========================================================
+//2.0.0
+
+/**
+ *
+ * @param {string} keymode '.' 'list'
+ * @param {string|number} keystr 'key.key2'
+ * @returns {any[]|string|number} 如果 keymode 是 '.' ,最后一项是字符串,前面的是列表,单个键返回的只是字符串。如果 keymode 是 'list' ,全是字符串。
+ */
+function for_json_get_keys( keymode, keystr ){
+ if( typeof keystr === 'number' )
+ return keystr;
+ if( keymode === '.' ){
+ if( !keystr.includes('.') )
+ return keystr;
+
+ const outkeys = [];
+ let myslice_start = 0;
+ for( let i = 0 ; i < keystr.length ; i++ ){
+ if( keystr[i] !== '.' ) continue;
+ if( keystr[i-1] === '?' ){
+ outkeys.push([
+ keystr.slice( myslice_start , i-1 ),
+ '?.',
+ ]);
+ }else{
+ outkeys.push([
+ keystr.slice( myslice_start , i ),
+ '.',
+ ]);
+ }
+ myslice_start = i+1 ;
+ }
+ outkeys.push( keystr.slice( myslice_start , keystr.length ) );
+ return outkeys;
+ }
+ if( keymode === 'Array' ){
+ let thiskeystr = keystr.trim();
+ if( thiskeystr[0] !== '[' )
+ thiskeystr = '[' + thiskeystr;
+ if( thiskeystr.slice(-1) !== ']' )
+ thiskeystr += ']';
+ return JSON.parse( thiskeystr );
+ }
+ throw 'Not allowed keymode!';
+}
+
+module.exports.for_json_get_keys = for_json_get_keys;
+
+//===========================================================
+//2.0.0
+
+/**
+ *
+ * @param {any} v value
+ * @param {string} t typename in myTypeMenu
+ * @param {boolean} b if t==='string' try JSON.stringify(v)
+ */
+function returnType( v, t , b=true ){
+ switch( t ){
+ case 'default':
+ return v;
+ case 'ScratchType':
+ return to_scratch_type(v);
+ case 'string':
+ if( b && (typeof v === 'object') ){
+ try{
+ return JSON.stringify(v);
+ }catch{}
+ }
+ return String(v);
+ case 'boolean':
+ return Boolean(v);
+ case 'number':
+ return Number(v);
+ case 'integer':
+ return Number.parseInt(v);
+ case 'ScratchBoolean':
+ return to_scratch_boolean(v);
+ }
+ throw 'Not allowed type name!';
+}
+
+module.exports.returnType = returnType;
+
+//===========================================================
+//2.0.0
+
+/**
+ *
+ * @param {object} util
+ * @param {string} sprite_type stage sprite thisSprite thisClone id drawableID
+ * @param {string} sprite_name name id drawableID
+ * @returns {any} object
+ */
+function get_sprite_target( util, sprite_type, sprite_name ){
+ // 简单的取值
+ switch( sprite_type ){
+ case 'stage':
+ // 背景始终在角色列表的第0个位置
+ return util.runtime.targets[0];
+ case 'thisSprite':
+ // 本体始终在克隆体列表的第0个位置
+ return util.target.sprite.clones[0];
+ case 'thisClone':
+ return util.target;
+ }
+
+ // 接下来的肯定要用这个
+ if(util.bddjr_toolbox_v2_sprite_number_cache === undefined){
+ // 没有缓存的对象就创建
+ util.bddjr_toolbox_v2_sprite_number_cache = {
+ name: {
+ /* 说明格式
+ Stage: {
+ number: 0,
+ id: "|2On|0TzTO[DRM@?5DX.",
+ drawableID: 0,
+ },
+ */
+ },
+ id: {
+ /* 说明格式
+ "|2On|0TzTO[DRM@?5DX.": {
+ number: 0,
+ name: "Stage",
+ drawableID: 0,
+ },
+ */
+ },
+ drawableID: {
+ /* 说明格式
+ 0: {
+ number: 0,
+ name: "Stage",
+ id: "|2On|0TzTO[DRM@?5DX.",
+ },
+ */
+ },
+ }
+ }
+
+ /**number_cache */
+ const NC = util.bddjr_toolbox_v2_sprite_number_cache;
+
+ let return_target;
+ let return_target_number;
+
+ switch( sprite_type ){
+ case 'sprite':
+ if(
+ NC.name !== undefined
+ &&
+ NC.name[ sprite_name ] !== undefined
+ ){
+ // 读缓存
+ if(
+ util.runtime.targets[
+ NC.name[ sprite_name ].number
+ ].sprite.name === sprite_name
+ ){
+ // 有缓存的对象,有对应名称的缓存,直接返回
+ return util.runtime.targets[
+ NC.name[ sprite_name ].number
+ ];
+ }
+ // 对不上?依据缓存名称删除对应id与drawableID的缓存,再删除对应name的缓存。
+ Reflect.deleteProperty(
+ NC.id ,
+ NC.name[ sprite_name ]?.id
+ );
+ Reflect.deleteProperty(
+ NC.drawableID ,
+ NC.name[ sprite_name ]?.drawableID
+ );
+ Reflect.deleteProperty(
+ NC.name ,
+ sprite_name
+ );
+ }
+ // 重新查找
+ for( let i in util.runtime.targets ){
+ let J = util.runtime.targets[i];
+ if(
+ J.sprite.name === sprite_name
+ &&
+ !J.isStage //用的是sprite模式,所以肯定不能是背景
+ ){
+ // 找到了,将要返回的值设置为这个对象,然后退出循环
+ return_target_number = i;
+ return_target = J;
+ break;
+ }
+ }
+ // 退出switch
+ break;
+ case 'id':
+ if(
+ NC.id !== undefined
+ &&
+ NC.id[ sprite_name ] !== undefined
+ ){
+ // 读缓存
+ if(
+ util.runtime.targets[
+ NC.id[ sprite_name ].number
+ ].id === sprite_name
+ ){
+ // 有缓存的对象,有对应名称的缓存,直接返回
+ return util.runtime.targets[
+ NC.id[ sprite_name ].number
+ ];
+ }
+ // 对不上?依据缓存名称删除对应name与drawableID的缓存,再删除对应id的缓存。
+ Reflect.deleteProperty(
+ NC.name ,
+ NC.id[ sprite_name ]?.name
+ );
+ Reflect.deleteProperty(
+ NC.drawableID ,
+ NC.id[ sprite_name ]?.drawableID
+ );
+ Reflect.deleteProperty(
+ NC.id ,
+ sprite_name
+ );
+ }
+ // 重新查找
+ for( let i in util.runtime.targets ){
+ let J = util.runtime.targets[i];
+ if(J.id === sprite_name){
+ // 找到了,将要返回的值设置为这个对象,然后退出循环
+ return_target_number = i;
+ return_target = J;
+ break;
+ }
+ }
+ // 退出switch
+ break;
+ case 'drawableID':
+ if(
+ NC.drawableID !== undefined
+ &&
+ NC.drawableID[ sprite_name ] !== undefined
+ ){
+ // 读缓存
+ if(
+ util.runtime.targets[
+ NC.drawableID[ sprite_name ].number
+ ].drawableID === sprite_name
+ ){
+ // 有缓存的对象,有对应名称的缓存,直接返回
+ return util.runtime.targets[
+ NC.drawableID[ sprite_name ].number
+ ];
+ }
+ // 对不上?依据缓存名称删除对应name与id的缓存,再删除对应drawableID的缓存。
+ Reflect.deleteProperty(
+ NC.name ,
+ NC.drawableID[ sprite_name ]?.name
+ );
+ Reflect.deleteProperty(
+ NC.id ,
+ NC.drawableID[ sprite_name ]?.id
+ );
+ Reflect.deleteProperty(
+ NC.drawableID ,
+ sprite_name
+ );
+ }
+ // 重新查找
+ for( let i in util.runtime.targets ){
+ let J = util.runtime.targets[i];
+ if(J.drawableID === sprite_name){
+ // 找到了,将要返回的值设置为这个对象,然后退出循环
+ return_target_number = i;
+ return_target = J;
+ break;
+ }
+ }
+ // 退出switch
+ break;
+ }
+
+ if(return_target === undefined){
+ // 找不到?抛出错误
+ throw `Can not get sprite target from type:${sprite_type} name:${sprite_name}`;
+ }
+
+ // 加入缓存
+ if(return_target.isOriginal){
+ // 不是克隆体才会缓存名称
+ NC.name[ return_target.sprite.name ] = {
+ number: return_target_number,
+ id: return_target.id,
+ drawableID: return_target.drawableID,
+ }
+ }
+ NC.id[ return_target.id ] = {
+ number: return_target_number,
+ drawableID: return_target.drawableID,
+ // 不是克隆体才会缓存名称,null从逻辑上不会导致故障
+ name: return_target.isOriginal ? return_target.sprite.name : null
+ }
+ NC.drawableID[ return_target.drawableID ] = {
+ number: return_target_number,
+ id: return_target.id,
+ // 不是克隆体才会缓存名称,null从逻辑上不会导致故障
+ name: return_target.isOriginal ? return_target.sprite.name : null
+ }
+
+ return return_target;
+}
+
+module.exports.get_sprite_target = get_sprite_target;
+
+//===========================================================
+//2.0.0
+
+/**
+ *
+ * @param {object} target
+ * @param {string} type '' 'list' 'broadcast_msg'
+ * @param {*} name
+ * @returns {any} object
+ */
+function get_var_obj_from_target( target, type, name ){
+ const vars = target.variables;
+ if( target.bddjr_toolbox_v2_var_id_cache === undefined ){
+ // 没有这个缓存变量,那么初始化它
+ target.bddjr_toolbox_v2_var_id_cache = {
+ // type对应键
+ '': {
+ //varname: id
+ },
+ list: {
+ //varname: id
+ }
+ }
+ }else{
+ // 有这个缓存变量,那么检查名称与类型是否对上
+ const idcache = target.bddjr_toolbox_v2_var_id_cache;
+ let cache_this_id = idcache[ type ][ name ];
+ if( cache_this_id !== undefined ){
+ // 找得到这个值
+ if(
+ vars[ cache_this_id ].name === name
+ &&
+ vars[ cache_this_id ].type === type
+ ){
+ // 对上了,直接返回
+ return vars[ cache_this_id ];
+ }
+ // 没对上,删掉缓存
+ Reflect.deleteProperty(
+ idcache[ type ] ,
+ name
+ );
+ }
+ }
+ // 没能成功返回缓存,那么重新生成并缓存。
+ for( let i of Object.values(vars) ){
+ if(
+ i.name === name
+ &&
+ i.type === type
+ ){
+ // 找到了,生成缓存并返回
+ target.bddjr_toolbox_v2_var_id_cache[ type ][ name ] = i.id;
+ return i;
+ }
+ }
+}
+
+module.exports.get_var_obj_from_target = get_var_obj_from_target;
+
+//===========================================================
+//2.0.0
+
+/**
+ * @param {object} util
+ * @param {string} sprite_type stage sprite thisSprite thisClone id drawableID
+ * @param {string} sprite_name name id drawableID
+ * @param {string} type '' 'list' 'broadcast_msg'
+ * @param {string} name
+ * @returns {any} object
+ */
+function get_var_obj_from_sprite_name( util, sprite_type, sprite_name, type, name ){
+ return get_var_obj_from_target(
+ get_sprite_target( util, sprite_type, sprite_name ),
+ type,
+ name
+ );
+}
+
+module.exports.get_var_obj_from_sprite_name = get_var_obj_from_sprite_name;
+
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..4abb1dd
--- /dev/null
+++ b/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "",
+ "version": "",
+ "author": "",
+ "scripts": {
+ "build": "rimraf ./build && mkdirp build && mkdirp dist && webpack --bail",
+ "build:dist": "NODE_ENV=production yarn run build"
+ },
+ "dependencies": {
+ "clipcc-extension": "^0.2.0",
+ "uglify-es": "^3.3.9"
+ },
+ "devDependencies": {
+ "copy-webpack-plugin": "^11.0.0",
+ "mkdirp": "^3.0.1",
+ "rimraf": "^5.0.1",
+ "webpack": "^5.87.0",
+ "webpack-cli": "^5.1.4",
+ "zip-webpack-plugin": "^4.0.1"
+ }
+}
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..aca84c3
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,124 @@
+const path = require('path');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
+const ZipWebpackPlugin = require('zip-webpack-plugin');
+const TerserPlugin = require("terser-webpack-plugin");
+const fs = require('fs');
+
+const info = require('./info.json');
+
+
+// 检查扩展 id 合规
+console.log('Checking extension ID\n/^[a-z0-9_\\.]+$/.test( info.id )');
+
+if( !/^[a-z0-9_\.]+$/.test( info.id ) ){
+ throw 'Extension ID format not allowed, please check ./info.json';
+}
+
+console.log('Extension ID check passed.');
+
+
+
+// 写入 ./myjs/extension_id.js
+console.log('Writing ./myjs/extension_id.js');
+
+let extension_id_js_PATH = './myjs/extension_id.js';
+let extension_id_js = fs.readFileSync( extension_id_js_PATH ).toString();
+
+// 生成要写入的数据
+let extension_id_js_WriteData = (
+ extension_id_js.slice(
+ 0 ,
+ extension_id_js.lastIndexOf('=') +1
+ ) + JSON.stringify( info.id )
+);
+
+// 如果要写入的数据与当前数据不一致,则写入。
+if( extension_id_js !== extension_id_js_WriteData ){
+ fs.writeFileSync(
+ extension_id_js_PATH ,
+ extension_id_js_WriteData
+ );
+}
+
+console.log('Write completed.');
+
+
+
+module.exports = {
+ // 用来压成一行的
+ optimization: {
+ minimize: true,
+ minimizer: [new TerserPlugin({
+ //允许多进程并发运行
+ parallel: true,
+ //配置
+ terserOptions: {
+ output:{
+ comments: false
+ }
+ },
+ //不留注释
+ extractComments: false,
+ })],
+ },
+ //使用这个模式才能做到有效压缩
+ mode: 'production', //process.env.NODE_ENV === 'production' ? 'production' : 'development',
+
+ entry: './index.js',
+ output: {
+ filename: 'main.js',
+ path: path.resolve(__dirname, 'build'),
+ module: true,
+ library: {
+ type: 'commonjs2'
+ },
+ },
+ experiments: {
+ outputModule: true
+ },
+ externals: {
+ 'clipcc-extension': 'ClipCCExtension'
+ },
+ externalsType: 'global',
+ plugins: [
+ new CopyWebpackPlugin({ patterns: [
+ // icon
+ {
+ from: path.join(__dirname, info.icon),
+ to: path.join(__dirname, 'build', info.icon),
+ },
+ // inset_icon
+ {
+ from: path.join(__dirname, info.inset_icon),
+ to: path.join(__dirname, 'build', info.inset_icon),
+ },
+ // info.json
+ {
+ from: path.join(__dirname, 'info.json'),
+ to: path.join(__dirname, 'build/info.json'),
+ // 压缩JSON
+ transform: ( content )=> JSON.stringify( JSON.parse( content.toString() ) )
+ },
+ // locales/*
+ {
+
+ from: path.join(__dirname, 'locales'),
+ to: path.join(__dirname, 'build/locales'),
+ // 补全JSON的键
+ transform: ( content )=>{
+ const inputjson = JSON.parse( content.toString() );
+ const outjson = {};
+ for( let i in inputjson ){
+ outjson[`${info.id}.${i}`] = inputjson[i];
+ }
+ return JSON.stringify( outjson );
+ }
+ },
+ ] }),
+ new ZipWebpackPlugin({
+ path: path.join(__dirname, 'dist'),
+ filename: `${info.id}@${info.version}`,
+ extension: 'ccx'
+ }),
+ ]
+}
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 0000000..820c0b4
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,1257 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@discoveryjs/json-ext@^0.5.0":
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
+ integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
+
+"@isaacs/cliui@^8.0.2":
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
+ integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==
+ dependencies:
+ string-width "^5.1.2"
+ string-width-cjs "npm:string-width@^4.2.0"
+ strip-ansi "^7.0.1"
+ strip-ansi-cjs "npm:strip-ansi@^6.0.1"
+ wrap-ansi "^8.1.0"
+ wrap-ansi-cjs "npm:wrap-ansi@^7.0.0"
+
+"@jridgewell/gen-mapping@^0.3.0":
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098"
+ integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==
+ dependencies:
+ "@jridgewell/set-array" "^1.0.1"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+ "@jridgewell/trace-mapping" "^0.3.9"
+
+"@jridgewell/resolve-uri@3.1.0":
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
+ integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
+
+"@jridgewell/set-array@^1.0.1":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
+ integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
+
+"@jridgewell/source-map@^0.3.3":
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda"
+ integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==
+ dependencies:
+ "@jridgewell/gen-mapping" "^0.3.0"
+ "@jridgewell/trace-mapping" "^0.3.9"
+
+"@jridgewell/sourcemap-codec@1.4.14":
+ version "1.4.14"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
+ integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
+
+"@jridgewell/sourcemap-codec@^1.4.10":
+ version "1.4.15"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
+ integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+
+"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
+ version "0.3.18"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6"
+ integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==
+ dependencies:
+ "@jridgewell/resolve-uri" "3.1.0"
+ "@jridgewell/sourcemap-codec" "1.4.14"
+
+"@nodelib/fs.scandir@2.1.5":
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
+ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
+ dependencies:
+ "@nodelib/fs.stat" "2.0.5"
+ run-parallel "^1.1.9"
+
+"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
+ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
+
+"@nodelib/fs.walk@^1.2.3":
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
+ integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
+ dependencies:
+ "@nodelib/fs.scandir" "2.1.5"
+ fastq "^1.6.0"
+
+"@pkgjs/parseargs@^0.11.0":
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
+ integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
+
+"@types/eslint-scope@^3.7.3":
+ version "3.7.4"
+ resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16"
+ integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==
+ dependencies:
+ "@types/eslint" "*"
+ "@types/estree" "*"
+
+"@types/eslint@*":
+ version "8.40.2"
+ resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.40.2.tgz#2833bc112d809677864a4b0e7d1de4f04d7dac2d"
+ integrity sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==
+ dependencies:
+ "@types/estree" "*"
+ "@types/json-schema" "*"
+
+"@types/estree@*", "@types/estree@^1.0.0":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194"
+ integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==
+
+"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
+ version "7.0.12"
+ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb"
+ integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==
+
+"@types/node@*":
+ version "20.3.1"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe"
+ integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==
+
+"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24"
+ integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==
+ dependencies:
+ "@webassemblyjs/helper-numbers" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+
+"@webassemblyjs/floating-point-hex-parser@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431"
+ integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==
+
+"@webassemblyjs/helper-api-error@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768"
+ integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==
+
+"@webassemblyjs/helper-buffer@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093"
+ integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==
+
+"@webassemblyjs/helper-numbers@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5"
+ integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==
+ dependencies:
+ "@webassemblyjs/floating-point-hex-parser" "1.11.6"
+ "@webassemblyjs/helper-api-error" "1.11.6"
+ "@xtuc/long" "4.2.2"
+
+"@webassemblyjs/helper-wasm-bytecode@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9"
+ integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==
+
+"@webassemblyjs/helper-wasm-section@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577"
+ integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-buffer" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/wasm-gen" "1.11.6"
+
+"@webassemblyjs/ieee754@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a"
+ integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==
+ dependencies:
+ "@xtuc/ieee754" "^1.2.0"
+
+"@webassemblyjs/leb128@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7"
+ integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==
+ dependencies:
+ "@xtuc/long" "4.2.2"
+
+"@webassemblyjs/utf8@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a"
+ integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==
+
+"@webassemblyjs/wasm-edit@^1.11.5":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab"
+ integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-buffer" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/helper-wasm-section" "1.11.6"
+ "@webassemblyjs/wasm-gen" "1.11.6"
+ "@webassemblyjs/wasm-opt" "1.11.6"
+ "@webassemblyjs/wasm-parser" "1.11.6"
+ "@webassemblyjs/wast-printer" "1.11.6"
+
+"@webassemblyjs/wasm-gen@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268"
+ integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/ieee754" "1.11.6"
+ "@webassemblyjs/leb128" "1.11.6"
+ "@webassemblyjs/utf8" "1.11.6"
+
+"@webassemblyjs/wasm-opt@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2"
+ integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-buffer" "1.11.6"
+ "@webassemblyjs/wasm-gen" "1.11.6"
+ "@webassemblyjs/wasm-parser" "1.11.6"
+
+"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1"
+ integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-api-error" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/ieee754" "1.11.6"
+ "@webassemblyjs/leb128" "1.11.6"
+ "@webassemblyjs/utf8" "1.11.6"
+
+"@webassemblyjs/wast-printer@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20"
+ integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@xtuc/long" "4.2.2"
+
+"@webpack-cli/configtest@^2.1.1":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646"
+ integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==
+
+"@webpack-cli/info@^2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd"
+ integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==
+
+"@webpack-cli/serve@^2.0.5":
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e"
+ integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==
+
+"@xtuc/ieee754@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
+ integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==
+
+"@xtuc/long@4.2.2":
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
+ integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
+
+acorn-import-assertions@^1.9.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac"
+ integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==
+
+acorn@^8.7.1, acorn@^8.8.2:
+ version "8.9.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.9.0.tgz#78a16e3b2bcc198c10822786fa6679e245db5b59"
+ integrity sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==
+
+ajv-formats@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520"
+ integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==
+ dependencies:
+ ajv "^8.0.0"
+
+ajv-keywords@^3.5.2:
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
+ integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
+
+ajv-keywords@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16"
+ integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==
+ dependencies:
+ fast-deep-equal "^3.1.3"
+
+ajv@^6.12.5:
+ version "6.12.6"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
+ integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ajv@^8.0.0, ajv@^8.9.0:
+ version "8.12.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1"
+ integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ json-schema-traverse "^1.0.0"
+ require-from-string "^2.0.2"
+ uri-js "^4.2.2"
+
+ansi-regex@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
+ integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
+
+ansi-regex@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"
+ integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==
+
+ansi-styles@^4.0.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
+ dependencies:
+ color-convert "^2.0.1"
+
+ansi-styles@^6.1.0:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
+ integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
+
+balanced-match@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
+
+brace-expansion@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
+ integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
+ dependencies:
+ balanced-match "^1.0.0"
+
+braces@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
+ dependencies:
+ fill-range "^7.0.1"
+
+browserslist@^4.14.5:
+ version "4.21.9"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635"
+ integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==
+ dependencies:
+ caniuse-lite "^1.0.30001503"
+ electron-to-chromium "^1.4.431"
+ node-releases "^2.0.12"
+ update-browserslist-db "^1.0.11"
+
+buffer-crc32@~0.2.3:
+ version "0.2.13"
+ resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
+ integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==
+
+buffer-from@^1.0.0:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
+ integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
+
+caniuse-lite@^1.0.30001503:
+ version "1.0.30001504"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz#eaf77e5c852dfa5f82c4924468c30602ac53744a"
+ integrity sha512-5uo7eoOp2mKbWyfMXnGO9rJWOGU8duvzEiYITW+wivukL7yHH4gX9yuRaobu6El4jPxo6jKZfG+N6fB621GD/Q==
+
+chrome-trace-event@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac"
+ integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==
+
+clipcc-extension@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/clipcc-extension/-/clipcc-extension-0.2.0.tgz#30b792fb90863fd8df4631f73f49f6f67d3ee5a8"
+ integrity sha512-Oqu26y37Ncavogm9DR42nm7tXT3GZj4UJFVHM39GZ31agiTCyjZdRckXlfT/Dg6hohotiyTz5MxoL2OKa+Sxeg==
+
+clone-deep@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
+ integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==
+ dependencies:
+ is-plain-object "^2.0.4"
+ kind-of "^6.0.2"
+ shallow-clone "^3.0.0"
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+colorette@^2.0.14:
+ version "2.0.20"
+ resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
+ integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==
+
+commander@^10.0.1:
+ version "10.0.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
+ integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
+
+commander@^2.20.0:
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
+commander@~2.13.0:
+ version "2.13.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
+ integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==
+
+copy-webpack-plugin@^11.0.0:
+ version "11.0.0"
+ resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz#96d4dbdb5f73d02dd72d0528d1958721ab72e04a"
+ integrity sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==
+ dependencies:
+ fast-glob "^3.2.11"
+ glob-parent "^6.0.1"
+ globby "^13.1.1"
+ normalize-path "^3.0.0"
+ schema-utils "^4.0.0"
+ serialize-javascript "^6.0.0"
+
+cross-spawn@^7.0.0, cross-spawn@^7.0.3:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
+ integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
+dir-glob@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
+ integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
+ dependencies:
+ path-type "^4.0.0"
+
+eastasianwidth@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
+ integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
+
+electron-to-chromium@^1.4.431:
+ version "1.4.433"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.433.tgz#305ef5f8ea5fe65d252aae4b0e1088f9e4842533"
+ integrity sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ==
+
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
+emoji-regex@^9.2.2:
+ version "9.2.2"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
+ integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
+
+enhanced-resolve@^5.15.0:
+ version "5.15.0"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35"
+ integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==
+ dependencies:
+ graceful-fs "^4.2.4"
+ tapable "^2.2.0"
+
+envinfo@^7.7.3:
+ version "7.8.1"
+ resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475"
+ integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==
+
+es-module-lexer@^1.2.1:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f"
+ integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==
+
+escalade@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
+ integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
+
+eslint-scope@5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
+ integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
+ dependencies:
+ esrecurse "^4.3.0"
+ estraverse "^4.1.1"
+
+esrecurse@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
+ integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
+ dependencies:
+ estraverse "^5.2.0"
+
+estraverse@^4.1.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
+estraverse@^5.2.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
+ integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
+
+events@^3.2.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
+ integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
+
+fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
+
+fast-glob@^3.2.11:
+ version "3.2.12"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
+ integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.2"
+ "@nodelib/fs.walk" "^1.2.3"
+ glob-parent "^5.1.2"
+ merge2 "^1.3.0"
+ micromatch "^4.0.4"
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
+
+fastest-levenshtein@^1.0.12:
+ version "1.0.16"
+ resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
+ integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==
+
+fastq@^1.6.0:
+ version "1.15.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
+ integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==
+ dependencies:
+ reusify "^1.0.4"
+
+fill-range@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
+ dependencies:
+ to-regex-range "^5.0.1"
+
+find-up@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
+ integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
+ dependencies:
+ locate-path "^5.0.0"
+ path-exists "^4.0.0"
+
+foreground-child@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d"
+ integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==
+ dependencies:
+ cross-spawn "^7.0.0"
+ signal-exit "^4.0.1"
+
+function-bind@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+glob-parent@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob-parent@^6.0.1:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
+ dependencies:
+ is-glob "^4.0.3"
+
+glob-to-regexp@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
+ integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
+
+glob@^10.2.5:
+ version "10.2.7"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.7.tgz#9dd2828cd5bc7bd861e7738d91e7113dda41d7d8"
+ integrity sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==
+ dependencies:
+ foreground-child "^3.1.0"
+ jackspeak "^2.0.3"
+ minimatch "^9.0.1"
+ minipass "^5.0.0 || ^6.0.2"
+ path-scurry "^1.7.0"
+
+globby@^13.1.1:
+ version "13.1.4"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317"
+ integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==
+ dependencies:
+ dir-glob "^3.0.1"
+ fast-glob "^3.2.11"
+ ignore "^5.2.0"
+ merge2 "^1.4.1"
+ slash "^4.0.0"
+
+graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
+ version "4.2.11"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
+ integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+ignore@^5.2.0:
+ version "5.2.4"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
+ integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
+
+import-local@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4"
+ integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==
+ dependencies:
+ pkg-dir "^4.2.0"
+ resolve-cwd "^3.0.0"
+
+interpret@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4"
+ integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==
+
+is-core-module@^2.11.0:
+ version "2.12.1"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd"
+ integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==
+ dependencies:
+ has "^1.0.3"
+
+is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
+
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
+is-glob@^4.0.1, is-glob@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-number@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
+
+is-plain-object@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
+ integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
+ dependencies:
+ isobject "^3.0.1"
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
+
+isobject@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
+ integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
+
+jackspeak@^2.0.3:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.2.1.tgz#655e8cf025d872c9c03d3eb63e8f0c024fef16a6"
+ integrity sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==
+ dependencies:
+ "@isaacs/cliui" "^8.0.2"
+ optionalDependencies:
+ "@pkgjs/parseargs" "^0.11.0"
+
+jest-worker@^27.4.5:
+ version "27.5.1"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0"
+ integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==
+ dependencies:
+ "@types/node" "*"
+ merge-stream "^2.0.0"
+ supports-color "^8.0.0"
+
+json-parse-even-better-errors@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
+ integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema-traverse@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
+ integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
+
+kind-of@^6.0.2:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
+ integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
+
+loader-runner@^4.2.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1"
+ integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==
+
+locate-path@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
+ integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
+ dependencies:
+ p-locate "^4.1.0"
+
+lru-cache@^9.1.1:
+ version "9.1.2"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.2.tgz#255fdbc14b75589d6d0e73644ca167a8db506835"
+ integrity sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==
+
+merge-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
+
+merge2@^1.3.0, merge2@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
+ integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+
+micromatch@^4.0.4:
+ version "4.0.5"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
+ integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
+ dependencies:
+ braces "^3.0.2"
+ picomatch "^2.3.1"
+
+mime-db@1.52.0:
+ version "1.52.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
+ integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
+
+mime-types@^2.1.27:
+ version "2.1.35"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
+ integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
+ dependencies:
+ mime-db "1.52.0"
+
+minimatch@^9.0.1:
+ version "9.0.1"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253"
+ integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==
+ dependencies:
+ brace-expansion "^2.0.1"
+
+"minipass@^5.0.0 || ^6.0.2":
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-6.0.2.tgz#542844b6c4ce95b202c0995b0a471f1229de4c81"
+ integrity sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==
+
+mkdirp@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50"
+ integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==
+
+neo-async@^2.6.2:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
+ integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
+
+node-releases@^2.0.12:
+ version "2.0.12"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039"
+ integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==
+
+normalize-path@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
+
+p-limit@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
+ integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
+ dependencies:
+ p-try "^2.0.0"
+
+p-locate@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
+ integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
+ dependencies:
+ p-limit "^2.2.0"
+
+p-try@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
+ integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
+
+path-exists@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
+ integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
+
+path-key@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
+
+path-parse@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
+
+path-scurry@^1.7.0:
+ version "1.9.2"
+ resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.9.2.tgz#90f9d296ac5e37e608028e28a447b11d385b3f63"
+ integrity sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==
+ dependencies:
+ lru-cache "^9.1.1"
+ minipass "^5.0.0 || ^6.0.2"
+
+path-type@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
+ integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+
+picocolors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
+ integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
+
+picomatch@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
+
+pkg-dir@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
+ integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
+ dependencies:
+ find-up "^4.0.0"
+
+punycode@^2.1.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
+ integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==
+
+queue-microtask@^1.2.2:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
+ integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
+
+randombytes@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
+ integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
+ dependencies:
+ safe-buffer "^5.1.0"
+
+rechoir@^0.8.0:
+ version "0.8.0"
+ resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22"
+ integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==
+ dependencies:
+ resolve "^1.20.0"
+
+require-from-string@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
+ integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
+
+resolve-cwd@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
+ integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==
+ dependencies:
+ resolve-from "^5.0.0"
+
+resolve-from@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
+ integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
+
+resolve@^1.20.0:
+ version "1.22.2"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f"
+ integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==
+ dependencies:
+ is-core-module "^2.11.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
+
+reusify@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
+ integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+
+rimraf@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.1.tgz#0881323ab94ad45fec7c0221f27ea1a142f3f0d0"
+ integrity sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==
+ dependencies:
+ glob "^10.2.5"
+
+run-parallel@^1.1.9:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
+ integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
+ dependencies:
+ queue-microtask "^1.2.2"
+
+safe-buffer@^5.1.0:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
+schema-utils@^3.1.1, schema-utils@^3.2.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe"
+ integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==
+ dependencies:
+ "@types/json-schema" "^7.0.8"
+ ajv "^6.12.5"
+ ajv-keywords "^3.5.2"
+
+schema-utils@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b"
+ integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==
+ dependencies:
+ "@types/json-schema" "^7.0.9"
+ ajv "^8.9.0"
+ ajv-formats "^2.1.1"
+ ajv-keywords "^5.1.0"
+
+serialize-javascript@^6.0.0, serialize-javascript@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c"
+ integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==
+ dependencies:
+ randombytes "^2.1.0"
+
+shallow-clone@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3"
+ integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==
+ dependencies:
+ kind-of "^6.0.2"
+
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
+ dependencies:
+ shebang-regex "^3.0.0"
+
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+
+signal-exit@^4.0.1:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967"
+ integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==
+
+slash@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
+ integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
+
+source-map-support@~0.5.20:
+ version "0.5.21"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
+ integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
+source-map@^0.6.0, source-map@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
+"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
+ name string-width-cjs
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.1"
+
+string-width@^5.0.1, string-width@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
+ integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==
+ dependencies:
+ eastasianwidth "^0.2.0"
+ emoji-regex "^9.2.2"
+ strip-ansi "^7.0.1"
+
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+ name strip-ansi-cjs
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
+ dependencies:
+ ansi-regex "^5.0.1"
+
+strip-ansi@^7.0.1:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
+ integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==
+ dependencies:
+ ansi-regex "^6.0.1"
+
+supports-color@^8.0.0:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
+ integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
+ dependencies:
+ has-flag "^4.0.0"
+
+supports-preserve-symlinks-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
+ integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
+
+tapable@^2.1.1, tapable@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
+ integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
+
+terser-webpack-plugin@^5.3.7:
+ version "5.3.9"
+ resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1"
+ integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==
+ dependencies:
+ "@jridgewell/trace-mapping" "^0.3.17"
+ jest-worker "^27.4.5"
+ schema-utils "^3.1.1"
+ serialize-javascript "^6.0.1"
+ terser "^5.16.8"
+
+terser@^5.16.8:
+ version "5.18.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-5.18.0.tgz#dc811fb8e3481a875d545bda247c8730ee4dc76b"
+ integrity sha512-pdL757Ig5a0I+owA42l6tIuEycRuM7FPY4n62h44mRLRfnOxJkkOHd6i89dOpwZlpF6JXBwaAHF6yWzFrt+QyA==
+ dependencies:
+ "@jridgewell/source-map" "^0.3.3"
+ acorn "^8.8.2"
+ commander "^2.20.0"
+ source-map-support "~0.5.20"
+
+to-regex-range@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
+ dependencies:
+ is-number "^7.0.0"
+
+uglify-es@^3.3.9:
+ version "3.3.9"
+ resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
+ integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==
+ dependencies:
+ commander "~2.13.0"
+ source-map "~0.6.1"
+
+update-browserslist-db@^1.0.11:
+ version "1.0.11"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940"
+ integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==
+ dependencies:
+ escalade "^3.1.1"
+ picocolors "^1.0.0"
+
+uri-js@^4.2.2:
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
+ integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
+ dependencies:
+ punycode "^2.1.0"
+
+watchpack@^2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
+ integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
+ dependencies:
+ glob-to-regexp "^0.4.1"
+ graceful-fs "^4.1.2"
+
+webpack-cli@^5.1.4:
+ version "5.1.4"
+ resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b"
+ integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==
+ dependencies:
+ "@discoveryjs/json-ext" "^0.5.0"
+ "@webpack-cli/configtest" "^2.1.1"
+ "@webpack-cli/info" "^2.0.2"
+ "@webpack-cli/serve" "^2.0.5"
+ colorette "^2.0.14"
+ commander "^10.0.1"
+ cross-spawn "^7.0.3"
+ envinfo "^7.7.3"
+ fastest-levenshtein "^1.0.12"
+ import-local "^3.0.2"
+ interpret "^3.1.1"
+ rechoir "^0.8.0"
+ webpack-merge "^5.7.3"
+
+webpack-merge@^5.7.3:
+ version "5.9.0"
+ resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.9.0.tgz#dc160a1c4cf512ceca515cc231669e9ddb133826"
+ integrity sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==
+ dependencies:
+ clone-deep "^4.0.1"
+ wildcard "^2.0.0"
+
+webpack-sources@^3.2.3:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
+ integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
+
+webpack@^5.87.0:
+ version "5.87.0"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.87.0.tgz#df8a9c094c6037f45e0d77598f9e59d33ca3a98c"
+ integrity sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==
+ dependencies:
+ "@types/eslint-scope" "^3.7.3"
+ "@types/estree" "^1.0.0"
+ "@webassemblyjs/ast" "^1.11.5"
+ "@webassemblyjs/wasm-edit" "^1.11.5"
+ "@webassemblyjs/wasm-parser" "^1.11.5"
+ acorn "^8.7.1"
+ acorn-import-assertions "^1.9.0"
+ browserslist "^4.14.5"
+ chrome-trace-event "^1.0.2"
+ enhanced-resolve "^5.15.0"
+ es-module-lexer "^1.2.1"
+ eslint-scope "5.1.1"
+ events "^3.2.0"
+ glob-to-regexp "^0.4.1"
+ graceful-fs "^4.2.9"
+ json-parse-even-better-errors "^2.3.1"
+ loader-runner "^4.2.0"
+ mime-types "^2.1.27"
+ neo-async "^2.6.2"
+ schema-utils "^3.2.0"
+ tapable "^2.1.1"
+ terser-webpack-plugin "^5.3.7"
+ watchpack "^2.4.0"
+ webpack-sources "^3.2.3"
+
+which@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
+ dependencies:
+ isexe "^2.0.0"
+
+wildcard@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67"
+ integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==
+
+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
+ dependencies:
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+
+wrap-ansi@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
+ integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==
+ dependencies:
+ ansi-styles "^6.1.0"
+ string-width "^5.0.1"
+ strip-ansi "^7.0.1"
+
+yazl@^2.5.1:
+ version "2.5.1"
+ resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35"
+ integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==
+ dependencies:
+ buffer-crc32 "~0.2.3"
+
+zip-webpack-plugin@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/zip-webpack-plugin/-/zip-webpack-plugin-4.0.1.tgz#95f09716ecf73e53d949443017cfb03afe597dd3"
+ integrity sha512-G041Q4qUaog44Ynit6gs4o+o3JIv0WWfOLvc8Q3IxvPfuqd2KBHhpJWAXUB9Cm1JcWHTIOp9vS3oGMWa1p1Ehw==
+ dependencies:
+ yazl "^2.5.1"