@next-bricks/ai-portal 0.60.0 → 0.60.1

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 (70) hide show
  1. package/dist/bricks.json +22 -22
  2. package/dist/chunks/1480.ec45b604.js +2 -0
  3. package/dist/chunks/1480.ec45b604.js.map +1 -0
  4. package/dist/chunks/2357.b6f1e719.js +2 -0
  5. package/dist/chunks/2357.b6f1e719.js.map +1 -0
  6. package/dist/chunks/3793.03162dd0.js +2 -0
  7. package/dist/chunks/3793.03162dd0.js.map +1 -0
  8. package/dist/chunks/5712.4f691939.js +2 -0
  9. package/dist/chunks/5712.4f691939.js.map +1 -0
  10. package/dist/chunks/6450.ade6ef3e.js +2 -0
  11. package/dist/chunks/6450.ade6ef3e.js.map +1 -0
  12. package/dist/chunks/6792.26bcd166.js +2 -0
  13. package/dist/chunks/6792.26bcd166.js.map +1 -0
  14. package/dist/chunks/7888.c0645842.js +3 -0
  15. package/dist/chunks/7888.c0645842.js.LICENSE.txt +7 -0
  16. package/dist/chunks/7888.c0645842.js.map +1 -0
  17. package/dist/chunks/7955.0c92eb57.js +3 -0
  18. package/dist/chunks/{7238.9abe2a64.js.LICENSE.txt → 7955.0c92eb57.js.LICENSE.txt} +0 -6
  19. package/dist/chunks/7955.0c92eb57.js.map +1 -0
  20. package/dist/chunks/9525.9e5140be.js +15 -0
  21. package/dist/chunks/9525.9e5140be.js.map +1 -0
  22. package/dist/chunks/9979.44f64896.js +2 -0
  23. package/dist/chunks/9979.44f64896.js.map +1 -0
  24. package/dist/chunks/call-tool.89a848e0.js.map +1 -1
  25. package/dist/chunks/{cruise-canvas.b444c4ca.js → cruise-canvas.426be93e.js} +2 -2
  26. package/dist/chunks/{cruise-canvas.b444c4ca.js.map → cruise-canvas.426be93e.js.map} +1 -1
  27. package/dist/chunks/{gantt-chart.c8cdcd66.js → gantt-chart.0086539c.js} +2 -2
  28. package/dist/chunks/{gantt-chart.c8cdcd66.js.map → gantt-chart.0086539c.js.map} +1 -1
  29. package/dist/chunks/main.08db9bee.js +2 -0
  30. package/dist/chunks/{main.87ffc00f.js.map → main.08db9bee.js.map} +1 -1
  31. package/dist/chunks/preview-container.5793faee.js +2 -0
  32. package/dist/chunks/preview-container.5793faee.js.map +1 -0
  33. package/dist/examples.json +13 -13
  34. package/dist/index.8852dff5.js +2 -0
  35. package/dist/index.8852dff5.js.map +1 -0
  36. package/dist/manifest.json +146 -146
  37. package/dist/types.json +104 -104
  38. package/dist-types/data-providers/call-tool.d.ts +1 -1
  39. package/dist-types/shared/interfaces.d.ts +1 -1
  40. package/dist-types/shared/workers/tsxParser.d.ts +1 -1
  41. package/package.json +2 -2
  42. package/dist/chunks/3199.0220cf6e.js +0 -3
  43. package/dist/chunks/3199.0220cf6e.js.map +0 -1
  44. package/dist/chunks/3735.8c1d82e7.js +0 -15
  45. package/dist/chunks/3735.8c1d82e7.js.LICENSE.txt +0 -5
  46. package/dist/chunks/3735.8c1d82e7.js.map +0 -1
  47. package/dist/chunks/5712.c566ad78.js +0 -2
  48. package/dist/chunks/5712.c566ad78.js.map +0 -1
  49. package/dist/chunks/6593.58eda50f.js +0 -2
  50. package/dist/chunks/6593.58eda50f.js.map +0 -1
  51. package/dist/chunks/6792.0efb2d00.js +0 -2
  52. package/dist/chunks/6792.0efb2d00.js.map +0 -1
  53. package/dist/chunks/7238.9abe2a64.js +0 -3
  54. package/dist/chunks/7238.9abe2a64.js.map +0 -1
  55. package/dist/chunks/7586.b406d4bf.js +0 -2
  56. package/dist/chunks/7586.b406d4bf.js.map +0 -1
  57. package/dist/chunks/8135.3255c5ba.js +0 -2
  58. package/dist/chunks/8135.3255c5ba.js.map +0 -1
  59. package/dist/chunks/843.9b7325c3.js +0 -2
  60. package/dist/chunks/843.9b7325c3.js.map +0 -1
  61. package/dist/chunks/9388.e48bb229.js +0 -2
  62. package/dist/chunks/9388.e48bb229.js.map +0 -1
  63. package/dist/chunks/9496.1d7ebb7f.js +0 -2
  64. package/dist/chunks/9496.1d7ebb7f.js.map +0 -1
  65. package/dist/chunks/main.87ffc00f.js +0 -2
  66. package/dist/chunks/preview-container.19631a7b.js +0 -2
  67. package/dist/chunks/preview-container.19631a7b.js.map +0 -1
  68. package/dist/index.a91518b7.js +0 -2
  69. package/dist/index.a91518b7.js.map +0 -1
  70. /package/dist/chunks/{3199.0220cf6e.js.LICENSE.txt → 9525.9e5140be.js.LICENSE.txt} +0 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 7888.c0645842.js.LICENSE.txt */
