@ray-js/robot-map-sdk 0.0.6 → 0.0.7

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/bin/mcp-server.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- #!/usr/bin/env node
3
2
  var Ik=Object.create;var md=Object.defineProperty;var zk=Object.getOwnPropertyDescriptor;var Pk=Object.getOwnPropertyNames;var Tk=Object.getPrototypeOf,Ek=Object.prototype.hasOwnProperty;var Ok=(e,t)=>()=>(e&&(t=e(e=0)),t);var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),er=(e,t)=>{for(var n in t)md(e,n,{get:t[n],enumerable:!0})},jk=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Pk(t))!Ek.call(e,r)&&r!==n&&md(e,r,{get:()=>t[r],enumerable:!(o=zk(t,r))||o.enumerable});return e};var Vg=(e,t,n)=>(n=e!=null?Ik(Tk(e)):{},jk(t||!e||!e.__esModule?md(n,"default",{value:e,enumerable:!0}):n,e));import t4 from"path";import{fileURLToPath as n4}from"url";var m=Ok(()=>{"use strict"});var aa=A(me=>{"use strict";m();Object.defineProperty(me,"__esModule",{value:!0});me.regexpCode=me.getEsmExportName=me.getProperty=me.safeStringify=me.stringify=me.strConcat=me.addCodeArg=me.str=me._=me.nil=me._Code=me.Name=me.IDENTIFIER=me._CodeOrName=void 0;var oa=class{};me._CodeOrName=oa;me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var mn=class extends oa{constructor(t){if(super(),!me.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};me.Name=mn;var It=class extends oa{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((n,o)=>`${n}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,o)=>(o instanceof mn&&(n[o.str]=(n[o.str]||0)+1),n),{})}};me._Code=It;me.nil=new It("");function H$(e,...t){let n=[e[0]],o=0;for(;o<t.length;)qp(n,t[o]),n.push(e[++o]);return new It(n)}me._=H$;var Vp=new It("+");function K$(e,...t){let n=[ia(e[0])],o=0;for(;o<t.length;)n.push(Vp),qp(n,t[o]),n.push(Vp,ia(e[++o]));return $P(n),new It(n)}me.str=K$;function qp(e,t){t instanceof It?e.push(...t._items):t instanceof mn?e.push(t):e.push(kP(t))}me.addCodeArg=qp;function $P(e){let t=1;for(;t<e.length-1;){if(e[t]===Vp){let n=xP(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function xP(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof mn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof mn))return`"${e}${t.slice(1)}`}function bP(e,t){return t.emptyStr()?e:e.emptyStr()?t:K$`${e}${t}`}me.strConcat=bP;function kP(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ia(Array.isArray(e)?e.join(","):e)}function SP(e){return new It(ia(e))}me.stringify=SP;function ia(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}me.safeStringify=ia;function wP(e){return typeof e=="string"&&me.IDENTIFIER.test(e)?new It(`.${e}`):H$`[${e}]`}me.getProperty=wP;function IP(e){if(typeof e=="string"&&me.IDENTIFIER.test(e))return new It(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}me.getEsmExportName=IP;function zP(e){return new It(e.toString())}me.regexpCode=zP});var Bp=A(ct=>{"use strict";m();Object.defineProperty(ct,"__esModule",{value:!0});ct.ValueScope=ct.ValueScopeName=ct.Scope=ct.varKinds=ct.UsedValueState=void 0;var st=aa(),Fp=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},yl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(yl||(ct.UsedValueState=yl={}));ct.varKinds={const:new st.Name("const"),let:new st.Name("let"),var:new st.Name("var")};var _l=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof st.Name?t:this.name(t)}name(t){return new st.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,o;if(!((o=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||o===void 0)&&o.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};ct.Scope=_l;var $l=class extends st.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:o}){this.value=t,this.scopePath=(0,st._)`.${new st.Name(n)}[${o}]`}};ct.ValueScopeName=$l;var PP=(0,st._)`\n`,Jp=class extends _l{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?PP:st.nil}}get(){return this._scope}name(t){return new $l(t,this._newName(t))}value(t,n){var o;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,a=(o=n.key)!==null&&o!==void 0?o:n.ref,s=this._values[i];if(s){let l=s.get(a);if(l)return l}else s=this._values[i]=new Map;s.set(a,r);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=n.ref,r.setValue(n,{property:i,itemIndex:u}),r}getValue(t,n){let o=this._values[t];if(o)return o.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,st._)`${t}${o.scopePath}`})}scopeCode(t=this._values,n,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,o)}_reduceValues(t,n,o={},r){let i=st.nil;for(let a in t){let s=t[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,yl.Started);let l=n(u);if(l){let d=this.opts.es5?ct.varKinds.var:ct.varKinds.const;i=(0,st._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=r==null?void 0:r(u))i=(0,st._)`${i}${l}${this.opts._n}`;else throw new Fp(u);c.set(u,yl.Completed)})}return i}};ct.ValueScope=Jp});var te=A(oe=>{"use strict";m();Object.defineProperty(oe,"__esModule",{value:!0});oe.or=oe.and=oe.not=oe.CodeGen=oe.operators=oe.varKinds=oe.ValueScopeName=oe.ValueScope=oe.Scope=oe.Name=oe.regexpCode=oe.stringify=oe.getProperty=oe.nil=oe.strConcat=oe.str=oe._=void 0;var le=aa(),Zt=Bp(),Dr=aa();Object.defineProperty(oe,"_",{enumerable:!0,get:function(){return Dr._}});Object.defineProperty(oe,"str",{enumerable:!0,get:function(){return Dr.str}});Object.defineProperty(oe,"strConcat",{enumerable:!0,get:function(){return Dr.strConcat}});Object.defineProperty(oe,"nil",{enumerable:!0,get:function(){return Dr.nil}});Object.defineProperty(oe,"getProperty",{enumerable:!0,get:function(){return Dr.getProperty}});Object.defineProperty(oe,"stringify",{enumerable:!0,get:function(){return Dr.stringify}});Object.defineProperty(oe,"regexpCode",{enumerable:!0,get:function(){return Dr.regexpCode}});Object.defineProperty(oe,"Name",{enumerable:!0,get:function(){return Dr.Name}});var Sl=Bp();Object.defineProperty(oe,"Scope",{enumerable:!0,get:function(){return Sl.Scope}});Object.defineProperty(oe,"ValueScope",{enumerable:!0,get:function(){return Sl.ValueScope}});Object.defineProperty(oe,"ValueScopeName",{enumerable:!0,get:function(){return Sl.ValueScopeName}});Object.defineProperty(oe,"varKinds",{enumerable:!0,get:function(){return Sl.varKinds}});oe.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};var cr=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},Hp=class extends cr{constructor(t,n,o){super(),this.varKind=t,this.name=n,this.rhs=o}render({es5:t,_n:n}){let o=t?Zt.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=yo(this.rhs,t,n)),this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}},xl=class extends cr{constructor(t,n,o){super(),this.lhs=t,this.rhs=n,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof le.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=yo(this.rhs,t,n),this}get names(){let t=this.lhs instanceof le.Name?{}:{...this.lhs.names};return kl(t,this.rhs)}},Kp=class extends xl{constructor(t,n,o,r){super(t,o,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Wp=class extends cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Gp=class extends cr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Xp=class extends cr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Yp=class extends cr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=yo(this.code,t,n),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}},sa=class extends cr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,o)=>n+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let o=t[n].optimizeNodes();Array.isArray(o)?t.splice(n,1,...o):o?t[n]=o:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,n)||(TP(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>hn(t,n.names),{})}},ur=class extends sa{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Qp=class extends sa{},vo=class extends ur{};vo.kind="else";var fn=class e extends ur{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let o=n.optimizeNodes();n=this.else=Array.isArray(o)?new vo(o):o}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(W$(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=yo(this.condition,t,n),this}get names(){let t=super.names;return kl(t,this.condition),this.else&&hn(t,this.else.names),t}};fn.kind="if";var pn=class extends ur{};pn.kind="for";var eh=class extends pn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=yo(this.iteration,t,n),this}get names(){return hn(super.names,this.iteration.names)}},th=class extends pn{constructor(t,n,o,r){super(),this.varKind=t,this.name=n,this.from=o,this.to=r}render(t){let n=t.es5?Zt.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${n} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=kl(super.names,this.from);return kl(t,this.to)}},bl=class extends pn{constructor(t,n,o,r){super(),this.loop=t,this.varKind=n,this.name=o,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=yo(this.iterable,t,n),this}get names(){return hn(super.names,this.iterable.names)}},ca=class extends ur{constructor(t,n,o){super(),this.name=t,this.args=n,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ca.kind="func";var ua=class extends sa{render(t){return"return "+super.render(t)}};ua.kind="return";var rh=class extends ur{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var o,r;return super.optimizeNames(t,n),(o=this.catch)===null||o===void 0||o.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&hn(t,this.catch.names),this.finally&&hn(t,this.finally.names),t}},la=class extends ur{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};la.kind="catch";var da=class extends ur{render(t){return"finally"+super.render(t)}};da.kind="finally";var nh=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
4
3
  `:""},this._extScope=t,this._scope=new Zt.Scope({parent:t}),this._nodes=[new Qp]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,n){let o=this._extScope.value(t,n);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,n){return this._extScope.getValue(t,n)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,n,o,r){let i=this._scope.toName(n);return o!==void 0&&r&&(this._constants[i.str]=o),this._leafNode(new Hp(t,i,o)),i}const(t,n,o){return this._def(Zt.varKinds.const,t,n,o)}let(t,n,o){return this._def(Zt.varKinds.let,t,n,o)}var(t,n,o){return this._def(Zt.varKinds.var,t,n,o)}assign(t,n,o){return this._leafNode(new xl(t,n,o))}add(t,n){return this._leafNode(new Kp(t,oe.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==le.nil&&this._leafNode(new Yp(t)),this}object(...t){let n=["{"];for(let[o,r]of t)n.length>1&&n.push(","),n.push(o),(o!==r||this.opts.es5)&&(n.push(":"),(0,le.addCodeArg)(n,r));return n.push("}"),new le._Code(n)}if(t,n,o){if(this._blockNode(new fn(t)),n&&o)this.code(n).else().code(o).endIf();else if(n)this.code(n).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new fn(t))}else(){return this._elseNode(new vo)}endIf(){return this._endBlockNode(fn,vo)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new eh(t),n)}forRange(t,n,o,r,i=this.opts.es5?Zt.varKinds.var:Zt.varKinds.let){let a=this._scope.toName(t);return this._for(new th(i,a,n,o),()=>r(a))}forOf(t,n,o,r=Zt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=n instanceof le.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,le._)`${a}.length`,s=>{this.var(i,(0,le._)`${a}[${s}]`),o(i)})}return this._for(new bl("of",r,i,n),()=>o(i))}forIn(t,n,o,r=this.opts.es5?Zt.varKinds.var:Zt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,le._)`Object.keys(${n})`,o);let i=this._scope.toName(t);return this._for(new bl("in",r,i,n),()=>o(i))}endFor(){return this._endBlockNode(pn)}label(t){return this._leafNode(new Wp(t))}break(t){return this._leafNode(new Gp(t))}return(t){let n=new ua;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ua)}try(t,n,o){if(!n&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new rh;if(this._blockNode(r),this.code(t),n){let i=this.name("e");this._currNode=r.catch=new la(i),n(i)}return o&&(this._currNode=r.finally=new da,this.code(o)),this._endBlockNode(la,da)}throw(t){return this._leafNode(new Xp(t))}block(t,n){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(n),this}endBlock(t){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-n;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=le.nil,o,r){return this._blockNode(new ca(t,n,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(ca)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,n){let o=this._currNode;if(o instanceof t||n&&o instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${t.kind}/${n.kind}`:t.kind}"`)}_elseNode(t){let n=this._currNode;if(!(n instanceof fn))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let n=this._nodes;n[n.length-1]=t}};oe.CodeGen=nh;function hn(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function kl(e,t){return t instanceof le._CodeOrName?hn(e,t.names):e}function yo(e,t,n){if(e instanceof le.Name)return o(e);if(!r(e))return e;return new le._Code(e._items.reduce((i,a)=>(a instanceof le.Name&&(a=o(a)),a instanceof le._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=n[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function r(i){return i instanceof le._Code&&i._items.some(a=>a instanceof le.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function TP(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function W$(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,le._)`!${oh(e)}`}oe.not=W$;var EP=G$(oe.operators.AND);function OP(...e){return e.reduce(EP)}oe.and=OP;var jP=G$(oe.operators.OR);function RP(...e){return e.reduce(jP)}oe.or=RP;function G$(e){return(t,n)=>t===le.nil?n:n===le.nil?t:(0,le._)`${oh(t)} ${e} ${oh(n)}`}function oh(e){return e instanceof le.Name?e:(0,le._)`(${e})`}});var fe=A(ie=>{"use strict";m();Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var we=te(),NP=aa();function DP(e){let t={};for(let n of e)t[n]=!0;return t}ie.toHash=DP;function AP(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Q$(e,t),!ex(t,e.self.RULES.all))}ie.alwaysValidSchema=AP;function Q$(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=o.RULES.keywords;for(let i in t)r[i]||nx(e,`unknown keyword: "${i}"`)}ie.checkUnknownRules=Q$;function ex(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ie.schemaHasRules=ex;function MP(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ie.schemaHasRulesButRef=MP;function CP({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,we._)`${n}`}return(0,we._)`${e}${t}${(0,we.getProperty)(o)}`}ie.schemaRefOrVal=CP;function ZP(e){return tx(decodeURIComponent(e))}ie.unescapeFragment=ZP;function UP(e){return encodeURIComponent(ah(e))}ie.escapeFragment=UP;function ah(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=ah;function tx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=tx;function LP(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ie.eachItem=LP;function X$({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let c=a===void 0?i:a instanceof we.Name?(i instanceof we.Name?e(r,i,a):t(r,i,a),a):i instanceof we.Name?(t(r,a,i),i):n(i,a);return s===we.Name&&!(c instanceof we.Name)?o(r,c):c}}ie.mergeEvaluated={props:X$({mergeNames:(e,t,n)=>e.if((0,we._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,we._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,we._)`${n} || {}`).code((0,we._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,we._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,we._)`${n} || {}`),sh(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:rx}),items:X$({mergeNames:(e,t,n)=>e.if((0,we._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,we._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,we._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,we._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function rx(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,we._)`{}`);return t!==void 0&&sh(e,n,t),n}ie.evaluatedPropsToName=rx;function sh(e,t,n){Object.keys(n).forEach(o=>e.assign((0,we._)`${t}${(0,we.getProperty)(o)}`,!0))}ie.setEvaluated=sh;var Y$={};function VP(e,t){return e.scopeValue("func",{ref:t,code:Y$[t.code]||(Y$[t.code]=new NP._Code(t.code))})}ie.useFunc=VP;var ih;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(ih||(ie.Type=ih={}));function qP(e,t,n){if(e instanceof we.Name){let o=t===ih.Num;return n?o?(0,we._)`"[" + ${e} + "]"`:(0,we._)`"['" + ${e} + "']"`:o?(0,we._)`"/" + ${e}`:(0,we._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,we.getProperty)(e).toString():"/"+ah(e)}ie.getErrorPath=qP;function nx(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=nx});var lr=A(ch=>{"use strict";m();Object.defineProperty(ch,"__esModule",{value:!0});var Ke=te(),FP={data:new Ke.Name("data"),valCxt:new Ke.Name("valCxt"),instancePath:new Ke.Name("instancePath"),parentData:new Ke.Name("parentData"),parentDataProperty:new Ke.Name("parentDataProperty"),rootData:new Ke.Name("rootData"),dynamicAnchors:new Ke.Name("dynamicAnchors"),vErrors:new Ke.Name("vErrors"),errors:new Ke.Name("errors"),this:new Ke.Name("this"),self:new Ke.Name("self"),scope:new Ke.Name("scope"),json:new Ke.Name("json"),jsonPos:new Ke.Name("jsonPos"),jsonLen:new Ke.Name("jsonLen"),jsonPart:new Ke.Name("jsonPart")};ch.default=FP});var ma=A(We=>{"use strict";m();Object.defineProperty(We,"__esModule",{value:!0});We.extendErrors=We.resetErrorsCount=We.reportExtraError=We.reportError=We.keyword$DataError=We.keywordError=void 0;var de=te(),wl=fe(),tt=lr();We.keywordError={message:({keyword:e})=>(0,de.str)`must pass "${e}" keyword validation`};We.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,de.str)`"${e}" keyword must be ${t} ($data)`:(0,de.str)`"${e}" keyword is invalid ($data)`};function JP(e,t=We.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,c=ax(e,t,n);o??(a||s)?ox(i,c):ix(r,(0,de._)`[${c}]`)}We.reportError=JP;function BP(e,t=We.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=ax(e,t,n);ox(r,s),i||a||ix(o,tt.default.vErrors)}We.reportExtraError=BP;function HP(e,t){e.assign(tt.default.errors,t),e.if((0,de._)`${tt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,de._)`${tt.default.vErrors}.length`,t),()=>e.assign(tt.default.vErrors,null)))}We.resetErrorsCount=HP;function KP({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,tt.default.errors,s=>{e.const(a,(0,de._)`${tt.default.vErrors}[${s}]`),e.if((0,de._)`${a}.instancePath === undefined`,()=>e.assign((0,de._)`${a}.instancePath`,(0,de.strConcat)(tt.default.instancePath,i.errorPath))),e.assign((0,de._)`${a}.schemaPath`,(0,de.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,de._)`${a}.schema`,n),e.assign((0,de._)`${a}.data`,o))})}We.extendErrors=KP;function ox(e,t){let n=e.const("err",t);e.if((0,de._)`${tt.default.vErrors} === null`,()=>e.assign(tt.default.vErrors,(0,de._)`[${n}]`),(0,de._)`${tt.default.vErrors}.push(${n})`),e.code((0,de._)`${tt.default.errors}++`)}function ix(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;r.$async?n.throw((0,de._)`new ${e.ValidationError}(${t})`):(n.assign((0,de._)`${o}.errors`,t),n.return(!1))}var gn={keyword:new de.Name("keyword"),schemaPath:new de.Name("schemaPath"),params:new de.Name("params"),propertyName:new de.Name("propertyName"),message:new de.Name("message"),schema:new de.Name("schema"),parentSchema:new de.Name("parentSchema")};function ax(e,t,n){let{createErrors:o}=e.it;return o===!1?(0,de._)`{}`:WP(e,t,n)}function WP(e,t,n={}){let{gen:o,it:r}=e,i=[GP(r,n),XP(e,n)];return YP(e,t,i),o.object(...i)}function GP({errorPath:e},{instancePath:t}){let n=t?(0,de.str)`${e}${(0,wl.getErrorPath)(t,wl.Type.Str)}`:e;return[tt.default.instancePath,(0,de.strConcat)(tt.default.instancePath,n)]}function XP({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:(0,de.str)`${t}/${e}`;return n&&(r=(0,de.str)`${r}${(0,wl.getErrorPath)(n,wl.Type.Str)}`),[gn.schemaPath,r]}function YP(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;o.push([gn.keyword,r],[gn.params,typeof t=="function"?t(e):t||(0,de._)`{}`]),c.messages&&o.push([gn.message,typeof n=="function"?n(e):n]),c.verbose&&o.push([gn.schema,a],[gn.parentSchema,(0,de._)`${l}${d}`],[tt.default.data,i]),u&&o.push([gn.propertyName,u])}});var cx=A(_o=>{"use strict";m();Object.defineProperty(_o,"__esModule",{value:!0});_o.boolOrEmptySchema=_o.topBoolOrEmptySchema=void 0;var QP=ma(),e1=te(),t1=lr(),r1={message:"boolean schema is false"};function n1(e){let{gen:t,schema:n,validateName:o}=e;n===!1?sx(e,!1):typeof n=="object"&&n.$async===!0?t.return(t1.default.data):(t.assign((0,e1._)`${o}.errors`,null),t.return(!0))}_o.topBoolOrEmptySchema=n1;function o1(e,t){let{gen:n,schema:o}=e;o===!1?(n.var(t,!1),sx(e)):n.var(t,!0)}_o.boolOrEmptySchema=o1;function sx(e,t){let{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,QP.reportError)(r,r1,void 0,t)}});var uh=A($o=>{"use strict";m();Object.defineProperty($o,"__esModule",{value:!0});$o.getRules=$o.isJSONType=void 0;var i1=["string","number","integer","boolean","null","object","array"],a1=new Set(i1);function s1(e){return typeof e=="string"&&a1.has(e)}$o.isJSONType=s1;function c1(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}$o.getRules=c1});var lh=A(Ar=>{"use strict";m();Object.defineProperty(Ar,"__esModule",{value:!0});Ar.shouldUseRule=Ar.shouldUseGroup=Ar.schemaHasRulesForType=void 0;function u1({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&ux(e,o)}Ar.schemaHasRulesForType=u1;function ux(e,t){return t.rules.some(n=>lx(e,n))}Ar.shouldUseGroup=ux;function lx(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(o=>e[o]!==void 0))}Ar.shouldUseRule=lx});var fa=A(Ge=>{"use strict";m();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.reportTypeError=Ge.checkDataTypes=Ge.checkDataType=Ge.coerceAndCheckDataType=Ge.getJSONTypes=Ge.getSchemaTypes=Ge.DataType=void 0;var l1=uh(),d1=lh(),m1=ma(),ee=te(),dx=fe(),xo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(xo||(Ge.DataType=xo={}));function f1(e){let t=mx(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Ge.getSchemaTypes=f1;function mx(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(l1.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Ge.getJSONTypes=mx;function p1(e,t){let{gen:n,data:o,opts:r}=e,i=h1(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,d1.schemaHasRulesForType)(e,t[0]));if(a){let s=mh(t,o,r.strictNumbers,xo.Wrong);n.if(s,()=>{i.length?g1(e,t,i):fh(e)})}return a}Ge.coerceAndCheckDataType=p1;var fx=new Set(["string","number","integer","boolean","null"]);function h1(e,t){return t?e.filter(n=>fx.has(n)||t==="array"&&n==="array"):[]}function g1(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",(0,ee._)`typeof ${r}`),s=o.let("coerced",(0,ee._)`undefined`);i.coerceTypes==="array"&&o.if((0,ee._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,ee._)`${r}[0]`).assign(a,(0,ee._)`typeof ${r}`).if(mh(t,r,i.strictNumbers),()=>o.assign(s,r))),o.if((0,ee._)`${s} !== undefined`);for(let u of n)(fx.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),fh(e),o.endIf(),o.if((0,ee._)`${s} !== undefined`,()=>{o.assign(r,s),v1(e,s)});function c(u){switch(u){case"string":o.elseIf((0,ee._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ee._)`"" + ${r}`).elseIf((0,ee._)`${r} === null`).assign(s,(0,ee._)`""`);return;case"number":o.elseIf((0,ee._)`${a} == "boolean" || ${r} === null
5
4
  || (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,ee._)`+${r}`);return;case"integer":o.elseIf((0,ee._)`${a} === "boolean" || ${r} === null
@@ -9,14 +9,14 @@
9
9
  <link rel="preload stylesheet" href="/assets/style.CN_tJoU2.css" as="style">
10
10
  <link rel="preload stylesheet" href="/vp-icons.css" as="style">
11
11
 
12
- <script type="module" src="/assets/app.XWdqe1Jg.js"></script>
12
+ <script type="module" src="/assets/app.B9MowiKp.js"></script>
13
13
  <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
14
14
  <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
15
15
  <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
16
16
  </head>
17
17
  <body>
18
18
  <div id="app"></div>
19
- <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"B4LS-34s\",\"guide_concepts.md\":\"DBFk-g-l\",\"guide_getting-started.md\":\"DMnUXWCy\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"CZ8IiuH-\",\"reference_config.md\":\"DLC4kvTR\",\"reference_data.md\":\"DciSLVC8\",\"reference_methods.md\":\"BNxMKwmx\",\"reference_runtime.md\":\"BnT09w_m\",\"reference_types.md\":\"CL_VFfB8\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
19
+ <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"B4LS-34s\",\"guide_concepts.md\":\"DBFk-g-l\",\"guide_getting-started.md\":\"d9VFlNB6\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"CZ8IiuH-\",\"reference_config.md\":\"DLC4kvTR\",\"reference_data.md\":\"DciSLVC8\",\"reference_methods.md\":\"BNxMKwmx\",\"reference_runtime.md\":\"BnT09w_m\",\"reference_types.md\":\"CL_VFfB8\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
20
20
 
21
21
  </body>
22
22
  </html>
@@ -1 +1 @@
1
- import{t as p}from"./chunks/theme.D2rRQxPQ.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.DRADY2L-.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
1
+ import{t as p}from"./chunks/theme.CdCUaiEQ.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.DRADY2L-.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};