@doubao-dev/cli 1.0.0-legacy-rc.13 → 1.0.0-legacy-rc.15

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.
Files changed (56) hide show
  1. package/dist/1349~0.js +2 -2
  2. package/dist/1453.js +2 -2
  3. package/dist/1499~0.js +13 -0
  4. package/dist/1547~0.js +29 -0
  5. package/dist/351.js +1 -1
  6. package/dist/4569~0.js +1 -0
  7. package/dist/4946.js +3 -3
  8. package/dist/5085~0.js +1 -1
  9. package/dist/5329~0.js +98 -0
  10. package/dist/{5792~0.js.LICENSE.txt → 5329~0.js.LICENSE.txt} +40 -0
  11. package/dist/5343~0.js +1 -1
  12. package/dist/5641~0.js +2 -2
  13. package/dist/5725~0.js +1 -1
  14. package/dist/678~0.js +1 -1
  15. package/dist/8352~0.js +1 -0
  16. package/dist/8652~0.js +5 -5
  17. package/dist/9652~0.js +1 -0
  18. package/dist/@inquirer/select.js +1 -1
  19. package/dist/app.js +1 -1
  20. package/dist/build.js +4 -4
  21. package/dist/business-template-personal-information.js +1 -1
  22. package/dist/check.js +2 -2
  23. package/dist/components-loader.js +1 -1
  24. package/dist/demo-server.js +1 -1
  25. package/dist/demo.js +1 -1
  26. package/dist/dev-service-client.js +1 -1
  27. package/dist/dev-shell.js +1 -1
  28. package/dist/dev.js +7 -12
  29. package/dist/dev2.js +4 -33
  30. package/dist/dist.js +1 -1
  31. package/dist/dist~1.js +1 -1
  32. package/dist/info.js +2 -2
  33. package/dist/init.js +4 -4
  34. package/dist/inquirer.js +1 -1
  35. package/dist/login.js +2 -2
  36. package/dist/main.js +1 -1
  37. package/dist/manifest-headers.js +1 -1
  38. package/dist/mcp-bridge.js +1 -1
  39. package/dist/ora.js +3 -3
  40. package/dist/sandbox.js +1 -1
  41. package/dist/sdk.js +37 -37
  42. package/dist/skills.js +1 -1
  43. package/dist/skills~1.js +1 -1
  44. package/dist/status.js +1 -1
  45. package/dist/stop.js +1 -1
  46. package/dist/sync.js +1 -1
  47. package/dist/yaml.js +1 -1
  48. package/package.json +5 -5
  49. package/dist/4970~0.js +0 -5
  50. package/dist/5792~0.js +0 -30
  51. package/dist/6179~0.js +0 -25
  52. package/dist/6611~0.js +0 -34
  53. package/dist/6686~0.js +0 -1
  54. package/dist/8348~0.js +0 -1
  55. package/dist/9966~0.js +0 -15
  56. package/dist/9966~0.js.LICENSE.txt +0 -39