2
+ "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[7888],{1740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var a=void 0!==r.layer;a&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,a&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},30855:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},47695:(e,t,r)=>{r.d(t,{LV:()=>d});const n=Symbol("Comlink.proxy"),a=Symbol("Comlink.endpoint"),o=Symbol("Comlink.releaseProxy"),i=Symbol("Comlink.finalizer"),c=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,u=new Map([["proxy",{canHandle:e=>s(e)&&e[n],serialize(e){const{port1:t,port2:r}=new MessageChannel;return l(e,t),[r,[r]]},deserialize:e=>(e.start(),d(e))}],["throw",{canHandle:e=>s(e)&&c in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function l(e,t=globalThis,r=["*"]){t.addEventListener("message",(function a(o){if(!o||!o.data)return;if(!function(e,t){for(const r of e){if(t===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}return!1}(r,o.origin))return void console.warn(`Invalid origin '${o.origin}' for comlink proxy`);const{id:s,type:u,path:d}=Object.assign({path:[]},o.data),f=(o.data.argumentList||[]).map(w);let m;try{const t=d.slice(0,-1).reduce(((e,t)=>e[t]),e),r=d.reduce(((e,t)=>e[t]),e);switch(u){case"GET":m=r;break;case"SET":t[d.slice(-1)[0]]=w(o.data.value),m=!0;break;case"APPLY":m=r.apply(t,f);break;case"CONSTRUCT":m=function(e){return Object.assign(e,{[n]:!0})}(new r(...f));break;case"ENDPOINT":{const{port1:t,port2:r}=new MessageChannel;l(e,r),m=function(e,t){return b.set(e,t),e}(t,[t])}break;case"RELEASE":m=void 0;break;default:return}}catch(e){m={value:e,[c]:0}}Promise.resolve(m).catch((e=>({value:e,[c]:0}))).then((r=>{const[n,o]=x(r);t.postMessage(Object.assign(Object.assign({},n),{id:s}),o),"RELEASE"===u&&(t.removeEventListener("message",a),p(t),i in e&&"function"==typeof e[i]&&e[i]())})).catch((e=>{const[r,n]=x({value:new TypeError("Unserializable return value"),[c]:0});t.postMessage(Object.assign(Object.assign({},r),{id:s}),n)}))})),t.start&&t.start()}function p(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function d(e,t){const r=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const n=r.get(t.id);if(n)try{n(t)}finally{r.delete(t.id)}})),y(e,r,[],t)}function f(e){if(e)throw new Error("Proxy has been released and is not useable")}function m(e){return k(e,new Map,{type:"RELEASE"}).then((()=>{p(e)}))}const h=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(h.get(e)||0)-1;h.set(e,t),0===t&&m(e)}));function y(e,t,r=[],n=function(){}){let i=!1;const c=new Proxy(n,{get(n,a){if(f(i),a===o)return()=>{!function(e){v&&v.unregister(e)}(c),m(e),t.clear(),i=!0};if("then"===a){if(0===r.length)return{then:()=>c};const n=k(e,t,{type:"GET",path:r.map((e=>e.toString()))}).then(w);return n.then.bind(n)}return y(e,t,[...r,a])},set(n,a,o){f(i);const[c,s]=x(o);return k(e,t,{type:"SET",path:[...r,a].map((e=>e.toString())),value:c},s).then(w)},apply(n,o,c){f(i);const s=r[r.length-1];if(s===a)return k(e,t,{type:"ENDPOINT"}).then(w);if("bind"===s)return y(e,t,r.slice(0,-1));const[u,l]=g(c);return k(e,t,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:u},l).then(w)},construct(n,a){f(i);const[o,c]=g(a);return k(e,t,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:o},c).then(w)}});return function(e,t){const r=(h.get(t)||0)+1;h.set(t,r),v&&v.register(e,t,e)}(c,e),c}function g(e){const t=e.map(x);return[t.map((e=>e[0])),(r=t.map((e=>e[1])),Array.prototype.concat.apply([],r))];var r}const b=new WeakMap;function x(e){for(const[t,r]of u)if(r.canHandle(e)){const[n,a]=r.serialize(e);return[{type:"HANDLER",name:t,value:n},a]}return[{type:"RAW",value:e},b.get(e)||[]]}function w(e){switch(e.type){case"HANDLER":return u.get(e.name).deserialize(e.value);case"RAW":return e.value}}function k(e,t,r,n){return new Promise((a=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(o,a),e.start&&e.start(),e.postMessage(Object.assign({id:o},r),n)}))}},72591:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},i=[],c=0;c<e.length;c++){var s=e[c],u=n.base?s[0]+n.base:s[0],l=o[u]||0,p="".concat(u," ").concat(l);o[u]=l+1;var d=r(p),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var m=a(f,n);n.byIndex=c,t.splice(c,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function a(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,a){var o=n(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var c=r(o[i]);t[c].references--}for(var s=n(e,a),u=0;u<o.length;u++){var l=r(o[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}o=s}}},73301:(e,t,r)=>{r.d(t,{z:()=>ge});var n=r(90689),a=r(17545);function o(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),c=new N(n||[]);return i(o,"_invoke",{value:L(e,r,c)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",h="suspendedYield",v="executing",y="completed",g={};function b(){}function x(){}function w(){}var k={};p(k,s,(function(){return this}));var A=Object.getPrototypeOf,E=A&&A(A(O([])));E&&E!==r&&n.call(E,s)&&(k=E);var S=w.prototype=b.prototype=Object.create(k);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function r(o,i,c,s){var u=f(e[o],e,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==(0,a.A)(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,c,s)}),(function(e){r("throw",e,c,s)})):t.resolve(p).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=m;return function(o,i){if(a===v)throw Error("Generator is already running");if(a===y){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var s=T(c,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?y:h,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=y,n.method="throw",n.arg=u.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function O(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError((0,a.A)(t)+" is not iterable")}return x.prototype=w,i(S,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:x,configurable:!0}),x.displayName=p(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},_(M.prototype),p(M.prototype,u,(function(){return this})),t.AsyncIterator=M,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new M(d(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(S),p(S,l,"Generator"),p(S,s,(function(){return this})),p(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=O,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(F),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;F(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var i=r(83705),c=r(86330),s=r(73310);r(58135);var u=/^<%=?\s/,l=/\s%>$/;function p(e){return!e.reference||"imported"===e.reference.type&&"@next-tsx/core"===e.reference.importSource}function d(e,t){return p(e)&&(e.reference?e.reference.name===t:e.name===t)}var f=r(69740),m=r(77019);function h(e,t){for(var r={},a=0,o=Object.entries(null!==(i=e.events)&&void 0!==i?i:{});a<o.length;a++){var i,c=(0,n.A)(o[a],2),s=c[0],u=c[1];switch(e.name){case"Table":switch(s){case"select":var l=v(u,t);l&&(r["row.select.v2"]=l);break;case"sort":var p=v(u,t);p&&(r["sort.change"]=p);break;case"paginate":var d=v(u,t);d&&(r["page.change"]=d)}break;case"Button":if("click"===s){var f=v(u,t);f&&(r.click=f)}break;case"Search":if("search"===s){var m=v(u,t);m&&(r.search=m)}break;case"Select":if("change"===s){var h=v(u,t);h&&(r["change.v2"]=h)}break;default:var y=v(u,t);y&&(r[s]=y)}}return Object.keys(r).length>0?r:void 0}function v(e,t){if(e){var r=(Array.isArray(e)?e:[e]).map((function(e){return function(e,t){var r;switch(null==e?void 0:e.action){case"update_variable":return{action:"template"===e.payload.scope?"state.set":"context.set",args:[e.payload.name,e.payload.value]};case"refresh_data_source":return{action:"template"===e.payload.scope?"state.refresh":"context.refresh",args:[e.payload.name]};case"call_api":var n,a,o=e.payload,i=o.api,c=o.http,s=o.tool,u=o.params,l=o.isRawProvider,p=null!==(n=e.callback)&&void 0!==n&&n.success?v(e.callback.success,t):void 0,d=null!==(a=e.callback)&&void 0!==a&&a.error?v(e.callback.error,t):void 0;return(0,f.A)((0,f.A)({},l?{useProvider:i,args:u}:c?{useProvider:"basic.http-request",args:[i,u]}:s?{useProvider:"ai-portal.call-tool",args:[s,u]}:{useProvider:"".concat(i).concat(i.includes(":")?"":":*"),params:u}),{},{callback:(0,f.A)((0,f.A)({},p&&{success:p}),d&&{error:d})});case"call_ref":return(0,f.A)((0,f.A)({},"template"===e.payload.scope?{targetRef:e.payload.ref}:{target:"".concat(t.rootId?'[data-root-id="'.concat(t.rootId,'"] '):"",'[data-ref="').concat(e.payload.ref,'"]')}),{},{method:e.payload.method,args:e.payload.args});case"call_selector":return{target:e.payload.selector,method:e.payload.method,args:e.payload.args};case"navigate":return{action:"history.".concat(e.payload.method),args:e.payload.args};case"show_message":return{action:"message.".concat(e.payload.type),args:[e.payload.content]};case"handle_http_error":return{action:"handleHttpError",args:[e.payload]};case"dispatch_event":return{action:"tpl.dispatchEvent",args:[e.payload.type,{detail:e.payload.detail}]};case"conditional":return{if:e.payload.test,then:null!==(r=v(e.payload.consequent,t))&&void 0!==r?r:[],else:v(e.payload.alternate,t)}}}(e,t)})).filter(Boolean);return r.length>0?r:void 0}}var y=r(69655),g=/^<%=?\s/,b=/\s%>$/;function x(e){if("string"!=typeof e)return{isString:!1};var t,r,n=e.trim();return r=n,g.test(r)&&b.test(r)?t=n.replace(g,"").replace(b,"").trim():(console.warn("Invalid expression:",JSON.stringify(e)),t="null"),{isString:!0,embedded:e,expression:t,usedContexts:(0,y.strictCollectMemberUsage)(e,"CTX")}}function w(e){var t=e.properties,r=t.dataSource,n=t.fields,a=t.variant,o=x(r);return{brick:"eo-list",properties:{variant:a,dataSource:o.isString?o.embedded:r,fields:n,themeVariant:"elevo"}}}function k(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var A=r(71321);function E(e,t){return null!=t&&t.size?Array.isArray(e)?e.map((function(e){return E(e,t)})):"object"===(0,a.A)(e)&&null!==e?Object.fromEntries(Object.entries(e).map((function(e){var r=(0,n.A)(e,2);return[r[0],E(r[1],t)]}))):"string"==typeof e&&function(e){if("string"!=typeof e)return!1;var t=e.trim();return u.test(t)&&l.test(t)}(e)?function(e,t){if(null==t||!t.size)return e;if((0,i.A)(t.keys()).some((function(t){return e.includes(t)}))){var r,n=[];try{r=(0,A.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:function(e,r){if(t.has(e.name)){var a,o,i=null===(a=r[r.length-1])||void 0===a?void 0:a.node;i&&"Property"===i.type&&!i.computed&&i.shorthand&&(o=!0),n.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse expression failed:",e)}if(n.length>0&&r){for(var a=r,o=a.prefix,c=a.source,s=a.suffix,u=[],l=0,p=0;p<n.length;p++){var d=n[p],f=d.id,m=d.shorthand,h=f.name,v=f.start,y=f.end;u.push(c.substring(l,v),"".concat(m?"".concat(h,": "):"").concat(t.get(h))),l=y}return u.push(c.substring(l)),"".concat(o).concat(u.join("")).concat(s)}}return e}(e,t):e:e}var S=["dataSource","size","columns","rowKey","pagination"],_=["render"],M=["cellData","rowData"];function L(e,t,r,n,a){return T.apply(this,arguments)}function T(){return T=(0,c.A)(o().mark((function e(t,r,n,a,i){var s,u,l,p,d,m,h,v,y,g,b,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t.properties,p=(l=u).dataSource,l.size,d=l.columns,m=l.rowKey,h=l.pagination,v=k(l,S),y=x(p),g=new Map,!Array.isArray(d)){e.next=2;break}return e.next=1,Promise.all(d.map(function(){var e=(0,c.A)(o().mark((function e(t){var c,s,u,l,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=t.render,s=k(t,_),!c){e.next=2;break}for(u=new Map,l=0;l<c.params.length&&l<M.length;l++)u.set(c.params[l],"DATA.".concat(M[l]));return e.next=1,Promise.all(c.children.map((function(e){return le(e,r,n,a,i)})));case 1:return p=e.sent.flatMap((function(e){return E(e,u)})),e.abrupt("return",(0,f.A)((0,f.A)({},s),{},{useBrick:p.map((function(e){return e.brick.startsWith(":")?{brick:"div",children:[e]}:e}))}));case 2:return e.abrupt("return","string"==typeof s.dataIndex&&g.has(s.dataIndex)?(0,f.A)((0,f.A)({},s),{},{useChildren:"[".concat(s.dataIndex,"]")}):s);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:w=e.sent,e.next=3;break;case 2:w=d;case 3:return b=w,e.abrupt("return",{brick:"eo-next-table",properties:(0,f.A)((0,f.A)({dataSource:y.isString?y.embedded:p},v),{},{rowKey:null!=m?m:Array.isArray(d)?null===(s=d[0])||void 0===s?void 0:s.key:void 0,columns:b,themeVariant:"elevo",scrollConfig:{x:"max-content"}},a.expanded?{bordered:!0,pagination:h,size:"large"}:{size:"middle",pagination:!1}),children:g.size>0?Array.from(g.values()):[]});case 4:case"end":return e.stop()}}),e)}))),T.apply(this,arguments)}var C=["dataSource","title","list","columns"],F=["render"];function N(e,t,r,n,a){return O.apply(this,arguments)}function O(){return O=(0,c.A)(o().mark((function e(t,r,n,a,i){var s,u,l,p,d,m,h,v,y,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=t.properties,l=(u=s).dataSource,u.title,p=u.list,d=u.columns,m=k(u,C),h=x(l),v=new Map,!Array.isArray(p)){e.next=2;break}return e.next=1,Promise.all(p.map(function(){var e=(0,c.A)(o().mark((function e(t){var c,s,u,l,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=t.render,s=k(t,F),!c){e.next=2;break}return u=new Map,c.params.length>0&&u.set(c.params[0],"DATA"),e.next=1,Promise.all(c.children.map((function(e){return le(e,r,n,a,i)})));case 1:return l=e.sent.flatMap((function(e){return E(e,u)})),e.abrupt("return",{label:s.label,useBrick:l});case 2:return p=s.field?v.get(s.field):void 0,e.abrupt("return",p?{label:s.label,useChildren:"[".concat(s.field,"]")}:s);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:g=e.sent,e.next=3;break;case 2:g=p;case 3:return y=g,e.abrupt("return",{brick:"eo-descriptions",properties:(0,f.A)((0,f.A)((0,f.A)({},m),{},{dataSource:h.isString?h.embedded:l,list:y},null==d?{column:a.expanded?3:1,templateColumns:"repeat(auto-fill,minmax(360px,1fr))"}:{column:d}),{},{themeVariant:"elevo"}),children:v.size>0?Array.from(v.values()):[]});case 4:case"end":return e.stop()}}),e)}))),O.apply(this,arguments)}var P=r(24586),j=["#336EF4","#45CAFF","#41CDCF","#8146F3","#F8A075","#94E65E","#57689C","#C285EF","#FAC60B","#E4551F","#8984FF","#2540FF","#08BF33","#F7811C","#AC7CFF","#1BA5DC","#E89716","#76A6F5","#4F69FF"];function R(e,t,r,n){return I.apply(this,arguments)}function I(){return(I=(0,c.A)(o().mark((function e(t,r,n,a){var i,c,u,l,p,d,m,h,v,y,g,b,w,k,A,E,S,_,M;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.properties,u=(c=i).dataSource,l=c.groupField,p=c.widgets,n.usedHelpers.add("_helper_getLatestMetricValue"),n.usedHelpers.add("_helper_extractList"),n.usedHelpers.add("_helper_groupMetricData"),n.usedHelpers.add("_helper_getMetricDisplayNames"),d=l?"#showKey":void 0,m=x(u),h=m.isString,v=m.expression,y=h?"<%= FN._helper_extractList((".concat(v,")) %>"):u,!a.expanded){e.next=9;break}if(g=p,!((b=[]).length>0)){e.next=8;break}g=[],w=new Set,k=new Set(p.map((function(e){return e.metric.id}))),A=(0,s.A)(p),e.prev=1,S=o().mark((function e(){var t,r,n,a,i,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=E.value,!w.has(t.metric.id)){e.next=1;break}return e.abrupt("return",1);case 1:if(r=(0,f.A)({},t),g.push(r),(n=b.find((function(e){return e.metrics.includes(t.metric.id)})))&&(a=n.metrics.filter((function(e){return k.has(e)}))).length>1){r.relevantMetrics=a,r.counterMetric=n.counter,r.groupTitle=n.group,i=(0,s.A)(a);try{for(i.s();!(c=i.n()).done;)u=c.value,w.add(u),k.delete(u)}catch(e){i.e(e)}finally{i.f()}}case 2:case"end":return e.stop()}}),e)})),A.s();case 2:if((E=A.n()).done){e.next=5;break}return e.delegateYield(S(),"t0",3);case 3:if(!e.t0){e.next=4;break}return e.abrupt("continue",4);case 4:e.next=2;break;case 5:e.next=7;break;case 6:e.prev=6,M=e.catch(1),A.e(M);case 7:return e.prev=7,A.f(),e.finish(7);case 8:return _=0,e.abrupt("return",{brick:"div",properties:{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(500px, 1fr))",gap:"16px"},dataset:{component:"dashboard"}},children:g.map((function(e){var t,r,n=e.title,a=e.metric,o=e.size,i=e.precision,c=null!==(t=null===(r=e.relevantMetrics)||void 0===r?void 0:r.length)&&void 0!==t?t:d?2:1,s=Array.from({length:c},(function(e,t){return j[(_+t)%j.length]}));_+=c;var u,l,p,m,h,g,b="load"===a.unit?"":a.unit,x={brick:"chart-v2.time-series-chart",properties:(0,f.A)((0,f.A)((0,f.A)((0,f.A)({data:y,xField:"time"},e.relevantMetrics?{yFields:"<% FN._helper_getMetricDisplayNames((".concat(v,").displayNameList, ").concat(JSON.stringify(e.relevantMetrics),") %>")}:{yField:"<% FN._helper_getMetricDisplayNames((".concat(v,").displayNameList, [").concat(JSON.stringify(a.id),"])[0] %>")}),e.counterMetric?{forceAbsoluteNumbers:!0,series:(0,P.A)({},e.counterMetric,{isNegative:!0})}:null),{},{height:"large"===o?230:200,timeFormat:"HH:mm"},e.relevantMetrics||d?null:{areaOptions:{style:{fill:"l(90) 0:".concat(s[0]," 1:#ffffff")}}}),{},{axis:{yAxis:(0,f.A)((0,f.A)({unit:b,precision:i},e.counterMetric?null:"percent(1)"===b?{min:0,max:1}:"percent(100)"===b||"%"===b?{min:0,max:100}:{min:0}),{},{shape:"smooth"})},groupField:d,areaShape:"smooth",legends:!(!e.relevantMetrics&&!d),colors:s,tooltip:{marker:{fill:s[0],stroke:"#fff",lineWidth:2,shadowColor:s[0],shadowBlur:8,shadowOffsetX:0,shadowOffsetY:4},domStyles:{"g2-tooltip":{background:["radial-gradient( farthest-corner at -20px 150px, ".concat(s[0]," 0%, rgba(238,238,238,0) 60%)"),"linear-gradient( 180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.8) 100%)"].join(", "),boxShadow:"0px 4px 8px 0px ".concat((u=s[0],l=u.slice(1),p=parseInt(l,16),m=p>>16&255,h=p>>8&255,g=255&p,"rgba(".concat(m,", ").concat(h,", ").concat(g,", ").concat(.08,")"))),borderRadius:"8px",border:"1px solid rgba(255,255,255,1)",backdropFilter:"blur(3px)"}}}})};return{brick:"div",properties:{style:{background:"rgba(255,255,255,0.8)",boxShadow:"0px 2px 4px 0px rgba(0,0,0,0.06)",borderRadius:"8px",padding:"16px 20px 20px"}},children:[{brick:"div",properties:{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"},textContent:e.groupTitle||n||a.id}},x]}}))});case 9:if(!d){e.next=10;break}return e.abrupt("return",{brick:"div",properties:{style:{display:"flex",flexDirection:"column",gap:"8px"}},children:[{brick:":forEach",dataSource:"<%= FN._helper_groupMetricData(FN._helper_extractList((".concat(v,")), ").concat(JSON.stringify(d),") %>"),children:[{brick:"div",properties:{textContent:"<% `${ITEM.group}:` %>",style:{fontWeight:"500"}}},{brick:"div",properties:{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"10px",marginBottom:"8px"},dataset:{component:"dashboard"}},children:p.map((function(e,t){var r=e.title,n=e.metric,a=e.precision;return{brick:"ai-portal.stat-with-mini-chart",properties:(0,f.A)((0,f.A)({size:"small",label:r||n.id,data:"<% ITEM.list %>",xField:"time",yField:n.id,lineColor:j[t%j.length],showArea:!0},"percent(1)"===n.unit?{min:0,max:1}:"percent(100)"===n.unit||"%"===n.unit?{min:0,max:100}:{min:0}),{},{value:"<%= FN._helper_getLatestMetricValue(ITEM.list, ".concat(JSON.stringify({metric:n,precision:a}),") %>")})}}))}]}]});case 10:return e.abrupt("return",{brick:"div",properties:{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"10px"},dataset:{component:"dashboard"}},children:p.map((function(e,t){var r=e.title,n=e.metric,a=e.precision;return{brick:"ai-portal.stat-with-mini-chart",properties:(0,f.A)((0,f.A)({size:"small",label:r||n.id,data:y,xField:"time",yField:n.id,lineColor:j[t%j.length],showArea:!0},"percent(1)"===n.unit?{min:0,max:1}:"percent(100)"===n.unit||"%"===n.unit?{min:0,max:100}:{min:0}),{},{value:"<%= FN._helper_getLatestMetricValue((".concat(h?"FN._helper_extractList((".concat(v,"))"):JSON.stringify(null!=u?u:null),"), ").concat(JSON.stringify({metric:n,precision:a}),") %>")})}}))});case 11:case"end":return e.stop()}}),e,null,[[1,6,7,8]])})))).apply(this,arguments)}function z(e){var t=e.properties;return{brick:"eo-button",properties:(0,f.A)((0,f.A)({},t),{},{themeVariant:"elevo"})}}function V(e){var t=e.properties,r=(null!=t?t:{}).values;return{brick:"eo-form",properties:{values:null!=r?r:{},themeVariant:"elevo"}}}function D(e,t){var r=e.properties,n=t,a=(0,f.A)((0,f.A)({},r),{},{themeVariant:"elevo"});switch(n){case"eo-search":a=(0,f.A)((0,f.A)({},a),{},{trim:!0});break;case"eo-number-input":n="eo-input",a=(0,f.A)({type:"number"},a)}return{brick:n,properties:a}}var H=["title","confirmText","cancelText"];function B(e){var t=e.properties,r=t.title,n=t.confirmText,a=t.cancelText,o=k(t,H);return{brick:"eo-modal",portal:!0,properties:(0,f.A)({themeVariant:"elevo",modalTitle:r,confirmText:n,cancelText:a,keyboard:!0},o)}}function G(e){var t=e.properties;return{brick:"span",properties:(0,f.A)({},t)}}function W(e){var t=e.properties,r=t.title,n=t.textContent;return{brick:"eo-card",properties:(0,f.A)({themeVariant:"elevo",cardTitle:r,background:"#fff",outline:"background"},n?{textContent:n}:null)}}function J(e){return{brick:":forEach",dataSource:e.properties.dataSource}}function U(e){return{brick:":if",dataSource:e.properties.dataSource}}var $=["style"];function Y(e){var t=e.properties,r=t.style,n=k(t,$);return{brick:"pre",properties:(0,f.A)({style:(0,f.A)({background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",tabSize:"2",hyphens:"none",fontSize:"13px",padding:"1em",margin:"0",overflowX:"auto",borderRadius:"9px"},r)},n)}}function q(e,t,r){var n=e.properties;return{brick:"eo-link",properties:(0,f.A)((0,f.A)({},n),{},{inApp:"app"===r.app.appType,themeVariant:"elevo"})}}function K(e){var t=e.properties;return{brick:"eo-tag",properties:(0,f.A)((0,f.A)({},t),{},{themeVariant:"elevo"})}}function X(e){var t=e.properties;return{brick:"eo-avatar",properties:(0,f.A)((0,f.A)({},t),{},{themeVariant:"elevo"})}}function Z(e){var t=e.properties;return{brick:"eo-avatar-group",properties:(0,f.A)((0,f.A)({},t),{},{themeVariant:"elevo"})}}function Q(e){var t=e.properties;return{brick:"eo-code-block",properties:(0,f.A)((0,f.A)({},t),{},{themeVariant:"elevo"})}}var ee=0,te=new Map;function re(e,t){return"".concat(function(e){return te.has(e)||te.set(e,"isolated-tpl-".concat(ee++)),te.get(e)}(t)).concat(ae(e))}function ne(e){return"tpl".concat(ae(e))}function ae(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function oe(e,t,r,n){return ie.apply(this,arguments)}function ie(){return ie=(0,c.A)(o().mark((function e(t,r,n,a){var s,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.all(null!==(s=null==t?void 0:t.map(function(){var e=(0,c.A)(o().mark((function e(t){var c,s,u,l,p,f,m,h,v,y,g,b,x;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d(t,"Route")){e.next=1;break}throw new Error("All children of <Routes> must be <Route>.");case 1:if(s=t.properties,u=s.path,l=s.component,"string"==typeof u&&u.startsWith("/")){e.next=2;break}throw new Error('The "path" property of <Route> must be a string starting with "/".');case 2:if(l){e.next=3;break}throw new Error('The "component" property of <Route> is required.');case 3:if(f=(p=l).reference,m=p.name,v="local"===f.type?n.filePath:f.importSource,y=null,r.convertedModules.has(v)?y=r.convertedModules.get(v):((g=r.app.modules.get(v))&&(y=fe(g,r,a)),r.convertedModules.set(v,y)),y){e.next=4;break}throw new Error('Cannot find the module "'.concat(f.importSource,'" imported by the route "').concat(u,'".'));case 4:return"local"===f.type?(b=[].concat((0,i.A)(y.internals),(0,i.A)(y.namedExports.values())),h=b.find((function(e){var t=e.raw;return"function"!==t.type&&"context"!==t.type&&t.component.id&&t.component.id.name===f.name}))):h=f.name?y.namedExports.get(f.name):y.defaultExport,e.next=5,null===(c=h)||void 0===c?void 0:c.promise;case 5:if(x=e.sent){e.next=6;break}throw new Error('Cannot find the component "'.concat(f.name,'" used in the route "').concat(u,'".'));case 6:if("page"===x.type){e.next=7;break}throw new Error('The component "'.concat(f.name,'" used in the route "').concat(u,'" must be a page component.'));case 7:return e.abrupt("return",{path:"${APP.homepage}".concat("/"===u?"":u),alias:m,incrementalSubRoutes:!0,bricks:x.bricks,context:x.context});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()))&&void 0!==s?s:[]);case 1:return(u=e.sent).sort((function(e,t){return t.path.length-e.path.length})),e.abrupt("return",u);case 2:case"end":return e.stop()}}),e)}))),ie.apply(this,arguments)}function ce(e,t){for(var r={},a=0,o=Object.entries(null!==(i=e.lifeCycle)&&void 0!==i?i:{});a<o.length;a++){var i,c=(0,n.A)(o[a],2),s=c[0],u=c[1];switch(s){case"onMount":case"onUnmount":var l=v(u,t);l&&(r[s]=l)}}return Object.keys(r).length>0?r:void 0}var se,ue=["eo-modal","eo-drawer"];function le(e,t,r,n,a){return pe.apply(this,arguments)}function pe(){return(pe=(0,c.A)(o().mark((function e(t,r,n,a,c){var s,u,l,d,f,m,v,y,g,b,x,k,A,E,S,_,M;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=null,!p(t)){e.next=43;break}l=t.reference?t.reference.name:t.name,M=l,e.next="List"===M?1:"Table"===M?3:"Descriptions"===M?5:"Card"===M?7:"Dashboard"===M?9:"Button"===M?11:"Form"===M?13:"Toolbar"===M?15:"Modal"===M?17:"Plaintext"===M?19:"Link"===M?21:"Output"===M?23:"Tag"===M?25:"Avatar"===M?27:"AvatarGroup"===M?29:"CodeBlock"===M?31:"Search"===M||"Input"===M||"NumberInput"===M||"Textarea"===M||"Select"===M||"Radio"===M||"Checkbox"===M||"Switch"===M||"DatePicker"===M||"TimePicker"===M?33:"ForEach"===M?35:"If"===M?37:"Routes"===M?39:"Route"===M?40:41;break;case 1:return e.next=2,w(t);case 2:return u=e.sent,e.abrupt("continue",42);case 3:return e.next=4,L(t,r,n,a,c);case 4:return u=e.sent,e.abrupt("continue",42);case 5:return e.next=6,N(t,r,n,a,c);case 6:return u=e.sent,e.abrupt("continue",42);case 7:return e.next=8,W(t);case 8:return u=e.sent,e.abrupt("continue",42);case 9:return e.next=10,R(t,r,n,a);case 10:return u=e.sent,e.abrupt("continue",42);case 11:return e.next=12,z(t);case 12:return u=e.sent,e.abrupt("continue",42);case 13:return e.next=14,V(t);case 14:return u=e.sent,e.abrupt("continue",42);case 15:return e.next=16,{brick:"eo-flex-layout",properties:{gap:"0.5em",alignItems:"center"}};case 16:return u=e.sent,e.abrupt("continue",42);case 17:return e.next=18,B(t);case 18:return u=e.sent,e.abrupt("continue",42);case 19:return e.next=20,G(t);case 20:return u=e.sent,e.abrupt("continue",42);case 21:return e.next=22,q(t,0,n);case 22:return u=e.sent,e.abrupt("continue",42);case 23:return e.next=24,Y(t);case 24:return u=e.sent,e.abrupt("continue",42);case 25:return e.next=26,K(t);case 26:return u=e.sent,e.abrupt("continue",42);case 27:return e.next=28,X(t);case 28:return u=e.sent,e.abrupt("continue",42);case 29:return e.next=30,Z(t);case 30:return u=e.sent,e.abrupt("continue",42);case 31:return e.next=32,Q(t);case 32:return u=e.sent,e.abrupt("continue",42);case 33:return e.next=34,D(t,de(t.name));case 34:return u=e.sent,e.abrupt("continue",42);case 35:return e.next=36,J(t);case 36:return u=e.sent,e.abrupt("continue",42);case 37:return e.next=38,U(t);case 38:return u=e.sent,e.abrupt("continue",42);case 39:return e.abrupt("return",oe(t.children,n,r,a));case 40:return console.error("<Route> should be a child of <Routes>."),e.abrupt("continue",42);case 41:"app"!==n.app.appType&&!a.allowAnyBricks||t.name.toLowerCase()!==t.name?console.error("Unknown component:",t.name):u={brick:t.name.replaceAll("_",".").replaceAll("--","."),properties:t.properties};case 42:e.next=44;break;case 43:f=t.reference,m=f.type,v=f.importSource,y=f.name,"imported"===m?(b=n.app.modules.get(v),g=y?null==b?void 0:b.namedExports.get(y):null==b?void 0:b.defaultExport):(x=[].concat((0,i.A)(r.internals),(0,i.A)(r.namedExports.values())),g=x.find((function(e){var t;return"template"===e.type&&(null===(t=e.component.id)||void 0===t?void 0:t.name)===y}))),"template"===(null===(d=g)||void 0===d?void 0:d.type)?(k=g.component.id.name,u={brick:"app"===n.app.appType?ne(k):re(k,a.rootId),properties:t.properties}):console.error('Cannot find the component "'.concat(t.reference.name,'".'));case 44:if(u){e.next=45;break}return e.abrupt("return",[]);case 45:if(t.ref&&("template"===c?u.ref=t.ref:(null!==(E=(A=u).properties)&&void 0!==E||(A.properties={}),null!==(_=(S=u.properties).dataset)&&void 0!==_||(S.dataset={}),u.properties.dataset.ref=t.ref)),t.slot&&(u.slot=t.slot),u.events=h(t,a),u.lifeCycle=ce(t,a),null===(s=t.children)||void 0===s||!s.length){e.next=47;break}return e.next=46,Promise.all(t.children.map((function(e){return le(e,r,n,a,c)})));case 46:u.children=e.sent.flat(),("Card"===t.name||"Modal"===t.name)&&u.children.length>0&&(u.children=[{brick:"eo-content-layout",children:u.children}]);case 47:return(t.portal||ue.includes(u.brick))&&(u.portal=!0),t.context&&(u.context=t.context),e.abrupt("return",u);case 48:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){return e.includes("-")?e:"eo".concat(e.replace(/([A-Z])/g,"-$1").toLowerCase())}function fe(e,t,r){if(e.usedHelpers.size>0){var a,o=(0,s.A)(e.usedHelpers);try{for(o.s();!(a=o.n()).done;){var c=a.value;t.usedHelpers.add(c)}}catch(e){o.e(e)}finally{o.f()}}return{sourceModule:e,defaultExport:e.defaultExport?{raw:e.defaultExport,promise:me(e.defaultExport,e,t,r)}:null,namedExports:new Map((0,i.A)(e.namedExports).map((function(a){var o=(0,n.A)(a,2),i=o[0],c=o[1];return[i,{raw:c,promise:me(c,e,t,r)}]}))),internals:e.internals.map((function(n){return{raw:n,promise:me(n,e,t,r)}}))}}function me(e,t,r,n){return he.apply(this,arguments)}function he(){return(he=(0,c.A)(o().mark((function e(t,r,n,a){var i,c,u,l,p,h,v,y,g,b,x,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==t.type&&"context"!==t.type){e.next=1;break}return e.abrupt("return",t);case 1:u=[],l=t.component,p=(0,s.A)(l.bindingMap.values());try{for(p.s();!(h=p.n()).done;)"resource"===(v=h.value).kind?u.push((o=v.resource,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,k=o.name,A=o.http,E=o.api,S=o.params,_=o.tool,M=o.transform,L=o.rejectTransform,T=o.config,C=o.scope,F=o.isRawProvider,N=T&&Object.prototype.hasOwnProperty.call(T,"enabled"),(0,f.A)((0,f.A)({name:k,resolve:(0,f.A)((0,f.A)((0,f.A)((0,f.A)({},F?{useProvider:E,args:S}:A?{useProvider:"basic.http-request",args:[E,S]}:_?{useProvider:"ai-portal.call-tool",args:[_,S]}:(0,f.A)({useProvider:"".concat(E,":*"),params:S},"easyops.api.data_exchange.olap@Query"===E&&(0,m.isObject)(S)?{params:(0,f.A)((0,f.A)({},S),{},{translate:["#showKey"],limit:void 0,limitBy:void 0,order:void 0,displayName:!0})}:null)),M?{transform:{value:M}}:null),L?{onReject:{transform:{value:L}}}:null),N?{if:T.enabled}:null),track:!0},N?{value:T.fallback}:null),"template"===C?{expose:!1}:null))):"state"!==v.kind&&"constant"!==v.kind&&"param"!==v.kind||u.push({name:v.id.name,value:v.initialValue,expose:"param"===v.kind,track:!0})}catch(e){p.e(e)}finally{p.f()}if("view"===t.type?(b=null===(g=l.children)||void 0===g?void 0:g.find((function(e){return d(e,"View")})))&&(y=b.children):y=l.children,null===(i=y)||void 0===i||!i.length){e.next=3;break}return e.next=2,Promise.all(y.map((function(e){return le(e,r,n,a,t.type)})));case 2:w=e.sent.flat(),e.next=4;break;case 3:w=[];case 4:return x=w,e.abrupt("return",{type:t.type,bricks:x,context:u,name:null===(c=l.id)||void 0===c?void 0:c.name,proxy:l.proxy,title:t.title});case 5:case"end":return e.stop()}var o,k,A,E,S,_,M,L,T,C,F,N}),e)})))).apply(this,arguments)}function ve(e){return e.replace(/^export /m,"").replace(/^import [^\n]+\n/gm,"")}function ye(e,t){return{brick:"div",properties:{style:t.expanded?{background:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(10px)",borderRadius:"16px",padding:"24px"}:{background:"var(--elevo-component-background)",backdropFilter:"var(--elevo-component-backdrop-filter)",borderRadius:"var(--elevo-border-radius)",padding:"16px"}},children:e}}function ge(e,t){return be.apply(this,arguments)}function be(){return be=(0,c.A)(o().mark((function e(t,r){var a,s,u,l,p,d,f,m,h,v,y,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=t.entry){e.next=1;break}throw new Error("No entry module found in the view.");case 1:return l={usedHelpers:new Set,app:t,convertedModules:new Map},p=[],d=[],e.next=2,Promise.all(Array.from(t.modules.values()).map(function(){var e=(0,c.A)(o().mark((function e(t){var n,a,c,f,m,h,v,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=8;break}return e.next=1,fe(t,l,r);case 1:n=e.sent,t===s&&(u=n),a=0,c=[].concat((0,i.A)(n.internals),(0,i.A)(n.namedExports.values()),[n.defaultExport]);case 2:if(!(a<c.length)){e.next=8;break}if(f=c[a]){e.next=3;break}return e.abrupt("continue",7);case 3:m=f.raw,h=f.promise,y=null==m?void 0:m.type,e.next="function"===y?4:"template"===y?5:7;break;case 4:return p.push(m.function),e.abrupt("continue",7);case 5:return e.next=6,h;case 6:return v=e.sent,d.push({name:re(v.name,r.rootId),bricks:v.bricks,state:v.context}),e.abrupt("continue",7);case 7:a++,e.next=2;break;case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:if(null!==(a=u)&&void 0!==a&&a.defaultExport){e.next=3;break}throw new Error("No view found in the entry module.");case 3:return f=Array.from(l.usedHelpers).map((function(e){var t=(se||(se=new Map([["_helper_mergeTexts",ve('export function mergeTexts(\n ...items: (\n | { type: "text"; text: string }\n | { type: "expression"; value: unknown }\n )[]\n): string {\n function mergeValuesAsText(value: unknown): string {\n if (Array.isArray(value)) {\n return value.map(mergeValuesAsText).join("");\n }\n const type = typeof value;\n if (type === "string" || type === "number") {\n return String(value);\n }\n if (type === "object" && value !== null) {\n throw new Error("Can not render object as text");\n }\n return "";\n }\n\n const texts: string[] = [];\n for (const item of items) {\n if (item.type === "text") {\n texts.push(item.text.trim());\n } else {\n texts.push(mergeValuesAsText(item.value));\n }\n }\n return texts.join("");\n}\n')],["_helper_getLatestMetricValue",ve('import { pipes as PIPES } from "@easyops-cn/brick-next-pipes";\n\nexport function getLatestMetricValue(\n list: Record<string, any>[] | undefined,\n {\n metric,\n precision,\n }: { metric: { id: string; unit: string }; precision?: number }\n) {\n const value = list?.findLast?.((item) => item[metric.id] != null)?.[\n metric.id\n ];\n const unit = metric.unit === "load" ? "" : metric.unit;\n return PIPES.unitFormat(value, unit, precision).join("");\n}\n')],["_helper_extractList",ve("export function extractList<T = unknown>(data: T[] | { list: T[] }): T[] {\n if (Array.isArray(data)) {\n return data;\n }\n return data?.list;\n}\n")],["_helper_groupMetricData",ve("export function groupMetricData(\n list: Record<string, any>[],\n groupField: string\n) {\n if (!list || !Array.isArray(list) || list.length === 0) {\n return [];\n }\n const grouped = new Map<\n string,\n { group: string; list: Record<string, any>[] }\n >();\n for (const item of list) {\n const key = item[groupField];\n let groupedList = grouped.get(key);\n if (!groupedList) {\n grouped.set(key, (groupedList = { group: key, list: [] }));\n }\n groupedList.list.push(item);\n }\n return Array.from(grouped.values());\n}\n")],["_helper_getMetricDisplayNames",ve("export function getMetricDisplayNames(\n displayNameList:\n | { metric_name: string; metric_display_name: string }[]\n | undefined,\n metricNames: string[]\n): string[] {\n return metricNames.map(\n (metricName) =>\n displayNameList?.find((item) => item.metric_name === metricName)\n ?.metric_display_name ?? metricName\n );\n}\n")]])),se).get(e);if(!t)throw new Error("Helper function ".concat(e," not found"));return{name:e,source:t,typescript:!0}})),e.next=4,u.defaultExport.promise;case 4:return m=e.sent,h=m.title,v=m.bricks,y=m.context,g=function(){return v.every((function(e){return["eo-form","eo-descriptions","eo-button"].includes(e.brick)}))},e.abrupt("return",{title:h,brick:r.withoutWrapper?v:{brick:"eo-content-layout",children:g()?[ye(v,r)]:v},context:[].concat((0,i.A)(y),(0,i.A)(r.withContexts?Object.entries(r.withContexts).map((function(e){var t=(0,n.A)(e,2);return{name:t[0],value:t[1]}})):[])),functions:[].concat(p,(0,i.A)(f)),templates:d});case 5:case"end":return e.stop()}}),e)}))),be.apply(this,arguments)}},73656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},86330:(e,t,r)=>{function n(e,t,r,n,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var i=e.apply(t,r);function c(e){n(i,a,o,c,s,"next",e)}function s(e){n(i,a,o,c,s,"throw",e)}c(void 0)}))}}r.d(t,{A:()=>a})},88128:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},93051:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}}}]);
3
+ //# sourceMappingURL=7888.c0645842.js.map
@@ -0,0 +1,7 @@
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
2
+
3
+ /**
4
+ * @license
5
+ * Copyright 2019 Google LLC
6
+ * SPDX-License-Identifier: Apache-2.0
7
+ */