@fugood/bricks-cli 2.26.0-beta.35 → 2.26.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -2
- package/lib/1010.js +1 -1
- package/lib/1708.js +2 -2
- package/lib/2486.js +1 -1
- package/lib/2499.js +1 -0
- package/lib/2517.js +1 -1
- package/lib/6818.js +1 -1
- package/lib/7281.js +1 -1
- package/lib/7511.js +3 -3
- package/lib/907.js +91 -26
- package/lib/9439.js +5 -7
- package/lib/index.js +162 -120
- package/lib/lib.js +171 -86
- package/package.json +6 -6
- package/lib/3332.js +0 -13
package/lib/7511.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const __rspack_esm_id=7511;export const __rspack_esm_ids=[7511];export const __webpack_modules__={66422(e,t){let r=e=>`PROPERTY_BANK_DATA_NODE_${e}`,i={isLocalSyncMainDevice:{id:r("325068e3-89b6-4c6a-942b-126d38c84a62"),title:"SYSTEM: Is Local Sync Main Device",description:"The current device is main for local sync",type:"bool",value:!0},currentCanvasId:{id:r("2dfeb635-deb4-481a-9d17-ea7b1fe19f74"),title:"SYSTEM: Current Canvas ID",description:"ID for known current canvas",type:"string",value:""},previousCanvasId:{id:r("2971e463-0b0e-45b7-bbfb-a01d8fd49db3"),title:"SYSTEM: Previous Canvas ID",description:"ID for known previous canvas",type:"string",value:""},canvasIdHistory:{id:r("1a086f39-817d-40ed-92f0-5a999535d3dd"),title:"SYSTEM: Change Canvas History",description:"Change Canvas ID History (Limit: 10)",type:"array",schema:{type:"string",allowNewItem:!1,allowCustomProperty:!1},value:[]},rootSubspaceInfo:{id:r("c0817f4a-1ff3-40ed-9cbf-71d8cefd2cd9"),title:"SYSTEM: Root Subspace Info",description:"Root Subspace Information",type:"object",value:{}},subspaceInfo:{id:r("2657ec09-7323-46c3-a96e-3d8b5a0f79b3"),title:"SYSTEM: Current Subspace Info",description:"Current Subspace Information",type:"object",value:{}},uniqueID:{id:r("6f4a543f-a88a-4a83-bf53-223259263be3"),title:"SYSTEM: Unique ID",description:"Unique ID of current device",type:"string",value:"unknown"},appVersion:{id:r("d614a258-2a45-4f91-9f6b-3936038cb2b1"),title:"SYSTEM: App Version",description:"App Version of current installed BRICKS Foundation app",type:"string",value:"unknown"},lastUpdateTime:{id:r("956f3b3e-cb0b-47ca-8119-65663910d110"),title:"SYSTEM: Last Update Time",description:"Last update time of current installed BRICKS Foundation app",type:"string",value:"2019-07-09T03:32:27.058Z"},deviceName:{id:r("7b9d9ad4-e9a2-47cd-91d3-b64187895c16"),title:"SYSTEM: Device Name",description:"Name of current device",type:"string",value:"Default Device Name"},deviceType:{id:r("b0beae12-e45e-4870-ae15-858eeac566fa"),title:"SYSTEM: Device Type",description:"Type of current device (Handset, Tv, Tablet)",type:"string",value:"Tv"},operationMode:{id:r("2e715d3b-92bf-4761-b5c0-ca21f7c1ada8"),title:"SYSTEM: Operation Mode",description:"Operation Mode of current device (android, ios, ...)",type:"string",value:"android"},operationVersion:{id:r("fa886963-0a16-4b5f-b4ea-6c25b049db03"),title:"SYSTEM: Operation Version",description:"Operation Version of current device",type:"string",value:""},screenWidth:{id:r("2942470a-c3bc-413e-8f2c-30a89aded3f8"),title:"SYSTEM: Screen Width",description:"Width of current device main screen",type:"number",value:1280},screenHeight:{id:r("4f031e27-f67b-40e0-a317-9f6c5215d97d"),title:"SYSTEM: Screen Height",description:"Height of current device main screen",type:"number",value:768},screenScale:{id:r("c3c9b7aa-1dc1-4be1-8a4a-d9e299b9eeaa"),title:"SYSTEM: Screen Scale",description:"Scale of current device main screen",type:"number",value:2},screenFontScale:{id:r("0312f380-d525-4938-82d2-5b35ef8ef1e8"),title:"SYSTEM: Screen Font Scale",description:"Font scale of current device main screen",type:"number",value:1},orientation:{id:r("4f584f51-a250-4f97-a2f8-d5e6a3affb4f"),title:"SYSTEM: Orientation",description:"Orientation of current device main screen",type:"string",value:"landspace"},touchAvailable:{id:r("1fe7555f-df41-43ce-a268-3ea1b5efda6d"),title:"SYSTEM: Touch Available",description:"Is touch available of current device main screen?",type:"bool",value:!0},soundAvailable:{id:r("bf839498-f7d6-4212-ac3a-b409e3ad77a5"),title:"SYSTEM: Sound Available",description:"Is sound available of current device?",type:"bool",value:!0},cameraAvailable:{id:r("4878f3c2-8bb8-4c94-855c-06bda5a287d5"),title:"SYSTEM: Camera Available",description:"Is camera available of current device?",type:"bool",value:!0},audioInputAvailable:{id:r("4854b259-96c1-40d7-b17b-47156b4698dc"),title:"SYSTEM: Audio Input Available",description:"Is audio input available of current device?",type:"bool",value:!1},networkType:{id:r("1cbb1756-e53c-45a9-be23-5d84a214e144"),title:"SYSTEM: Network Type",description:"Network Type of current device",type:"string",value:"wifi"},networkConnected:{id:r("687b62fe-ead5-417a-b415-9bd5233784a4"),title:"SYSTEM: Network Connected",description:"Is Network connected of current device?",type:"bool",value:!0},networkIpAddress:{id:r("41971ba7-8294-4aa6-a425-ecd39853c3e6"),title:"SYSTEM: Network IP Address",description:"Current network IP address",type:"string",value:""},networkDetails:{id:r("9351fbfc-4ace-477a-b05d-41ac9b05087d"),title:"SYSTEM: Network Details",description:"Network details, provide different data depends on Network Type",type:"object",value:null},isInternetReachable:{id:r("e367ae7e-46ec-46d0-b87d-51e544591ff9"),title:"SYSTEM: Internet Reachable",description:"Is Internet reachable?",type:"bool",value:!0},isWifiEnabled:{id:r("be395305-fb85-4d05-8506-22a4ae8c7b9e"),title:"SYSTEM: Wifi Enabled",description:"Is WiFi enabled?",type:"bool",value:!0},deviceDisplayName:{id:r("76356a9a-fc46-11ec-9905-db53d6811cb7"),title:"SYSTEM: Device Display Name",description:"Current device display name",type:"string",value:""},workspaceName:{id:r("d857125e-0401-40f1-b768-56190aa8e147"),title:"SYSTEM: Workspace Name",description:"Current workspace name",type:"string",value:""},applicationInfo:{id:r("935d3322-84aa-4465-b1e7-241d1f024267"),title:"SYSTEM: Application Info",description:"Current application info",type:"object",value:{}},applicationName:{id:r("df395fd6-a754-4b60-8bac-1360933e6707"),title:"SYSTEM: Application Name",description:"Current application name",type:"string",value:""},deviceID:{id:r("8b5c2d9e-f0a1-4b2c-8d3e-4f5a6b7c8d9e"),title:"SYSTEM: Device ID",description:"Device ID of current device",type:"string",value:"unknown"},macAddress:{id:r("f01fcc78-0723-11ed-ac00-877339de1030"),title:"SYSTEM: MAC Address",description:"Network adapter MAC address of current device",type:"string",value:""},bindDeviceCode:{id:r("1ca90262-3584-11ed-8c9a-174949844872"),title:"SYSTEM: Bind Device Code",description:"The passcode to bind the device",type:"string",value:"",hide:!0},bindDeviceCodeExpire:{id:r("5b52d204-3584-11ed-bb5e-abb4d270daf1"),title:"SYSTEM: Bind Device Code Expire Time",description:"The expire time of bind passcode",type:"string",value:"",hide:!0},bindDeviceUrl:{id:r("833a7db2-3584-11ed-88dd-3b3d3ff58855"),title:"SYSTEM: Bind Device URL",description:"The URL to bind the device",type:"string",value:"",hide:!0},bindDeviceUseApplication:{id:r("631bbce8-9c90-4590-b8ec-8b27f4a0e50b"),title:"SYSTEM: Selected Application on Bind Device",description:"Current selected use application info on Bind Device",type:"object",value:null,hide:!0},isApplicationPreview:{id:r("c673967a-3996-11ed-96d9-efbc3f7eac53"),title:"SYSTEM: Is Preview Mode",description:"Is current in preview mode?",type:"bool",value:"",hide:!0},isSupportAuthInDevice:{id:r("beb2a666-3e18-11ed-bdab-6f0cb082fa67"),title:"SYSTEM: Is Support Auth In Device",description:"Is current device support auth in device?",type:"bool",value:"",hide:!0},env:{id:r("74e7a574-1099-4fe5-b193-8a9ea7d20ed0"),title:"SYSTEM: Environment Variables",description:"Environment Variables of the device",type:"object",value:{}},isViewDebugModeEnabled:{id:r("3f61c4f6-1e02-492e-8e4c-a8dc4a5bc101"),title:"SYSTEM: Is View Debug mode Enabled",description:"Is View Debug mode enabled?",type:"bool",value:!1},language:{id:r("f0ed0a03-6195-459f-9ffe-bca61923f94e"),title:"SYSTEM: Language",description:"Language of the device",type:"string",value:""},aiFilters:{id:r("3ffc1e98-8f65-4cc8-a949-3da8d2092ccb"),title:"SYSTEM: AI Filters",description:"AI filters configuration from the application",type:"array",value:[]},systemOpenAIApiKey:{id:r("a1b2c3d4-5e6f-7890-abcd-ef1234567890"),title:"SYSTEM: OpenAI API Key",description:"System OpenAI API Key (only available if application enabled)",type:"string",value:""},systemAnthropicApiKey:{id:r("b2c3d4e5-6f78-9012-bcde-f23456789012"),title:"SYSTEM: Anthropic API Key",description:"System Anthropic API Key (only available if application enabled)",type:"string",value:""},systemGeminiApiKey:{id:r("c3d4e5f6-7890-1234-cdef-345678901234"),title:"SYSTEM: Gemini API Key",description:"System Gemini API Key (only available if application enabled)",type:"string",value:""},ggmlBackendDevices:{id:r("9e8f7a6b-5c4d-3e2f-1a0b-9c8d7e6f5a4b"),title:"SYSTEM: GGML Backend Devices",description:"Available GGML backend devices with supported generators",type:"array",schema:{type:"object",allowNewItem:!1,allowCustomProperty:!1},value:[]}};t.idMap=Object.entries(i).reduce((e,[t,r])=>(e[t]=r.id,e),{}),Object.fromEntries(Object.entries(t.idMap).map(([e,t])=>[t,e])),t.MI=Object.entries(i).reduce((e,[t,r])=>{let{id:i,...a}=r;return e[t]=a,e},{}),Object.keys(t.MI)},18501(e,t,r){let{docs:i}=r(5867);t.isCommand=e=>!!(e&&e.type&&e.type.startsWith("command-node-")),t.isScriptCommand=e=>!!e&&"command-node-script"===e.type,t.getPorts=e=>e?Array.isArray(e)?e:[e]:[];let a=e=>i[e.type.replace("command-node-","")]?.commands?.[e.properties?.command];t.getCommandDoc=a,t.getCommandCallbackFromPort=(e,r)=>{let i=e[r];if(!t.isCommand(i))return null;let n=a(i);return n?.iterateeFrom||n?.invocationFrom||null};let n=e=>t.getPorts(e).some(e=>e?.disable_trigger_command);t.checkDisableTriggerCommand=(e,t)=>n(e[t.id]?.in?.[t.port]),t.findCircularReferenceIds=e=>{let r,i,a=(r=new Map,i=new Map,Object.keys(e).reduce((a,s)=>{let o=[];return Object.values(e[s]?.out||{}).forEach(a=>{t.getPorts(a).forEach(a=>{((e,r,i,a)=>{var s;if(!r||!e[r.id]||r.port===(s=r.id,i.has(s)||i.set(s,t.getCommandCallbackFromPort(e,s)),i.get(s)))return!1;let o=e[r.id]?.in?.[r.port];return!Array.isArray(o)||o.length<2?!n(o):(a.has(o)||a.set(o,n(o)),!a.get(o))})(e,a,r,i)&&o.push(a.id)})}),a[s]=o,a},{})),s=new Map;return Object.keys(e).filter(t=>e[t]?.type==="data-node").filter(e=>((e,t,r)=>{if(r.has(e))return r.get(e);let i=[{id:e,edgeIndex:0,reachesCycle:!1}],a=new Set([e]);for(;i.length>0;){let e=i[i.length-1],n=t[e.id]||[];if(e.reachesCycle||e.edgeIndex>=n.length){a.delete(e.id),r.set(e.id,e.reachesCycle),i.pop(),e.reachesCycle&&i.length>0&&(i[i.length-1].reachesCycle=!0);continue}let s=n[e.edgeIndex];if(e.edgeIndex+=1,r.has(s)){r.get(s)&&(e.reachesCycle=!0);continue}if(a.has(s)){e.reachesCycle=!0;continue}a.add(s),i.push({id:s,edgeIndex:0,reachesCycle:!1})}return r.get(e)||!1})(e,a,s))},t.hasCircularReference=e=>t.findCircularReferenceIds(e).length>0;let s=(e={})=>Object.entries(e).reduce((e,[t,r])=>(e[t]=Array.isArray(r)?r.slice():r,e),{}),o=new WeakSet,c=(e,t,r)=>{if(!r)return;let i=((e,t)=>{let r=e[t];if(!r)return e[t]=[],e[t];if(!Array.isArray(r))return e[t]=[r],e[t];if(!o.has(r)){let e=0;for(let t of r)t&&(r[e]=t,e+=1);r.length=e,o.add(r)}return r})(e,t);(Array.isArray(r)?r:[r]).forEach(e=>{e&&i.push(e)})};t.getCalcMap=e=>e?.script_map||e?.scriptMap||e?.map||{},t.composeMap=e=>Object.values(e).reduce((e,r)=>Object.entries(t.getCalcMap(r)).reduce((e,[r,i])=>{if(e[r]){if(t.isCommand(i))throw Error(`Doesn't allow same command id in another map, ${r}`);let a=e[r];Object.keys(i?.in||{}).forEach(e=>{c(a.in,e,i.in[e])}),Object.keys(i?.out||{}).forEach(e=>{c(a.out,e,i.out[e])})}else e[r]={...i,in:s(i?.in),out:s(i?.out)};return e},e),{}),t.isInputTriggerPort=(e,r)=>t.getPorts(r).some(r=>{let i;return r&&(i=e[r.id],i?.type==="data-node"&&!Object.values(i.in||{}).some(e=>t.getPorts(e).length>0))});let l=(e,r)=>Object.entries(e||{}).forEach(([i,a])=>{t.isCommand(a)&&Object.entries(a.in||{}).forEach(([a,n])=>{t.isInputTriggerPort(e,n)&&r(i,a,t.getPorts(n))})}),d=(e,t)=>{let r=e;return l(e,(i,a,n)=>{let s=t(i,a);n.every(e=>!e||!!e.disable_trigger_command===s)||(r===e&&(r={...e}),r[i]===e[i]&&(r[i]={...e[i],in:{...e[i].in}}),r[i].in[a]=n.map(e=>{if(!e)return e;let{disable_trigger_command:t,...r}=e;return s?{...r,disable_trigger_command:!0}:r}))}),r};t.getDisabledInputTriggers=e=>{let t={};return l(e,(e,r,i)=>{i.some(e=>e?.disable_trigger_command)&&(t[e]={...t[e],[r]:!0})}),t},t.disableInputTriggers=e=>d(e,()=>!0),t.restoreInputTriggers=(e,t={})=>d(e,(e,r)=>!!t[e]?.[r])},86343(e,t,r){let{v4:i}=r(45620),a=r(95479),n=r(56005),{nameMap:s,brickMapping:o,generatorMapping:c}=r(63981);t.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,t.getAnimationType=e=>e.type||e.compose_type||e.composeType,t.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[t,r])=>((r.type||r.compose_type)&&(e[t]=r),e),{}),t.matchItemByItem=(e,t)=>{let r;if(!e)return!1;switch("string"==typeof t&&(r=t),e.type){case"brick":return e.brick_id===(r||t.brick_id);case"subspace":return e.subspace_id===(r||t.subspace_id);case"canvas":return e.canvas_id===(r||t.canvas_id);case"generator":return e.generator_id===(r||t.generator_id);case"property_bank":return e.property_bank_id===(r||t.property_bank_id);default:return!1}},t.makePasscode=()=>i(),t.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","mlx-model-asset","binary-asset","scene3d-objects"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},t.getKindOneOfTypes=(e,r)=>"array"===e?"object"===r?t.kindOneOfTypes[`${e}-${r}`]:void 0:t.kindOneOfTypes[e],t.unitOneOfTypes=["grid","px","ms"],t.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],t.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},t.getBrickName=(e,r,i)=>{let n;if(!r)return e.toUpperCase();if(r.title)return r.title;switch(e){case"bank":n="BANK";break;case"subspace":n="SUBSPACE";break;case"canvas":n="CANVAS";break;case"animation":n=`<${a(t.getAnimationType(r))}>`;break;case"property_bank":n="<Data>";break;case"property_bank_calc":n="<Map>";break;case"state_group":n="<Switch Case>";break;default:n=`<${s[r.template_key||r.templateKey]||"Unknown"}>`}return i&&i.length>10?n+=` (${i.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:i&&(n+=` (${i})`),n},t.getEventLabel=(e,{templateKey:t,itemType:r}={})=>{if(!e)return"";let i=e;return"subspace"===r?i=e.replace("SUBSPACE_ACTION_",""):t&&(i=e.replace(`${t}_`,"").replace("CANVAS_","")),a(n(a(i)))},t.getCallInternalActions=e=>{let t=o[e]||c[e];if(t)return t.callInternalActions},t.mapToList=(e,r)=>Object.entries(r).reduce((r,[i,a])=>(r.push({id:i,...a,title:t.getBrickName(e,a,i)}),r),[]);let l={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},d={};t.mapToListForDerivedState=(e,r,i,a)=>{let n=i[e]||d;return n!==a[e]?{[e]:n,[r]:t.mapToList(l[e],n)}:{}},t.arrayTypePrefix="array of ",t.propertyBankTypes=["string","number","bool","object","any",`${t.arrayTypePrefix}string`,`${t.arrayTypePrefix}number`,`${t.arrayTypePrefix}bool`,`${t.arrayTypePrefix}object`],t.animationRunTypes=["once","loop"],t.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},t.nestedTypes=["object","array","any"],t.isPropertyBankTypeNested=e=>t.nestedTypes.includes(e),t.propertyTypeToSchema=e=>{let r=e.indexOf(t.arrayTypePrefix)>-1,i=e.replace(t.arrayTypePrefix,"");return{type:i,properties:"object"===i?{}:void 0,allowNewItem:r,allowCustomProperty:"object"===i}}},33770(e,t,r){let{idMap:i}=r(66422),{forEachEventAction:a,getActionParam:n}=r(78078),s="PROPERTY_BANK_DATA_NODE_",o=new Set(Object.values(i||{}).filter(e=>"string"==typeof e&&e.startsWith(s)));e.exports=function(e){let t,r,i=[],c=(t=new Set(o),Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.property_bank_map||{}).forEach(e=>t.add(e))}),t),l=(r=new Set,Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.canvas_map||{}).forEach(e=>r.add(e))}),r);return a(e,(e,t)=>{if("PROPERTY_BANK_EXPRESSION"===e.action){let r;Array.isArray(r=n(e,"VARIABLES"))&&r.forEach((e,r)=>{let a=e?.id;if("string"!=typeof a||!a.startsWith(s)||c.has(a))return;let n=e.key?`\`${e.key}\``:`at index ${r}`;i.push({field:`${t}.VARIABLES[${r}].id`,message:`PROPERTY_BANK_EXPRESSION variable ${n} references data node \`${a}\`, which is not defined in any subspace.`})})}else"CHANGE_CANVAS"===e.action&&((e,t,r,i)=>{if("SYSTEM"!==e.handler)return;let a=n(e,"CANVAS_ID");"string"!=typeof a||!a||a.startsWith("PROPERTY_BANK#")||a.startsWith("VARIABLE#")||!a.startsWith("CANVAS_")||r.has(a)||i.push({field:`${t}.CANVAS_ID`,message:`CHANGE_CANVAS references canvas \`${a}\`, which is not defined in any subspace.`})})(e,t,l,i)}),i}},37517(e,t,r){let{composeMap:i,findCircularReferenceIds:a}=r(18501);e.exports=function(e){let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{if(!r||"object"!=typeof r||r.module?.link)return;let n=r.property_bank_calc_map;if(!n||0===Object.keys(n).length)return;let s=`subspace_map.${e}.property_bank_calc_map`;try{let e=i(n),r=a(e);if(r.length>0){let i=r.slice(0,5).map(t=>e[t].title||t),a=r.length>5?` and ${r.length-5} more`:"";t.push({field:s,message:`Circular reference detected in data calculation. Affected nodes: ${i.join(", ")}${a}. Please check the data connections for loops.`})}}catch(e){t.push({field:s,message:e.message})}}),t}},41900(e){let t=e=>{if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return e.some(t);if("FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type||"FunctionDeclaration"===e.type)return!1;if("AssignmentExpression"===e.type&&e.left?.type!=="Identifier"||"UpdateExpression"===e.type&&e.argument?.type!=="Identifier")return!0;for(let r of Object.keys(e))if("type"!==r&&t(e[r]))return!0;return!1};e.exports={expressionFoldAcornOptions:{ecmaVersion:2022,allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0},getUnfoldableStatementDescription:(e,r=null)=>{for(let r=0;r<e.length;r+=1){let i=e[r];if(t(i))return"a write to a member or computed target";if("ExpressionStatement"!==i.type){if("VariableDeclaration"===i.type){if(i.declarations.some(e=>"Identifier"!==e.id.type||!e.init))return"a variable declaration with destructuring or no initializer";continue}if(r!==e.length-1||"ReturnStatement"!==i.type)return`an unsupported ${i.type}`}}return r},writesToNonIdentifierTarget:t}},78078(e,t,r){let{parse:i}=r(89236),{expressionFoldAcornOptions:a}=r(41900),n=(e,t)=>{let r=e.parameter_list||e.parameterList||[];if(!Array.isArray(r))return;let i=r.find(e=>(e?.input_to_receiver||e?.inputToReceiver)===t);return i?i.result_from_sender??i.resultFromSender:void 0},s=(e,t,r)=>{if(e&&"object"==typeof e){if(Array.isArray(e))return void e.forEach((e,i)=>s(e,`${t}[${i}]`,r));Object.entries(e).forEach(([e,i])=>{("event_map"===e||"eventMap"===e)&&i&&"object"==typeof i?Object.entries(i).forEach(([i,a])=>{Array.isArray(a)&&a.forEach((a,n)=>{a&&"object"==typeof a&&r(a,`${t}.${e}.${i}[${n}]`)})}):i&&"object"==typeof i&&s(i,`${t}.${e}`,r)})}},o=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,r])=>{!r||"object"!=typeof r||r.module?.link||s(r,`subspace_map.${e}`,t)})};e.exports=function(e){let t=[];return o(e,(e,r)=>{if("PROPERTY_BANK_EXPRESSION"!==e.action)return;let s=n(e,"EXPRESSION");if("string"!=typeof s||s.startsWith("PROPERTY_BANK#"))return;let o=(e=>{if(!e.trim())return"Expression is empty";try{i(e,a)}catch(e){return`Expression does not parse: ${e.message}`}return null})(s);o&&t.push({field:r,message:o})}),t},e.exports.forEachEventAction=o,e.exports.getActionParam=n},38890(e,t,r){let{getDocByTemplateKey:i}=r(63981),a=r(80211),n=r(45907),s=r(37517),o=r(78078),c=r(33770),l=r(69516),{lintConfig:d,lintRuleCodes:p}=r(9098),{getBrickName:u}=r(86343);t.lintConfig=d,t.lintRuleCodes=p;let f=(e,t,r,i)=>({id:e,name:"Used Deprecated Feature",data:`The \`${u("brick",t,e)}\` brick in \`${u("subspace",r,i)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`});t.checkConfigDeprecatedFeatures=e=>{let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{r&&"object"==typeof r&&(Object.entries(r.brick_map||{}).forEach(([a,n])=>{(void 0!==n.property?.borderLeftWidth||void 0!==n.property?.borderRightWidth||void 0!==n.property?.borderTopWidth||void 0!==n.property?.borderBottomWidth)&&t.push({id:a,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${u("brick",n,a)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});let s=i(n.template_key);s?.brickMeta?.deprecated&&t.push(f(a,n,r,e))}),Object.entries(r.generator_map||{}).forEach(([a,n])=>{let s=i(n.template_key);s?.brickMeta?.deprecated&&t.push(f(a,n,r,e))}))}),t};let m=({instancePath:e,field:t,message:r})=>{let i=e||t;return i?`${i}: ${r}`:`${r??""}`};t.checkConfig=(e,t={})=>{let r={schema:a(e),ref:n(e,t),calc:t.checkCalc?s(e):[],expression:t.checkExpressions?o(e):[],actionRef:t.checkActionRefs?c(e):[],itemsEventMap:t.checkItemsEventMaps?l(e):[]};return r.valid=0===r.schema.length&&0===r.ref.length&&0===r.calc.length&&0===r.expression.length&&0===r.actionRef.length&&0===r.itemsEventMap.length,r.message=(e=>{let t="",r=0;for(let i of e){let e=0===r?i:`${t}
|
|
2
|
-
${
|
|
3
|
-
…and ${i} more`:t})(r.schema.concat(r.ref).concat(r.calc).concat(r.expression).concat(r.actionRef).concat(r.itemsEventMap).map(m)),r}},69516(e,t,r){let i=r(80211),{templateSupportInnerRefs:a}=r(30302);e.exports=function(e){let t=[],r=i.ajv.getSchema("http://display.bricks.tools/event_map_camel.schema.json5");return Object.entries(e.subspace_map||{}).forEach(([e,i])=>{!i||"object"!=typeof i||i.module?.link||Object.entries(i.brick_map||{}).forEach(([i,n])=>{let s=a.find(e=>e.key===n?.template_key);s&&n.property&&s.listProps.forEach(a=>{let s=n.property[a];Array.isArray(s)&&s.forEach((n,s)=>{if(!n||"object"!=typeof n)return;let o=`subspace_map.${e}.brick_map.${i}.property.${a}[${s}]`;"event_map"in n&&t.push({field:`${o}.event_map`,message:"items-list entries store their event map in camelCase as `eventMap`; this snake_case `event_map` key is never read by the runtime or the editor (dead data, typically left by an old Short Edit write) — remove it."}),void 0!==n.eventMap&&null!==n.eventMap&&(r(n.eventMap)||r.errors.forEach(e=>{t.push({field:`${o}.eventMap${e.instancePath.split("/").filter(Boolean).map(e=>/^\d+$/.test(e)?`[${e}]`:`.${e}`).join("")}`,message:e.message})}))})})})}),t}},27899(e){let t=["x","y","width","height"],r=e=>"string"==typeof e&&e.startsWith("PROPERTY_BANK_"),i=/PROPERTY_BANK#(PROPERTY_BANK_[A-Za-z0-9_-]+)/g,a=/(?:BRICK|ANIMATION|SUBSPACE)_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/g,n=(e,t=new Set)=>{if("string"==typeof e){let r;for(i.lastIndex=0;r=i.exec(e);)t.add(r[1])}else Array.isArray(e)?e.forEach(e=>n(e,t)):e&&"object"==typeof e&&(r(e.id)&&t.add(e.id),Object.values(e).forEach(e=>n(e,t)));return t},s=(e,t)=>{if("string"==typeof e){let r;for(a.lastIndex=0;r=a.exec(e);)t.add(r[0])}else Array.isArray(e)?e.forEach(e=>s(e,t)):e&&"object"==typeof e&&Object.values(e).forEach(e=>s(e,t));return t},o=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,r])=>{!r||"object"!=typeof r||r.module?.link||t(e,r)})},c=(e,t)=>{o(e,(e,r)=>{Object.entries(r.canvas_map||{}).forEach(([i,a])=>{let n=Array.isArray(a?.item_list)?a.item_list:[];t({subspaceId:e,subspace:r,canvasId:i,canvas:a,items:n})})})},l=[["brick_map","brick"],["generator_map","generator"],["property_bank_map","property_bank"],["canvas_map","canvas"]],d=(e,t,r)=>{l.forEach(([i,a])=>{Object.entries(t[i]||{}).forEach(([t,n])=>{Object.entries(n?.event_map||{}).forEach(([n,s])=>{Array.isArray(s)&&r({ownerType:a,ownerId:t,eventKey:n,list:s,path:`subspace_map.${e}.${i}.${t}.event_map.${n}`})})})})},p=(e,t)=>{o(e,(e,r)=>{d(e,r,i=>{i.list.forEach((a,n)=>{t({subspaceId:e,subspace:r,...i,entry:a,index:n})})})})},u=(e,t)=>(e.parameter_list||[]).find(e=>e?.input_to_receiver===t)?.result_from_sender;e.exports={FRAME_KEYS:t,isBankNodeId:r,collectBankReads:n,forEachSubspace:o,forEachCanvas:c,forEachCanvasItem:(e,t)=>{c(e,e=>{e.items.forEach((r,i)=>{t({...e,item:r,index:i})})})},forEachEventList:d,forEachEventEntry:p,getParamValue:u,hasParamValue:(e,t)=>{let r=u(e,t);return null!=r&&""!==r},collectDynamicallyReferencedIds:e=>{let t=new Set;return p(e,({entry:e})=>{s(e?.parameter_list,t)}),s(e.automation_map,t),s(e.test_map,t),t},frameIsNumeric:e=>!!e&&t.every(t=>"number"==typeof e[t]),framesAlmostEqual:(e,r,i=.01)=>t.every(t=>Math.abs(e[t]-r[t])<=i),frameContains:(e,t,r=.01)=>e.x<=t.x+r&&e.y<=t.y+r&&e.x+e.width>=t.x+t.width-r&&e.y+e.height>=t.y+t.height-r,framesIntersect:(e,t)=>!(e.x+e.width<=t.x||t.x+t.width<=e.x||e.y+e.height<=t.y||t.y+t.height<=e.y),getItemId:e=>e?.brick_id||e?.subspace_id||null,itemHasAnimations:e=>!!e?.animations&&Object.keys(e.animations).length>0}},9098(e,t,r){let{collectDynamicallyReferencedIds:i}=r(27899),a=[r(98632),r(84223),r(92260),r(96810),r(60760),r(40566),r(31172),r(59707),r(39425),r(78899)],n=a.map(e=>e.code),s=e=>Array.isArray(e)?e:"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null;e.exports={lintConfig:(e,t={})=>{let r,o=s(t.only),c=s(t.ignore),l=[...o||[],...c||[]].filter(e=>!n.includes(e));if(l.length>0)throw Error(`Unknown lint rule code(s): ${l.join(", ")}. Valid codes: ${n.join(", ")}`);if(!e||"object"!=typeof e)return[];let d=a.filter(e=>(!o||o.includes(e.code))&&(!c||!c.includes(e.code)));if(0===d.length)return[];let p={configType:"module"===t.configType?"module":"app",gridStep:"number"==typeof t.gridStep&&t.gridStep>0?t.gridStep:.5,get dynamicRefIds(){return r||(r=i(e)),r}},u=[];return d.forEach(t=>{try{t.check(e,p,e=>u.push({severity:t.severity,code:t.code,path:"",subspaceId:null,itemId:null,hint:null,...e}))}catch(e){u.push({severity:"warning",code:t.code,path:"",subspaceId:null,itemId:null,message:`Lint rule crashed: ${e.message}`,hint:null})}}),u},lintRuleCodes:n}},98632(e,t,r){let{composeMap:i}=r(18501),{forEachSubspace:a,forEachEventList:n,collectBankReads:s,isBankNodeId:o,getParamValue:c}=r(27899),l=(e,t)=>t.map(t=>c(e,t)).filter(o),d={PROPERTY_BANK:{waitable:!0,targets:e=>(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(o)},PROPERTY_BANK_EXPRESSION:{waitable:!0,targets:e=>l(e,["RESULT","ERROR_RESULT"])},PROPERTY_BANK_COMMAND:{waitable:!0,targets:(e,t)=>((e,t)=>{let r=t();if(!r)return[];let i=[],a=new Set,n=(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(o);for(let e=0;e<n.length;e+=1){let t=n[e];if(a.has(t))continue;a.add(t);let s=r[t];s&&Object.values(s.out||{}).forEach(e=>{(e||[]).forEach(e=>{e?.id&&(e.id.includes("DATA_NODE")&&i.push(e.id),n.push(e.id))})})}return i})(e,t)},STORAGE_RETRIEVE:{waitable:!0,targets:e=>l(e,["STORAGE_RETRIEVE_RESULT"])},OPEN_FILE:{waitable:!0,targets:e=>l(e,["SAVE_PROPERTY","SAVE_DETAIL_PROPERTY","ERROR_SAVE_PROPERTY"])},SAVE_UPDATE_SNAPSHOT:{waitable:!0,targets:e=>l(e,["SNAPSHOT_SAVE_RESULT","SNAPSHOT_ERROR_RESULT"])},TRIGGER_APPLICATION_FILTER:{waitable:!0,targets:e=>l(e,["RESULT","ERROR_RESULT"])},TAKE_SCREENSHOT:{waitable:!1,targets:e=>l(e,["TAKE_SCREENSHOT_SAVE_PROPERTY"])}},p=/(^|_)RESULT$|_SAVE_PROPERTY$/;e.exports={code:"data-update-race",severity:"warning",description:"A data node is written without wait_async and read by a later action in the same event",check(e,t,r){a(e,(e,t)=>{let a,c=()=>{if(void 0===a)try{a=i(t.property_bank_calc_map||{})}catch{a=null}return a};n(e,t,({path:t,list:i})=>{let a=new Map;i.forEach((i,n)=>{if(!i||"object"!=typeof i)return;if("SYSTEM"===i.handler&&"DELAY"===i.action)return void a.clear();let l=new Set;(i.parameter_list||[]).forEach(e=>s(e?.result_from_sender,l)),l.forEach(s=>{let o=a.get(s);o&&(r({path:`${t}.${n}`,subspaceId:e,itemId:s,message:`\`${s}\` is written by action #${o.index} (${o.action}) without waiting, then read by action #${n} (${i.action}) — the read can still see the previous value.`,hint:o.waitable?`Set \`wait_async: true\` on action #${o.index} (${o.action}).`:`${o.action} ignores \`wait_async\` for its data write — insert a SYSTEM DELAY action between the two, or move the read into the data node's value-change event.`}),a.delete(s))});let u=((e,t)=>{if("SYSTEM"===e.handler){let r=d[e.action];if(!r)return null;let i=r.targets(e,t);return i.length>0?{targets:i,waitable:r.waitable}:null}let r=(e.parameter_list||[]).filter(e=>"string"==typeof e?.input_to_receiver&&p.test(e.input_to_receiver)&&o(e.result_from_sender)).map(e=>e.result_from_sender);return r.length>0?{targets:r,waitable:!0}:null})(i,c);if(!u)return;let f=!0===i.wait_async&&u.waitable;u.targets.forEach(e=>{f?a.delete(e):a.set(e,{index:n,action:i.action,waitable:u.waitable})})})})})}}},39425(e,t,r){let{forEachEventEntry:i,getParamValue:a}=r(27899),n=new Set(["Math","Date","Object","Array","Number","String","Boolean","JSON","RegExp","Intl","isNaN","isFinite","parseInt","parseFloat","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","NaN","Infinity","undefined"]);e.exports={code:"expression-global-variable",severity:"error",description:"A PROPERTY_BANK_EXPRESSION variable is named after a JS global and is silently ignored at runtime",check(e,t,r){i(e,({subspaceId:e,path:t,entry:i,index:s})=>{if(i?.handler!=="SYSTEM"||"PROPERTY_BANK_EXPRESSION"!==i.action)return;let o=a(i,"VARIABLES");Array.isArray(o)&&o.forEach(i=>{let a=i?.key;"string"==typeof a&&n.has(a)&&r({path:`${t}.${s}`,subspaceId:e,itemId:null,message:`Expression variable "${a}" is named after the JS global \`${a}\` and is silently ignored — the global takes precedence in the expression scope, so the bound value is never used.`,hint:`Rename the variable (e.g. "${a}Value") so the expression reads the bound value.`})})})}}},78899(e,t,r){let{forEachEventEntry:i}=r(27899),a=/^(?:SUBSPACE|BRICK|GENERATOR|CANVAS|DATA)_[A-Z0-9_]+$/,n=/^PROPERTY_BANK#/;e.exports={code:"mapping-outside-items",severity:"warning",description:"An event action outside BRICK_ITEMS sets result_data_mapping (ctor `mapping`) on a value the runtime will write verbatim",check(e,t,r){i(e,({subspaceId:e,subspace:t,ownerType:i,ownerId:s,path:o,entry:c,index:l})=>{let d=c?.parameter_list;if(!Array.isArray(d))return;let p=t[`${i}_map`]?.[s];("brick"!==i||p?.template_key!=="BRICK_ITEMS")&&d.forEach((t,s)=>{let c;if(t?.result_data_mapping!==!0||"string"!=typeof(c=t.result_from_sender)||a.test(c)||n.test(c))return;let d=t.input_to_receiver||"the target",u=String(t.result_from_sender),f=u.length>80?`${u.slice(0,77)}…`:u;r({path:`${o}.${l}.parameter_list.${s}`,subspaceId:e,itemId:null,message:`result_data_mapping (ctor \`mapping\`) only resolves inside BRICK_ITEMS list entries, where it names a field of the item. On ${"brick"===i?p?.template_key||"this brick":"generator"===i?p?.template_key||"this generator":"property_bank"===i?"a data node event":"canvas"===i?"a canvas event":i} the runtime writes the mapping text \`${f}\` itself into ${d}.`,hint:'Forward the event payload by its property key (`value: "BRICK_…_PROP"` / `result_from_sender: "BRICK_…_PROP"`) into a scratch data node with waitAsync, then derive the final value with PROPERTY_BANK_EXPRESSION or a data calculation.'})})})}}},40566(e,t,r){let{forEachEventEntry:i,hasParamValue:a}=r(27899),n=[{action:"STORAGE_RETRIEVE",severity:"error",isMissing:e=>!a(e,"STORAGE_RETRIEVE_RESULT"),message:"STORAGE_RETRIEVE requires a STORAGE_RETRIEVE_RESULT parameter — without it the action throws at runtime.",hint:"Add a STORAGE_RETRIEVE_RESULT parameter pointing at a data node."},{action:"TAKE_SCREENSHOT",severity:"warning",isMissing:e=>!a(e,"TAKE_SCREENSHOT_SAVE_PROPERTY"),message:"TAKE_SCREENSHOT without TAKE_SCREENSHOT_SAVE_PROPERTY is silently skipped at runtime.",hint:"Add a TAKE_SCREENSHOT_SAVE_PROPERTY parameter pointing at a data node."},{action:"OPEN_FILE",severity:"warning",isMissing:e=>!a(e,"SAVE_PROPERTY")&&!a(e,"SAVE_DETAIL_PROPERTY"),message:"OPEN_FILE has no SAVE_PROPERTY / SAVE_DETAIL_PROPERTY — the picked file is discarded.",hint:"Add SAVE_PROPERTY (file uri) or SAVE_DETAIL_PROPERTY (file detail) parameters."},{action:"OPEN_URL",severity:"warning",isMissing:e=>!a(e,"URL"),message:"OPEN_URL has no URL parameter — the action does nothing.",hint:"Add a URL parameter."}];e.exports={code:"missing-result-param",severity:"warning",description:"An action is missing the parameter that receives or drives its effect",check(e,t,r){i(e,({subspaceId:e,path:t,entry:i,index:a})=>{if(i?.handler!=="SYSTEM")return;let s=n.find(e=>e.action===i.action);s&&s.isMissing(i)&&r({path:`${t}.${a}`,subspaceId:e,itemId:null,severity:s.severity,message:s.message,hint:s.hint})})}}},92260(e,t,r){let{forEachCanvasItem:i,frameIsNumeric:a,getItemId:n,FRAME_KEYS:s}=r(27899),o=["width","height"];e.exports={code:"off-grid-frame",severity:"warning",description:"Frame values should be multiples of the 0.5 grid step",check(e,t,r){let c=t.gridStep;i(e,({subspaceId:e,canvasId:t,item:i,index:l})=>{let d=i?.frame;if(!a(d))return;let p=s.filter(e=>{let t=d[e];return(!o.includes(e)||!(t<=c))&&Math.abs(t-Math.round(t/c)*c)>.001});0!==p.length&&r({path:`subspace_map.${e}.canvas_map.${t}.item_list.${l}.frame`,subspaceId:e,itemId:n(i),message:`Frame ${p.map(e=>`${e}=${d[e]}`).join(", ")} ${1===p.length?"is":"are"} not aligned to the ${c} grid step.`,hint:`Round frame values to multiples of ${c}.`})})}}},96810(e,t,r){let{forEachCanvasItem:i,frameIsNumeric:a,getItemId:n,itemHasAnimations:s}=r(27899);e.exports={code:"out-of-bounds-frame",severity:"warning",description:"An element is fully outside the subspace layout or has a non-positive size",check(e,t,r){i(e,({subspaceId:i,subspace:o,canvasId:c,item:l,index:d})=>{let p=o.layout;if("number"!=typeof p?.width||"number"!=typeof p?.height||p.width<=0||p.height<=0)return;let u=l?.frame;if(!a(u)||!0===u.exceed_boundary||u.standby_frame||s(l))return;let f=n(l);if(f&&t.dynamicRefIds.has(f))return;let m=`subspace_map.${i}.canvas_map.${c}.item_list.${d}.frame`;if(u.width<=0||u.height<=0)return void r({path:m,subspaceId:i,itemId:f,message:`Frame has a non-positive size (width=${u.width}, height=${u.height}) — the element renders nothing.`,hint:"Give the element a positive size, or remove it if unused."});let b=i===e.root_subspace_id,h=u.x>=p.width||u.x+u.width<=0,y=u.y>=p.height||u.y+u.height<=0;(h||!b&&y)&&r({path:m,subspaceId:i,itemId:f,message:`Frame (x=${u.x}, y=${u.y}, width=${u.width}, height=${u.height}) is fully outside the ${p.width}\xd7${p.height} layout — nothing is visible.`,hint:"Move the element back into the layout, or set `exceed_boundary` if the placement is intentional."})})}}},84223(e,t,r){let{FRAME_KEYS:i,forEachCanvas:a,frameIsNumeric:n,framesAlmostEqual:s,framesIntersect:o,itemHasAnimations:c}=r(27899),l=new Set(["BRICK_TEXT","BRICK_RICH_TEXT"]),d=["linearGradientEnabled","blurEnabled"],p=e=>Object.values(e?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0),u=/^backgroundColor$|^border/,f=(e,t)=>{if(e?.type!=="brick")return null;let r=t[e.brick_id];return l.has(r?.template_key)?r:null},m=e=>i.map(t=>Math.floor(e[t]/.01)),b=e=>e.join(":"),h=(e,t,r,i)=>{if(!n(t?.frame)||!f(t,r))return;let a=b(m(t.frame)),s=(e.get(a)||0)+i;s>0?e.set(a,s):e.delete(a)};e.exports={code:"redundant-rect-overlay",severity:"info",description:"A plain Rect behind a same-frame Text/RichText can be folded into the text brick",check(e,t,r){a(e,({subspaceId:e,subspace:i,canvasId:a,items:l})=>{let y,_=i.brick_map||{},E=(y=new Map,l.forEach(e=>h(y,e,_,1)),y);l.forEach((i,y)=>{if(h(E,i,_,-1),i?.type!=="brick"||!n(i.frame))return;let g=_[i.brick_id];if(g?.template_key!=="BRICK_RECT"||c(i)||t.dynamicRefIds.has(i.brick_id))return;let v={...g.property,...i.property};if(d.some(e=>v[e])||!((e,t)=>{let[r,i,a,n]=m(t);for(let t=-1;t<=1;t+=1)for(let s=-1;s<=1;s+=1)for(let o=-1;o<=1;o+=1)for(let c=-1;c<=1;c+=1)if(e.has(b([r+t,i+s,a+o,n+c])))return!0;return!1})(E,i.frame))return;let S=p(g);for(let t=y+1;t<l.length;t+=1){let c=l[t];if(!n(c?.frame))continue;let d=f(c,_);if(d&&s(i.frame,c.frame,.01)){let t={...d.property,...c.property};if(Object.keys(t).some(e=>u.test(e)&&void 0!==t[e])||S&&p(d))return;r({path:`subspace_map.${e}.canvas_map.${a}.item_list.${y}`,subspaceId:e,itemId:i.brick_id,message:`Rect \`${g.title||i.brick_id}\` has the same frame as the ${d.template_key} above it and only uses base styles`+(S?", behind its press handler.":"."),hint:S?"Make the Text brick pressable, move backgroundColor / border / radius and the press handler onto it, then remove the Rect.":"Set backgroundColor / border / radius directly on the text brick and remove the Rect."});return}if(o(i.frame,c.frame))return}})})}}},31172(e,t,r){let{autoGeneratedItemIdKind:i}=r(99470),{forEachSubspace:a}=r(27899),n="PROPERTY_BANK_",s=()=>({children:Object.create(null),ids:null}),o=(e,t)=>{let r=e;for(let e of t)r.children[e]||(r.children[e]=s()),r=r.children[e];r.ids||(r.ids=[]),r.ids.push(t)},c=(e,t,r,i)=>{let a=r.children[e[i]];if(a){a.ids&&a.ids.forEach(e=>{t.set(e,t.get(e)+1)});for(let r=i+1;r<e.length&&(a=a.children[e[r]]);r+=1)a.ids&&a.ids.forEach(e=>{t.set(e,t.get(e)+1)})}};e.exports={code:"unused-data-node",severity:"info",description:"A data node is defined but never referenced anywhere in the config",check(e,t,r){let l=JSON.stringify(e),d=[];a(e,(r,a)=>{("module"!==t.configType||r!==e.root_subspace_id)&&Object.entries(a.property_bank_map||{}).forEach(([e,t])=>{!(!t||"object"!=typeof t||t.kind===i||t.enable_remote_update||t.global_remote_update_prop||t.linkedFrom||t.alias||t.preload||a.routing?.[e]?.enabled_routing)&&(Object.values(t?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0)||d.push({subspaceId:r,nodeId:e,node:t}))})});let p=((e,t)=>{let r=[...new Set(t)];if(0===r.length)return new Map;let i=new Map(r.map(e=>[e,0])),a=s(),l=s(),d=!1,p=!1;if(r.forEach(e=>{e.startsWith(n)?(o(a,e),d=!0):(o(l,e),p=!0)}),d){let t=e.indexOf(n);for(;-1!==t;)c(e,i,a,t),t=e.indexOf(n,t+1)}if(p)for(let t=0;t<e.length;t+=1)c(e,i,l,t);return i})(l,d.map(({nodeId:e})=>e));d.forEach(({subspaceId:e,nodeId:t,node:i})=>{(p.get(t)||0)>1||r({path:`subspace_map.${e}.property_bank_map.${t}`,subspaceId:e,itemId:t,message:`Data node \`${i.title||t}\` is never referenced in the config.`,hint:"Remove it, or keep it if external tooling depends on it."})})}}},60760(e,t,r){let{forEachEventEntry:i}=r(27899),a=new Set(["MESSAGE","ALERT","POPUP_RESET","TAKE_SCREENSHOT","THROW_EXCEPTION","RESTART_FOUNDATION","DYNAMIC_BRICK","DYNAMIC_BRICK_RESET","DYNAMIC_ANIMATION","DYNAMIC_ANIMATION_RESET","DYNAMIC_ANIMATION_STOP","CHANNEL_SUBSCRIBE","CHANNEL_UNSUBSCRIBE","CHANNEL_PUBLISH","DISMISS_KEYBOARD","STORAGE_SET","STORAGE_DELETE","DELAY","USE_SHARE_APPLICATION","AUTH_IN_DEVICE","REFRESH_BINDCODE","STOP_APPLICATION_FILTER"]);e.exports={code:"wait-async-no-op",severity:"info",description:"wait_async is set on an action that ignores it",check(e,t,r){i(e,({subspaceId:e,path:t,entry:i,index:n})=>{i?.handler!=="SYSTEM"||!0!==i.wait_async||a.has(i.action)&&r({path:`${t}.${n}`,subspaceId:e,itemId:null,message:"DELAY"===i.action?"DELAY always waits for its timeout — `wait_async: true` is redundant.":`\`wait_async: true\` has no effect on ${i.action}; the action does not block the chain.`,hint:"DELAY"===i.action?"Remove the redundant flag.":"Remove the flag, or restructure if you relied on it for sequencing."})})}}},59707(e,t,r){let{forEachCanvas:i,frameIsNumeric:a,frameContains:n,itemHasAnimations:s}=r(27899);e.exports={code:"z-order-cover",severity:"info",description:"A later opaque element fully covers an earlier pressable element",check(e,t,r){i(e,({subspaceId:e,subspace:i,canvasId:o,items:c})=>{let l=i.brick_map||{},d=[];if(c.forEach((e,t)=>{if(e?.type!=="brick"||!a(e.frame))return;let r=l[e.brick_id];r&&Object.entries(r?.event_map||{}).some(([e,t])=>e.includes("_ON_PRESS")&&Array.isArray(t)&&t.length>0)&&d.push({item:e,index:t,brick:r})}),0===d.length)return;let p=t.dynamicRefIds,u=c.map((e,t)=>((e,t,r,i)=>{let n;if(e?.type!=="brick"||!a(e.frame)||s(e)||i.has(e.brick_id))return null;let o=r[e.brick_id],c={...o?.property,...e.property};return"string"==typeof(n=c.backgroundColor)&&(/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*1(?:\.0+)?\s*\)$/.test(n)||/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(n)||/^#[0-9a-fA-F]{6}$/.test(n))&&(void 0===c.opacity||1===c.opacity)?{index:t,item:e,brick:o,frame:e.frame}:null})(e,t,l,p)).filter(Boolean),f=(e=>{let t=Array(e.length),r=1/0,i=1/0,a=-1/0,n=-1/0,s=-1/0,o=-1/0;for(let c=e.length-1;c>=0;c-=1){let{frame:l}=e[c];r=Math.min(r,l.x),i=Math.min(i,l.y),a=Math.max(a,l.x+l.width),n=Math.max(n,l.y+l.height),s=Math.max(s,l.width),o=Math.max(o,l.height),t[c]={minX:r,minY:i,maxRight:a,maxBottom:n,maxWidth:s,maxHeight:o}}return t})(u),m=0;d.forEach(({item:t,index:i,brick:a})=>{let c,l;if(!(s(t)||p.has(t.brick_id))){for(;m<u.length&&u[m].index<=i;)m+=1;if(c=f[m],l=t.frame,c&&c.minX<=l.x+.01&&c.minY<=l.y+.01&&c.maxRight>=l.x+l.width-.01&&c.maxBottom>=l.y+l.height-.01&&c.maxWidth>=l.width-.02&&c.maxHeight>=l.height-.02)for(let s=m;s<u.length;s+=1){let c=u[s];if(n(c.frame,t.frame))return void r({path:`subspace_map.${e}.canvas_map.${o}.item_list.${i}`,subspaceId:e,itemId:t.brick_id,message:`Pressable \`${a.title||t.brick_id}\` is fully covered by the opaque \`${c.brick?.title||c.item.brick_id}\` later in the item list — it is invisible and untappable.`,hint:"Reorder the items, shrink the covering element, or remove the hidden one."})}}})})}}},30302(e,t){t.templateSupportInnerRefs=[{key:"BRICK_ITEMS",dataKey:"items",listProps:["brickList","brickDetails"]}]}};
|
|
1
|
+
export const __rspack_esm_id=7511;export const __rspack_esm_ids=[7511];export const __webpack_modules__={66422(e,t){let r=e=>`PROPERTY_BANK_DATA_NODE_${e}`,a={isLocalSyncMainDevice:{id:r("325068e3-89b6-4c6a-942b-126d38c84a62"),title:"SYSTEM: Is Local Sync Main Device",description:"The current device is main for local sync",type:"bool",value:!0},currentCanvasId:{id:r("2dfeb635-deb4-481a-9d17-ea7b1fe19f74"),title:"SYSTEM: Current Canvas ID",description:"ID for known current canvas",type:"string",value:""},previousCanvasId:{id:r("2971e463-0b0e-45b7-bbfb-a01d8fd49db3"),title:"SYSTEM: Previous Canvas ID",description:"ID for known previous canvas",type:"string",value:""},canvasIdHistory:{id:r("1a086f39-817d-40ed-92f0-5a999535d3dd"),title:"SYSTEM: Change Canvas History",description:"Change Canvas ID History (Limit: 10)",type:"array",schema:{type:"string",allowNewItem:!1,allowCustomProperty:!1},value:[]},rootSubspaceInfo:{id:r("c0817f4a-1ff3-40ed-9cbf-71d8cefd2cd9"),title:"SYSTEM: Root Subspace Info",description:"Root Subspace Information",type:"object",value:{}},subspaceInfo:{id:r("2657ec09-7323-46c3-a96e-3d8b5a0f79b3"),title:"SYSTEM: Current Subspace Info",description:"Current Subspace Information",type:"object",value:{}},uniqueID:{id:r("6f4a543f-a88a-4a83-bf53-223259263be3"),title:"SYSTEM: Unique ID",description:"Unique ID of current device",type:"string",value:"unknown"},appVersion:{id:r("d614a258-2a45-4f91-9f6b-3936038cb2b1"),title:"SYSTEM: App Version",description:"App Version of current installed BRICKS Foundation app",type:"string",value:"unknown"},lastUpdateTime:{id:r("956f3b3e-cb0b-47ca-8119-65663910d110"),title:"SYSTEM: Last Update Time",description:"Last update time of current installed BRICKS Foundation app",type:"string",value:"2019-07-09T03:32:27.058Z"},deviceName:{id:r("7b9d9ad4-e9a2-47cd-91d3-b64187895c16"),title:"SYSTEM: Device Name",description:"Name of current device",type:"string",value:"Default Device Name"},deviceType:{id:r("b0beae12-e45e-4870-ae15-858eeac566fa"),title:"SYSTEM: Device Type",description:"Type of current device (Handset, Tv, Tablet)",type:"string",value:"Tv"},operationMode:{id:r("2e715d3b-92bf-4761-b5c0-ca21f7c1ada8"),title:"SYSTEM: Operation Mode",description:"Operation Mode of current device (android, ios, ...)",type:"string",value:"android"},operationVersion:{id:r("fa886963-0a16-4b5f-b4ea-6c25b049db03"),title:"SYSTEM: Operation Version",description:"Operation Version of current device",type:"string",value:""},screenWidth:{id:r("2942470a-c3bc-413e-8f2c-30a89aded3f8"),title:"SYSTEM: Screen Width",description:"Width of current device main screen",type:"number",value:1280},screenHeight:{id:r("4f031e27-f67b-40e0-a317-9f6c5215d97d"),title:"SYSTEM: Screen Height",description:"Height of current device main screen",type:"number",value:768},screenScale:{id:r("c3c9b7aa-1dc1-4be1-8a4a-d9e299b9eeaa"),title:"SYSTEM: Screen Scale",description:"Scale of current device main screen",type:"number",value:2},screenFontScale:{id:r("0312f380-d525-4938-82d2-5b35ef8ef1e8"),title:"SYSTEM: Screen Font Scale",description:"Font scale of current device main screen",type:"number",value:1},orientation:{id:r("4f584f51-a250-4f97-a2f8-d5e6a3affb4f"),title:"SYSTEM: Orientation",description:"Orientation of current device main screen",type:"string",value:"landspace"},touchAvailable:{id:r("1fe7555f-df41-43ce-a268-3ea1b5efda6d"),title:"SYSTEM: Touch Available",description:"Is touch available of current device main screen?",type:"bool",value:!0},soundAvailable:{id:r("bf839498-f7d6-4212-ac3a-b409e3ad77a5"),title:"SYSTEM: Sound Available",description:"Is sound available of current device?",type:"bool",value:!0},cameraAvailable:{id:r("4878f3c2-8bb8-4c94-855c-06bda5a287d5"),title:"SYSTEM: Camera Available",description:"Is camera available of current device?",type:"bool",value:!0},audioInputAvailable:{id:r("4854b259-96c1-40d7-b17b-47156b4698dc"),title:"SYSTEM: Audio Input Available",description:"Is audio input available of current device?",type:"bool",value:!1},networkType:{id:r("1cbb1756-e53c-45a9-be23-5d84a214e144"),title:"SYSTEM: Network Type",description:"Network Type of current device",type:"string",value:"wifi"},networkConnected:{id:r("687b62fe-ead5-417a-b415-9bd5233784a4"),title:"SYSTEM: Network Connected",description:"Is Network connected of current device?",type:"bool",value:!0},networkIpAddress:{id:r("41971ba7-8294-4aa6-a425-ecd39853c3e6"),title:"SYSTEM: Network IP Address",description:"Current network IP address",type:"string",value:""},networkDetails:{id:r("9351fbfc-4ace-477a-b05d-41ac9b05087d"),title:"SYSTEM: Network Details",description:"Network details, provide different data depends on Network Type",type:"object",value:null},isInternetReachable:{id:r("e367ae7e-46ec-46d0-b87d-51e544591ff9"),title:"SYSTEM: Internet Reachable",description:"Is Internet reachable?",type:"bool",value:!0},isWifiEnabled:{id:r("be395305-fb85-4d05-8506-22a4ae8c7b9e"),title:"SYSTEM: Wifi Enabled",description:"Is WiFi enabled?",type:"bool",value:!0},deviceDisplayName:{id:r("76356a9a-fc46-11ec-9905-db53d6811cb7"),title:"SYSTEM: Device Display Name",description:"Current device display name",type:"string",value:""},workspaceName:{id:r("d857125e-0401-40f1-b768-56190aa8e147"),title:"SYSTEM: Workspace Name",description:"Current workspace name",type:"string",value:""},applicationInfo:{id:r("935d3322-84aa-4465-b1e7-241d1f024267"),title:"SYSTEM: Application Info",description:"Current application info",type:"object",value:{}},applicationName:{id:r("df395fd6-a754-4b60-8bac-1360933e6707"),title:"SYSTEM: Application Name",description:"Current application name",type:"string",value:""},deviceID:{id:r("8b5c2d9e-f0a1-4b2c-8d3e-4f5a6b7c8d9e"),title:"SYSTEM: Device ID",description:"Device ID of current device",type:"string",value:"unknown"},macAddress:{id:r("f01fcc78-0723-11ed-ac00-877339de1030"),title:"SYSTEM: MAC Address",description:"Network adapter MAC address of current device",type:"string",value:""},bindDeviceCode:{id:r("1ca90262-3584-11ed-8c9a-174949844872"),title:"SYSTEM: Bind Device Code",description:"The passcode to bind the device",type:"string",value:"",hide:!0},bindDeviceCodeExpire:{id:r("5b52d204-3584-11ed-bb5e-abb4d270daf1"),title:"SYSTEM: Bind Device Code Expire Time",description:"The expire time of bind passcode",type:"string",value:"",hide:!0},bindDeviceUrl:{id:r("833a7db2-3584-11ed-88dd-3b3d3ff58855"),title:"SYSTEM: Bind Device URL",description:"The URL to bind the device",type:"string",value:"",hide:!0},bindDeviceUseApplication:{id:r("631bbce8-9c90-4590-b8ec-8b27f4a0e50b"),title:"SYSTEM: Selected Application on Bind Device",description:"Current selected use application info on Bind Device",type:"object",value:null,hide:!0},isApplicationPreview:{id:r("c673967a-3996-11ed-96d9-efbc3f7eac53"),title:"SYSTEM: Is Preview Mode",description:"Is current in preview mode?",type:"bool",value:"",hide:!0},isSupportAuthInDevice:{id:r("beb2a666-3e18-11ed-bdab-6f0cb082fa67"),title:"SYSTEM: Is Support Auth In Device",description:"Is current device support auth in device?",type:"bool",value:"",hide:!0},env:{id:r("74e7a574-1099-4fe5-b193-8a9ea7d20ed0"),title:"SYSTEM: Environment Variables",description:"Environment Variables of the device",type:"object",value:{}},isViewDebugModeEnabled:{id:r("3f61c4f6-1e02-492e-8e4c-a8dc4a5bc101"),title:"SYSTEM: Is View Debug mode Enabled",description:"Is View Debug mode enabled?",type:"bool",value:!1},language:{id:r("f0ed0a03-6195-459f-9ffe-bca61923f94e"),title:"SYSTEM: Language",description:"Language of the device",type:"string",value:""},aiFilters:{id:r("3ffc1e98-8f65-4cc8-a949-3da8d2092ccb"),title:"SYSTEM: AI Filters",description:"AI filters configuration from the application",type:"array",value:[]},systemOpenAIApiKey:{id:r("a1b2c3d4-5e6f-7890-abcd-ef1234567890"),title:"SYSTEM: OpenAI API Key",description:"System OpenAI API Key (only available if application enabled)",type:"string",value:""},systemAnthropicApiKey:{id:r("b2c3d4e5-6f78-9012-bcde-f23456789012"),title:"SYSTEM: Anthropic API Key",description:"System Anthropic API Key (only available if application enabled)",type:"string",value:""},systemGeminiApiKey:{id:r("c3d4e5f6-7890-1234-cdef-345678901234"),title:"SYSTEM: Gemini API Key",description:"System Gemini API Key (only available if application enabled)",type:"string",value:""},ggmlBackendDevices:{id:r("9e8f7a6b-5c4d-3e2f-1a0b-9c8d7e6f5a4b"),title:"SYSTEM: GGML Backend Devices",description:"Available GGML backend devices with supported generators",type:"array",schema:{type:"object",allowNewItem:!1,allowCustomProperty:!1},value:[]}};t.idMap=Object.entries(a).reduce((e,[t,r])=>(e[t]=r.id,e),{}),Object.fromEntries(Object.entries(t.idMap).map(([e,t])=>[t,e])),t.MI=Object.entries(a).reduce((e,[t,r])=>{let{id:a,...i}=r;return e[t]=i,e},{}),Object.keys(t.MI)},18501(e,t,r){let{docs:a}=r(5867);t.isCommand=e=>!!(e&&e.type&&e.type.startsWith("command-node-")),t.isScriptCommand=e=>!!e&&"command-node-script"===e.type,t.getPorts=e=>e?Array.isArray(e)?e:[e]:[];let i=e=>a[e.type.replace("command-node-","")]?.commands?.[e.properties?.command];t.getCommandDoc=i,t.getCommandCallbackFromPort=(e,r)=>{let a=e[r];if(!t.isCommand(a))return null;let n=i(a);return n?.iterateeFrom||n?.invocationFrom||null};let n=e=>t.getPorts(e).some(e=>e?.disable_trigger_command);t.checkDisableTriggerCommand=(e,t)=>n(e[t.id]?.in?.[t.port]),t.findCircularReferenceIds=e=>{let r,a,i=(r=new Map,a=new Map,Object.keys(e).reduce((i,s)=>{let o=[];return Object.values(e[s]?.out||{}).forEach(i=>{t.getPorts(i).forEach(i=>{((e,r,a,i)=>{var s;if(!r||!e[r.id]||r.port===(s=r.id,a.has(s)||a.set(s,t.getCommandCallbackFromPort(e,s)),a.get(s)))return!1;let o=e[r.id]?.in?.[r.port];return!Array.isArray(o)||o.length<2?!n(o):(i.has(o)||i.set(o,n(o)),!i.get(o))})(e,i,r,a)&&o.push(i.id)})}),i[s]=o,i},{})),s=new Map;return Object.keys(e).filter(t=>e[t]?.type==="data-node").filter(e=>((e,t,r)=>{if(r.has(e))return r.get(e);let a=[{id:e,edgeIndex:0,reachesCycle:!1}],i=new Set([e]);for(;a.length>0;){let e=a[a.length-1],n=t[e.id]||[];if(e.reachesCycle||e.edgeIndex>=n.length){i.delete(e.id),r.set(e.id,e.reachesCycle),a.pop(),e.reachesCycle&&a.length>0&&(a[a.length-1].reachesCycle=!0);continue}let s=n[e.edgeIndex];if(e.edgeIndex+=1,r.has(s)){r.get(s)&&(e.reachesCycle=!0);continue}if(i.has(s)){e.reachesCycle=!0;continue}i.add(s),a.push({id:s,edgeIndex:0,reachesCycle:!1})}return r.get(e)||!1})(e,i,s))},t.hasCircularReference=e=>t.findCircularReferenceIds(e).length>0;let s=(e={})=>Object.entries(e).reduce((e,[t,r])=>(e[t]=Array.isArray(r)?r.slice():r,e),{}),o=new WeakSet,c=(e,t,r)=>{if(!r)return;let a=((e,t)=>{let r=e[t];if(!r)return e[t]=[],e[t];if(!Array.isArray(r))return e[t]=[r],e[t];if(!o.has(r)){let e=0;for(let t of r)t&&(r[e]=t,e+=1);r.length=e,o.add(r)}return r})(e,t);(Array.isArray(r)?r:[r]).forEach(e=>{e&&a.push(e)})};t.getCalcMap=e=>e?.script_map||e?.scriptMap||e?.map||{},t.composeMap=e=>Object.values(e).reduce((e,r)=>Object.entries(t.getCalcMap(r)).reduce((e,[r,a])=>{if(e[r]){if(t.isCommand(a))throw Error(`Doesn't allow same command id in another map, ${r}`);let i=e[r];Object.keys(a?.in||{}).forEach(e=>{c(i.in,e,a.in[e])}),Object.keys(a?.out||{}).forEach(e=>{c(i.out,e,a.out[e])})}else e[r]={...a,in:s(a?.in),out:s(a?.out)};return e},e),{}),t.isInputTriggerPort=(e,r)=>t.getPorts(r).some(r=>{let a;return r&&(a=e[r.id],a?.type==="data-node"&&!Object.values(a.in||{}).some(e=>t.getPorts(e).length>0))});let l=(e,r)=>Object.entries(e||{}).forEach(([a,i])=>{t.isCommand(i)&&Object.entries(i.in||{}).forEach(([i,n])=>{t.isInputTriggerPort(e,n)&&r(a,i,t.getPorts(n))})}),d=(e,t)=>{let r=e;return l(e,(a,i,n)=>{let s=t(a,i);n.every(e=>!e||!!e.disable_trigger_command===s)||(r===e&&(r={...e}),r[a]===e[a]&&(r[a]={...e[a],in:{...e[a].in}}),r[a].in[i]=n.map(e=>{if(!e)return e;let{disable_trigger_command:t,...r}=e;return s?{...r,disable_trigger_command:!0}:r}))}),r};t.getDisabledInputTriggers=e=>{let t={};return l(e,(e,r,a)=>{a.some(e=>e?.disable_trigger_command)&&(t[e]={...t[e],[r]:!0})}),t},t.disableInputTriggers=e=>d(e,()=>!0),t.restoreInputTriggers=(e,t={})=>d(e,(e,r)=>!!t[e]?.[r])},86343(e,t,r){let{v4:a}=r(45620),i=r(95479),n=r(56005),{nameMap:s,brickMapping:o,generatorMapping:c}=r(63981);t.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,t.getAnimationType=e=>e.type||e.compose_type||e.composeType,t.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[t,r])=>((r.type||r.compose_type)&&(e[t]=r),e),{}),t.matchItemByItem=(e,t)=>{let r;if(!e)return!1;switch("string"==typeof t&&(r=t),e.type){case"brick":return e.brick_id===(r||t.brick_id);case"subspace":return e.subspace_id===(r||t.subspace_id);case"canvas":return e.canvas_id===(r||t.canvas_id);case"generator":return e.generator_id===(r||t.generator_id);case"property_bank":return e.property_bank_id===(r||t.property_bank_id);default:return!1}},t.makePasscode=()=>a(),t.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","mlx-model-asset","binary-asset","scene3d-objects"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},t.getKindOneOfTypes=(e,r)=>"array"===e?"object"===r?t.kindOneOfTypes[`${e}-${r}`]:void 0:t.kindOneOfTypes[e],t.unitOneOfTypes=["grid","px","ms"],t.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],t.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},t.getBrickName=(e,r,a)=>{let n;if(!r)return e.toUpperCase();if(r.title)return r.title;switch(e){case"bank":n="BANK";break;case"subspace":n="SUBSPACE";break;case"canvas":n="CANVAS";break;case"animation":n=`<${i(t.getAnimationType(r))}>`;break;case"property_bank":n="<Data>";break;case"property_bank_calc":n="<Map>";break;case"state_group":n="<Switch Case>";break;default:n=`<${s[r.template_key||r.templateKey]||"Unknown"}>`}return a&&a.length>10?n+=` (${a.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:a&&(n+=` (${a})`),n},t.getEventLabel=(e,{templateKey:t,itemType:r}={})=>{if(!e)return"";let a=e;return"subspace"===r?a=e.replace("SUBSPACE_ACTION_",""):t&&(a=e.replace(`${t}_`,"").replace("CANVAS_","")),i(n(i(a)))},t.getCallInternalActions=e=>{let t=o[e]||c[e];if(t)return t.callInternalActions},t.mapToList=(e,r)=>Object.entries(r).reduce((r,[a,i])=>(r.push({id:a,...i,title:t.getBrickName(e,i,a)}),r),[]);let l={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},d={};t.mapToListForDerivedState=(e,r,a,i)=>{let n=a[e]||d;return n!==i[e]?{[e]:n,[r]:t.mapToList(l[e],n)}:{}},t.arrayTypePrefix="array of ",t.propertyBankTypes=["string","number","bool","object","any",`${t.arrayTypePrefix}string`,`${t.arrayTypePrefix}number`,`${t.arrayTypePrefix}bool`,`${t.arrayTypePrefix}object`],t.animationRunTypes=["once","loop"],t.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},t.nestedTypes=["object","array","any"],t.isPropertyBankTypeNested=e=>t.nestedTypes.includes(e),t.propertyTypeToSchema=e=>{let r=e.indexOf(t.arrayTypePrefix)>-1,a=e.replace(t.arrayTypePrefix,"");return{type:a,properties:"object"===a?{}:void 0,allowNewItem:r,allowCustomProperty:"object"===a}}},33770(e,t,r){let{idMap:a}=r(66422),{forEachEventAction:i,getActionParam:n}=r(78078),s="PROPERTY_BANK_DATA_NODE_",o=new Set(Object.values(a||{}).filter(e=>"string"==typeof e&&e.startsWith(s)));e.exports=function(e){let t,r,a=[],c=(t=new Set(o),Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.property_bank_map||{}).forEach(e=>t.add(e))}),t),l=(r=new Set,Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.canvas_map||{}).forEach(e=>r.add(e))}),r);return i(e,(e,t)=>{if("PROPERTY_BANK_EXPRESSION"===e.action){let r;Array.isArray(r=n(e,"VARIABLES"))&&r.forEach((e,r)=>{let i=e?.id;if("string"!=typeof i||!i.startsWith(s)||c.has(i))return;let n=e.key?`\`${e.key}\``:`at index ${r}`;a.push({field:`${t}.VARIABLES[${r}].id`,message:`PROPERTY_BANK_EXPRESSION variable ${n} references data node \`${i}\`, which is not defined in any subspace.`})})}else"CHANGE_CANVAS"===e.action&&((e,t,r,a)=>{if("SYSTEM"!==e.handler)return;let i=n(e,"CANVAS_ID");"string"!=typeof i||!i||i.startsWith("PROPERTY_BANK#")||i.startsWith("VARIABLE#")||!i.startsWith("CANVAS_")||r.has(i)||a.push({field:`${t}.CANVAS_ID`,message:`CHANGE_CANVAS references canvas \`${i}\`, which is not defined in any subspace.`})})(e,t,l,a)}),a}},37517(e,t,r){let{composeMap:a,findCircularReferenceIds:i}=r(18501);e.exports=function(e){let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{if(!r||"object"!=typeof r||r.module?.link)return;let n=r.property_bank_calc_map;if(!n||0===Object.keys(n).length)return;let s=`subspace_map.${e}.property_bank_calc_map`;try{let e=a(n),r=i(e);if(r.length>0){let a=r.slice(0,5).map(t=>e[t].title||t),i=r.length>5?` and ${r.length-5} more`:"";t.push({field:s,message:`Circular reference detected in data calculation. Affected nodes: ${a.join(", ")}${i}. Please check the data connections for loops.`})}}catch(e){t.push({field:s,message:e.message})}}),t}},41900(e){let t=e=>{if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return e.some(t);if("FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type||"FunctionDeclaration"===e.type)return!1;if("AssignmentExpression"===e.type&&e.left?.type!=="Identifier"||"UpdateExpression"===e.type&&e.argument?.type!=="Identifier")return!0;for(let r of Object.keys(e))if("type"!==r&&t(e[r]))return!0;return!1},r=(e,t)=>"ExpressionStatement"===e.type?null:"VariableDeclaration"===e.type?e.declarations.some(e=>"Identifier"!==e.id.type||!e.init)?"a variable declaration with destructuring or no initializer":null:t&&"ReturnStatement"===e.type?null:`an unsupported ${e.type}`;e.exports={expressionFoldAcornOptions:{ecmaVersion:2022,allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0},getUnfoldableStatementDescription:(e,a=null)=>{for(let a=0;a<e.length;a+=1){let i=e[a];if(t(i))return"a write to a member or computed target";let n=r(i,a===e.length-1);if(n)return n}return a},hasFoldShape:e=>e.every((t,a)=>!r(t,a===e.length-1)),writesToNonIdentifierTarget:t}},78078(e,t,r){let{parse:a}=r(89236),{expressionFoldAcornOptions:i}=r(41900),n=(e,t)=>{let r=e.parameter_list||e.parameterList||[];if(!Array.isArray(r))return;let a=r.find(e=>(e?.input_to_receiver||e?.inputToReceiver)===t);return a?a.result_from_sender??a.resultFromSender:void 0},s=(e,t,r)=>{if(e&&"object"==typeof e){if(Array.isArray(e))return void e.forEach((e,a)=>s(e,`${t}[${a}]`,r));Object.entries(e).forEach(([e,a])=>{("event_map"===e||"eventMap"===e)&&a&&"object"==typeof a?Object.entries(a).forEach(([a,i])=>{Array.isArray(i)&&i.forEach((i,n)=>{i&&"object"==typeof i&&r(i,`${t}.${e}.${a}[${n}]`)})}):a&&"object"==typeof a&&s(a,`${t}.${e}`,r)})}},o=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,r])=>{!r||"object"!=typeof r||r.module?.link||s(r,`subspace_map.${e}`,t)})};e.exports=function(e){let t=[];return o(e,(e,r)=>{if("PROPERTY_BANK_EXPRESSION"!==e.action)return;let s=n(e,"EXPRESSION");if("string"!=typeof s||s.startsWith("PROPERTY_BANK#"))return;let o=(e=>{if(!e.trim())return"Expression is empty";try{a(e,i)}catch(e){return`Expression does not parse: ${e.message}`}return null})(s);o&&t.push({field:r,message:o})}),t},e.exports.forEachEventAction=o,e.exports.getActionParam=n},38890(e,t,r){let{getDocByTemplateKey:a}=r(63981),i=r(80211),n=r(45907),s=r(37517),o=r(78078),c=r(33770),l=r(69516),{lintConfig:d,lintRuleCodes:p}=r(9098),{getBrickName:u}=r(86343);t.lintConfig=d,t.lintRuleCodes=p;let f=(e,t,r,a)=>({id:e,name:"Used Deprecated Feature",data:`The \`${u("brick",t,e)}\` brick in \`${u("subspace",r,a)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`});t.checkConfigDeprecatedFeatures=e=>{let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{r&&"object"==typeof r&&(Object.entries(r.brick_map||{}).forEach(([i,n])=>{(void 0!==n.property?.borderLeftWidth||void 0!==n.property?.borderRightWidth||void 0!==n.property?.borderTopWidth||void 0!==n.property?.borderBottomWidth)&&t.push({id:i,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${u("brick",n,i)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});let s=a(n.template_key);s?.brickMeta?.deprecated&&t.push(f(i,n,r,e))}),Object.entries(r.generator_map||{}).forEach(([i,n])=>{let s=a(n.template_key);s?.brickMeta?.deprecated&&t.push(f(i,n,r,e))}))}),t};let m=({instancePath:e,field:t,message:r})=>{let a=e||t;return a?`${a}: ${r}`:`${r??""}`};t.checkConfig=(e,t={})=>{let r={schema:i(e),ref:n(e,t),calc:t.checkCalc?s(e):[],expression:t.checkExpressions?o(e):[],actionRef:t.checkActionRefs?c(e):[],itemsEventMap:t.checkItemsEventMaps?l(e):[]};return r.valid=0===r.schema.length&&0===r.ref.length&&0===r.calc.length&&0===r.expression.length&&0===r.actionRef.length&&0===r.itemsEventMap.length,r.message=(e=>{let t="",r=0;for(let a of e){let e=0===r?a:`${t}
|
|
2
|
+
${a}`;if(e.length>65504){0===r&&(t=`${a.slice(0,65503)}…`,r=1);break}t=e,r+=1}let a=e.length-r;return a>0?`${t}
|
|
3
|
+
…and ${a} more`:t})(r.schema.concat(r.ref).concat(r.calc).concat(r.expression).concat(r.actionRef).concat(r.itemsEventMap).map(m)),r}},69516(e,t,r){let a=r(80211),{templateSupportInnerRefs:i}=r(30302);e.exports=function(e){let t=[],r=a.ajv.getSchema("http://display.bricks.tools/event_map_camel.schema.json5");return Object.entries(e.subspace_map||{}).forEach(([e,a])=>{!a||"object"!=typeof a||a.module?.link||Object.entries(a.brick_map||{}).forEach(([a,n])=>{let s=i.find(e=>e.key===n?.template_key);s&&n.property&&s.listProps.forEach(i=>{let s=n.property[i];Array.isArray(s)&&s.forEach((n,s)=>{if(!n||"object"!=typeof n)return;let o=`subspace_map.${e}.brick_map.${a}.property.${i}[${s}]`;"event_map"in n&&t.push({field:`${o}.event_map`,message:"items-list entries store their event map in camelCase as `eventMap`; this snake_case `event_map` key is never read by the runtime or the editor (dead data, typically left by an old Short Edit write) — remove it."}),void 0!==n.eventMap&&null!==n.eventMap&&(r(n.eventMap)||r.errors.forEach(e=>{t.push({field:`${o}.eventMap${e.instancePath.split("/").filter(Boolean).map(e=>/^\d+$/.test(e)?`[${e}]`:`.${e}`).join("")}`,message:e.message})}))})})})}),t}},27899(e){let t=["x","y","width","height"],r=e=>"string"==typeof e&&e.startsWith("PROPERTY_BANK_"),a=/PROPERTY_BANK#(PROPERTY_BANK_[A-Za-z0-9_-]+)/g,i=/(?:BRICK|ANIMATION|SUBSPACE)_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/g,n=(e,t=new Set)=>{if("string"==typeof e){let r;for(a.lastIndex=0;r=a.exec(e);)t.add(r[1])}else Array.isArray(e)?e.forEach(e=>n(e,t)):e&&"object"==typeof e&&(r(e.id)&&t.add(e.id),Object.values(e).forEach(e=>n(e,t)));return t},s=(e,t)=>{if("string"==typeof e){let r;for(i.lastIndex=0;r=i.exec(e);)t.add(r[0])}else Array.isArray(e)?e.forEach(e=>s(e,t)):e&&"object"==typeof e&&Object.values(e).forEach(e=>s(e,t));return t},o=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,r])=>{!r||"object"!=typeof r||r.module?.link||t(e,r)})},c=(e,t)=>{o(e,(e,r)=>{Object.entries(r.canvas_map||{}).forEach(([a,i])=>{let n=Array.isArray(i?.item_list)?i.item_list:[];t({subspaceId:e,subspace:r,canvasId:a,canvas:i,items:n})})})},l=[["brick_map","brick"],["generator_map","generator"],["property_bank_map","property_bank"],["canvas_map","canvas"]],d=(e,t,r)=>{l.forEach(([a,i])=>{Object.entries(t[a]||{}).forEach(([t,n])=>{Object.entries(n?.event_map||{}).forEach(([n,s])=>{Array.isArray(s)&&r({ownerType:i,ownerId:t,eventKey:n,list:s,path:`subspace_map.${e}.${a}.${t}.event_map.${n}`})})})})},p=(e,t)=>{o(e,(e,r)=>{d(e,r,a=>{a.list.forEach((i,n)=>{t({subspaceId:e,subspace:r,...a,entry:i,index:n})})})})},u=(e,t)=>(e.parameter_list||[]).find(e=>e?.input_to_receiver===t)?.result_from_sender;e.exports={FRAME_KEYS:t,isBankNodeId:r,collectBankReads:n,forEachSubspace:o,forEachCanvas:c,forEachCanvasItem:(e,t)=>{c(e,e=>{e.items.forEach((r,a)=>{t({...e,item:r,index:a})})})},forEachEventList:d,forEachEventEntry:p,getParamValue:u,hasParamValue:(e,t)=>{let r=u(e,t);return null!=r&&""!==r},collectDynamicallyReferencedIds:e=>{let t=new Set;return p(e,({entry:e})=>{s(e?.parameter_list,t)}),s(e.automation_map,t),s(e.test_map,t),t},frameIsNumeric:e=>!!e&&t.every(t=>"number"==typeof e[t]),framesAlmostEqual:(e,r,a=.01)=>t.every(t=>Math.abs(e[t]-r[t])<=a),frameContains:(e,t,r=.01)=>e.x<=t.x+r&&e.y<=t.y+r&&e.x+e.width>=t.x+t.width-r&&e.y+e.height>=t.y+t.height-r,framesIntersect:(e,t)=>!(e.x+e.width<=t.x||t.x+t.width<=e.x||e.y+e.height<=t.y||t.y+t.height<=e.y),getItemId:e=>e?.brick_id||e?.subspace_id||null,itemHasAnimations:e=>!!e?.animations&&Object.keys(e.animations).length>0}},9098(e,t,r){let{collectDynamicallyReferencedIds:a}=r(27899),i=[r(98632),r(84223),r(92260),r(96810),r(60760),r(40566),r(31172),r(59707),r(39425),r(78899)],n=i.map(e=>e.code),s=e=>Array.isArray(e)?e:"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null;e.exports={lintConfig:(e,t={})=>{let r,o=s(t.only),c=s(t.ignore),l=[...o||[],...c||[]].filter(e=>!n.includes(e));if(l.length>0)throw Error(`Unknown lint rule code(s): ${l.join(", ")}. Valid codes: ${n.join(", ")}`);if(!e||"object"!=typeof e)return[];let d=i.filter(e=>(!o||o.includes(e.code))&&(!c||!c.includes(e.code)));if(0===d.length)return[];let p={configType:"module"===t.configType?"module":"app",gridStep:"number"==typeof t.gridStep&&t.gridStep>0?t.gridStep:.5,get dynamicRefIds(){return r||(r=a(e)),r}},u=[];return d.forEach(t=>{try{t.check(e,p,e=>u.push({severity:t.severity,code:t.code,path:"",subspaceId:null,itemId:null,hint:null,...e}))}catch(e){u.push({severity:"warning",code:t.code,path:"",subspaceId:null,itemId:null,message:`Lint rule crashed: ${e.message}`,hint:null})}}),u},lintRuleCodes:n}},98632(e,t,r){let{composeMap:a}=r(18501),{forEachSubspace:i,forEachEventList:n,collectBankReads:s,isBankNodeId:o,getParamValue:c}=r(27899),l=(e,t)=>t.map(t=>c(e,t)).filter(o),d={PROPERTY_BANK:{waitable:!0,targets:e=>(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(o)},PROPERTY_BANK_EXPRESSION:{waitable:!0,targets:e=>l(e,["RESULT","ERROR_RESULT"])},PROPERTY_BANK_COMMAND:{waitable:!0,targets:(e,t)=>((e,t)=>{let r=t();if(!r)return[];let a=[],i=new Set,n=(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(o);for(let e=0;e<n.length;e+=1){let t=n[e];if(i.has(t))continue;i.add(t);let s=r[t];s&&Object.values(s.out||{}).forEach(e=>{(e||[]).forEach(e=>{e?.id&&(e.id.includes("DATA_NODE")&&a.push(e.id),n.push(e.id))})})}return a})(e,t)},STORAGE_RETRIEVE:{waitable:!0,targets:e=>l(e,["STORAGE_RETRIEVE_RESULT"])},OPEN_FILE:{waitable:!0,targets:e=>l(e,["SAVE_PROPERTY","SAVE_DETAIL_PROPERTY","ERROR_SAVE_PROPERTY"])},SAVE_UPDATE_SNAPSHOT:{waitable:!0,targets:e=>l(e,["SNAPSHOT_SAVE_RESULT","SNAPSHOT_ERROR_RESULT"])},TRIGGER_APPLICATION_FILTER:{waitable:!0,targets:e=>l(e,["RESULT","ERROR_RESULT"])},TAKE_SCREENSHOT:{waitable:!1,targets:e=>l(e,["TAKE_SCREENSHOT_SAVE_PROPERTY"])}},p=/(^|_)RESULT$|_SAVE_PROPERTY$/;e.exports={code:"data-update-race",severity:"warning",description:"A data node is written without wait_async and read by a later action in the same event",check(e,t,r){i(e,(e,t)=>{let i,c=()=>{if(void 0===i)try{i=a(t.property_bank_calc_map||{})}catch{i=null}return i};n(e,t,({path:t,list:a})=>{let i=new Map;a.forEach((a,n)=>{if(!a||"object"!=typeof a)return;if("SYSTEM"===a.handler&&"DELAY"===a.action)return void i.clear();let l=new Set;(a.parameter_list||[]).forEach(e=>s(e?.result_from_sender,l)),l.forEach(s=>{let o=i.get(s);o&&(r({path:`${t}.${n}`,subspaceId:e,itemId:s,message:`\`${s}\` is written by action #${o.index} (${o.action}) without waiting, then read by action #${n} (${a.action}) — the read can still see the previous value.`,hint:o.waitable?`Set \`wait_async: true\` on action #${o.index} (${o.action}).`:`${o.action} ignores \`wait_async\` for its data write — insert a SYSTEM DELAY action between the two, or move the read into the data node's value-change event.`}),i.delete(s))});let u=((e,t)=>{if("SYSTEM"===e.handler){let r=d[e.action];if(!r)return null;let a=r.targets(e,t);return a.length>0?{targets:a,waitable:r.waitable}:null}let r=(e.parameter_list||[]).filter(e=>"string"==typeof e?.input_to_receiver&&p.test(e.input_to_receiver)&&o(e.result_from_sender)).map(e=>e.result_from_sender);return r.length>0?{targets:r,waitable:!0}:null})(a,c);if(!u)return;let f=!0===a.wait_async&&u.waitable;u.targets.forEach(e=>{f?i.delete(e):i.set(e,{index:n,action:a.action,waitable:u.waitable})})})})})}}},39425(e,t,r){let{forEachEventEntry:a,getParamValue:i}=r(27899),n=new Set(["Math","Date","Object","Array","Number","String","Boolean","JSON","RegExp","Intl","isNaN","isFinite","parseInt","parseFloat","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","NaN","Infinity","undefined"]);e.exports={code:"expression-global-variable",severity:"error",description:"A PROPERTY_BANK_EXPRESSION variable is named after a JS global and is silently ignored at runtime",check(e,t,r){a(e,({subspaceId:e,path:t,entry:a,index:s})=>{if(a?.handler!=="SYSTEM"||"PROPERTY_BANK_EXPRESSION"!==a.action)return;let o=i(a,"VARIABLES");Array.isArray(o)&&o.forEach(a=>{let i=a?.key;"string"==typeof i&&n.has(i)&&r({path:`${t}.${s}`,subspaceId:e,itemId:null,message:`Expression variable "${i}" is named after the JS global \`${i}\` and is silently ignored — the global takes precedence in the expression scope, so the bound value is never used.`,hint:`Rename the variable (e.g. "${i}Value") so the expression reads the bound value.`})})})}}},78899(e,t,r){let{forEachEventEntry:a}=r(27899),i=/^(?:SUBSPACE|BRICK|GENERATOR|CANVAS|DATA)_[A-Z0-9_]+$/,n=/^PROPERTY_BANK#/;e.exports={code:"mapping-outside-items",severity:"warning",description:"An event action outside BRICK_ITEMS sets result_data_mapping (ctor `mapping`) on a value the runtime will write verbatim",check(e,t,r){a(e,({subspaceId:e,subspace:t,ownerType:a,ownerId:s,path:o,entry:c,index:l})=>{let d=c?.parameter_list;if(!Array.isArray(d))return;let p=t[`${a}_map`]?.[s];("brick"!==a||p?.template_key!=="BRICK_ITEMS")&&d.forEach((t,s)=>{let c;if(t?.result_data_mapping!==!0||"string"!=typeof(c=t.result_from_sender)||i.test(c)||n.test(c))return;let d=t.input_to_receiver||"the target",u=String(t.result_from_sender),f=u.length>80?`${u.slice(0,77)}…`:u;r({path:`${o}.${l}.parameter_list.${s}`,subspaceId:e,itemId:null,message:`result_data_mapping (ctor \`mapping\`) only resolves inside BRICK_ITEMS list entries, where it names a field of the item. On ${"brick"===a?p?.template_key||"this brick":"generator"===a?p?.template_key||"this generator":"property_bank"===a?"a data node event":"canvas"===a?"a canvas event":a} the runtime writes the mapping text \`${f}\` itself into ${d}.`,hint:'Forward the event payload by its property key (`value: "BRICK_…_PROP"` / `result_from_sender: "BRICK_…_PROP"`) into a scratch data node with waitAsync, then derive the final value with PROPERTY_BANK_EXPRESSION or a data calculation.'})})})}}},40566(e,t,r){let{forEachEventEntry:a,hasParamValue:i}=r(27899),n=[{action:"STORAGE_RETRIEVE",severity:"error",isMissing:e=>!i(e,"STORAGE_RETRIEVE_RESULT"),message:"STORAGE_RETRIEVE requires a STORAGE_RETRIEVE_RESULT parameter — without it the action throws at runtime.",hint:"Add a STORAGE_RETRIEVE_RESULT parameter pointing at a data node."},{action:"TAKE_SCREENSHOT",severity:"warning",isMissing:e=>!i(e,"TAKE_SCREENSHOT_SAVE_PROPERTY"),message:"TAKE_SCREENSHOT without TAKE_SCREENSHOT_SAVE_PROPERTY is silently skipped at runtime.",hint:"Add a TAKE_SCREENSHOT_SAVE_PROPERTY parameter pointing at a data node."},{action:"OPEN_FILE",severity:"warning",isMissing:e=>!i(e,"SAVE_PROPERTY")&&!i(e,"SAVE_DETAIL_PROPERTY"),message:"OPEN_FILE has no SAVE_PROPERTY / SAVE_DETAIL_PROPERTY — the picked file is discarded.",hint:"Add SAVE_PROPERTY (file uri) or SAVE_DETAIL_PROPERTY (file detail) parameters."},{action:"OPEN_URL",severity:"warning",isMissing:e=>!i(e,"URL"),message:"OPEN_URL has no URL parameter — the action does nothing.",hint:"Add a URL parameter."}];e.exports={code:"missing-result-param",severity:"warning",description:"An action is missing the parameter that receives or drives its effect",check(e,t,r){a(e,({subspaceId:e,path:t,entry:a,index:i})=>{if(a?.handler!=="SYSTEM")return;let s=n.find(e=>e.action===a.action);s&&s.isMissing(a)&&r({path:`${t}.${i}`,subspaceId:e,itemId:null,severity:s.severity,message:s.message,hint:s.hint})})}}},92260(e,t,r){let{forEachCanvasItem:a,frameIsNumeric:i,getItemId:n,FRAME_KEYS:s}=r(27899),o=["width","height"];e.exports={code:"off-grid-frame",severity:"warning",description:"Frame values should be multiples of the 0.5 grid step",check(e,t,r){let c=t.gridStep;a(e,({subspaceId:e,canvasId:t,item:a,index:l})=>{let d=a?.frame;if(!i(d))return;let p=s.filter(e=>{let t=d[e];return(!o.includes(e)||!(t<=c))&&Math.abs(t-Math.round(t/c)*c)>.001});0!==p.length&&r({path:`subspace_map.${e}.canvas_map.${t}.item_list.${l}.frame`,subspaceId:e,itemId:n(a),message:`Frame ${p.map(e=>`${e}=${d[e]}`).join(", ")} ${1===p.length?"is":"are"} not aligned to the ${c} grid step.`,hint:`Round frame values to multiples of ${c}.`})})}}},96810(e,t,r){let{forEachCanvasItem:a,frameIsNumeric:i,getItemId:n,itemHasAnimations:s}=r(27899);e.exports={code:"out-of-bounds-frame",severity:"warning",description:"An element is fully outside the subspace layout or has a non-positive size",check(e,t,r){a(e,({subspaceId:a,subspace:o,canvasId:c,item:l,index:d})=>{let p=o.layout;if("number"!=typeof p?.width||"number"!=typeof p?.height||p.width<=0||p.height<=0)return;let u=l?.frame;if(!i(u)||!0===u.exceed_boundary||u.standby_frame||s(l))return;let f=n(l);if(f&&t.dynamicRefIds.has(f))return;let m=`subspace_map.${a}.canvas_map.${c}.item_list.${d}.frame`;if(u.width<=0||u.height<=0)return void r({path:m,subspaceId:a,itemId:f,message:`Frame has a non-positive size (width=${u.width}, height=${u.height}) — the element renders nothing.`,hint:"Give the element a positive size, or remove it if unused."});let h=a===e.root_subspace_id,b=u.x>=p.width||u.x+u.width<=0,y=u.y>=p.height||u.y+u.height<=0;(b||!h&&y)&&r({path:m,subspaceId:a,itemId:f,message:`Frame (x=${u.x}, y=${u.y}, width=${u.width}, height=${u.height}) is fully outside the ${p.width}\xd7${p.height} layout — nothing is visible.`,hint:"Move the element back into the layout, or set `exceed_boundary` if the placement is intentional."})})}}},84223(e,t,r){let{FRAME_KEYS:a,forEachCanvas:i,frameIsNumeric:n,framesAlmostEqual:s,framesIntersect:o,itemHasAnimations:c}=r(27899),l=new Set(["BRICK_TEXT","BRICK_RICH_TEXT"]),d=["linearGradientEnabled","blurEnabled"],p=e=>Object.values(e?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0),u=/^backgroundColor$|^border/,f=(e,t)=>{if(e?.type!=="brick")return null;let r=t[e.brick_id];return l.has(r?.template_key)?r:null},m=e=>a.map(t=>Math.floor(e[t]/.01)),h=e=>e.join(":"),b=(e,t,r,a)=>{if(!n(t?.frame)||!f(t,r))return;let i=h(m(t.frame)),s=(e.get(i)||0)+a;s>0?e.set(i,s):e.delete(i)};e.exports={code:"redundant-rect-overlay",severity:"info",description:"A plain Rect behind a same-frame Text/RichText can be folded into the text brick",check(e,t,r){i(e,({subspaceId:e,subspace:a,canvasId:i,items:l})=>{let y,_=a.brick_map||{},E=(y=new Map,l.forEach(e=>b(y,e,_,1)),y);l.forEach((a,y)=>{if(b(E,a,_,-1),a?.type!=="brick"||!n(a.frame))return;let g=_[a.brick_id];if(g?.template_key!=="BRICK_RECT"||c(a)||t.dynamicRefIds.has(a.brick_id))return;let v={...g.property,...a.property};if(d.some(e=>v[e])||!((e,t)=>{let[r,a,i,n]=m(t);for(let t=-1;t<=1;t+=1)for(let s=-1;s<=1;s+=1)for(let o=-1;o<=1;o+=1)for(let c=-1;c<=1;c+=1)if(e.has(h([r+t,a+s,i+o,n+c])))return!0;return!1})(E,a.frame))return;let S=p(g);for(let t=y+1;t<l.length;t+=1){let c=l[t];if(!n(c?.frame))continue;let d=f(c,_);if(d&&s(a.frame,c.frame,.01)){let t={...d.property,...c.property};if(Object.keys(t).some(e=>u.test(e)&&void 0!==t[e])||S&&p(d))return;r({path:`subspace_map.${e}.canvas_map.${i}.item_list.${y}`,subspaceId:e,itemId:a.brick_id,message:`Rect \`${g.title||a.brick_id}\` has the same frame as the ${d.template_key} above it and only uses base styles`+(S?", behind its press handler.":"."),hint:S?"Make the Text brick pressable, move backgroundColor / border / radius and the press handler onto it, then remove the Rect.":"Set backgroundColor / border / radius directly on the text brick and remove the Rect."});return}if(o(a.frame,c.frame))return}})})}}},31172(e,t,r){let{autoGeneratedItemIdKind:a}=r(99470),{forEachSubspace:i}=r(27899),n="PROPERTY_BANK_",s=()=>({children:Object.create(null),ids:null}),o=(e,t)=>{let r=e;for(let e of t)r.children[e]||(r.children[e]=s()),r=r.children[e];r.ids||(r.ids=[]),r.ids.push(t)},c=(e,t,r,a)=>{let i=r.children[e[a]];if(i){i.ids&&i.ids.forEach(e=>{t.set(e,t.get(e)+1)});for(let r=a+1;r<e.length&&(i=i.children[e[r]]);r+=1)i.ids&&i.ids.forEach(e=>{t.set(e,t.get(e)+1)})}};e.exports={code:"unused-data-node",severity:"info",description:"A data node is defined but never referenced anywhere in the config",check(e,t,r){let l=JSON.stringify(e),d=[];i(e,(r,i)=>{("module"!==t.configType||r!==e.root_subspace_id)&&Object.entries(i.property_bank_map||{}).forEach(([e,t])=>{!(!t||"object"!=typeof t||t.kind===a||t.enable_remote_update||t.global_remote_update_prop||t.linkedFrom||t.alias||t.preload||i.routing?.[e]?.enabled_routing)&&(Object.values(t?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0)||d.push({subspaceId:r,nodeId:e,node:t}))})});let p=((e,t)=>{let r=[...new Set(t)];if(0===r.length)return new Map;let a=new Map(r.map(e=>[e,0])),i=s(),l=s(),d=!1,p=!1;if(r.forEach(e=>{e.startsWith(n)?(o(i,e),d=!0):(o(l,e),p=!0)}),d){let t=e.indexOf(n);for(;-1!==t;)c(e,a,i,t),t=e.indexOf(n,t+1)}if(p)for(let t=0;t<e.length;t+=1)c(e,a,l,t);return a})(l,d.map(({nodeId:e})=>e));d.forEach(({subspaceId:e,nodeId:t,node:a})=>{(p.get(t)||0)>1||r({path:`subspace_map.${e}.property_bank_map.${t}`,subspaceId:e,itemId:t,message:`Data node \`${a.title||t}\` is never referenced in the config.`,hint:"Remove it, or keep it if external tooling depends on it."})})}}},60760(e,t,r){let{forEachEventEntry:a}=r(27899),i=new Set(["MESSAGE","ALERT","POPUP_RESET","TAKE_SCREENSHOT","THROW_EXCEPTION","RESTART_FOUNDATION","DYNAMIC_BRICK","DYNAMIC_BRICK_RESET","DYNAMIC_ANIMATION","DYNAMIC_ANIMATION_RESET","DYNAMIC_ANIMATION_STOP","CHANNEL_SUBSCRIBE","CHANNEL_UNSUBSCRIBE","CHANNEL_PUBLISH","DISMISS_KEYBOARD","STORAGE_SET","STORAGE_DELETE","DELAY","USE_SHARE_APPLICATION","AUTH_IN_DEVICE","REFRESH_BINDCODE","STOP_APPLICATION_FILTER"]);e.exports={code:"wait-async-no-op",severity:"info",description:"wait_async is set on an action that ignores it",check(e,t,r){a(e,({subspaceId:e,path:t,entry:a,index:n})=>{a?.handler!=="SYSTEM"||!0!==a.wait_async||i.has(a.action)&&r({path:`${t}.${n}`,subspaceId:e,itemId:null,message:"DELAY"===a.action?"DELAY always waits for its timeout — `wait_async: true` is redundant.":`\`wait_async: true\` has no effect on ${a.action}; the action does not block the chain.`,hint:"DELAY"===a.action?"Remove the redundant flag.":"Remove the flag, or restructure if you relied on it for sequencing."})})}}},59707(e,t,r){let{forEachCanvas:a,frameIsNumeric:i,frameContains:n,itemHasAnimations:s}=r(27899);e.exports={code:"z-order-cover",severity:"info",description:"A later opaque element fully covers an earlier pressable element",check(e,t,r){a(e,({subspaceId:e,subspace:a,canvasId:o,items:c})=>{let l=a.brick_map||{},d=[];if(c.forEach((e,t)=>{if(e?.type!=="brick"||!i(e.frame))return;let r=l[e.brick_id];r&&Object.entries(r?.event_map||{}).some(([e,t])=>e.includes("_ON_PRESS")&&Array.isArray(t)&&t.length>0)&&d.push({item:e,index:t,brick:r})}),0===d.length)return;let p=t.dynamicRefIds,u=c.map((e,t)=>((e,t,r,a)=>{let n;if(e?.type!=="brick"||!i(e.frame)||s(e)||a.has(e.brick_id))return null;let o=r[e.brick_id],c={...o?.property,...e.property};return"string"==typeof(n=c.backgroundColor)&&(/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*1(?:\.0+)?\s*\)$/.test(n)||/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(n)||/^#[0-9a-fA-F]{6}$/.test(n))&&(void 0===c.opacity||1===c.opacity)?{index:t,item:e,brick:o,frame:e.frame}:null})(e,t,l,p)).filter(Boolean),f=(e=>{let t=Array(e.length),r=1/0,a=1/0,i=-1/0,n=-1/0,s=-1/0,o=-1/0;for(let c=e.length-1;c>=0;c-=1){let{frame:l}=e[c];r=Math.min(r,l.x),a=Math.min(a,l.y),i=Math.max(i,l.x+l.width),n=Math.max(n,l.y+l.height),s=Math.max(s,l.width),o=Math.max(o,l.height),t[c]={minX:r,minY:a,maxRight:i,maxBottom:n,maxWidth:s,maxHeight:o}}return t})(u),m=0;d.forEach(({item:t,index:a,brick:i})=>{let c,l;if(!(s(t)||p.has(t.brick_id))){for(;m<u.length&&u[m].index<=a;)m+=1;if(c=f[m],l=t.frame,c&&c.minX<=l.x+.01&&c.minY<=l.y+.01&&c.maxRight>=l.x+l.width-.01&&c.maxBottom>=l.y+l.height-.01&&c.maxWidth>=l.width-.02&&c.maxHeight>=l.height-.02)for(let s=m;s<u.length;s+=1){let c=u[s];if(n(c.frame,t.frame))return void r({path:`subspace_map.${e}.canvas_map.${o}.item_list.${a}`,subspaceId:e,itemId:t.brick_id,message:`Pressable \`${i.title||t.brick_id}\` is fully covered by the opaque \`${c.brick?.title||c.item.brick_id}\` later in the item list — it is invisible and untappable.`,hint:"Reorder the items, shrink the covering element, or remove the hidden one."})}}})})}}},30302(e,t){t.templateSupportInnerRefs=[{key:"BRICK_ITEMS",dataKey:"items",listProps:["brickList","brickDetails"]}]}};
|
package/lib/907.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export const __webpack_modules__={85382(e,i,t){t.r(i),t.d(i,{BricksClient:()=>
|
|
1
|
+
export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export const __webpack_modules__={85382(e,i,t){t.r(i),t.d(i,{BricksClient:()=>B,BricksPublicClient:()=>k,createClient:()=>D,createFetchForUrl:()=>_.createFetchForUrl,createPublicClient:()=>A});var n,a,r,o,s=t(99436),d=t(5018),l=t(44668),u=t(54506),c=t(78549),p=t(94370),$=t(90424),m=t(43741),g=t(89293),_=t(75149),v=u.ApolloClient,f=u.InMemoryCache,I=u.HttpLink,y=c.o,h={query:"query",mutation:"mutate"},k=l(function e(i){d(this,e),this.baseUrl=i,this.endpoint="/api/graphql-nonauth";var t=new I({uri:`${i}${this.endpoint}`,fetch:(0,_.createFetchForUrl)(i)});this.apolloClient=new v({link:t,cache:new f,defaultOptions:{query:{errorPolicy:"all",fetchPolicy:"no-cache"}}})},[{key:"checkWorkspaceOTP",value:(n=s(function*(e){var i=(0,p.default)`
|
|
2
2
|
query checkWorkspaceOTP($passcode: String!) {
|
|
3
3
|
checkWorkspaceOTP(passcode: $passcode)
|
|
4
4
|
}
|
|
@@ -10,9 +10,9 @@ export const __rspack_esm_id=907;export const __rspack_esm_ids=[907];export cons
|
|
|
10
10
|
workspaceName
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
`,t=yield this.apolloClient.mutate({mutation:i,variables:{passcode:e}}),n=t.data,a=t.errors;if(a?.length>0)throw Error(a.map(({message:e})=>e).join("\n"));return n.exchangeWorkspaceOTP}),function(e){return a.apply(this,arguments)})}]),A=e=>new k(e),C="Note: OAuth workspace access is awaiting the next production server release. Until then, use workspace auth (passcode or token; CLI: `bricks auth login-workspace`).",
|
|
13
|
+
`,t=yield this.apolloClient.mutate({mutation:i,variables:{passcode:e}}),n=t.data,a=t.errors;if(a?.length>0)throw Error(a.map(({message:e})=>e).join("\n"));return n.exchangeWorkspaceOTP}),function(e){return a.apply(this,arguments)})}]),A=e=>new k(e),C=e=>Object.assign(Error(e.map(({message:e})=>e).join("\n")),{graphQLErrors:e}),b="Note: OAuth workspace access is awaiting the next production server release. Until then, use workspace auth (passcode or token; CLI: `bricks auth login-workspace`).",S=(e,i)=>{if(i?.kind!=="oauth")return e;var t=e?.message||String(e);if(!(403===(e?.statusCode||e?.networkError?.statusCode||e?.cause?.statusCode)||/\b403\b|invalid algorithm/i.test(t))||t.includes(b))return e;var n=Error(`${t}
|
|
14
14
|
|
|
15
|
-
${
|
|
15
|
+
${b}`);return n.cause=e,n},B=l(function e(i,t){var n,a=this;d(this,e),this.baseUrl=i,this.auth=(e=>{if(!e)return null;if("string"==typeof e){var i;return{kind:"token",token:e,getHeaders:(i=s(function*(){return{authorization:`Bearer ${e}`}}),function(){return i.apply(this,arguments)})}}return e})(t),this.token=this.auth?.token,this.endpoint="/api/graphql-workspace";var r=new I({uri:`${i}${this.endpoint}`,fetch:(0,_.createFetchForUrl)(i)}),o=y((n=s(function*(e,{headers:i}){return{headers:{...i,...a.auth?yield a.auth.getHeaders():{}}}}),function(e,i){return n.apply(this,arguments)}));this.apolloClient=new v({link:o.concat(r),cache:new f,defaultOptions:{watchQuery:{errorPolicy:"all",fetchPolicy:"no-cache"},query:{errorPolicy:"all",fetchPolicy:"no-cache"}}}),this.queries=m,this.mutations=g,this.generateMethods()},[{key:"generateMethods",value:function(){var e=this,i=i=>([t,n])=>{if(!this[t]){var a,r=(a=s(function*(a,r,o=!1){try{var s=e.apolloClient[h[i]].bind(e.apolloClient),d=yield s({[i]:o?(0,$.YR)(n,{FragmentDefinition(e){if("BlueprintRun"===e.typeCondition.name.value)return{...e,selectionSet:{...e.selectionSet,selections:e.selectionSet.selections.filter(e=>!["instance_id","sessions"].includes(e.name?.value))}}},VariableDefinition:e=>"instanceId"===e.variable.name.value?null:void 0,Argument:e=>"instanceId"===e.name.value?null:void 0}):n,variables:o?Object.fromEntries(Object.entries(a).filter(([e])=>"instanceId"!==e)):a,...r}),l=d.data,u=d.errors;if(u)throw C(u);return l[t]}catch(e){var c=e.cause?.result?.errors||e.networkError?.result?.errors;if(c)throw C(c);throw e}}),function(e,i){return a.apply(this,arguments)});this[t]=s(function*(i={},n={}){try{return yield r(i,n)}catch(o){let a;if(/blueprint/i.test(t)&&(a=o.message,/Unknown argument "instanceId".*acquireBlueprintRun|Cannot query field "(?:instance_id|sessions)" on type "BlueprintRun"/.test(a)))return r(i,n,!0);if(e.auth?.kind==="oauth"&&e.auth.refresh&&/401|unauthoriz|jwt expired|token.*expired|invalid.*token/i.test(o?.message||"")){yield e.auth.refresh();try{return yield r(i,n)}catch(i){throw S(i,e.auth)}}throw S(o,e.auth)}})}};Object.entries(this.queries).forEach(i("query")),Object.entries(this.mutations).forEach(i("mutation"))}},{key:"query",value:(r=s(function*(e,i={}){var t=yield this.apolloClient.query({query:e,variables:i,fetchPolicy:"no-cache"}),n=t.data,a=t.errors;if(a?.length>0)throw C(a);return n}),function(e){return r.apply(this,arguments)})},{key:"mutate",value:(o=s(function*(e,i={}){var t=yield this.apolloClient.mutate({mutation:e,variables:i}),n=t.data,a=t.errors;if(a?.length>0)throw C(a);return n}),function(e){return o.apply(this,arguments)})}]),D=(e,i)=>new B(e,i)},75149(e,i,t){t.r(i),t.d(i,{createFetchForUrl:()=>r});var n=t(79657),a=t(64007);function r(e){var i=process.env.HTTPS_PROXY||process.env.https_proxy;if(!i||!e.startsWith("https://"))return n.Ay;var t=new a(i);return(e,i={})=>(0,n.Ay)(e,{...i,agent:t})}},48596(e,i,t){t.d(i,{$7:()=>u,$V:()=>c,C$:()=>_,F3:()=>r,J6:()=>p,NJ:()=>s,VZ:()=>o,Yi:()=>a,_A:()=>g,ju:()=>v,lI:()=>l,mJ:()=>d,sJ:()=>f,zL:()=>m});var n=t(94370),a=(0,n.default)`
|
|
16
16
|
fragment cliWorkspaceArguments on Workspace {
|
|
17
17
|
_id
|
|
18
18
|
name
|
|
@@ -366,7 +366,23 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
366
366
|
last_modify_datetime
|
|
367
367
|
}
|
|
368
368
|
${m}
|
|
369
|
-
|
|
369
|
+
`,v=(0,n.default)`
|
|
370
|
+
fragment cliRegistryCredentialArguments on RegistryCredential {
|
|
371
|
+
token
|
|
372
|
+
jti
|
|
373
|
+
kid
|
|
374
|
+
issuedAt
|
|
375
|
+
expiresAt
|
|
376
|
+
renewAfter
|
|
377
|
+
}
|
|
378
|
+
`,f=(0,n.default)`
|
|
379
|
+
fragment cliRegistryTrustArguments on RegistryTrust {
|
|
380
|
+
issuer
|
|
381
|
+
audience
|
|
382
|
+
baseUrl
|
|
383
|
+
jwks
|
|
384
|
+
}
|
|
385
|
+
`},89293(e,i,t){t.r(i),t.d(i,{acquireBlueprintRun:()=>O,bindApplication:()=>f,bindButtressServer:()=>q,bindButtressServerWithRegistry:()=>x,controlDevice:()=>o,copyMediaFiles:()=>D,createApplication:()=>p,createApplicationWithShareVersion:()=>$,createBlueprint:()=>W,createDevice:()=>r,createMediaFileUploadRequest:()=>S,createModule:()=>y,createVirtualDevice:()=>s,deleteMediaBoxFiles:()=>w,deleteMediaFiles:()=>L,dispatchDeviceGroupAction:()=>c,heartbeatBlueprintRun:()=>U,issueButtressAccessToken:()=>M,issueButtressNodeCredential:()=>F,issueDevtoolsAccessToken:()=>V,releaseApplication:()=>b,releaseBlueprintRun:()=>K,releaseModule:()=>T,removeApplication:()=>_,removeBlueprint:()=>j,removeDevice:()=>u,removeModule:()=>k,revertBlueprint:()=>N,revokeAccessTokens:()=>E,setMediaFileAsBoxPreview:()=>P,shortEditApplication:()=>v,shortEditModule:()=>A,triggerApplicationCanvasControl:()=>I,unbindButtressServer:()=>R,updateApplication:()=>m,updateBlueprint:()=>G,updateDevice:()=>l,updateMediaFiles:()=>B,updateModule:()=>h,updateVirtualDevice:()=>d,updateWorkspace:()=>C,useApplicationReleaseVersion:()=>g});var n=t(94370),a=t(48596),r=(0,n.default)`
|
|
370
386
|
mutation CLI_createDevice($bindPasscode: String, $name: String, $deviceName: String) {
|
|
371
387
|
createDevice(bindPasscode: $bindPasscode, name: $name, deviceName: $deviceName) {
|
|
372
388
|
...cliDeviceArguments
|
|
@@ -569,7 +585,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
569
585
|
_id
|
|
570
586
|
}
|
|
571
587
|
}
|
|
572
|
-
`,
|
|
588
|
+
`,y=(0,n.default)`
|
|
573
589
|
mutation CLI_createModule(
|
|
574
590
|
$name: String
|
|
575
591
|
$description: String
|
|
@@ -594,7 +610,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
594
610
|
}
|
|
595
611
|
}
|
|
596
612
|
${a.$V}
|
|
597
|
-
`,
|
|
613
|
+
`,h=(0,n.default)`
|
|
598
614
|
mutation CLI_updateModule(
|
|
599
615
|
$id: ID!
|
|
600
616
|
$config: String
|
|
@@ -705,7 +721,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
705
721
|
}
|
|
706
722
|
}
|
|
707
723
|
}
|
|
708
|
-
`,
|
|
724
|
+
`,B=(0,n.default)`
|
|
709
725
|
mutation CLI_updateMediaFiles(
|
|
710
726
|
$fileIds: [ID!]!
|
|
711
727
|
$name: String
|
|
@@ -714,7 +730,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
714
730
|
) {
|
|
715
731
|
updateMediaFiles(fileIds: $fileIds, name: $name, description: $description, userTags: $userTags)
|
|
716
732
|
}
|
|
717
|
-
`,
|
|
733
|
+
`,D=(0,n.default)`
|
|
718
734
|
mutation CLI_copyMediaFiles($fromBoxId: ID!, $toBoxId: ID!, $fileIds: [ID!]!) {
|
|
719
735
|
copyMediaFiles(fromBoxId: $fromBoxId, toBoxId: $toBoxId, fileIds: $fileIds)
|
|
720
736
|
}
|
|
@@ -730,7 +746,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
730
746
|
mutation CLI_setMediaFileAsBoxPreview($id: ID!) {
|
|
731
747
|
setMediaFileAsBoxPreview(id: $id)
|
|
732
748
|
}
|
|
733
|
-
`,
|
|
749
|
+
`,T=(0,n.default)`
|
|
734
750
|
mutation CLI_releaseModule(
|
|
735
751
|
$id: ID!
|
|
736
752
|
$config: String
|
|
@@ -750,7 +766,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
750
766
|
name
|
|
751
767
|
}
|
|
752
768
|
}
|
|
753
|
-
`,
|
|
769
|
+
`,q=(0,n.default)`
|
|
754
770
|
mutation CLI_bindButtressServer(
|
|
755
771
|
$serverId: String!
|
|
756
772
|
$name: String
|
|
@@ -766,7 +782,42 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
766
782
|
}
|
|
767
783
|
}
|
|
768
784
|
}
|
|
785
|
+
`,x=(0,n.default)`
|
|
786
|
+
mutation CLI_bindButtressServerWithRegistry(
|
|
787
|
+
$serverId: String!
|
|
788
|
+
$name: String
|
|
789
|
+
$serverPublicKey: ButtressServerPublicKeyInput
|
|
790
|
+
) {
|
|
791
|
+
bindButtressServerWithRegistry: bindButtressServer(
|
|
792
|
+
serverId: $serverId
|
|
793
|
+
name: $name
|
|
794
|
+
serverPublicKey: $serverPublicKey
|
|
795
|
+
) {
|
|
796
|
+
workspaceId
|
|
797
|
+
workspaceName
|
|
798
|
+
serverId
|
|
799
|
+
issuerPublicKey {
|
|
800
|
+
pem
|
|
801
|
+
kid
|
|
802
|
+
}
|
|
803
|
+
nodeCredential {
|
|
804
|
+
...cliRegistryCredentialArguments
|
|
805
|
+
}
|
|
806
|
+
registry {
|
|
807
|
+
...cliRegistryTrustArguments
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
${a.ju}
|
|
812
|
+
${a.sJ}
|
|
769
813
|
`,F=(0,n.default)`
|
|
814
|
+
mutation CLI_issueButtressNodeCredential($serverId: String!) {
|
|
815
|
+
issueButtressNodeCredential(serverId: $serverId) {
|
|
816
|
+
...cliRegistryCredentialArguments
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
${a.ju}
|
|
820
|
+
`,R=(0,n.default)`
|
|
770
821
|
mutation CLI_unbindButtressServer($serverId: String!) {
|
|
771
822
|
unbindButtressServer(serverId: $serverId)
|
|
772
823
|
}
|
|
@@ -779,7 +830,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
779
830
|
jti
|
|
780
831
|
}
|
|
781
832
|
}
|
|
782
|
-
`,
|
|
833
|
+
`,V=(0,n.default)`
|
|
783
834
|
mutation CLI_issueDevtoolsAccessToken($ttlSeconds: Int) {
|
|
784
835
|
issueDevtoolsAccessToken(ttlSeconds: $ttlSeconds) {
|
|
785
836
|
token
|
|
@@ -788,32 +839,39 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
788
839
|
jti
|
|
789
840
|
}
|
|
790
841
|
}
|
|
791
|
-
`,
|
|
842
|
+
`,E=(0,n.default)`
|
|
843
|
+
mutation CLI_revokeAccessTokens {
|
|
844
|
+
revokeAccessTokens {
|
|
845
|
+
workspaceId
|
|
846
|
+
notBefore
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
`,W=(0,n.default)`
|
|
792
850
|
mutation CLI_createBlueprint($name: String!, $description: String) {
|
|
793
851
|
createBlueprint(name: $name, description: $description) {
|
|
794
852
|
...cliBlueprintArguments
|
|
795
853
|
}
|
|
796
854
|
}
|
|
797
855
|
${a._A}
|
|
798
|
-
`,
|
|
856
|
+
`,G=(0,n.default)`
|
|
799
857
|
mutation CLI_updateBlueprint($id: ID!, $revision: Int!, $patch: BlueprintPatchInput!) {
|
|
800
858
|
updateBlueprint(id: $id, revision: $revision, patch: $patch) {
|
|
801
859
|
...cliBlueprintArguments
|
|
802
860
|
}
|
|
803
861
|
}
|
|
804
862
|
${a._A}
|
|
805
|
-
`,
|
|
863
|
+
`,N=(0,n.default)`
|
|
806
864
|
mutation CLI_revertBlueprint($id: ID!, $toRevision: Int!) {
|
|
807
865
|
revertBlueprint(id: $id, toRevision: $toRevision) {
|
|
808
866
|
...cliBlueprintArguments
|
|
809
867
|
}
|
|
810
868
|
}
|
|
811
869
|
${a._A}
|
|
812
|
-
`,
|
|
870
|
+
`,j=(0,n.default)`
|
|
813
871
|
mutation CLI_removeBlueprint($id: ID!) {
|
|
814
872
|
removeBlueprint(id: $id)
|
|
815
873
|
}
|
|
816
|
-
`,
|
|
874
|
+
`,O=(0,n.default)`
|
|
817
875
|
mutation CLI_acquireBlueprintRun(
|
|
818
876
|
$id: ID!
|
|
819
877
|
$host: String!
|
|
@@ -828,7 +886,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
828
886
|
}
|
|
829
887
|
}
|
|
830
888
|
${a.zL}
|
|
831
|
-
`,
|
|
889
|
+
`,U=(0,n.default)`
|
|
832
890
|
mutation CLI_heartbeatBlueprintRun($id: ID!, $sessionId: String!) {
|
|
833
891
|
heartbeatBlueprintRun(id: $id, sessionId: $sessionId) {
|
|
834
892
|
ok
|
|
@@ -838,11 +896,11 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
838
896
|
}
|
|
839
897
|
}
|
|
840
898
|
${a.zL}
|
|
841
|
-
`,
|
|
899
|
+
`,K=(0,n.default)`
|
|
842
900
|
mutation CLI_releaseBlueprintRun($id: ID!, $sessionId: String!) {
|
|
843
901
|
releaseBlueprintRun(id: $id, sessionId: $sessionId)
|
|
844
902
|
}
|
|
845
|
-
`},43741(e,i,t){t.r(i),t.d(i,{application:()=>p,applicationDeviceSettings:()=>$,applicationProject:()=>
|
|
903
|
+
`},43741(e,i,t){t.r(i),t.d(i,{application:()=>p,applicationDeviceSettings:()=>$,applicationProject:()=>B,applicationReleaseVersions:()=>m,applications:()=>g,blueprint:()=>P,blueprintEvents:()=>R,blueprintProjection:()=>x,blueprintRevisions:()=>F,blueprints:()=>T,blueprintsByInstance:()=>q,buttressServers:()=>L,checkBindDevicePasscode:()=>y,device:()=>o,deviceGroup:()=>l,deviceGroups:()=>u,deviceUsage:()=>S,devices:()=>s,devicesApplicationStatus:()=>M,devicesByGroup:()=>c,devicesPanel:()=>d,mediaBox:()=>C,mediaBoxes:()=>A,mediaFile:()=>b,mediaFiles:()=>h,mediaWorkspace:()=>k,module:()=>v,moduleProject:()=>D,modules:()=>f,publicApplicationShareInfo:()=>_,publicModules:()=>I,registryTrust:()=>w,workspace:()=>r});var n=t(94370),a=t(48596),r=(0,n.default)`
|
|
846
904
|
query CLI_workspace {
|
|
847
905
|
workspace {
|
|
848
906
|
...cliWorkspaceArguments
|
|
@@ -999,11 +1057,11 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
999
1057
|
}
|
|
1000
1058
|
}
|
|
1001
1059
|
${a.J6}
|
|
1002
|
-
`,
|
|
1060
|
+
`,y=(0,n.default)`
|
|
1003
1061
|
query CLI_checkBindDevicePasscode($passcode: String!) {
|
|
1004
1062
|
checkBindDevicePasscode(passcode: $passcode)
|
|
1005
1063
|
}
|
|
1006
|
-
`,
|
|
1064
|
+
`,h=(0,n.default)`
|
|
1007
1065
|
query CLI_mediaFiles(
|
|
1008
1066
|
$boxId: ID!
|
|
1009
1067
|
$includeTypes: [String]
|
|
@@ -1153,7 +1211,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
1153
1211
|
}
|
|
1154
1212
|
}
|
|
1155
1213
|
}
|
|
1156
|
-
`,
|
|
1214
|
+
`,B=(0,n.default)`
|
|
1157
1215
|
query CLI_applicationProject(
|
|
1158
1216
|
$id: ID!
|
|
1159
1217
|
$buildApplicationOnly: Boolean
|
|
@@ -1171,7 +1229,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
1171
1229
|
setupGeminiCLI: $setupGeminiCLI
|
|
1172
1230
|
)
|
|
1173
1231
|
}
|
|
1174
|
-
`,
|
|
1232
|
+
`,D=(0,n.default)`
|
|
1175
1233
|
query CLI_moduleProject(
|
|
1176
1234
|
$id: ID!
|
|
1177
1235
|
$buildApplicationOnly: Boolean
|
|
@@ -1199,13 +1257,20 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
1199
1257
|
}
|
|
1200
1258
|
}
|
|
1201
1259
|
`,w=(0,n.default)`
|
|
1260
|
+
query CLI_registryTrust {
|
|
1261
|
+
registryTrust {
|
|
1262
|
+
...cliRegistryTrustArguments
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
${a.sJ}
|
|
1266
|
+
`,P=(0,n.default)`
|
|
1202
1267
|
query CLI_blueprint($id: ID!) {
|
|
1203
1268
|
blueprint(id: $id) {
|
|
1204
1269
|
...cliBlueprintArguments
|
|
1205
1270
|
}
|
|
1206
1271
|
}
|
|
1207
1272
|
${a._A}
|
|
1208
|
-
`,
|
|
1273
|
+
`,T=(0,n.default)`
|
|
1209
1274
|
query CLI_blueprints($keyword: String, $paginate: Paginate) {
|
|
1210
1275
|
blueprints(keyword: $keyword, paginate: $paginate) {
|
|
1211
1276
|
...cliBlueprintShortArguments
|
|
@@ -1233,7 +1298,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
1233
1298
|
created_at
|
|
1234
1299
|
}
|
|
1235
1300
|
}
|
|
1236
|
-
`,
|
|
1301
|
+
`,R=(0,n.default)`
|
|
1237
1302
|
query CLI_blueprintEvents($id: ID!, $limit: Int) {
|
|
1238
1303
|
blueprintEvents(id: $id, limit: $limit) {
|
|
1239
1304
|
_id
|
|
@@ -1249,7 +1314,7 @@ ${C}`);return n.cause=e,n},S=l(function e(i,t){var n,a=this;d(this,e),this.baseU
|
|
|
1249
1314
|
created_at
|
|
1250
1315
|
}
|
|
1251
1316
|
}
|
|
1252
|
-
`,
|
|
1317
|
+
`,M=(0,n.default)`
|
|
1253
1318
|
query CLI_devicesApplicationStatus($filter: DeviceApplicationStatusFilter, $paginate: Paginate) {
|
|
1254
1319
|
devicesApplicationStatus(filter: $filter, paginate: $paginate) {
|
|
1255
1320
|
device_id
|