@@ -1,2 +1,2 @@
1
- import"node:module";import{__webpack_require__ as t}from"./rslib-runtime~0.js";import"./8348~0.js";import{encode as e,walk_simple as i}from"./8522~0.js";class r{constructor(t){this.bits=t instanceof r?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(31&t)}has(t){return!!(this.bits[t>>5]&1<<(31&t))}}class n{constructor(t,e,i){this.start=t,this.end=e,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new n(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous}edit(t,e,i){return this.content=t,i||(this.intro="",this.outro=""),this.storeName=e,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let e=t-this.start,i=this.original.slice(0,e),r=this.original.slice(e);this.original=i;let o=new n(t,this.end,r);return o.outro=this.outro,this.outro="",this.end=t,this.edited?(o.edit("",!1),this.content=""):this.content=i,o.next=this.next,o.next&&(o.next.previous=o),o.previous=this,this.next=o,o}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let e=this.content.replace(t,"");return e.length?(e!==this.content&&(this.split(this.start+e.length).edit("",void 0,!0),this.edited&&this.edit(e,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),!!this.intro.length||void 0)}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let e=this.content.replace(t,"");if(e.length){if(e!==this.content){let t=this.split(this.end-e.length);this.edited&&t.edit(e,this.storeName,!0),this.edit("",void 0,!0)}return!0}if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}}let o="u">typeof globalThis&&"function"==typeof globalThis.btoa?t=>globalThis.btoa(unescape(encodeURIComponent(t))):"function"==typeof Buffer?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};class s{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=e(t.mappings),void 0!==t.x_google_ignoreList&&(this.x_google_ignoreList=t.x_google_ignoreList),void 0!==t.debugId&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+o(this.toString())}}let a=Object.prototype.toString;function l(t){let e=t.split("\n"),i=[];for(let t=0,r=0;t<e.length;t++)i.push(r),r+=e[t].length+1;return function(t){let e=0,r=i.length;for(;e<r;){let n=e+r>>1;t<i[n]?r=n:e=n+1}let n=e-1,o=t-i[n];return{line:n,column:o}}}let h=/\w/;class u{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,e,i,r){if(e.length){let n=e.length-1,o=e.indexOf("\n",0),s=-1;for(;o>=0&&n>o;){let n=[this.generatedCodeColumn,t,i.line,i.column];r>=0&&n.push(r),this.rawSegments.push(n),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=o,o=e.indexOf("\n",o+1)}let a=[this.generatedCodeColumn,t,i.line,i.column];r>=0&&a.push(r),this.rawSegments.push(a),this.advance(e.slice(s+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(e));this.pending=null}addUneditedChunk(t,e,i,r,n){let o=e.start,s=!0,a=!1;for(;o<e.end;){if("\n"===i[o])r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=!0,a=!1;else{if(this.hires||s||n.has(o)){let e=[this.generatedCodeColumn,t,r.line,r.column];"boundary"===this.hires?h.test(i[o])?a||(this.rawSegments.push(e),a=!0):(this.rawSegments.push(e),a=!1):this.rawSegments.push(e)}r.column+=1,this.generatedCodeColumn+=1,s=!1}o+=1}this.pending=null}advance(t){if(!t)return;let e=t.split("\n");if(e.length>1){for(let t=0;t<e.length-1;t++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e[e.length-1].length}}let p={insertLeft:!1,insertRight:!1,storeName:!1};class d{constructor(t,e={}){let i=new n(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:e.filename},indentExclusionRanges:{writable:!0,value:e.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new r},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:e.ignoreList},offset:{writable:!0,value:e.offset||0}}),this.byStart[0]=i,this.byEnd[t.length]=i}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if("string"!=typeof t)throw TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byEnd[t];return i?i.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byStart[t];return i?i.appendRight(e):this.outro+=e,this}clone(){let t=new d(this.original,{filename:this.filename,offset:this.offset}),e=this.firstChunk,i=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[i.start]=i,t.byEnd[i.end]=i;let r=e.next,n=r&&r.clone();n&&(i.next=n,n.previous=i,i=n),e=r}return t.lastChunk=i,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new r(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let e=Object.keys(this.storedNames),i=new u(t.hires),r=l(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(t=>{let n=r(t.start);t.intro.length&&i.advance(t.intro),t.edited?i.addEdit(0,t.content,n,t.storeName?e.indexOf(t.original):-1):i.addUneditedChunk(0,t,this.original,n,this.sourcemapLocations),t.outro.length&&i.advance(t.outro)}),this.outro&&i.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?function(t,e){let i=t.split(/[/\\]/),r=e.split(/[/\\]/);for(i.pop();i[0]===r[0];)i.shift(),r.shift();if(i.length){let t=i.length;for(;t--;)i[t]=".."}return i.concat(r).join("/")}(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:e,mappings:i.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(t){return new s(this.generateDecodedMap(t))}_ensureindentStr(){let t,e,i;void 0===this.indentStr&&(this.indentStr=(e=(t=this.original.split("\n")).filter(t=>/^\t+/.test(t)),i=t.filter(t=>/^ {2,}/.test(t)),0===e.length&&0===i.length?null:e.length>=i.length?" ":Array(i.reduce((t,e)=>Math.min(/^ +/.exec(e)[0].length,t),1/0)+1).join(" ")))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?" ":this.indentStr}indent(t,e){var i;let r=/^[^\r\n]/gm;if(i=t,"[object Object]"===a.call(i)&&(e=t,t=void 0),void 0===t&&(this._ensureindentStr(),t=this.indentStr||" "),""===t)return this;let n={};(e=e||{}).exclude&&("number"==typeof e.exclude[0]?[e.exclude]:e.exclude).forEach(t=>{for(let e=t[0];e<t[1];e+=1)n[e]=!0});let o=!1!==e.indentStart,s=e=>o?`${t}${e}`:(o=!0,e);this.intro=this.intro.replace(r,s);let l=0,h=this.firstChunk;for(;h;){let e=h.end;if(h.edited)!n[l]&&(h.content=h.content.replace(r,s),h.content.length&&(o="\n"===h.content[h.content.length-1]));else for(l=h.start;l<e;){if(!n[l]){let e=this.original[l];"\n"===e?o=!0:"\r"!==e&&o&&(o=!1,l===h.start?h.prependRight(t):(this._splitChunk(h,l),(h=h.next).prependRight(t)))}l+=1}l=h.end,h=h.next}return this.outro=this.outro.replace(r,s),this}insert(){throw Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return p.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),p.insertLeft=!0),this.appendLeft(t,e)}insertRight(t,e){return p.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),p.insertRight=!0),this.prependRight(t,e)}move(t,e,i){if(t+=this.offset,e+=this.offset,(i+=this.offset)>=t&&i<=e)throw Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(i);let r=this.byStart[t],n=this.byEnd[e],o=r.previous,s=n.next,a=this.byStart[i];if(!a&&n===this.lastChunk)return this;let l=a?a.previous:this.lastChunk;return o&&(o.next=s),s&&(s.previous=o),l&&(l.next=r),a&&(a.previous=n),r.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=l,n.next=a||null,l||(this.firstChunk=r),a||(this.lastChunk=n),this}overwrite(t,e,i,r){return r=r||{},this.update(t,e,i,{...r,overwrite:!r.contentOnly})}update(t,e,i,r){if(t+=this.offset,e+=this.offset,"string"!=typeof i)throw TypeError("replacement content must be a string");if(0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(e>this.original.length)throw Error("end is out of bounds");if(t===e)throw Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(t),this._split(e),!0===r&&(p.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),p.storeName=!0),r={storeName:!0});let o=void 0!==r&&r.storeName,s=void 0!==r&&r.overwrite;if(o){let i=this.original.slice(t,e);Object.defineProperty(this.storedNames,i,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[t],l=this.byEnd[e];if(a){let t=a;for(;t!==l;){if(t.next!==this.byStart[t.end])throw Error("Cannot overwrite across a split point");(t=t.next).edit("",!1)}a.edit(i,o,!s)}else{let r=new n(t,e,"").edit(i,o);l.next=r,r.previous=l}return this}prepend(t){if("string"!=typeof t)throw TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byEnd[t];return i?i.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byStart[t];return i?i.prependRight(e):this.outro=e+this.outro,this}remove(t,e){if(t+=this.offset,e+=this.offset,0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw Error("Character is out of bounds");if(t>e)throw Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.intro="",i.outro="",i.edit(""),i=e>i.end?this.byStart[i.end]:null;return this}reset(t,e){if(t+=this.offset,e+=this.offset,0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw Error("Character is out of bounds");if(t>e)throw Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.reset(),i=e>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf("\n");if(-1!==t)return this.outro.substr(t+1);let e=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(-1!==(t=i.outro.lastIndexOf("\n")))return i.outro.substr(t+1)+e;e=i.outro+e}if(i.content.length>0){if(-1!==(t=i.content.lastIndexOf("\n")))return i.content.substr(t+1)+e;e=i.content+e}if(i.intro.length>0){if(-1!==(t=i.intro.lastIndexOf("\n")))return i.intro.substr(t+1)+e;e=i.intro+e}}while(i=i.previous);return -1!==(t=this.intro.lastIndexOf("\n"))?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length-this.offset){if(t+=this.offset,e+=this.offset,0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}let i="",r=this.firstChunk;for(;r&&(r.start>t||r.end<=t);){if(r.start<e&&r.end>=e)return i;r=r.next}if(r&&r.edited&&r.start!==t)throw Error(`Cannot use replaced character ${t} as slice start anchor.`);let n=r;for(;r;){r.intro&&(n!==r||r.start===t)&&(i+=r.intro);let o=r.start<e&&r.end>=e;if(o&&r.edited&&r.end!==e)throw Error(`Cannot use replaced character ${e} as slice end anchor.`);let s=n===r?t-r.start:0,a=o?r.content.length+e-r.end:r.content.length;if(i+=r.content.slice(s,a),r.outro&&(!o||r.end===e)&&(i+=r.outro),o)break;r=r.next}return i}snip(t,e){let i=this.clone();return i.remove(0,t),i.remove(e,i.original.length),i}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk,i=e,r=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);if((e=r?this.byStart[e.end]:this.byEnd[e.start])===i)return;i=e}}_splitChunk(t,e){if(t.edited&&t.content.length){let i=l(this.original)(e);throw Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${t.original}")`)}let i=t.split(e);return this.byEnd[e]=t,this.byStart[e]=i,this.byEnd[i.end]=i,t===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let e=RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let i=this.lastChunk;do{let t=i.end,r=i.trimEnd(e);if(i.end!==t&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.previous}while(i);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let e=RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let i=this.firstChunk;do{let t=i.end,r=i.trimStart(e);if(i.end!==t&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.next}while(i);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function i(t,i){return"string"==typeof e?e.replace(/\$(\$|&|\d+)/g,(e,i)=>"$"===i?"$":"&"===i?t[0]:+i<t.length?t[+i]:`$${i}`):e(...t,t.index,i,t.groups)}if(t.global)(function(t,e){let i,r=[];for(;i=t.exec(e);)r.push(i);return r})(t,this.original).forEach(t=>{if(null!=t.index){let e=i(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}});else{let e=this.original.match(t);if(e&&null!=e.index){let t=i(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}}return this}_replaceString(t,e){let{original:i}=this,r=i.indexOf(t);return -1!==r&&("function"==typeof e&&(e=e(t,r,i)),t!==e&&this.overwrite(r,r+t.length,e)),this}replace(t,e){return"string"==typeof t?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){let{original:i}=this,r=t.length;for(let n=i.indexOf(t);-1!==n;n=i.indexOf(t,n+r)){let t=i.slice(n,n+r),o=e;"function"==typeof e&&(o=e(t,n,i)),t!==o&&this.overwrite(n,n+r,o)}return this}replaceAll(t,e){if("string"==typeof t)return this._replaceAllString(t,e);if(!t.global)throw TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}}Object.prototype.hasOwnProperty;let c=new Set(["@doubao-dev/template","@byted-doubao-apps/template"]),f=new Set([...c].map(t=>`${t}/primitives`)),g=t=>`${t.ctxt??0}:${t.value}`,m=t("node:fs"),y=t("node:path"),b=t("../../../node_modules/.pnpm/@swc+core@1.15.11_@swc+helpers@0.5.23/node_modules/@swc/core/index.js"),x={audio:"DoubaoAudio",button:"DoubaoButton",camera:"DoubaoCamera",canvas:"DoubaoCanvas",checkbox:"DoubaoCheckbox","checkbox-group":"DoubaoCheckboxGroup",map:"DoubaoMap","map-marker":"DoubaoMapMarker",markdown:"DoubaoMarkdown","navigation-bar":"DoubaoNavigationBar","long-image":"DoubaoLongImage","movable-area":"DoubaoMovableArea","movable-view":"DoubaoMovableView",popup:"DoubaoPopup",radio:"DoubaoRadio","radio-group":"DoubaoRadioGroup","rich-text":"DoubaoRichText",slider:"DoubaoSlider",switch:"DoubaoSwitch",swiper:"DoubaoSwiper","swiper-item":"DoubaoSwiperItem","picker-column":"DoubaoPickerColumn","picker-divider":"DoubaoPickerDivider","picker-view":"DoubaoPickerView","theme-provider":"DoubaoThemeProvider",video:"DoubaoVideo","web-view":"DoubaoWebView",image:"DoubaoImage",input:"DoubaoInput",list:"DoubaoList",refresh:"DoubaoRefresh","refresh-header":"DoubaoRefreshHeader","scroll-view":"DoubaoScrollView",svg:"DoubaoSvg",text:"DoubaoText",textarea:"DoubaoTextArea",view:"DoubaoView"};function w(t){return"Identifier"===t.type&&t.value in x?t.value:null}function C(t,e,i,r,n){if("Identifier"!==e.type)return;let o=n(e.span.start-r),s=n(e.span.end-r);t.overwrite(o,s,i)}function S(t){try{return(0,m.realpathSync)(t)}catch{return y.resolve(t)}}export default function(t){let e=this.async();try{let{frameworkPackage:r="@byted-doubao-apps/framework",widgetEntryPaths:n=[]}=this.getOptions(),o=new d(t),s=(0,b.parseSync)(t,{syntax:"typescript",tsx:!0,decorators:!0}),a=function(t){let e=0;for(;e<t.length;){let i=t[e];if(" "===i||" "===i||"\n"===i||"\r"===i||"\f"===i){e+=1;continue}if("/"===i&&"/"===t[e+1]){for(e+=2;e<t.length&&"\n"!==t[e];)e+=1;continue}if("/"===i&&"*"===t[e+1]){for(e+=2;e<t.length&&("*"!==t[e]||"/"!==t[e+1]);)e+=1;e<t.length&&(e+=2);continue}break}return Buffer.byteLength(t.slice(0,e))}(t),l=Math.max(0,s.span.start-a),h=function(t){let e=new Map([[0,0]]),i=0,r=0;for(let n of t)i+=Buffer.byteLength(n),r+=n.length,e.set(i,r);return t=>{let i=e.get(t);if(void 0===i)throw Error(`无法将字节偏移量 ${t} 映射为字符串索引`);return i}}(t),u=[],p=new Set;for(let e of function(t,e={}){let r=new Map,n=new Map,o=new Map,s=[],a=new Set;for(let e of t.body)if("ImportDeclaration"===e.type&&!e.typeOnly)for(let t of e.specifiers)"ImportSpecifier"!==t.type||t.isTypeOnly?"ImportDefaultSpecifier"===t.type?n.set(g(t.local),{source:e.source.value,name:"default"}):"ImportNamespaceSpecifier"===t.type&&n.set(g(t.local),{source:e.source.value,name:"*"}):n.set(g(t.local),{source:e.source.value,name:t.imported?.value??t.local.value});function l(t){"Identifier"===t.type?o.delete(g(t)):"MemberExpression"===t.type&&l(t.object)}function h(t,e=new Set){if(e.has(t))return t;switch(e.add(t),t.type){case"Identifier":{let i=o.get(g(t));return i?h(i,e):t}case"MemberExpression":{let i=t.property,r="Identifier"===i.type?i.value:"Computed"===i.type&&"StringLiteral"===i.expression.type?i.expression.value:void 0;if(void 0===r)return t;let n=h(t.object,e);if("ObjectExpression"!==n.type)return t;let o=y(n).get(r);return o?h(o,e):t}case"ParenthesisExpression":case"TsAsExpression":case"TsSatisfiesExpression":case"TsTypeAssertion":case"TsNonNullExpression":return h(t.expression,e);default:return t}}function u(t,e=new Set){if("Identifier"===t.type){if(e.has(g(t)))return;e.add(g(t));let i=n.get(g(t));if(i)return i;let r=h(t);return r!==t?u(r,e):void 0}if("JSXMemberExpression"===t.type||"MemberExpression"===t.type){let i=u(t.object,e);if(i?.name==="*"&&"Identifier"===t.property.type)return{source:i.source,name:t.property.value}}}function p(t,e,i,r){if(!("span"in t))return;let n=`${t.span.start}:${e}:${i}`;a.has(n)||(a.add(n),s.push({span:t.span,field:e,message:i,...r?{ruleId:r}:{}}))}i(t,{FunctionDeclaration(t){r.set(g(t.identifier),t)},VariableDeclaration(t){if("const"===t.kind)for(let e of t.declarations)"Identifier"===e.id.type&&e.init&&o.set(g(e.id),e.init)}}),i(t,{AssignmentExpression(t){("Identifier"===t.left.type||"MemberExpression"===t.left.type)&&l(t.left)},UpdateExpression(t){l(t.argument)},CallExpression(t){"MemberExpression"===t.callee.type&&"Identifier"===t.callee.property.type&&["push","pop","shift","unshift","splice","fill","copyWithin","reverse","sort"].includes(t.callee.property.value)&&l(t.callee.object)}});let d=new Set,m=new WeakSet;function y(t,e=new Set){let i=new Map,r=h(t);if(e.has(r)||d.has(r)||"ObjectExpression"!==r.type)return m.add(i),i;for(let t of(d.add(r),e.add(r),r.properties))if("SpreadElement"===t.type){let r=h(t.arguments);if("ObjectExpression"!==r.type)i.clear(),m.add(i);else{let t=y(r,new Set(e));for(let[e,r]of(m.has(t)&&(i.clear(),m.add(i)),t))i.set(e,r)}}else"Identifier"===t.type?i.set(t.value,t):"KeyValueProperty"===t.type&&("Identifier"===t.key.type||"StringLiteral"===t.key.type?i.set(t.key.value,t.value):(i.clear(),m.add(i)));return d.delete(r),i}function b(t,e,i=new Set){let r=h(t);if(i.has(r))return;let n=new Set(i).add(r);"ConditionalExpression"===r.type?(b(r.consequent,e,n),b(r.alternate,e,n)):"BinaryExpression"===r.type&&"&&"===r.operator?b(r.right,e,n):"BinaryExpression"===r.type&&("||"===r.operator||"??"===r.operator)?(b(r.left,e,n),b(r.right,e,n)):e(r)}function x(t,e,i){b(t,t=>{if("NullLiteral"!==t.type&&("BooleanLiteral"!==t.type||t.value)&&("text"!==e||"StringLiteral"!==t.type&&"NumericLiteral"!==t.type)){if("JSXElement"===t.type){let i=t.opening.name,r=u(i),n=t.children.some(t=>"JSXText"!==t.type||t.value.trim()),o=r&&f.has(r.source)&&"text"===e&&["Title","Tag"].includes(r.name),s="image"===e&&"Identifier"===i.type&&["image","svg"].includes(i.value);if(!n&&(o||s))return}else if(!["JSXFragment","ArrayExpression","ObjectExpression","BooleanLiteral","StringLiteral","NumericLiteral"].includes(t.type))return;else if("config"===e&&"JSXFragment"!==t.type&&"ArrayExpression"!==t.type)return;p(t,i,`仅支持 ${"text"===e?"string / number / Tag / Title":"image"===e?"image / svg":"标准配置(price 也支持 string / number)"},不支持业务组件、fragment、包装节点或复合 JSX。`)}})}function w(t,e,i=new Set){b(t,t=>{if(i.has(t))return;let r=new Set(i).add(t);if("ArrayExpression"===t.type)for(let i of t.elements)i&&(i.spread?w(i.expression,e,r):b(i.expression,e));else if("CallExpression"===t.type&&"MemberExpression"===t.callee.type&&"Identifier"===t.callee.property.type&&"map"===t.callee.property.value){let i=t.arguments[0]?.expression;i?.type==="ArrowFunctionExpression"&&"BlockStatement"!==i.body.type&&b(i.body,e)}})}if(i(t,{JSXElement(t){let i=u(t.opening.name);if(!i||!(c.has(i.source)&&["ContentCard","CouponCard","TransitCard","CheckoutCard","CompositeCard","PriceActionCard","AskHumanCard","MapCard"].includes(i.name)||f.has(i.source)&&["Title","Tag","Price","Icon","OptionGroup","Checkbox","Agreement"].includes(i.name)))return;let r=new Map;for(let e of t.opening.attributes)if("SpreadElement"===e.type){let t=h(e.arguments);if("ObjectExpression"!==t.type)r.clear();else{let e=y(t);for(let[t,i]of(m.has(e)&&r.clear(),e))r.set(t,i)}}else if("Identifier"===e.name.type&&e.value){let t=e.value;"JSXExpressionContainer"===t.type&&"JSXEmptyExpression"!==t.expression.type?r.set(e.name.value,t.expression):"StringLiteral"===t.type&&r.set(e.name.value,t)}let n=function t(i,r,n=r){var o;let s=!1,a="CheckoutCard"===r?"productItems":"items",l=i.get(a);return l&&(o=`${n}.${a}`,w(l,t=>{for(let[e,i]of y(t)){let t=`${o}[].${e}`;"ContentCard"===r&&["title","subtitle","description"].includes(e)||"TransitCard"===r&&"title"===e?x(i,"text",t):"ContentCard"===r&&"thumbnail"===e||"CheckoutCard"===r&&"image"===e?x(i,"image",t):("ContentCard"===r&&"action"===e||"TransitCard"===r&&"price"===e)&&x(i,"config",t)}})),"CompositeCard"===r&&i.has("sections")&&w(i.get("sections"),i=>{let r=y(i),o=r.get("type"),a=o&&h(o),l=r.get("props");if(a?.type==="StringLiteral"&&"custom"===a.value){s=!0;let t=r.get("content");t&&b(t,t=>{if("JSXElement"===t.type){let i=u(t.opening.name);!i||c.has(i.source)||f.has(i.source)||e.onCustomSectionImport?.(i.source)}})}if(a?.type==="StringLiteral"&&l){let e={content:"ContentCard",transit:"TransitCard","option-group":"OptionGroup"}[a.value];e&&t(y(l),e,`${n}.sections[${a.value}].props`)}}),s}(r,i.name);"CompositeCard"===i.name&&p(t,"CompositeCard",`CompositeCard 支持组合内容模块,构建检查无法自动判断最终效果是否符合豆包卡片设计规范。请在交付前检查整体布局、视觉层级、交互及各状态。${n?"自定义内容及其样式也需符合规范,且不得覆盖模板外壳、Header 和 Footer。":""}`,n?"template.composite.design.custom":"template.composite.design")}}),e.checkWidgetRoot){let e=new Set,i=new Set,n=new Set(["@doubao-dev/framework","@byted-doubao-apps/framework"]),o=new Set(["ContentCard","CouponCard","TransitCard","CheckoutCard","CompositeCard","PriceActionCard","AskHumanCard","MapCard"]);function C(t){if(!e.has(t)&&t.body){if(e.add(t),"BlockStatement"!==t.body.type)return void S(t.body);!function t(e){if(e&&"object"==typeof e){if(Array.isArray(e))return void e.forEach(t);if("ReturnStatement"===e.type){e.argument&&S(e.argument);return}["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","MethodProperty","ClassDeclaration","ClassExpression"].includes(String(e.type))||Object.values(e).forEach(t)}}(t.body)}}function S(t){b(t,t=>{if(!i.has(t)&&(i.add(t),"NullLiteral"!==t.type&&("BooleanLiteral"!==t.type||t.value)))if("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type)C(t);else if("Identifier"===t.type){let e=r.get(g(t));e&&C(e)}else if("CallExpression"===t.type){if("Super"===t.callee.type||"Import"===t.callee.type)return;let e=u(t.callee);if(e?.name==="defineWidget"&&n.has(e.source)){let e=t.arguments[0]?.expression;e&&function(t){let e=h(t),i=y(e).get("render");if(i&&S(i),"ObjectExpression"===e.type)for(let t of e.properties)"MethodProperty"===t.type&&("Identifier"===t.key.type||"StringLiteral"===t.key.type)&&"render"===t.key.value&&C(t)}(e)}else if(e&&["memo","forwardRef"].includes(e.name)&&(n.has(e.source)||["react","@lynx-js/react"].includes(e.source))){let e=t.arguments[0]?.expression;e&&S(e)}else{let e=h(t.callee);if("FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)C(e);else if("Identifier"===e.type){let t=r.get(g(e));t&&C(t)}}}else if("JSXElement"===t.type){let e=t.opening.name,i=u(e);if(i&&c.has(i.source)&&o.has(i.name))return;if("Identifier"===e.type&&!/^[a-z]/.test(e.value)){let t=r.get(g(e)),i=h(e);if(t)return void C(t);if("FunctionExpression"===i.type||"ArrowFunctionExpression"===i.type||"CallExpression"===i.type)return void S(i)}p(t,"widget.root","Widget 最外层必须直接渲染模板卡片,不能套 view、scroll-view、fragment 或其他包装节点。")}else["JSXFragment","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral"].includes(t.type)&&p(t,"widget.root","Widget 最外层必须直接渲染一张模板卡片。")})}for(let e of t.body)if("ExportDefaultExpression"===e.type)S(e.expression);else if("ExportDefaultDeclaration"===e.type&&"FunctionExpression"===e.decl.type)C(e.decl);else if("ExportNamedDeclaration"===e.type&&!e.source&&!e.typeOnly)for(let t of e.specifiers)"ExportSpecifier"===t.type&&t.exported?.value==="default"&&"Identifier"===t.orig.type&&S(t.orig)}return s}(s,{onCustomSectionImport:t=>p.add(t),checkWidgetRoot:n.some(t=>S(t)===S(this.resourcePath))})){let i=h(e.span.start-l),r=t.slice(0,i),n=r.split("\n").length,o=i-r.lastIndexOf("\n");u.push({rule_id:e.ruleId??("widget.root"===e.field?"template.root":"template.content"),severity:"warning",file:this.resourcePath,line:n,column:o,field:e.field,message:e.message})}let m=this._module;m?.buildInfo&&(m.buildInfo.cardDiagnostics=u,m.buildInfo.cardCustomSectionImports=[...p]);let y=new Set;if(i(s,{JSXOpeningElement(t){let e=w(t.name);if(!e)return;let i=x[e];C(o,t.name,i,l,h),y.add(i)},JSXClosingElement(t){let e=w(t.name);if(!e)return;let i=x[e];C(o,t.name,i,l,h),y.add(i)}}),y.size>0){let t=Array.from(y).map(t=>{let e=t.replace("Doubao","");return`${e} as ${t}`}).join(", "),e=`import { ${t} } from '${r}/components';
1
+ import"node:module";import{__webpack_require__ as t}from"./rslib-runtime~0.js";import"./9652~0.js";import{encode as e,walk_simple as i}from"./8522~0.js";import"./8352~0.js";class r{constructor(t){this.bits=t instanceof r?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(31&t)}has(t){return!!(this.bits[t>>5]&1<<(31&t))}}class n{constructor(t,e,i){this.start=t,this.end=e,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new n(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous}edit(t,e,i){return this.content=t,i||(this.intro="",this.outro=""),this.storeName=e,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let e=t-this.start,i=this.original.slice(0,e),r=this.original.slice(e);this.original=i;let o=new n(t,this.end,r);return o.outro=this.outro,this.outro="",this.end=t,this.edited?(o.edit("",!1),this.content=""):this.content=i,o.next=this.next,o.next&&(o.next.previous=o),o.previous=this,this.next=o,o}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let e=this.content.replace(t,"");return e.length?(e!==this.content&&(this.split(this.start+e.length).edit("",void 0,!0),this.edited&&this.edit(e,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),!!this.intro.length||void 0)}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let e=this.content.replace(t,"");if(e.length){if(e!==this.content){let t=this.split(this.end-e.length);this.edited&&t.edit(e,this.storeName,!0),this.edit("",void 0,!0)}return!0}if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}}let o="u">typeof globalThis&&"function"==typeof globalThis.btoa?t=>globalThis.btoa(unescape(encodeURIComponent(t))):"function"==typeof Buffer?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};class s{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=e(t.mappings),void 0!==t.x_google_ignoreList&&(this.x_google_ignoreList=t.x_google_ignoreList),void 0!==t.debugId&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+o(this.toString())}}let a=Object.prototype.toString;function l(t){let e=t.split("\n"),i=[];for(let t=0,r=0;t<e.length;t++)i.push(r),r+=e[t].length+1;return function(t){let e=0,r=i.length;for(;e<r;){let n=e+r>>1;t<i[n]?r=n:e=n+1}let n=e-1,o=t-i[n];return{line:n,column:o}}}let h=/\w/;class u{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,e,i,r){if(e.length){let n=e.length-1,o=e.indexOf("\n",0),s=-1;for(;o>=0&&n>o;){let n=[this.generatedCodeColumn,t,i.line,i.column];r>=0&&n.push(r),this.rawSegments.push(n),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=o,o=e.indexOf("\n",o+1)}let a=[this.generatedCodeColumn,t,i.line,i.column];r>=0&&a.push(r),this.rawSegments.push(a),this.advance(e.slice(s+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(e));this.pending=null}addUneditedChunk(t,e,i,r,n){let o=e.start,s=!0,a=!1;for(;o<e.end;){if("\n"===i[o])r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=!0,a=!1;else{if(this.hires||s||n.has(o)){let e=[this.generatedCodeColumn,t,r.line,r.column];"boundary"===this.hires?h.test(i[o])?a||(this.rawSegments.push(e),a=!0):(this.rawSegments.push(e),a=!1):this.rawSegments.push(e)}r.column+=1,this.generatedCodeColumn+=1,s=!1}o+=1}this.pending=null}advance(t){if(!t)return;let e=t.split("\n");if(e.length>1){for(let t=0;t<e.length-1;t++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e[e.length-1].length}}let p={insertLeft:!1,insertRight:!1,storeName:!1};class d{constructor(t,e={}){let i=new n(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:e.filename},indentExclusionRanges:{writable:!0,value:e.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new r},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:e.ignoreList},offset:{writable:!0,value:e.offset||0}}),this.byStart[0]=i,this.byEnd[t.length]=i}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if("string"!=typeof t)throw TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byEnd[t];return i?i.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byStart[t];return i?i.appendRight(e):this.outro+=e,this}clone(){let t=new d(this.original,{filename:this.filename,offset:this.offset}),e=this.firstChunk,i=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[i.start]=i,t.byEnd[i.end]=i;let r=e.next,n=r&&r.clone();n&&(i.next=n,n.previous=i,i=n),e=r}return t.lastChunk=i,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new r(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let e=Object.keys(this.storedNames),i=new u(t.hires),r=l(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(t=>{let n=r(t.start);t.intro.length&&i.advance(t.intro),t.edited?i.addEdit(0,t.content,n,t.storeName?e.indexOf(t.original):-1):i.addUneditedChunk(0,t,this.original,n,this.sourcemapLocations),t.outro.length&&i.advance(t.outro)}),this.outro&&i.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?function(t,e){let i=t.split(/[/\\]/),r=e.split(/[/\\]/);for(i.pop();i[0]===r[0];)i.shift(),r.shift();if(i.length){let t=i.length;for(;t--;)i[t]=".."}return i.concat(r).join("/")}(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:e,mappings:i.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(t){return new s(this.generateDecodedMap(t))}_ensureindentStr(){let t,e,i;void 0===this.indentStr&&(this.indentStr=(e=(t=this.original.split("\n")).filter(t=>/^\t+/.test(t)),i=t.filter(t=>/^ {2,}/.test(t)),0===e.length&&0===i.length?null:e.length>=i.length?" ":Array(i.reduce((t,e)=>Math.min(/^ +/.exec(e)[0].length,t),1/0)+1).join(" ")))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?" ":this.indentStr}indent(t,e){var i;let r=/^[^\r\n]/gm;if(i=t,"[object Object]"===a.call(i)&&(e=t,t=void 0),void 0===t&&(this._ensureindentStr(),t=this.indentStr||" "),""===t)return this;let n={};(e=e||{}).exclude&&("number"==typeof e.exclude[0]?[e.exclude]:e.exclude).forEach(t=>{for(let e=t[0];e<t[1];e+=1)n[e]=!0});let o=!1!==e.indentStart,s=e=>o?`${t}${e}`:(o=!0,e);this.intro=this.intro.replace(r,s);let l=0,h=this.firstChunk;for(;h;){let e=h.end;if(h.edited)!n[l]&&(h.content=h.content.replace(r,s),h.content.length&&(o="\n"===h.content[h.content.length-1]));else for(l=h.start;l<e;){if(!n[l]){let e=this.original[l];"\n"===e?o=!0:"\r"!==e&&o&&(o=!1,l===h.start?h.prependRight(t):(this._splitChunk(h,l),(h=h.next).prependRight(t)))}l+=1}l=h.end,h=h.next}return this.outro=this.outro.replace(r,s),this}insert(){throw Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return p.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),p.insertLeft=!0),this.appendLeft(t,e)}insertRight(t,e){return p.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),p.insertRight=!0),this.prependRight(t,e)}move(t,e,i){if(t+=this.offset,e+=this.offset,(i+=this.offset)>=t&&i<=e)throw Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(i);let r=this.byStart[t],n=this.byEnd[e],o=r.previous,s=n.next,a=this.byStart[i];if(!a&&n===this.lastChunk)return this;let l=a?a.previous:this.lastChunk;return o&&(o.next=s),s&&(s.previous=o),l&&(l.next=r),a&&(a.previous=n),r.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=l,n.next=a||null,l||(this.firstChunk=r),a||(this.lastChunk=n),this}overwrite(t,e,i,r){return r=r||{},this.update(t,e,i,{...r,overwrite:!r.contentOnly})}update(t,e,i,r){if(t+=this.offset,e+=this.offset,"string"!=typeof i)throw TypeError("replacement content must be a string");if(0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(e>this.original.length)throw Error("end is out of bounds");if(t===e)throw Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(t),this._split(e),!0===r&&(p.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),p.storeName=!0),r={storeName:!0});let o=void 0!==r&&r.storeName,s=void 0!==r&&r.overwrite;if(o){let i=this.original.slice(t,e);Object.defineProperty(this.storedNames,i,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[t],l=this.byEnd[e];if(a){let t=a;for(;t!==l;){if(t.next!==this.byStart[t.end])throw Error("Cannot overwrite across a split point");(t=t.next).edit("",!1)}a.edit(i,o,!s)}else{let r=new n(t,e,"").edit(i,o);l.next=r,r.previous=l}return this}prepend(t){if("string"!=typeof t)throw TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byEnd[t];return i?i.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(t+=this.offset,"string"!=typeof e)throw TypeError("inserted content must be a string");this._split(t);let i=this.byStart[t];return i?i.prependRight(e):this.outro=e+this.outro,this}remove(t,e){if(t+=this.offset,e+=this.offset,0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw Error("Character is out of bounds");if(t>e)throw Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.intro="",i.outro="",i.edit(""),i=e>i.end?this.byStart[i.end]:null;return this}reset(t,e){if(t+=this.offset,e+=this.offset,0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}if(t===e)return this;if(t<0||e>this.original.length)throw Error("Character is out of bounds");if(t>e)throw Error("end must be greater than start");this._split(t),this._split(e);let i=this.byStart[t];for(;i;)i.reset(),i=e>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf("\n");if(-1!==t)return this.outro.substr(t+1);let e=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(-1!==(t=i.outro.lastIndexOf("\n")))return i.outro.substr(t+1)+e;e=i.outro+e}if(i.content.length>0){if(-1!==(t=i.content.lastIndexOf("\n")))return i.content.substr(t+1)+e;e=i.content+e}if(i.intro.length>0){if(-1!==(t=i.intro.lastIndexOf("\n")))return i.intro.substr(t+1)+e;e=i.intro+e}}while(i=i.previous);return -1!==(t=this.intro.lastIndexOf("\n"))?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length-this.offset){if(t+=this.offset,e+=this.offset,0!==this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length}let i="",r=this.firstChunk;for(;r&&(r.start>t||r.end<=t);){if(r.start<e&&r.end>=e)return i;r=r.next}if(r&&r.edited&&r.start!==t)throw Error(`Cannot use replaced character ${t} as slice start anchor.`);let n=r;for(;r;){r.intro&&(n!==r||r.start===t)&&(i+=r.intro);let o=r.start<e&&r.end>=e;if(o&&r.edited&&r.end!==e)throw Error(`Cannot use replaced character ${e} as slice end anchor.`);let s=n===r?t-r.start:0,a=o?r.content.length+e-r.end:r.content.length;if(i+=r.content.slice(s,a),r.outro&&(!o||r.end===e)&&(i+=r.outro),o)break;r=r.next}return i}snip(t,e){let i=this.clone();return i.remove(0,t),i.remove(e,i.original.length),i}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk,i=e,r=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);if((e=r?this.byStart[e.end]:this.byEnd[e.start])===i)return;i=e}}_splitChunk(t,e){if(t.edited&&t.content.length){let i=l(this.original)(e);throw Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${t.original}")`)}let i=t.split(e);return this.byEnd[e]=t,this.byStart[e]=i,this.byEnd[i.end]=i,t===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let e=RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let i=this.lastChunk;do{let t=i.end,r=i.trimEnd(e);if(i.end!==t&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.previous}while(i);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let e=RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let i=this.firstChunk;do{let t=i.end,r=i.trimStart(e);if(i.end!==t&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),r)return!0;i=i.next}while(i);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function i(t,i){return"string"==typeof e?e.replace(/\$(\$|&|\d+)/g,(e,i)=>"$"===i?"$":"&"===i?t[0]:+i<t.length?t[+i]:`$${i}`):e(...t,t.index,i,t.groups)}if(t.global)(function(t,e){let i,r=[];for(;i=t.exec(e);)r.push(i);return r})(t,this.original).forEach(t=>{if(null!=t.index){let e=i(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}});else{let e=this.original.match(t);if(e&&null!=e.index){let t=i(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}}return this}_replaceString(t,e){let{original:i}=this,r=i.indexOf(t);return -1!==r&&("function"==typeof e&&(e=e(t,r,i)),t!==e&&this.overwrite(r,r+t.length,e)),this}replace(t,e){return"string"==typeof t?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){let{original:i}=this,r=t.length;for(let n=i.indexOf(t);-1!==n;n=i.indexOf(t,n+r)){let t=i.slice(n,n+r),o=e;"function"==typeof e&&(o=e(t,n,i)),t!==o&&this.overwrite(n,n+r,o)}return this}replaceAll(t,e){if("string"==typeof t)return this._replaceAllString(t,e);if(!t.global)throw TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}}Object.prototype.hasOwnProperty;let c=new Set(["@doubao-dev/template","@byted-doubao-apps/template"]),f=new Set([...c].map(t=>`${t}/primitives`)),g=t=>`${t.ctxt??0}:${t.value}`,m=t("node:fs"),y=t("node:path"),b=t("../../../node_modules/.pnpm/@swc+core@1.15.11_@swc+helpers@0.5.23/node_modules/@swc/core/index.js"),x={audio:"DoubaoAudio",button:"DoubaoButton",camera:"DoubaoCamera",canvas:"DoubaoCanvas",checkbox:"DoubaoCheckbox","checkbox-group":"DoubaoCheckboxGroup",map:"DoubaoMap","map-marker":"DoubaoMapMarker",markdown:"DoubaoMarkdown","navigation-bar":"DoubaoNavigationBar","long-image":"DoubaoLongImage","movable-area":"DoubaoMovableArea","movable-view":"DoubaoMovableView",popup:"DoubaoPopup",radio:"DoubaoRadio","radio-group":"DoubaoRadioGroup","rich-text":"DoubaoRichText",slider:"DoubaoSlider",switch:"DoubaoSwitch",swiper:"DoubaoSwiper","swiper-item":"DoubaoSwiperItem","picker-column":"DoubaoPickerColumn","picker-divider":"DoubaoPickerDivider","picker-view":"DoubaoPickerView","theme-provider":"DoubaoThemeProvider",video:"DoubaoVideo","web-view":"DoubaoWebView",image:"DoubaoImage",input:"DoubaoInput",list:"DoubaoList",refresh:"DoubaoRefresh","refresh-header":"DoubaoRefreshHeader","scroll-view":"DoubaoScrollView",svg:"DoubaoSvg",text:"DoubaoText",textarea:"DoubaoTextArea",view:"DoubaoView"};function C(t){return"Identifier"===t.type&&t.value in x?t.value:null}function w(t,e,i,r,n){if("Identifier"!==e.type)return;let o=n(e.span.start-r),s=n(e.span.end-r);t.overwrite(o,s,i)}function S(t){try{return(0,m.realpathSync)(t)}catch{return y.resolve(t)}}export default function(t){let e=this.async();try{let{frameworkPackage:r="@byted-doubao-apps/framework",widgetEntryPaths:n=[]}=this.getOptions(),o=new d(t),s=(0,b.parseSync)(t,{syntax:"typescript",tsx:!0,decorators:!0}),a=function(t){let e=0;for(;e<t.length;){let i=t[e];if(" "===i||" "===i||"\n"===i||"\r"===i||"\f"===i){e+=1;continue}if("/"===i&&"/"===t[e+1]){for(e+=2;e<t.length&&"\n"!==t[e];)e+=1;continue}if("/"===i&&"*"===t[e+1]){for(e+=2;e<t.length&&("*"!==t[e]||"/"!==t[e+1]);)e+=1;e<t.length&&(e+=2);continue}break}return Buffer.byteLength(t.slice(0,e))}(t),l=Math.max(0,s.span.start-a),h=function(t){let e=new Map([[0,0]]),i=0,r=0;for(let n of t)i+=Buffer.byteLength(n),r+=n.length,e.set(i,r);return t=>{let i=e.get(t);if(void 0===i)throw Error(`无法将字节偏移量 ${t} 映射为字符串索引`);return i}}(t),u=[],p=new Set;for(let e of function(t,e={}){let r=new Map,n=new Map,o=new Map,s=[],a=new Set;for(let e of t.body)if("ImportDeclaration"===e.type&&!e.typeOnly)for(let t of e.specifiers)"ImportSpecifier"!==t.type||t.isTypeOnly?"ImportDefaultSpecifier"===t.type?n.set(g(t.local),{source:e.source.value,name:"default"}):"ImportNamespaceSpecifier"===t.type&&n.set(g(t.local),{source:e.source.value,name:"*"}):n.set(g(t.local),{source:e.source.value,name:t.imported?.value??t.local.value});function l(t){"Identifier"===t.type?o.delete(g(t)):"MemberExpression"===t.type&&l(t.object)}function h(t,e=new Set){if(e.has(t))return t;switch(e.add(t),t.type){case"Identifier":{let i=o.get(g(t));return i?h(i,e):t}case"MemberExpression":{let i=t.property,r="Identifier"===i.type?i.value:"Computed"===i.type&&"StringLiteral"===i.expression.type?i.expression.value:void 0;if(void 0===r)return t;let n=h(t.object,e);if("ObjectExpression"!==n.type)return t;let o=y(n).get(r);return o?h(o,e):t}case"ParenthesisExpression":case"TsAsExpression":case"TsSatisfiesExpression":case"TsTypeAssertion":case"TsNonNullExpression":return h(t.expression,e);default:return t}}function u(t,e=new Set){if("Identifier"===t.type){if(e.has(g(t)))return;e.add(g(t));let i=n.get(g(t));if(i)return i;let r=h(t);return r!==t?u(r,e):void 0}if("JSXMemberExpression"===t.type||"MemberExpression"===t.type){let i=u(t.object,e);if(i?.name==="*"&&"Identifier"===t.property.type)return{source:i.source,name:t.property.value}}}function p(t,e,i,r){if(!("span"in t))return;let n=`${t.span.start}:${e}:${i}`;a.has(n)||(a.add(n),s.push({span:t.span,field:e,message:i,...r?{ruleId:r}:{}}))}i(t,{FunctionDeclaration(t){r.set(g(t.identifier),t)},VariableDeclaration(t){if("const"===t.kind)for(let e of t.declarations)"Identifier"===e.id.type&&e.init&&o.set(g(e.id),e.init)}}),i(t,{AssignmentExpression(t){("Identifier"===t.left.type||"MemberExpression"===t.left.type)&&l(t.left)},UpdateExpression(t){l(t.argument)},CallExpression(t){"MemberExpression"===t.callee.type&&"Identifier"===t.callee.property.type&&["push","pop","shift","unshift","splice","fill","copyWithin","reverse","sort"].includes(t.callee.property.value)&&l(t.callee.object)}});let d=new Set,m=new WeakSet;function y(t,e=new Set){let i=new Map,r=h(t);if(e.has(r)||d.has(r)||"ObjectExpression"!==r.type)return m.add(i),i;for(let t of(d.add(r),e.add(r),r.properties))if("SpreadElement"===t.type){let r=h(t.arguments);if("ObjectExpression"!==r.type)i.clear(),m.add(i);else{let t=y(r,new Set(e));for(let[e,r]of(m.has(t)&&(i.clear(),m.add(i)),t))i.set(e,r)}}else"Identifier"===t.type?i.set(t.value,t):"KeyValueProperty"===t.type&&("Identifier"===t.key.type||"StringLiteral"===t.key.type?i.set(t.key.value,t.value):(i.clear(),m.add(i)));return d.delete(r),i}function b(t,e,i=new Set){let r=h(t);if(i.has(r))return;let n=new Set(i).add(r);"ConditionalExpression"===r.type?(b(r.consequent,e,n),b(r.alternate,e,n)):"BinaryExpression"===r.type&&"&&"===r.operator?b(r.right,e,n):"BinaryExpression"===r.type&&("||"===r.operator||"??"===r.operator)?(b(r.left,e,n),b(r.right,e,n)):e(r)}function x(t,e,i){b(t,t=>{if("NullLiteral"!==t.type&&("BooleanLiteral"!==t.type||t.value)&&("text"!==e||"StringLiteral"!==t.type&&"NumericLiteral"!==t.type)){if("JSXElement"===t.type){let i=t.opening.name,r=u(i),n=t.children.some(t=>"JSXText"!==t.type||t.value.trim()),o=r&&f.has(r.source)&&"text"===e&&["Title","Tag"].includes(r.name),s="image"===e&&"Identifier"===i.type&&["image","svg"].includes(i.value);if(!n&&(o||s))return}else if(!["JSXFragment","ArrayExpression","ObjectExpression","BooleanLiteral","StringLiteral","NumericLiteral"].includes(t.type))return;else if("config"===e&&"JSXFragment"!==t.type&&"ArrayExpression"!==t.type)return;p(t,i,`仅支持 ${"text"===e?"string / number / Tag / Title":"image"===e?"image / svg":"标准配置(price 也支持 string / number)"},不支持业务组件、fragment、包装节点或复合 JSX。`)}})}function C(t,e,i=new Set){b(t,t=>{if(i.has(t))return;let r=new Set(i).add(t);if("ArrayExpression"===t.type)for(let i of t.elements)i&&(i.spread?C(i.expression,e,r):b(i.expression,e));else if("CallExpression"===t.type&&"MemberExpression"===t.callee.type&&"Identifier"===t.callee.property.type&&"map"===t.callee.property.value){let i=t.arguments[0]?.expression;i?.type==="ArrowFunctionExpression"&&"BlockStatement"!==i.body.type&&b(i.body,e)}})}if(i(t,{JSXElement(t){let i=u(t.opening.name);if(!i||!(c.has(i.source)&&["ContentCard","CouponCard","TransitCard","CheckoutCard","CompositeCard","PriceActionCard","AskHumanCard","MapCard"].includes(i.name)||f.has(i.source)&&["Title","Tag","Price","Icon","OptionGroup","Checkbox","Agreement"].includes(i.name)))return;let r=new Map;for(let e of t.opening.attributes)if("SpreadElement"===e.type){let t=h(e.arguments);if("ObjectExpression"!==t.type)r.clear();else{let e=y(t);for(let[t,i]of(m.has(e)&&r.clear(),e))r.set(t,i)}}else if("Identifier"===e.name.type&&e.value){let t=e.value;"JSXExpressionContainer"===t.type&&"JSXEmptyExpression"!==t.expression.type?r.set(e.name.value,t.expression):"StringLiteral"===t.type&&r.set(e.name.value,t)}let n=function t(i,r,n=r){var o;let s=!1,a="CheckoutCard"===r?"productItems":"items",l=i.get(a);return l&&(o=`${n}.${a}`,C(l,t=>{for(let[e,i]of y(t)){let t=`${o}[].${e}`;"ContentCard"===r&&["title","subtitle","description"].includes(e)||"TransitCard"===r&&"title"===e?x(i,"text",t):"ContentCard"===r&&"thumbnail"===e||"CheckoutCard"===r&&"image"===e?x(i,"image",t):("ContentCard"===r&&"action"===e||"TransitCard"===r&&"price"===e)&&x(i,"config",t)}})),"CompositeCard"===r&&i.has("sections")&&C(i.get("sections"),i=>{let r=y(i),o=r.get("type"),a=o&&h(o),l=r.get("props");if(a?.type==="StringLiteral"&&"custom"===a.value){s=!0;let t=r.get("content");t&&b(t,t=>{if("JSXElement"===t.type){let i=u(t.opening.name);!i||c.has(i.source)||f.has(i.source)||e.onCustomSectionImport?.(i.source)}})}if(a?.type==="StringLiteral"&&l){let e={content:"ContentCard",transit:"TransitCard","option-group":"OptionGroup"}[a.value];e&&t(y(l),e,`${n}.sections[${a.value}].props`)}}),s}(r,i.name);"CompositeCard"===i.name&&p(t,"CompositeCard",`CompositeCard 支持组合内容模块,构建检查无法自动判断最终效果是否符合豆包卡片设计规范。请在交付前检查整体布局、视觉层级、交互及各状态。${n?"自定义内容及其样式也需符合规范,且不得覆盖模板外壳、Header 和 Footer。":""}`,n?"template.composite.design.custom":"template.composite.design")}}),e.checkWidgetRoot){let e=new Set,i=new Set,n=new Set(["@doubao-dev/framework","@byted-doubao-apps/framework"]),o=new Set(["ContentCard","CouponCard","TransitCard","CheckoutCard","CompositeCard","PriceActionCard","AskHumanCard","MapCard"]);function w(t){if(!e.has(t)&&t.body){if(e.add(t),"BlockStatement"!==t.body.type)return void S(t.body);!function t(e){if(e&&"object"==typeof e){if(Array.isArray(e))return void e.forEach(t);if("ReturnStatement"===e.type){e.argument&&S(e.argument);return}["FunctionDeclaration","FunctionExpression","ArrowFunctionExpression","MethodProperty","ClassDeclaration","ClassExpression"].includes(String(e.type))||Object.values(e).forEach(t)}}(t.body)}}function S(t){b(t,t=>{if(!i.has(t)&&(i.add(t),"NullLiteral"!==t.type&&("BooleanLiteral"!==t.type||t.value)))if("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type)w(t);else if("Identifier"===t.type){let e=r.get(g(t));e&&w(e)}else if("CallExpression"===t.type){if("Super"===t.callee.type||"Import"===t.callee.type)return;let e=u(t.callee);if(e?.name==="defineWidget"&&n.has(e.source)){let e=t.arguments[0]?.expression;e&&function(t){let e=h(t),i=y(e).get("render");if(i&&S(i),"ObjectExpression"===e.type)for(let t of e.properties)"MethodProperty"===t.type&&("Identifier"===t.key.type||"StringLiteral"===t.key.type)&&"render"===t.key.value&&w(t)}(e)}else if(e&&["memo","forwardRef"].includes(e.name)&&(n.has(e.source)||["react","@lynx-js/react"].includes(e.source))){let e=t.arguments[0]?.expression;e&&S(e)}else{let e=h(t.callee);if("FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)w(e);else if("Identifier"===e.type){let t=r.get(g(e));t&&w(t)}}}else if("JSXElement"===t.type){let e=t.opening.name,i=u(e);if(i&&c.has(i.source)&&o.has(i.name))return;if("Identifier"===e.type&&!/^[a-z]/.test(e.value)){let t=r.get(g(e)),i=h(e);if(t)return void w(t);if("FunctionExpression"===i.type||"ArrowFunctionExpression"===i.type||"CallExpression"===i.type)return void S(i)}p(t,"widget.root","Widget 最外层必须直接渲染模板卡片,不能套 view、scroll-view、fragment 或其他包装节点。")}else["JSXFragment","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral"].includes(t.type)&&p(t,"widget.root","Widget 最外层必须直接渲染一张模板卡片。")})}for(let e of t.body)if("ExportDefaultExpression"===e.type)S(e.expression);else if("ExportDefaultDeclaration"===e.type&&"FunctionExpression"===e.decl.type)w(e.decl);else if("ExportNamedDeclaration"===e.type&&!e.source&&!e.typeOnly)for(let t of e.specifiers)"ExportSpecifier"===t.type&&t.exported?.value==="default"&&"Identifier"===t.orig.type&&S(t.orig)}return s}(s,{onCustomSectionImport:t=>p.add(t),checkWidgetRoot:n.some(t=>S(t)===S(this.resourcePath))})){let i=h(e.span.start-l),r=t.slice(0,i),n=r.split("\n").length,o=i-r.lastIndexOf("\n");u.push({rule_id:e.ruleId??("widget.root"===e.field?"template.root":"template.content"),severity:"warning",file:this.resourcePath,line:n,column:o,field:e.field,message:e.message})}let m=this._module;m?.buildInfo&&(m.buildInfo.cardDiagnostics=u,m.buildInfo.cardCustomSectionImports=[...p]);let y=new Set;if(i(s,{JSXOpeningElement(t){let e=C(t.name);if(!e)return;let i=x[e];w(o,t.name,i,l,h),y.add(i)},JSXClosingElement(t){let e=C(t.name);if(!e)return;let i=x[e];w(o,t.name,i,l,h),y.add(i)}}),y.size>0){let t=Array.from(y).map(t=>{let e=t.replace("Doubao","");return`${e} as ${t}`}).join(", "),e=`import { ${t} } from '${r}/components';
2
2
  `;o.prepend(e)}if(o.hasChanged()){let t=o.toString(),i=o.generateMap({includeContent:!0,hires:!0,source:this.resourcePath,file:this.resourcePath});e(null,t,i)}else e(null,t)}catch(i){e(null,t)}};
@@ -1,4 +1,4 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime~0.js";import"./8348~0.js";import"./6686~0.js";import"./9966~0.js";import{isRecord as t}from"./6179~0.js";let r=e("node:fs");var n=e.n(r);let i=e("node:path");var o=e.n(i);let a=e("node:url"),s=o().dirname((0,a.fileURLToPath)(import.meta.url)),p=["taxi","milk-tea"];function d(e){if("taxi"===e)return l;if("milk-tea"===e)return c;throw Error(`未知示例:${e}。支持的示例: ${p.join(", ")}`)}let l={name:"taxi",appKey:"db_app_api_test_taxi",appName:"打车测试应用插件",serverName:"dbx-taxi-demo-mcp",tools:[{name:"Taxi_search",description:"搜索可用打车方案,返回 plan_id、车型、价格、距离和预计到达时间。",inputSchema:{type:"object",properties:{destination:{type:"string",description:"目的地"},preference:{type:"string",description:"车型或偏好,例如惠选、快车、商务"}},required:["destination"]}},{name:"Taxi_order",description:"根据 plan_id 发起打车订单,返回可出卡的应用插件订单实体。",inputSchema:{type:"object",properties:{plan_id:{type:"string",description:"Taxi_search 返回的方案 ID"},destination:{type:"string",description:"目的地"}},required:["plan_id"]}}],callTool:function(e,t){if("Taxi_search"===e){let e=m(t.destination)||"北京南站",r=m(t.preference)||"惠选";return{content:[{type:"text",text:`找到 2 个去${e}的${r}打车方案。`}],structuredContent:{plans:[{plan_id:"plan_demo_001",car_type:r,price_yuan:48.5,distance_km:12.8,eta_min:6},{plan_id:"plan_demo_002",car_type:"快车",price_yuan:55,distance_km:12.8,eta_min:4}]},isError:!1}}if("Taxi_order"===e){let e=m(t.destination)||"北京南站",r=m(t.plan_id)||"plan_demo_001";return{content:[{type:"text",text:`已为你创建去${e}的打车订单。`}],structuredContent:{entities:[{entity_type:"product",product_id:`taxi_order_${r}`,name:`去${e}的打车订单`,car_type:"惠选",price_yuan:48.5,status:"已下单"}]},isError:!1}}return{content:[{type:"text",text:`unknown tool: ${e}`}],isError:!0}},evalCase:{app_key:"doubao-api-test-taxi",app_name:"打车测试应用插件",query:"帮我叫一辆惠选去北京南站,直接下单",history_messages:[{role:"USER",content:"上一轮:你能调用应用插件工具吗?"},{role:"ASSISTANT",content:"可以,我会等待工具调用结果再继续回答。"}],skills:[_("taxi","SKILL.md")],manifest:_("taxi","manifest.yaml"),max_step:15,expect:{tool_calls:["Taxi_search","Taxi_order"],card:{widget_id:"tpl.taxi_order",min_count:1}}}},c={name:"milk-tea",appKey:"db_app_api_test_milk_tea",appName:"奶茶测试应用插件",serverName:"dbx-milk-tea-demo-mcp",tools:[{name:"MilkTea_search",description:"根据口味、场景和偏好搜索奶茶商品,返回 sku_id、名称、甜度、价格和推荐理由。",inputSchema:{type:"object",properties:{query:{type:"string",description:"用户想喝的饮品或场景,例如下午提神、少糖奶茶"},sugar:{type:"string",description:"甜度偏好,例如少糖、半糖、无糖"}},required:["query"]}},{name:"MilkTea_order",description:"根据 sku_id 创建奶茶订单,返回可出卡的应用插件订单实体。",inputSchema:{type:"object",properties:{sku_id:{type:"string",description:"MilkTea_search 返回的商品 ID"},sugar:{type:"string",description:"甜度"}},required:["sku_id"]}}],callTool:function(e,t){if("MilkTea_search"===e){let e=m(t.query)||"下午提神少糖奶茶",r=m(t.sugar)||"少糖";return{content:[{type:"text",text:`找到 3 个适合「${e}」的${r}奶茶选项。`}],structuredContent:{products:[{sku_id:"tea_demo_001",name:"冷萃乌龙奶茶",sugar:r,price_yuan:18,selling_point:"茶香明显,适合下午提神"},{sku_id:"tea_demo_002",name:"茉莉轻乳茶",sugar:r,price_yuan:16,selling_point:"口感清爽,负担较低"},{sku_id:"tea_demo_003",name:"厚乳拿铁奶茶",sugar:"半糖",price_yuan:21,selling_point:"奶香更足,提神感更强"}]},isError:!1}}if("MilkTea_order"===e){var r;let e=m(t.sku_id)||"tea_demo_001",n=m(t.sugar)||"少糖",i=("number"==typeof(r=t.quantity)&&Number.isFinite(r)?r:0)||1;return{content:[{type:"text",text:`已为你下单 ${i} 杯${n}冷萃乌龙奶茶。`}],structuredContent:{entities:[{entity_type:"product",product_id:`milk_tea_order_${e}`,name:"冷萃乌龙奶茶",sugar:n,quantity:i,price_yuan:18*i,status:"已下单",selling_point:"茶香明显,适合下午提神"}]},isError:!1}}return{content:[{type:"text",text:`unknown tool: ${e}`}],isError:!0}},evalCase:{app_key:"doubao-api-test-milk-tea",app_name:"奶茶测试应用插件",query:"我想点一杯适合下午提神的少糖奶茶,直接下单",history_messages:[{role:"USER",content:"上一轮:你能帮我点饮品吗?"},{role:"ASSISTANT",content:"可以,我会先查找合适饮品,再根据你的确认或明确下单意图创建订单。"}],skills:[_("milk-tea","SKILL.md")],manifest:_("milk-tea","manifest.yaml"),max_step:15,expect:{tool_calls:["MilkTea_search","MilkTea_order"],card:{widget_id:"tpl.milk_tea_order",min_count:1}}}};function m(e){return"string"==typeof e?e:""}function _(e,t){return n().readFileSync(o().join(s,"demos",`${e}.${t}`),"utf8")}let u=e("node:crypto"),y=e("node:http");var f=e.n(y);async function h(e){let t=d(e.demo),r=new Map,n=f().createServer(async(n,i)=>{try{let o=new URL(n.url||"/",`http://${n.headers.host||`${e.host}:${e.port}`}`);if("POST"===n.method&&"/mcp"===$(o.pathname)){let r=await x(n);e.log?.(`[mcp] ${r.method||"-"} ${S(r)}`);let o=g(t,r);if(!o){i.writeHead(202),i.end();return}i.writeHead(200,{"content-type":"application/json","mcp-session-id":`demo-${t.name}-session`}),i.end(JSON.stringify(o));return}if("GET"===n.method&&"/sse"===$(o.pathname)){let t=(0,u.randomUUID)();i.writeHead(200,{"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive"});let o={write:(e,t)=>{i.write(`event: ${e}
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime~0.js";import"./9652~0.js";import{isRecord as t}from"./1547~0.js";import"./4569~0.js";import"./1499~0.js";let r=e("node:fs");var n=e.n(r);let i=e("node:path");var o=e.n(i);let a=e("node:url"),s=o().dirname((0,a.fileURLToPath)(import.meta.url)),p=["taxi","milk-tea"];function d(e){if("taxi"===e)return l;if("milk-tea"===e)return c;throw Error(`未知示例:${e}。支持的示例: ${p.join(", ")}`)}let l={name:"taxi",appKey:"db_app_api_test_taxi",appName:"打车测试应用插件",serverName:"dbx-taxi-demo-mcp",tools:[{name:"Taxi_search",description:"搜索可用打车方案,返回 plan_id、车型、价格、距离和预计到达时间。",inputSchema:{type:"object",properties:{destination:{type:"string",description:"目的地"},preference:{type:"string",description:"车型或偏好,例如惠选、快车、商务"}},required:["destination"]}},{name:"Taxi_order",description:"根据 plan_id 发起打车订单,返回可出卡的应用插件订单实体。",inputSchema:{type:"object",properties:{plan_id:{type:"string",description:"Taxi_search 返回的方案 ID"},destination:{type:"string",description:"目的地"}},required:["plan_id"]}}],callTool:function(e,t){if("Taxi_search"===e){let e=m(t.destination)||"北京南站",r=m(t.preference)||"惠选";return{content:[{type:"text",text:`找到 2 个去${e}的${r}打车方案。`}],structuredContent:{plans:[{plan_id:"plan_demo_001",car_type:r,price_yuan:48.5,distance_km:12.8,eta_min:6},{plan_id:"plan_demo_002",car_type:"快车",price_yuan:55,distance_km:12.8,eta_min:4}]},isError:!1}}if("Taxi_order"===e){let e=m(t.destination)||"北京南站",r=m(t.plan_id)||"plan_demo_001";return{content:[{type:"text",text:`已为你创建去${e}的打车订单。`}],structuredContent:{entities:[{entity_type:"product",product_id:`taxi_order_${r}`,name:`去${e}的打车订单`,car_type:"惠选",price_yuan:48.5,status:"已下单"}]},isError:!1}}return{content:[{type:"text",text:`unknown tool: ${e}`}],isError:!0}},evalCase:{app_key:"doubao-api-test-taxi",app_name:"打车测试应用插件",query:"帮我叫一辆惠选去北京南站,直接下单",history_messages:[{role:"USER",content:"上一轮:你能调用应用插件工具吗?"},{role:"ASSISTANT",content:"可以,我会等待工具调用结果再继续回答。"}],skills:[_("taxi","SKILL.md")],manifest:_("taxi","manifest.yaml"),max_step:15,expect:{tool_calls:["Taxi_search","Taxi_order"],card:{widget_id:"tpl.taxi_order",min_count:1}}}},c={name:"milk-tea",appKey:"db_app_api_test_milk_tea",appName:"奶茶测试应用插件",serverName:"dbx-milk-tea-demo-mcp",tools:[{name:"MilkTea_search",description:"根据口味、场景和偏好搜索奶茶商品,返回 sku_id、名称、甜度、价格和推荐理由。",inputSchema:{type:"object",properties:{query:{type:"string",description:"用户想喝的饮品或场景,例如下午提神、少糖奶茶"},sugar:{type:"string",description:"甜度偏好,例如少糖、半糖、无糖"}},required:["query"]}},{name:"MilkTea_order",description:"根据 sku_id 创建奶茶订单,返回可出卡的应用插件订单实体。",inputSchema:{type:"object",properties:{sku_id:{type:"string",description:"MilkTea_search 返回的商品 ID"},sugar:{type:"string",description:"甜度"}},required:["sku_id"]}}],callTool:function(e,t){if("MilkTea_search"===e){let e=m(t.query)||"下午提神少糖奶茶",r=m(t.sugar)||"少糖";return{content:[{type:"text",text:`找到 3 个适合「${e}」的${r}奶茶选项。`}],structuredContent:{products:[{sku_id:"tea_demo_001",name:"冷萃乌龙奶茶",sugar:r,price_yuan:18,selling_point:"茶香明显,适合下午提神"},{sku_id:"tea_demo_002",name:"茉莉轻乳茶",sugar:r,price_yuan:16,selling_point:"口感清爽,负担较低"},{sku_id:"tea_demo_003",name:"厚乳拿铁奶茶",sugar:"半糖",price_yuan:21,selling_point:"奶香更足,提神感更强"}]},isError:!1}}if("MilkTea_order"===e){var r;let e=m(t.sku_id)||"tea_demo_001",n=m(t.sugar)||"少糖",i=("number"==typeof(r=t.quantity)&&Number.isFinite(r)?r:0)||1;return{content:[{type:"text",text:`已为你下单 ${i} 杯${n}冷萃乌龙奶茶。`}],structuredContent:{entities:[{entity_type:"product",product_id:`milk_tea_order_${e}`,name:"冷萃乌龙奶茶",sugar:n,quantity:i,price_yuan:18*i,status:"已下单",selling_point:"茶香明显,适合下午提神"}]},isError:!1}}return{content:[{type:"text",text:`unknown tool: ${e}`}],isError:!0}},evalCase:{app_key:"doubao-api-test-milk-tea",app_name:"奶茶测试应用插件",query:"我想点一杯适合下午提神的少糖奶茶,直接下单",history_messages:[{role:"USER",content:"上一轮:你能帮我点饮品吗?"},{role:"ASSISTANT",content:"可以,我会先查找合适饮品,再根据你的确认或明确下单意图创建订单。"}],skills:[_("milk-tea","SKILL.md")],manifest:_("milk-tea","manifest.yaml"),max_step:15,expect:{tool_calls:["MilkTea_search","MilkTea_order"],card:{widget_id:"tpl.milk_tea_order",min_count:1}}}};function m(e){return"string"==typeof e?e:""}function _(e,t){return n().readFileSync(o().join(s,"demos",`${e}.${t}`),"utf8")}let u=e("node:crypto"),y=e("node:http");var f=e.n(y);async function h(e){let t=d(e.demo),r=new Map,n=f().createServer(async(n,i)=>{try{let o=new URL(n.url||"/",`http://${n.headers.host||`${e.host}:${e.port}`}`);if("POST"===n.method&&"/mcp"===$(o.pathname)){let r=await x(n);e.log?.(`[mcp] ${r.method||"-"} ${S(r)}`);let o=g(t,r);if(!o){i.writeHead(202),i.end();return}i.writeHead(200,{"content-type":"application/json","mcp-session-id":`demo-${t.name}-session`}),i.end(JSON.stringify(o));return}if("GET"===n.method&&"/sse"===$(o.pathname)){let t=(0,u.randomUUID)();i.writeHead(200,{"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive"});let o={write:(e,t)=>{i.write(`event: ${e}
2
2
  `),i.write(`data: ${"string"==typeof t?t:JSON.stringify(t)}
3
3
 
4
4
  `)},close:()=>i.end()};r.set(t,o),n.on("close",()=>r.delete(t)),o.write("endpoint",`/sse/message?session_id=${encodeURIComponent(t)}`),e.log?.(`[sse] 已连接,会话=${t}`);return}if("POST"===n.method&&"/sse/message"===$(o.pathname)){let a=o.searchParams.get("session_id")||"",s=r.get(a);if(!s)return void k(i,404,{error:"SSE session not found"});let p=await x(n);e.log?.(`[sse] ${p.method||"-"} ${S(p)}`);let d=g(t,p);i.writeHead(202),i.end(),d&&s.write("message",d);return}if("GET"===n.method&&"/health"===$(o.pathname))return void k(i,200,{ok:!0,demo:e.demo});k(i,404,{error:"not found",paths:["/mcp","/sse","/health"]})}catch(e){k(i,500,{error:e instanceof Error?e.message:String(e)})}});await new Promise((t,r)=>{n.once("error",r),n.listen(e.port,e.host,()=>{n.off("error",r),t()})});let i=n.address(),o="object"==typeof i&&i?i.port:e.port,a=`http://${e.host}:${o}`;return{origin:a,streamableUrl:`${a}/mcp`,sseUrl:`${a}/sse`,close:()=>new Promise((e,t)=>{for(let e of r.values())e.close();r.clear(),n.close(r=>r?t(r):e())})}}function g(e,r){if("initialize"===r.method)return{jsonrpc:"2.0",id:r.id,result:{protocolVersion:r.params?.protocolVersion||"2025-11-25",capabilities:{tools:{}},serverInfo:{name:e.serverName,version:"0.1.0"}}};if("notifications/initialized"!==r.method){if("tools/list"===r.method)return{jsonrpc:"2.0",id:r.id,result:{tools:e.tools}};if("tools/call"===r.method){let n="string"==typeof r.params?.name?r.params.name:"",i=t(r.params?.arguments)?r.params.arguments:{};return{jsonrpc:"2.0",id:r.id,result:e.callTool(n,i)}}return{jsonrpc:"2.0",id:r.id??null,error:{code:-32601,message:`Method not found: ${r.method||"-"}`}}}}function x(e){return new Promise((t,r)=>{let n="";e.setEncoding("utf8"),e.on("data",e=>{n+=e}),e.on("end",()=>{try{t(n?JSON.parse(n):{})}catch(e){r(e)}}),e.on("error",r)})}function S(e){if("tools/call"!==e.method)return"";let t=e.params?.name;return"string"==typeof t?t:""}function k(e,t,r){e.writeHead(t,{"content-type":"application/json"}),e.end(JSON.stringify(r))}function $(e){return e.replace(/\/+$/,"")||"/"}export{p as DBX_DEMO_NAMES,d as getDBXDemo,h as startMCPDemoServer};
package/dist/demo.js CHANGED
@@ -1,2 +1,2 @@
1
- import"node:module";import{parseInteger as o,argument_Argument as e,command_Command as t,option_Option as r}from"./6179~0.js";import{runCommand as s}from"./5792~0.js";import{DBX_DEMO_NAMES as n,startMCPDemoServer as i}from"./demo-server.js";import{dist as a}from"./@inquirer/select.js";async function c(o,e,t=!!process.stdin.isTTY&&!!process.stderr.isTTY){return o||((e.json||!t)&&e.error(`非交互式终端需要指定示例名称。支持的示例:${n.join(", ")}。示例:dbx mcp demo taxi --json`),a({message:"选择要启动的示例 MCP 服务",choices:n.map(o=>({name:o,value:o}))},{output:process.stderr}))}async function p(o,e,t,r=i,s=l){let n=await c(e,o),a=await r({demo:n,host:t.host,port:t.port,log:o.log});if(o.json){let o={schema:"dbx.mcp.demo.v1",event:"ready",demo:n,pid:process.pid,endpoints:{streamable_http:a.streamableUrl,sse:a.sseUrl,health:`${a.origin}/health`}};process.stdout.write(`${JSON.stringify(o)}
1
+ import"node:module";import{parseInteger as o,argument_Argument as e,command_Command as t,option_Option as r}from"./1547~0.js";import{context_runCommand as s}from"./5329~0.js";import{DBX_DEMO_NAMES as n,startMCPDemoServer as i}from"./demo-server.js";import{dist as a}from"./@inquirer/select.js";async function c(o,e,t=!!process.stdin.isTTY&&!!process.stderr.isTTY){return o||((e.json||!t)&&e.error(`非交互式终端需要指定示例名称。支持的示例:${n.join(", ")}。示例:dbx mcp demo taxi --json`),a({message:"选择要启动的示例 MCP 服务",choices:n.map(o=>({name:o,value:o}))},{output:process.stderr}))}async function p(o,e,t,r=i,s=l){let n=await c(e,o),a=await r({demo:n,host:t.host,port:t.port,log:o.log});if(o.json){let o={schema:"dbx.mcp.demo.v1",event:"ready",demo:n,pid:process.pid,endpoints:{streamable_http:a.streamableUrl,sse:a.sseUrl,health:`${a.origin}/health`}};process.stdout.write(`${JSON.stringify(o)}
2
2
  `)}else o.log("用于本地调试的示例 MCP 服务已启动"),o.log(`示例:${n}`),o.log(`流式 HTTP 地址:${a.streamableUrl}`),o.log(`SSE 地址:${a.sseUrl}`),o.log(`健康检查地址:${a.origin}/health`),o.log(""),o.log("按 Ctrl+C 停止");await s(async e=>{process.exitCode="SIGINT"===e?130:143,await a.close().catch(e=>o.warn(`停止示例 MCP 服务失败:${String(e)}`))})}function l(o,e=process){return new Promise(t=>{let r=!1;function s(s){r||(r=!0,o(s).finally(()=>{e.off("SIGINT",n),e.off("SIGTERM",i),t()}))}function n(){s("SIGINT")}function i(){s("SIGTERM")}e.once("SIGINT",n),e.once("SIGTERM",i)})}export default function(){return new t("demo").description("启动内置 MCP 示例服务").usage("[options] [demo]\n\n示例:\n dbx mcp demo taxi").addArgument(new e("[demo]","示例名称").choices(n)).option("--host <host>","监听地址","127.0.0.1").addOption(new r("--port <port>","监听端口;0 表示自动选择空闲端口").default(0).argParser(o)).action(async(o,e,t)=>s(t,t=>p(t,o,e)))};export{c as resolveMcpDemo,p as runMcpDemo,l as waitForShutdown};
@@ -1 +1 @@
1
- import"node:module";export{DEV_ACTIONS,DEV_EVENTS,ServiceManager,connectDevService,createDevProviderBinding,createDevtoolConnectionIpcClient,createDevtoolConnectionIpcServer,ensureDevActionSucceeded,parseJsonData,summarizeData}from"./9966~0.js";
1
+ import"node:module";export{DEV_ACTIONS,DEV_EVENTS,ServiceManager,connectDevService,createDevProviderBinding,createDevtoolConnectionIpcClient,createDevtoolConnectionIpcServer,ensureDevActionSucceeded,parseJsonData,summarizeData}from"./1499~0.js";
package/dist/dev-shell.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime~0.js";import"./9966~0.js";import"./6686~0.js";import{node_modules_figures as r}from"./6611~0.js";import{use_input as t,Text as n,build_render as i,use_app as o,Static as a,components_Box as l,use_window_size as s}from"./5792~0.js";import{source as u}from"./4970~0.js";import{DEV_SHELL_HELP_ITEMS as c,DEV_SHELL_DEVICE_HELP_ITEMS as f,formatDeviceAppSetupStatus as _}from"./dev.js";import{version as v}from"./6179~0.js";e.add({"../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(e){var r=function(e){var r,n,i;return!!(r=e)&&"object"==typeof r&&(n=e,"[object RegExp]"!==(i=Object.prototype.toString.call(n))&&"[object Date]"!==i&&n.$$typeof!==t)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,r){return!1!==r.clone&&r.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,r):e}function i(e,r,t){return e.concat(r).map(function(e){return n(e,t)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[])}function a(e,r){try{return r in e}catch(e){return!1}}function l(e,t,s){(s=s||{}).arrayMerge=s.arrayMerge||i,s.isMergeableObject=s.isMergeableObject||r,s.cloneUnlessOtherwiseSpecified=n;var u,c,f=Array.isArray(t);return f!==Array.isArray(e)?n(t,s):f?s.arrayMerge(e,t,s):(c={},(u=s).isMergeableObject(e)&&o(e).forEach(function(r){c[r]=n(e[r],u)}),o(t).forEach(function(r){a(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))||(a(e,r)&&u.isMergeableObject(t[r])?c[r]=(function(e,r){if(!r.customMerge)return l;var t=r.customMerge(e);return"function"==typeof t?t:l})(r,u)(e[r],t[r],u):c[r]=n(t[r],u))}),c)}l.all=function(e,r){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,t){return l(e,t,r)},{})},e.exports=l}});let d={info:"blue",success:"green",error:"red",warning:"yellow"},m={success:"green",error:"red",warning:"yellow",info:"blue"},p={success:r.tick,error:r.cross,warning:r.warning,info:r.info},h=e("../../../node_modules/.pnpm/react@19.2.7/node_modules/react/index.js");e("../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js");let b=(0,h.createContext)({components:{Alert:{styles:{container:({variant:e})=>({flexGrow:1,borderStyle:"round",borderColor:d[e],gap:1,paddingX:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:d[e]}),content:()=>({flexShrink:1,flexGrow:1,minWidth:0,flexDirection:"column",gap:1}),title:()=>({bold:!0}),message:()=>({})},config({variant:e}){let t;return"info"===e&&(t=r.info),"success"===e&&(t=r.tick),"error"===e&&(t=r.cross),"warning"===e&&(t=r.warning),{icon:t}}},Badge:{styles:{container:({color:e})=>({backgroundColor:e}),label:()=>({color:"black"})}},ConfirmInput:{styles:{input:({isFocused:e})=>({dimColor:!e})}},MultiSelect:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:r}){let t;return r&&(t="green"),e&&(t="blue"),{color:t}},highlightedText:()=>({bold:!0})}},OrderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})}},ProgressBar:{styles:{container:()=>({flexGrow:1,minWidth:0}),completed:()=>({color:"magenta"}),remaining:()=>({dimColor:!0})},config:()=>({completedCharacter:r.square,remainingCharacter:r.squareLightShade})},Select:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:r}){let t;return r&&(t="green"),e&&(t="blue"),{color:t}},highlightedText:()=>({bold:!0})}},Spinner:{styles:{container:()=>({gap:1}),frame:()=>({color:"blue"}),label:()=>({})}},StatusMessage:{styles:{container:()=>({gap:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:m[e]}),message:()=>({})},config:({variant:e})=>({icon:p[e]})},UnorderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})},config:()=>({marker:r.line})},TextInput:{styles:{value:()=>({})}},EmailInput:{styles:{value:()=>({})}},PasswordInput:{styles:{value:()=>({})}}}}),g=e=>(0,h.useContext)(b).components[e],y=r.line;(0,h.createContext)({marker:y}),(0,h.createContext)({depth:0});class x extends Map{first;constructor(e){let r,t,n=[],i=0;for(let o of e){let e={...o,previous:t,next:void 0,index:i};t&&(t.next=e),r||=e,n.push([o.value,e]),i++,t=e}super(n),this.first=r}}let j=e("node:util");function w({isFocused:e,isSelected:t,children:i}){let{styles:o}=g("Select");return h.createElement(l,{...o.option({isFocused:e})},e&&h.createElement(n,{...o.focusIndicator()},r.pointer),h.createElement(n,{...o.label({isFocused:e,isSelected:t})},i),t&&h.createElement(n,{...o.selectedIndicator()},r.tick))}let S=(e,r)=>{switch(r.type){case"focus-next-option":{if(!e.focusedValue)return e;let r=e.optionMap.get(e.focusedValue);if(!r)return e;let t=r.next;if(!t)return e;if(!(t.index>=e.visibleToIndex))return{...e,focusedValue:t.value};let n=Math.min(e.optionMap.size,e.visibleToIndex+1),i=n-e.visibleOptionCount;return{...e,focusedValue:t.value,visibleFromIndex:i,visibleToIndex:n}}case"focus-previous-option":{if(!e.focusedValue)return e;let r=e.optionMap.get(e.focusedValue);if(!r)return e;let t=r.previous;if(!t)return e;if(!(t.index<=e.visibleFromIndex))return{...e,focusedValue:t.value};let n=Math.max(0,e.visibleFromIndex-1),i=n+e.visibleOptionCount;return{...e,focusedValue:t.value,visibleFromIndex:n,visibleToIndex:i}}case"select-focused-option":return{...e,previousValue:e.value,value:e.focusedValue};case"reset":return r.state}},C=({visibleOptionCount:e,defaultValue:r,options:t})=>{let n="number"==typeof e?Math.min(e,t.length):t.length,i=new x(t);return{optionMap:i,visibleOptionCount:n,focusedValue:i.first?.value,visibleFromIndex:0,visibleToIndex:n,previousValue:r,value:r}};function k({isDisabled:e=!1,visibleOptionCount:r=5,highlightText:i,options:o,defaultValue:a,onChange:s}){let u=(({visibleOptionCount:e=5,options:r,defaultValue:t,onChange:n})=>{let[i,o]=(0,h.useReducer)(S,{visibleOptionCount:e,defaultValue:t,options:r},C),[a,l]=(0,h.useState)(r);r===a||(0,j.isDeepStrictEqual)(r,a)||(o({type:"reset",state:C({visibleOptionCount:e,defaultValue:t,options:r})}),l(r));let s=(0,h.useCallback)(()=>{o({type:"focus-next-option"})},[]),u=(0,h.useCallback)(()=>{o({type:"focus-previous-option"})},[]),c=(0,h.useCallback)(()=>{o({type:"select-focused-option"})},[]),f=(0,h.useMemo)(()=>r.map((e,r)=>({...e,index:r})).slice(i.visibleFromIndex,i.visibleToIndex),[r,i.visibleFromIndex,i.visibleToIndex]);return(0,h.useEffect)(()=>{i.value&&i.previousValue!==i.value&&n?.(i.value)},[i.previousValue,i.value,r,n]),{focusedValue:i.focusedValue,visibleFromIndex:i.visibleFromIndex,visibleToIndex:i.visibleToIndex,value:i.value,visibleOptions:f,focusNextOption:s,focusPreviousOption:u,selectFocusedOption:c}})({visibleOptionCount:r,options:o,defaultValue:a,onChange:s});(({isDisabled:e=!1,state:r})=>{t((e,t)=>{t.downArrow&&r.focusNextOption(),t.upArrow&&r.focusPreviousOption(),t.return&&r.selectFocusedOption()},{isActive:!e})})({isDisabled:e,state:u});let{styles:c}=g("Select");return h.createElement(l,{...c.container()},u.visibleOptions.map(r=>{let t=r.label;if(i&&r.label.includes(i)){let e=r.label.indexOf(i);t=h.createElement(h.Fragment,null,r.label.slice(0,e),h.createElement(n,{...c.highlightedText()},i),r.label.slice(e+i.length))}return h.createElement(w,{key:r.value,isFocused:!e&&u.focusedValue===r.value,isSelected:u.value===r.value},t)}))}var O=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"frames":["/ "," - "," \\\\ "," |"," |"," \\\\ "," - ","/ "]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["\uD83D\uDE04 ","\uD83D\uDE1D "]},"monkey":{"interval":300,"frames":["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},"hearts":{"interval":100,"frames":["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","\uD83D\uDC97 "]},"clock":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},"earth":{"interval":180,"frames":["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},"runner":{"interval":140,"frames":["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["\uD83C\uDF32","\uD83C\uDF84"]},"grenade":{"interval":80,"frames":["، ","′ "," \xb4 "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},"fistBump":{"interval":80,"frames":["\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B "," \uD83E\uDD1C  \uD83E\uDD1B  ","  \uD83E\uDD1C\uD83E\uDD1B   "," \uD83E\uDD1C✨\uD83E\uDD1B   ","\uD83E\uDD1C ✨ \uD83E\uDD1B  "]},"soccerHeader":{"interval":80,"frames":[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},"mindblown":{"interval":160,"frames":["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ ","  ","  ","  "]},"speaker":{"interval":160,"frames":["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},"orangePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},"bluePulse":{"interval":100,"frames":["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"orangeBluePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"timeTravel":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺ █████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺ ████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺ ███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺ ██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺ █\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺ \xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺░\xa3\xa3 "," ☺░\xa3\xa3 "," ☺ \xa3\xa3 "," ☺\xa3\xa3 "," ☺\xa3\xa3 "," ☺▓\xa3 "," ☺▓\xa3 "," ☺▒\xa3 "," ☺▒\xa3 "," ☺░\xa3 "," ☺░\xa3 "," ☺ \xa3 "," ☺\xa3 "," ☺\xa3 "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & \xa3 "," & ░\xa3 "," & ▒\xa3 "," & ▓\xa3 "," & \xa3\xa3 "," & ░\xa3\xa3 "," & ▒\xa3\xa3 ","& ▓\xa3\xa3 ","& \xa3\xa3\xa3 "," ░\xa3\xa3\xa3 "," ▒\xa3\xa3\xa3 "," ▓\xa3\xa3\xa3 "," █\xa3\xa3\xa3 "," ░█\xa3\xa3\xa3 "," ▒█\xa3\xa3\xa3 "," ▓█\xa3\xa3\xa3 "," ██\xa3\xa3\xa3 "," ░██\xa3\xa3\xa3 "," ▒██\xa3\xa3\xa3 "," ▓██\xa3\xa3\xa3 "," ███\xa3\xa3\xa3 "," ░███\xa3\xa3\xa3 "," ▒███\xa3\xa3\xa3 "," ▓███\xa3\xa3\xa3 "," ████\xa3\xa3\xa3 "," ░████\xa3\xa3\xa3 "," ▒████\xa3\xa3\xa3 "," ▓████\xa3\xa3\xa3 "," █████\xa3\xa3\xa3 "," ░█████\xa3\xa3\xa3 "," ▒█████\xa3\xa3\xa3 "," ▓█████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xba> ~~~~~~~~~~~~~~~~~","(\xba> ~~~~~~~~~~~~~~~~","((\xba> ~~~~~~~~~~~~~~~","<((\xba> ~~~~~~~~~~~~~~","><((\xba> ~~~~~~~~~~~~~"," ><((\xba> ~~~~~~~~~~~~","~ ><((\xba> ~~~~~~~~~~~","~~ <>((\xba> ~~~~~~~~~~","~~~ ><((\xba> ~~~~~~~~~","~~~~ <>((\xba> ~~~~~~~~","~~~~~ ><((\xba> ~~~~~~~","~~~~~~ <>((\xba> ~~~~~~","~~~~~~~ ><((\xba> ~~~~~","~~~~~~~~ <>((\xba> ~~~~","~~~~~~~~~ ><((\xba> ~~~","~~~~~~~~~~ <>((\xba> ~~","~~~~~~~~~~~ ><((\xba> ~","~~~~~~~~~~~~ <>((\xba> ","~~~~~~~~~~~~~ ><((\xba>","~~~~~~~~~~~~~~ <>((\xba","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}');function I({label:e,type:r}){let{frame:t}=function({type:e="dots"}){let[r,t]=(0,h.useState)(0),n=O[e];return(0,h.useEffect)(()=>{let e=setInterval(()=>{t(e=>e===n.frames.length-1?0:e+1)},n.interval);return()=>{clearInterval(e)}},[n]),{frame:n.frames[r]??""}}({type:r}),{styles:i}=g("Spinner");return h.createElement(l,{...i.container()},h.createElement(n,{...i.frame()},t),e&&h.createElement(n,{...i.label()},e))}Object.keys(O);let E=(e,r)=>{switch(r.type){case"move-cursor-left":return{...e,cursorOffset:Math.max(0,e.cursorOffset-1)};case"move-cursor-right":return{...e,cursorOffset:Math.min(e.value.length,e.cursorOffset+1)};case"insert":return{...e,previousValue:e.value,value:e.value.slice(0,e.cursorOffset)+r.text+e.value.slice(e.cursorOffset),cursorOffset:e.cursorOffset+r.text.length};case"delete":{let r=Math.max(0,e.cursorOffset-1);return{...e,previousValue:e.value,value:e.value.slice(0,r)+e.value.slice(r+1),cursorOffset:r}}}},A=u.inverse(" ");function M({isDisabled:e=!1,defaultValue:r,placeholder:i="",suggestions:o,onChange:a,onSubmit:l}){let{inputValue:s}=(({isDisabled:e=!1,state:r,placeholder:n=""})=>{let i=(0,h.useMemo)(()=>e?n?u.dim(n):"":n&&n.length>0?u.inverse(n[0])+u.dim(n.slice(1)):A,[e,n]),o=(0,h.useMemo)(()=>{if(e)return r.value;let t=0,n=r.value.length>0?"":A;for(let e of r.value)n+=t===r.cursorOffset?u.inverse(e):e,t++;return r.suggestion?r.cursorOffset===r.value.length?n+=u.inverse(r.suggestion[0])+u.dim(r.suggestion.slice(1)):n+=u.dim(r.suggestion):r.value.length>0&&r.cursorOffset===r.value.length&&(n+=A),n},[e,r.value,r.cursorOffset,r.suggestion]);return t((e,t)=>{if(!t.upArrow&&!t.downArrow&&(!t.ctrl||"c"!==e)&&!t.tab&&(!t.shift||!t.tab)){if(t.return)return void r.submit();t.leftArrow?r.moveCursorLeft():t.rightArrow?r.moveCursorRight():t.backspace||t.delete?r.delete():r.insert(e)}},{isActive:!e}),{inputValue:r.value.length>0?o:i}})({isDisabled:e,placeholder:i,state:(({defaultValue:e="",suggestions:r,onChange:t,onSubmit:n})=>{let[i,o]=(0,h.useReducer)(E,{previousValue:e,value:e,cursorOffset:e.length}),a=(0,h.useMemo)(()=>{if(0!==i.value.length)return r?.find(e=>e.startsWith(i.value))?.replace(i.value,"")},[i.value,r]),l=(0,h.useCallback)(()=>{o({type:"move-cursor-left"})},[]),s=(0,h.useCallback)(()=>{o({type:"move-cursor-right"})},[]),u=(0,h.useCallback)(e=>{o({type:"insert",text:e})},[]),c=(0,h.useCallback)(()=>{o({type:"delete"})},[]),f=(0,h.useCallback)(()=>{if(a){u(a),n?.(i.value+a);return}n?.(i.value)},[i.value,a,u,n]);return(0,h.useEffect)(()=>{i.value!==i.previousValue&&t?.(i.value)},[i.previousValue,i.value,t]),{...i,suggestion:a,moveCursorLeft:l,moveCursorRight:s,insert:u,delete:c,submit:f}})({defaultValue:r,suggestions:o,onChange:a,onSubmit:l})}),{styles:c}=g("TextInput");return h.createElement(n,{...c.value()},s)}(0,h.createContext)({marker:r.line});(0,h.createContext)({marker:""}),u.inverse(" "),u.inverse(" ");let P=e("../../../node_modules/.pnpm/react@19.2.7/node_modules/react/jsx-runtime.js"),D=e("node:os"),T=e("node:stream");function V(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function F(e,r,t,n,i,o,a){try{var l=e[o](a),s=l.value}catch(e){t(e);return}l.done?r(s):Promise.resolve(s).then(n,i)}function R(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function a(e){F(o,n,i,a,l,"next",e)}function l(e){F(o,n,i,a,l,"throw",e)}a(void 0)})}}function K(e,r){if(!(e instanceof r))throw TypeError("Cannot call a class as a function")}function B(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function U(e,r,t){return r&&B(e.prototype,r),t&&B(e,t),e}function H(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e,r){return(N=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function W(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,l=!1;try{for(i=i.call(e);!(a=(t=i.next()).done)&&(o.push(t.value),!r||o.length!==r);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==i.return||i.return()}finally{if(l)throw n}}return o}}(e,r)||$(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,r){if(e){if("string"==typeof e)return V(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return V(e,r)}}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(G=function(){return!!e})()}function X(e,r){var t,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:s(0)}),l(a,"throw",{value:s(1)}),l(a,"return",{value:s(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function s(l){return function(s){var u=[l,s];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(t=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(e,o)}catch(e){u=[6,e],n=0}finally{t=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var z="#72A7FF",J="#4B586C",Q="#7F8DA6",Y="#55D6A9",Z="#F2C66D",ee=c.map(function(e){return e.command.replace(/\s+\[[^\]]+\]$/,"")}),er=f.map(function(e){return e.command.replace(/\s+\[[^\]]+\]$/,"")}),et={id:"initial",kind:"initial"};function en(){var e=[],r=-1,t="";return{next:function(n){return r<0?n:(r-=1)<0?t:e[r]},previous:function(n){return 0===e.length?n:(r<0&&(t=n),r=Math.min(r+1,e.length-1),e[r])},record:function(n){e.unshift(n),e.length>20&&(e.length=20),r=-1,t=""}}}function ei(e){return R(function(){var r,t,n,o,a;return X(this,function(l){switch(l.label){case 0:return r=new ef,t=new ev(e.toChoices),n=new e_,[4,e.createSession(r,t.selectItem,n.update)];case 1:o=l.sent(),a=i((0,P.jsx)(eo,{deviceAppSetup:n,selections:t,session:o,subscribeCompileProgress:e.subscribeCompileProgress,transcript:r}),{exitOnCtrlC:!1,maxFps:15,stderr:r,stdin:e.stdin,stdout:process.stderr}),l.label=2;case 2:return l.trys.push([2,,4,6]),[4,a.waitUntilExit()];case 3:return l.sent(),[3,6];case 4:return t.cancel(),[4,o.close()];case 5:return l.sent(),[7];case 6:return[2,{status:o.getState().status}]}})})()}function eo(e){var r=e.deviceAppSetup,i=e.session,s=e.selections,u=e.subscribeCompileProgress,c=e.transcript,f=o().exit,_=W((0,h.useState)(),2),v=_[0],d=_[1],m=W((0,h.useState)(!1),2),p=m[0],b=m[1],g=(0,h.useRef)(""),y=W((0,h.useState)(0),2),x=y[0],j=y[1],w=(0,h.useRef)({device:en(),root:en()}).current,S=W((0,h.useState)("root"),2),C=S[0],O=S[1],E=W((0,h.useState)(function(){return c.snapshot()}),2),A=E[0],D=E[1],T=W((0,h.useState)(),2),V=T[0],F=T[1],R=W((0,h.useState)(function(){return i.getState()}),2),K=R[0],B=R[1],U=W((0,h.useState)(),2),H=U[0],L=U[1],N=W((0,h.useState)(function(){return r.snapshot()}),2),$=N[0],G=N[1],X=(0,h.useCallback)(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"执行中";d(e?r:void 0)},[]),ei=(0,h.useCallback)(function(){return b(!0)},[]);(0,h.useEffect)(function(){return i.subscribe(function(e){"client-disconnected"===e&&O("root")})},[i]),(0,h.useEffect)(function(){return r.subscribe(G)},[r]),(0,h.useEffect)(function(){p&&f()},[f,p]),(0,h.useEffect)(function(){return c.subscribe(D)},[c]),(0,h.useEffect)(function(){return s.subscribe(function(e){F(e)})},[s]),(0,h.useEffect)(function(){return null==u?void 0:u(function(e){L(e<1?e:void 0)})},[u]),(0,h.useEffect)(function(){var e=setInterval(function(){return B(i.getState())},500);return i.stopped.then(ei,ei),function(){return clearInterval(e)}},[ei,i]);var eo=function(e){var r=w[C];if(e.upArrow)g.current=r.previous(g.current);else if(e.downArrow)g.current=r.next(g.current);else{if(!e.tab||e.shift)return;var t=("device"===C?er:ee).find(function(e){return e.startsWith(g.current)});if(!t||t===g.current)return;g.current=t}j(function(e){return e+1})},ec=(0,h.useCallback)(function(e){var r=e.trim();if(r&&!v){g.current="",j(function(e){return e+1}),w[C].record(r),c.appendLine("".concat("device"===C?"desktop ›":"›"," ").concat(r));var t=r.toLowerCase(),n=t.split(/\s+/,1)[0];if("device"===C&&("back"===t||".."===r)){X(!0,"正在返回主命令"),i.returnToRoot().finally(function(){O("root"),X(!1)});return}var o=r;"device"===C&&"status"!==n&&"web"!==n&&(o="desktop ".concat(r)),X(!0),i.execute(o).then(function(e){"root"===C&&"enter-device"===e&&O("device"),B(i.getState())}).finally(function(){return X(!1)})}},[v,w,C,i,X,c]);return t(function(e,r){if(r.ctrl&&"c"===e){if(s.cancel(),v){i.cancelActiveCommand()&&X(!0,"正在停止");return}X(!0,"正在退出"),i.close().finally(ei);return}if(!V&&r.ctrl&&"u"===e){g.current="",j(function(e){return e+1});return}V?r.escape&&s.resolve(void 0):eo(r)}),(0,P.jsxs)(h.Fragment,{children:[(0,P.jsx)(a,{items:[et].concat(q(A)),children:function(e){if("initial"===e.kind)return(0,P.jsx)(l,{flexDirection:"column",children:(0,P.jsx)(es,{state:K})},e.id);var r,t=e.text.startsWith("⚠");return(0,P.jsxs)(n,{color:t?void 0:(r=e.text,/^(error|failed|failure_reason|错误|失败|未知命令|未知 desktop 子命令|启动真机调试失败|启动豆包开发者工具失败|关闭豆包开发者工具失败)/i.test(r)?"#FF6B7A":/^(warning|toolchain warnings|警告|工具链警告)/i.test(r)?Z:/^✓ (下载豆包开发者工具|豆包开发者工具已安装)/.test(r)||/^(状态:成功|状态:运行中|页面已打开|卡片已推送|Web 模拟器|status: ok|status: running|page pushed|widget pushed|web_debugger)/i.test(r)?Y:/^(debug:|调试:|(?:desktop )?›)/i.test(r)?z:void 0),wrap:"wrap",children:[t&&(0,P.jsx)(n,{color:Z,children:"⚠"}),t?e.text.slice(1):e.text||" "]},e.id)}}),(0,P.jsxs)(l,{display:p?"none":"flex",flexDirection:"column",children:[(0,P.jsx)(el,{scope:C}),(0,P.jsxs)(l,{flexDirection:"column",marginTop:1,children:[$?(0,P.jsx)(ea,{progress:$}):void 0!==H?(0,P.jsx)(I,{label:"应用编译 ".concat(Math.round(100*H),"%")}):v?(0,P.jsx)(I,{label:v}):null,V?(0,P.jsxs)(l,{borderColor:J,borderStyle:"single",flexDirection:"column",paddingX:1,children:[(0,P.jsx)(n,{bold:!0,color:z,children:"versionTag"===V.kind?"选择关联的 versionTag":"选择".concat("page"===V.kind?"页面":"卡片")}),(0,P.jsx)(k,{onChange:function(e){return s.resolve(e)},options:V.choices,visibleOptionCount:7}),(0,P.jsx)(n,{color:Q,children:"↑↓ 移动 Enter 选择 Esc 取消"})]}):(0,P.jsxs)(l,{children:[(0,P.jsx)(n,{bold:!0,color:z,children:"device"===C?"desktop › ":"› "}),(0,P.jsx)(M,{defaultValue:g.current,isDisabled:!!v,onChange:function(e){g.current=e},onSubmit:ec,placeholder:"device"===C?"back 返回主命令":"Ctrl+C 退出",suggestions:"device"===C?er:ee},x)]})]}),(0,P.jsx)(eu,{state:K})]})]})}function ea(e){var r=e.progress,t=_(r);return"complete"===r.phase?(0,P.jsx)(l,{children:(0,P.jsxs)(n,{color:Y,children:["✓ ",t]})}):(0,P.jsx)(l,{children:(0,P.jsx)(I,{label:t})})}function el(e){var r=e.scope,t="device"===r?f:c;return(0,P.jsxs)(l,{flexDirection:"column",marginTop:1,children:[(0,P.jsx)(n,{bold:!0,color:z,children:"device"===r?"真机调试命令":"可用命令"}),t.map(function(e){return(0,P.jsxs)(l,{flexDirection:"row",children:[(0,P.jsx)(l,{width:24,children:(0,P.jsx)(n,{color:z,children:" ".concat(e.command)})}),(0,P.jsx)(n,{children:e.description})]},e.command)})]})}function es(e){var r,t,i=e.state;return(0,P.jsxs)(l,{borderColor:J,borderStyle:"single",flexDirection:"column",paddingX:1,children:[(0,P.jsxs)(n,{children:[(0,P.jsx)(n,{color:z,children:">"}),(0,P.jsx)(n,{bold:!0,children:" Doubao Dev CLI"}),(0,P.jsx)(n,{color:Q,children:" (v".concat(v,")")})]}),(0,P.jsxs)(n,{wrap:"truncate-middle",children:[(0,P.jsx)(n,{color:Q,children:"项目".padEnd(14)}),ec(null!=(r=i.projectPath)?r:i.appDir)]}),(0,P.jsxs)(n,{wrap:"truncate-middle",children:[(0,P.jsx)(n,{color:Q,children:"应用".padEnd(14)}),null!=(t=i.appId)?t:"-"]})]})}function eu(e){var r,t,i=e.state,o=s().columns,a="running"===i.status,l=null!=(r=i.appId)?r:"-",u=ec(null!=(t=i.projectPath)?t:i.appDir),c="".concat(l," \xb7 ").concat(u),f=c.length+2<=o?c:l;return(0,P.jsxs)(n,{color:Q,wrap:"truncate-middle",children:[(0,P.jsx)(n,{color:a?Y:Q,children:a?"●":"○"})," ".concat(f)]})}function ec(e){var r=(0,D.homedir)();return e===r?"~":e.startsWith("".concat(r,"/"))||e.startsWith("".concat(r,"\\"))?"~".concat(e.slice(r.length)):e}var ef=function(e){"use strict";if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;return K(this,r),t=r,n=arguments,t=L(t),H(e=function(e,r){var t;if(r&&("object"==((t=r)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof r))return r;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,G()?Reflect.construct(t,n||[],L(this).constructor):t.apply(this,n)),"carry",""),H(e,"id",0),H(e,"lines",[]),H(e,"subscribers",new Set),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&N(r,e),U(r,[{key:"snapshot",value:function(){return q(this.lines)}},{key:"subscribe",value:function(e){var r=this;return this.subscribers.add(e),function(){r.subscribers.delete(e)}}},{key:"appendLine",value:function(e){this.appendPart(e),this.notify()}},{key:"_write",value:function(e,r,t){var n="".concat(this.carry).concat(e.toString()).split(/\r?\n/);this.carry=null!=(l=n.pop())?l:"";var i=!0,o=!1,a=void 0;try{for(var l,s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;this.appendPart(c)}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}this.notify(),t()}},{key:"appendPart",value:function(e){this.lines.push({id:this.id++,kind:"line",text:e})}},{key:"notify",value:function(){var e=this.snapshot(),r=!0,t=!1,n=void 0;try{for(var i,o=this.subscribers[Symbol.iterator]();!(r=(i=o.next()).done);r=!0)(0,i.value)(e)}catch(e){t=!0,n=e}finally{try{r||null==o.return||o.return()}finally{if(t)throw n}}}}]),r}(T.Writable),e_=function(){"use strict";function e(){var r=this;K(this,e),H(this,"progress",void 0),H(this,"subscribers",new Set),H(this,"update",function(e){r.progress=e;var t=!0,n=!1,i=void 0;try{for(var o,a=r.subscribers[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)(0,o.value)(e)}catch(e){n=!0,i=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw i}}})}return U(e,[{key:"snapshot",value:function(){return this.progress}},{key:"subscribe",value:function(e){var r=this;return this.subscribers.add(e),function(){r.subscribers.delete(e)}}}]),e}(),ev=function(){"use strict";function e(r){var t=this;K(this,e),H(this,"toChoices",void 0),H(this,"listener",void 0),H(this,"resolver",void 0),H(this,"selectItem",void 0),this.toChoices=r,this.selectItem=function(e,r){return R(function(){var t,n;return X(this,function(i){return(t=this,this.cancel(),(n=this.toChoices(e,r)).length)?[2,new Promise(function(r){var i;t.resolver=r,null==(i=t.listener)||i.call(t,{choices:n,kind:e})})]:[2,void 0]})}).call(t)}}return U(e,[{key:"subscribe",value:function(e){var r=this;return this.listener=e,function(){r.listener===e&&(r.listener=void 0)}}},{key:"resolve",value:function(e){var r,t=this.resolver;this.resolver=void 0,null==(r=this.listener)||r.call(this,void 0),null==t||t(e)}},{key:"cancel",value:function(){this.resolve(void 0)}}]),e}();export{ei as runInkDevShell};
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime~0.js";import{use_input as r,use_app as t,Static as n,components_Box as i,use_window_size as o,Text as a,formatDeviceAppSetupStatus as l,node_modules_figures as s,build_render as u}from"./5329~0.js";import"./4569~0.js";import{version_version as c,chalk_source as f}from"./1547~0.js";import{DEV_SHELL_HELP_ITEMS as _,DEV_SHELL_DEVICE_HELP_ITEMS as v}from"./dev.js";e.add({"../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(e){var r=function(e){var r,n,i;return!!(r=e)&&"object"==typeof r&&(n=e,"[object RegExp]"!==(i=Object.prototype.toString.call(n))&&"[object Date]"!==i&&n.$$typeof!==t)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,r){return!1!==r.clone&&r.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,r):e}function i(e,r,t){return e.concat(r).map(function(e){return n(e,t)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[])}function a(e,r){try{return r in e}catch(e){return!1}}function l(e,t,s){(s=s||{}).arrayMerge=s.arrayMerge||i,s.isMergeableObject=s.isMergeableObject||r,s.cloneUnlessOtherwiseSpecified=n;var u,c,f=Array.isArray(t);return f!==Array.isArray(e)?n(t,s):f?s.arrayMerge(e,t,s):(c={},(u=s).isMergeableObject(e)&&o(e).forEach(function(r){c[r]=n(e[r],u)}),o(t).forEach(function(r){a(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))||(a(e,r)&&u.isMergeableObject(t[r])?c[r]=(function(e,r){if(!r.customMerge)return l;var t=r.customMerge(e);return"function"==typeof t?t:l})(r,u)(e[r],t[r],u):c[r]=n(t[r],u))}),c)}l.all=function(e,r){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,t){return l(e,t,r)},{})},e.exports=l}});let d={info:"blue",success:"green",error:"red",warning:"yellow"},m={success:"green",error:"red",warning:"yellow",info:"blue"},p={success:s.tick,error:s.cross,warning:s.warning,info:s.info},h=e("../../../node_modules/.pnpm/react@19.2.7/node_modules/react/index.js");e("../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js");let b=(0,h.createContext)({components:{Alert:{styles:{container:({variant:e})=>({flexGrow:1,borderStyle:"round",borderColor:d[e],gap:1,paddingX:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:d[e]}),content:()=>({flexShrink:1,flexGrow:1,minWidth:0,flexDirection:"column",gap:1}),title:()=>({bold:!0}),message:()=>({})},config({variant:e}){let r;return"info"===e&&(r=s.info),"success"===e&&(r=s.tick),"error"===e&&(r=s.cross),"warning"===e&&(r=s.warning),{icon:r}}},Badge:{styles:{container:({color:e})=>({backgroundColor:e}),label:()=>({color:"black"})}},ConfirmInput:{styles:{input:({isFocused:e})=>({dimColor:!e})}},MultiSelect:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:r}){let t;return r&&(t="green"),e&&(t="blue"),{color:t}},highlightedText:()=>({bold:!0})}},OrderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})}},ProgressBar:{styles:{container:()=>({flexGrow:1,minWidth:0}),completed:()=>({color:"magenta"}),remaining:()=>({dimColor:!0})},config:()=>({completedCharacter:s.square,remainingCharacter:s.squareLightShade})},Select:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:r}){let t;return r&&(t="green"),e&&(t="blue"),{color:t}},highlightedText:()=>({bold:!0})}},Spinner:{styles:{container:()=>({gap:1}),frame:()=>({color:"blue"}),label:()=>({})}},StatusMessage:{styles:{container:()=>({gap:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:m[e]}),message:()=>({})},config:({variant:e})=>({icon:p[e]})},UnorderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})},config:()=>({marker:s.line})},TextInput:{styles:{value:()=>({})}},EmailInput:{styles:{value:()=>({})}},PasswordInput:{styles:{value:()=>({})}}}}),g=e=>(0,h.useContext)(b).components[e],y=s.line;(0,h.createContext)({marker:y}),(0,h.createContext)({depth:0});class x extends Map{first;constructor(e){let r,t,n=[],i=0;for(let o of e){let e={...o,previous:t,next:void 0,index:i};t&&(t.next=e),r||=e,n.push([o.value,e]),i++,t=e}super(n),this.first=r}}let j=e("node:util");function w({isFocused:e,isSelected:r,children:t}){let{styles:n}=g("Select");return h.createElement(i,{...n.option({isFocused:e})},e&&h.createElement(a,{...n.focusIndicator()},s.pointer),h.createElement(a,{...n.label({isFocused:e,isSelected:r})},t),r&&h.createElement(a,{...n.selectedIndicator()},s.tick))}let S=(e,r)=>{switch(r.type){case"focus-next-option":{if(!e.focusedValue)return e;let r=e.optionMap.get(e.focusedValue);if(!r)return e;let t=r.next;if(!t)return e;if(!(t.index>=e.visibleToIndex))return{...e,focusedValue:t.value};let n=Math.min(e.optionMap.size,e.visibleToIndex+1),i=n-e.visibleOptionCount;return{...e,focusedValue:t.value,visibleFromIndex:i,visibleToIndex:n}}case"focus-previous-option":{if(!e.focusedValue)return e;let r=e.optionMap.get(e.focusedValue);if(!r)return e;let t=r.previous;if(!t)return e;if(!(t.index<=e.visibleFromIndex))return{...e,focusedValue:t.value};let n=Math.max(0,e.visibleFromIndex-1),i=n+e.visibleOptionCount;return{...e,focusedValue:t.value,visibleFromIndex:n,visibleToIndex:i}}case"select-focused-option":return{...e,previousValue:e.value,value:e.focusedValue};case"reset":return r.state}},C=({visibleOptionCount:e,defaultValue:r,options:t})=>{let n="number"==typeof e?Math.min(e,t.length):t.length,i=new x(t);return{optionMap:i,visibleOptionCount:n,focusedValue:i.first?.value,visibleFromIndex:0,visibleToIndex:n,previousValue:r,value:r}};function k({isDisabled:e=!1,visibleOptionCount:t=5,highlightText:n,options:o,defaultValue:l,onChange:s}){let u=(({visibleOptionCount:e=5,options:r,defaultValue:t,onChange:n})=>{let[i,o]=(0,h.useReducer)(S,{visibleOptionCount:e,defaultValue:t,options:r},C),[a,l]=(0,h.useState)(r);r===a||(0,j.isDeepStrictEqual)(r,a)||(o({type:"reset",state:C({visibleOptionCount:e,defaultValue:t,options:r})}),l(r));let s=(0,h.useCallback)(()=>{o({type:"focus-next-option"})},[]),u=(0,h.useCallback)(()=>{o({type:"focus-previous-option"})},[]),c=(0,h.useCallback)(()=>{o({type:"select-focused-option"})},[]),f=(0,h.useMemo)(()=>r.map((e,r)=>({...e,index:r})).slice(i.visibleFromIndex,i.visibleToIndex),[r,i.visibleFromIndex,i.visibleToIndex]);return(0,h.useEffect)(()=>{i.value&&i.previousValue!==i.value&&n?.(i.value)},[i.previousValue,i.value,r,n]),{focusedValue:i.focusedValue,visibleFromIndex:i.visibleFromIndex,visibleToIndex:i.visibleToIndex,value:i.value,visibleOptions:f,focusNextOption:s,focusPreviousOption:u,selectFocusedOption:c}})({visibleOptionCount:t,options:o,defaultValue:l,onChange:s});(({isDisabled:e=!1,state:t})=>{r((e,r)=>{r.downArrow&&t.focusNextOption(),r.upArrow&&t.focusPreviousOption(),r.return&&t.selectFocusedOption()},{isActive:!e})})({isDisabled:e,state:u});let{styles:c}=g("Select");return h.createElement(i,{...c.container()},u.visibleOptions.map(r=>{let t=r.label;if(n&&r.label.includes(n)){let e=r.label.indexOf(n);t=h.createElement(h.Fragment,null,r.label.slice(0,e),h.createElement(a,{...c.highlightedText()},n),r.label.slice(e+n.length))}return h.createElement(w,{key:r.value,isFocused:!e&&u.focusedValue===r.value,isSelected:u.value===r.value},t)}))}var O=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"frames":["/ "," - "," \\\\ "," |"," |"," \\\\ "," - ","/ "]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["\uD83D\uDE04 ","\uD83D\uDE1D "]},"monkey":{"interval":300,"frames":["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},"hearts":{"interval":100,"frames":["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","\uD83D\uDC97 "]},"clock":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},"earth":{"interval":180,"frames":["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},"runner":{"interval":140,"frames":["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["\uD83C\uDF32","\uD83C\uDF84"]},"grenade":{"interval":80,"frames":["، ","′ "," \xb4 "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},"fistBump":{"interval":80,"frames":["\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B "," \uD83E\uDD1C  \uD83E\uDD1B  ","  \uD83E\uDD1C\uD83E\uDD1B   "," \uD83E\uDD1C✨\uD83E\uDD1B   ","\uD83E\uDD1C ✨ \uD83E\uDD1B  "]},"soccerHeader":{"interval":80,"frames":[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},"mindblown":{"interval":160,"frames":["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ ","  ","  ","  "]},"speaker":{"interval":160,"frames":["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},"orangePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},"bluePulse":{"interval":100,"frames":["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"orangeBluePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"timeTravel":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺ █████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺ ████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺ ███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺ ██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺ █\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺ \xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺░\xa3\xa3 "," ☺░\xa3\xa3 "," ☺ \xa3\xa3 "," ☺\xa3\xa3 "," ☺\xa3\xa3 "," ☺▓\xa3 "," ☺▓\xa3 "," ☺▒\xa3 "," ☺▒\xa3 "," ☺░\xa3 "," ☺░\xa3 "," ☺ \xa3 "," ☺\xa3 "," ☺\xa3 "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & \xa3 "," & ░\xa3 "," & ▒\xa3 "," & ▓\xa3 "," & \xa3\xa3 "," & ░\xa3\xa3 "," & ▒\xa3\xa3 ","& ▓\xa3\xa3 ","& \xa3\xa3\xa3 "," ░\xa3\xa3\xa3 "," ▒\xa3\xa3\xa3 "," ▓\xa3\xa3\xa3 "," █\xa3\xa3\xa3 "," ░█\xa3\xa3\xa3 "," ▒█\xa3\xa3\xa3 "," ▓█\xa3\xa3\xa3 "," ██\xa3\xa3\xa3 "," ░██\xa3\xa3\xa3 "," ▒██\xa3\xa3\xa3 "," ▓██\xa3\xa3\xa3 "," ███\xa3\xa3\xa3 "," ░███\xa3\xa3\xa3 "," ▒███\xa3\xa3\xa3 "," ▓███\xa3\xa3\xa3 "," ████\xa3\xa3\xa3 "," ░████\xa3\xa3\xa3 "," ▒████\xa3\xa3\xa3 "," ▓████\xa3\xa3\xa3 "," █████\xa3\xa3\xa3 "," ░█████\xa3\xa3\xa3 "," ▒█████\xa3\xa3\xa3 "," ▓█████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xba> ~~~~~~~~~~~~~~~~~","(\xba> ~~~~~~~~~~~~~~~~","((\xba> ~~~~~~~~~~~~~~~","<((\xba> ~~~~~~~~~~~~~~","><((\xba> ~~~~~~~~~~~~~"," ><((\xba> ~~~~~~~~~~~~","~ ><((\xba> ~~~~~~~~~~~","~~ <>((\xba> ~~~~~~~~~~","~~~ ><((\xba> ~~~~~~~~~","~~~~ <>((\xba> ~~~~~~~~","~~~~~ ><((\xba> ~~~~~~~","~~~~~~ <>((\xba> ~~~~~~","~~~~~~~ ><((\xba> ~~~~~","~~~~~~~~ <>((\xba> ~~~~","~~~~~~~~~ ><((\xba> ~~~","~~~~~~~~~~ <>((\xba> ~~","~~~~~~~~~~~ ><((\xba> ~","~~~~~~~~~~~~ <>((\xba> ","~~~~~~~~~~~~~ ><((\xba>","~~~~~~~~~~~~~~ <>((\xba","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}');function I({label:e,type:r}){let{frame:t}=function({type:e="dots"}){let[r,t]=(0,h.useState)(0),n=O[e];return(0,h.useEffect)(()=>{let e=setInterval(()=>{t(e=>e===n.frames.length-1?0:e+1)},n.interval);return()=>{clearInterval(e)}},[n]),{frame:n.frames[r]??""}}({type:r}),{styles:n}=g("Spinner");return h.createElement(i,{...n.container()},h.createElement(a,{...n.frame()},t),e&&h.createElement(a,{...n.label()},e))}Object.keys(O);let E=(e,r)=>{switch(r.type){case"move-cursor-left":return{...e,cursorOffset:Math.max(0,e.cursorOffset-1)};case"move-cursor-right":return{...e,cursorOffset:Math.min(e.value.length,e.cursorOffset+1)};case"insert":return{...e,previousValue:e.value,value:e.value.slice(0,e.cursorOffset)+r.text+e.value.slice(e.cursorOffset),cursorOffset:e.cursorOffset+r.text.length};case"delete":{let r=Math.max(0,e.cursorOffset-1);return{...e,previousValue:e.value,value:e.value.slice(0,r)+e.value.slice(r+1),cursorOffset:r}}}},A=f.inverse(" ");function M({isDisabled:e=!1,defaultValue:t,placeholder:n="",suggestions:i,onChange:o,onSubmit:l}){let{inputValue:s}=(({isDisabled:e=!1,state:t,placeholder:n=""})=>{let i=(0,h.useMemo)(()=>e?n?f.dim(n):"":n&&n.length>0?f.inverse(n[0])+f.dim(n.slice(1)):A,[e,n]),o=(0,h.useMemo)(()=>{if(e)return t.value;let r=0,n=t.value.length>0?"":A;for(let e of t.value)n+=r===t.cursorOffset?f.inverse(e):e,r++;return t.suggestion?t.cursorOffset===t.value.length?n+=f.inverse(t.suggestion[0])+f.dim(t.suggestion.slice(1)):n+=f.dim(t.suggestion):t.value.length>0&&t.cursorOffset===t.value.length&&(n+=A),n},[e,t.value,t.cursorOffset,t.suggestion]);return r((e,r)=>{if(!r.upArrow&&!r.downArrow&&(!r.ctrl||"c"!==e)&&!r.tab&&(!r.shift||!r.tab)){if(r.return)return void t.submit();r.leftArrow?t.moveCursorLeft():r.rightArrow?t.moveCursorRight():r.backspace||r.delete?t.delete():t.insert(e)}},{isActive:!e}),{inputValue:t.value.length>0?o:i}})({isDisabled:e,placeholder:n,state:(({defaultValue:e="",suggestions:r,onChange:t,onSubmit:n})=>{let[i,o]=(0,h.useReducer)(E,{previousValue:e,value:e,cursorOffset:e.length}),a=(0,h.useMemo)(()=>{if(0!==i.value.length)return r?.find(e=>e.startsWith(i.value))?.replace(i.value,"")},[i.value,r]),l=(0,h.useCallback)(()=>{o({type:"move-cursor-left"})},[]),s=(0,h.useCallback)(()=>{o({type:"move-cursor-right"})},[]),u=(0,h.useCallback)(e=>{o({type:"insert",text:e})},[]),c=(0,h.useCallback)(()=>{o({type:"delete"})},[]),f=(0,h.useCallback)(()=>{if(a){u(a),n?.(i.value+a);return}n?.(i.value)},[i.value,a,u,n]);return(0,h.useEffect)(()=>{i.value!==i.previousValue&&t?.(i.value)},[i.previousValue,i.value,t]),{...i,suggestion:a,moveCursorLeft:l,moveCursorRight:s,insert:u,delete:c,submit:f}})({defaultValue:t,suggestions:i,onChange:o,onSubmit:l})}),{styles:u}=g("TextInput");return h.createElement(a,{...u.value()},s)}(0,h.createContext)({marker:s.line});(0,h.createContext)({marker:""}),f.inverse(" "),f.inverse(" ");let P=e("../../../node_modules/.pnpm/react@19.2.7/node_modules/react/jsx-runtime.js"),D=e("node:os"),T=e("node:stream");function V(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function F(e,r,t,n,i,o,a){try{var l=e[o](a),s=l.value}catch(e){t(e);return}l.done?r(s):Promise.resolve(s).then(n,i)}function R(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var o=e.apply(r,t);function a(e){F(o,n,i,a,l,"next",e)}function l(e){F(o,n,i,a,l,"throw",e)}a(void 0)})}}function B(e,r){if(!(e instanceof r))throw TypeError("Cannot call a class as a function")}function L(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function K(e,r,t){return r&&L(e.prototype,r),t&&L(e,t),e}function W(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e,r){return(H=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function q(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],a=!0,l=!1;try{for(i=i.call(e);!(a=(t=i.next()).done)&&(o.push(t.value),!r||o.length!==r);a=!0);}catch(e){l=!0,n=e}finally{try{a||null==i.return||i.return()}finally{if(l)throw n}}return o}}(e,r)||$(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,r){if(e){if("string"==typeof e)return V(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return V(e,r)}}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(G=function(){return!!e})()}function X(e,r){var t,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:s(0)}),l(a,"throw",{value:s(1)}),l(a,"return",{value:s(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function s(l){return function(s){var u=[l,s];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(o=0)),o;)try{if(t=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(e,o)}catch(e){u=[6,e],n=0}finally{t=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var z="#72A7FF",J="#4B586C",Q="#7F8DA6",Y="#55D6A9",Z="#F2C66D",ee=_.map(function(e){return e.command.replace(/\s+\[[^\]]+\]$/,"")}),er=v.map(function(e){return e.command.replace(/\s+\[[^\]]+\]$/,"")}),et={id:"initial",kind:"initial"};function en(){var e=[],r=-1,t="";return{next:function(n){return r<0?n:(r-=1)<0?t:e[r]},previous:function(n){return 0===e.length?n:(r<0&&(t=n),r=Math.min(r+1,e.length-1),e[r])},record:function(n){e.unshift(n),e.length>20&&(e.length=20),r=-1,t=""}}}function ei(e){return R(function(){var r,t,n,i,o;return X(this,function(a){switch(a.label){case 0:return r=new ef,t=new ev(e.toChoices),n=new e_,[4,e.createSession(r,t.selectItem,n.update)];case 1:i=a.sent(),o=u((0,P.jsx)(eo,{deviceAppSetup:n,selections:t,session:i,subscribeCompileProgress:e.subscribeCompileProgress,transcript:r}),{exitOnCtrlC:!1,maxFps:15,stderr:r,stdin:e.stdin,stdout:process.stderr}),a.label=2;case 2:return a.trys.push([2,,4,6]),[4,o.waitUntilExit()];case 3:return a.sent(),[3,6];case 4:return t.cancel(),[4,i.close()];case 5:return a.sent(),[7];case 6:return[2,{status:i.getState().status}]}})})()}function eo(e){var o=e.deviceAppSetup,l=e.session,s=e.selections,u=e.subscribeCompileProgress,c=e.transcript,f=t().exit,_=q((0,h.useState)(),2),v=_[0],d=_[1],m=q((0,h.useState)(!1),2),p=m[0],b=m[1],g=(0,h.useRef)(""),y=q((0,h.useState)(0),2),x=y[0],j=y[1],w=(0,h.useRef)({device:en(),root:en()}).current,S=q((0,h.useState)("root"),2),C=S[0],O=S[1],E=q((0,h.useState)(function(){return c.snapshot()}),2),A=E[0],D=E[1],T=q((0,h.useState)(),2),V=T[0],F=T[1],R=q((0,h.useState)(function(){return l.getState()}),2),B=R[0],L=R[1],K=q((0,h.useState)(),2),W=K[0],U=K[1],H=q((0,h.useState)(function(){return o.snapshot()}),2),$=H[0],G=H[1],X=(0,h.useCallback)(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"执行中";d(e?r:void 0)},[]),ei=(0,h.useCallback)(function(){return b(!0)},[]);(0,h.useEffect)(function(){return l.subscribe(function(e){"client-disconnected"===e&&O("root")})},[l]),(0,h.useEffect)(function(){return o.subscribe(G)},[o]),(0,h.useEffect)(function(){p&&f()},[f,p]),(0,h.useEffect)(function(){return c.subscribe(D)},[c]),(0,h.useEffect)(function(){return s.subscribe(function(e){F(e)})},[s]),(0,h.useEffect)(function(){return null==u?void 0:u(function(e){U(e<1?e:void 0)})},[u]),(0,h.useEffect)(function(){var e=setInterval(function(){return L(l.getState())},500);return l.stopped.then(ei,ei),function(){return clearInterval(e)}},[ei,l]);var eo=function(e){var r=w[C];if(e.upArrow)g.current=r.previous(g.current);else if(e.downArrow)g.current=r.next(g.current);else{if(!e.tab||e.shift)return;var t=("device"===C?er:ee).find(function(e){return e.startsWith(g.current)});if(!t||t===g.current)return;g.current=t}j(function(e){return e+1})},ec=(0,h.useCallback)(function(e){var r=e.trim();if(r&&!v){g.current="",j(function(e){return e+1}),w[C].record(r),c.appendLine("".concat("device"===C?"desktop ›":"›"," ").concat(r));var t=r.toLowerCase(),n=t.split(/\s+/,1)[0];if("device"===C&&("back"===t||".."===r)){X(!0,"正在返回主命令"),l.returnToRoot().finally(function(){O("root"),X(!1)});return}var i=r;"device"===C&&"status"!==n&&"web"!==n&&(i="desktop ".concat(r)),X(!0),l.execute(i).then(function(e){"root"===C&&"enter-device"===e&&O("device"),L(l.getState())}).finally(function(){return X(!1)})}},[v,w,C,l,X,c]);return r(function(e,r){if(r.ctrl&&"c"===e){if(s.cancel(),v){l.cancelActiveCommand()&&X(!0,"正在停止");return}X(!0,"正在退出"),l.close().finally(ei);return}if(!V&&r.ctrl&&"u"===e){g.current="",j(function(e){return e+1});return}V?r.escape&&s.resolve(void 0):eo(r)}),(0,P.jsxs)(h.Fragment,{children:[(0,P.jsx)(n,{items:[et].concat(N(A)),children:function(e){if("initial"===e.kind)return(0,P.jsx)(i,{flexDirection:"column",children:(0,P.jsx)(es,{state:B})},e.id);var r,t=e.text.startsWith("⚠");return(0,P.jsxs)(a,{color:t?void 0:(r=e.text,/^(error|failed|failure_reason|错误|失败|未知命令|未知 desktop 子命令|启动真机调试失败|启动豆包开发者工具失败|关闭豆包开发者工具失败)/i.test(r)?"#FF6B7A":/^(warning|toolchain warnings|警告|工具链警告)/i.test(r)?Z:/^✓ (下载豆包开发者工具|豆包开发者工具已安装)/.test(r)||/^(状态:成功|状态:运行中|页面已打开|卡片已推送|Web 模拟器|status: ok|status: running|page pushed|widget pushed|web_debugger)/i.test(r)?Y:/^(debug:|调试:|(?:desktop )?›)/i.test(r)?z:void 0),wrap:"wrap",children:[t&&(0,P.jsx)(a,{color:Z,children:"⚠"}),t?e.text.slice(1):e.text||" "]},e.id)}}),(0,P.jsxs)(i,{display:p?"none":"flex",flexDirection:"column",children:[(0,P.jsx)(el,{scope:C}),(0,P.jsxs)(i,{flexDirection:"column",marginTop:1,children:[$?(0,P.jsx)(ea,{progress:$}):void 0!==W?(0,P.jsx)(I,{label:"应用编译 ".concat(Math.round(100*W),"%")}):v?(0,P.jsx)(I,{label:v}):null,V?(0,P.jsxs)(i,{borderColor:J,borderStyle:"single",flexDirection:"column",paddingX:1,children:[(0,P.jsx)(a,{bold:!0,color:z,children:"versionTag"===V.kind?"选择关联的 versionTag":"选择".concat("page"===V.kind?"页面":"卡片")}),(0,P.jsx)(k,{onChange:function(e){return s.resolve(e)},options:V.choices,visibleOptionCount:7}),(0,P.jsx)(a,{color:Q,children:"↑↓ 移动 Enter 选择 Esc 取消"})]}):(0,P.jsxs)(i,{children:[(0,P.jsx)(a,{bold:!0,color:z,children:"device"===C?"desktop › ":"› "}),(0,P.jsx)(M,{defaultValue:g.current,isDisabled:!!v,onChange:function(e){g.current=e},onSubmit:ec,placeholder:"device"===C?"back 返回主命令":"Ctrl+C 退出",suggestions:"device"===C?er:ee},x)]})]}),(0,P.jsx)(eu,{state:B})]})]})}function ea(e){var r=e.progress,t=l(r);return"complete"===r.phase?(0,P.jsx)(i,{children:(0,P.jsxs)(a,{color:Y,children:["✓ ",t]})}):(0,P.jsx)(i,{children:(0,P.jsx)(I,{label:t})})}function el(e){var r=e.scope,t="device"===r?v:_;return(0,P.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,P.jsx)(a,{bold:!0,color:z,children:"device"===r?"真机调试命令":"可用命令"}),t.map(function(e){return(0,P.jsxs)(i,{flexDirection:"row",children:[(0,P.jsx)(i,{width:24,children:(0,P.jsx)(a,{color:z,children:" ".concat(e.command)})}),(0,P.jsx)(a,{children:e.description})]},e.command)})]})}function es(e){var r,t,n=e.state;return(0,P.jsxs)(i,{borderColor:J,borderStyle:"single",flexDirection:"column",paddingX:1,children:[(0,P.jsxs)(a,{children:[(0,P.jsx)(a,{color:z,children:">"}),(0,P.jsx)(a,{bold:!0,children:" Doubao Dev CLI"}),(0,P.jsx)(a,{color:Q,children:" (v".concat(c,")")})]}),(0,P.jsxs)(a,{wrap:"truncate-middle",children:[(0,P.jsx)(a,{color:Q,children:"项目".padEnd(14)}),ec(null!=(r=n.projectPath)?r:n.appDir)]}),(0,P.jsxs)(a,{wrap:"truncate-middle",children:[(0,P.jsx)(a,{color:Q,children:"应用".padEnd(14)}),null!=(t=n.appId)?t:"-"]})]})}function eu(e){var r,t,n=e.state,i=o().columns,l="running"===n.status,s=null!=(r=n.appId)?r:"-",u=ec(null!=(t=n.projectPath)?t:n.appDir),c="".concat(s," \xb7 ").concat(u),f=c.length+2<=i?c:s;return(0,P.jsxs)(a,{color:Q,wrap:"truncate-middle",children:[(0,P.jsx)(a,{color:l?Y:Q,children:l?"●":"○"})," ".concat(f)]})}function ec(e){var r=(0,D.homedir)();return e===r?"~":e.startsWith("".concat(r,"/"))||e.startsWith("".concat(r,"\\"))?"~".concat(e.slice(r.length)):e}var ef=function(e){"use strict";if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n;return B(this,r),t=r,n=arguments,t=U(t),W(e=function(e,r){var t;if(r&&("object"==((t=r)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof r))return r;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,G()?Reflect.construct(t,n||[],U(this).constructor):t.apply(this,n)),"carry",""),W(e,"id",0),W(e,"lines",[]),W(e,"subscribers",new Set),e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&H(r,e),K(r,[{key:"snapshot",value:function(){return N(this.lines)}},{key:"subscribe",value:function(e){var r=this;return this.subscribers.add(e),function(){r.subscribers.delete(e)}}},{key:"appendLine",value:function(e){this.appendPart(e),this.notify()}},{key:"_write",value:function(e,r,t){var n="".concat(this.carry).concat(e.toString()).split(/\r?\n/);this.carry=null!=(l=n.pop())?l:"";var i=!0,o=!1,a=void 0;try{for(var l,s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;this.appendPart(c)}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}this.notify(),t()}},{key:"appendPart",value:function(e){this.lines.push({id:this.id++,kind:"line",text:e})}},{key:"notify",value:function(){var e=this.snapshot(),r=!0,t=!1,n=void 0;try{for(var i,o=this.subscribers[Symbol.iterator]();!(r=(i=o.next()).done);r=!0)(0,i.value)(e)}catch(e){t=!0,n=e}finally{try{r||null==o.return||o.return()}finally{if(t)throw n}}}}]),r}(T.Writable),e_=function(){"use strict";function e(){var r=this;B(this,e),W(this,"progress",void 0),W(this,"subscribers",new Set),W(this,"update",function(e){r.progress=e;var t=!0,n=!1,i=void 0;try{for(var o,a=r.subscribers[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)(0,o.value)(e)}catch(e){n=!0,i=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw i}}})}return K(e,[{key:"snapshot",value:function(){return this.progress}},{key:"subscribe",value:function(e){var r=this;return this.subscribers.add(e),function(){r.subscribers.delete(e)}}}]),e}(),ev=function(){"use strict";function e(r){var t=this;B(this,e),W(this,"toChoices",void 0),W(this,"listener",void 0),W(this,"resolver",void 0),W(this,"selectItem",void 0),this.toChoices=r,this.selectItem=function(e,r){return R(function(){var t,n;return X(this,function(i){return(t=this,this.cancel(),(n=this.toChoices(e,r)).length)?[2,new Promise(function(r){var i;t.resolver=r,null==(i=t.listener)||i.call(t,{choices:n,kind:e})})]:[2,void 0]})}).call(t)}}return K(e,[{key:"subscribe",value:function(e){var r=this;return this.listener=e,function(){r.listener===e&&(r.listener=void 0)}}},{key:"resolve",value:function(e){var r,t=this.resolver;this.resolver=void 0,null==(r=this.listener)||r.call(this,void 0),null==t||t(e)}},{key:"cancel",value:function(){this.resolve(void 0)}}]),e}();export{ei as runInkDevShell};