import{C as t,S as s,a as i,b as o,V as n,L as a}from"./p-6e1ab235.js";import{c as e}from"./p-6a334573.js";import{i as c}from"./p-8b5d3a52.js";function r(){return function(o,n){var a;Object.defineProperty(o,n,{set:(a=n,function(o){this[t]||(this[t]=new Map),this[t].set(a,o),o[s]=this,function(t,s){const o=t.constructor.prototype;if(o[i])for(const n of o[i])s[n.componentMethodName]=u(s,t,s[n.componentMethodName],n)}(o,this)})})}}function u(t,s,i,n){return function(...a){const e=i.apply(t,a);return s[o]=n.componentMethodName,e&&"function"==typeof e.then?e.then((()=>s[n.slimmerMethodName].call(s,...a))):s[n.slimmerMethodName].call(s,...a),e}}class f extends n{constructor(t,s){super(),this.className=t,this.usageDefinitions=s}sendPublicAPIPayloadToTelemetry(t){try{const s=this.getPublicAPIMetricsPayload(t);s&&import("./p-982747ef.js").then((t=>{t.default.emit("publicAPIMetrics",s)}))}catch(t){a.log("Public API payload failed to emit telemetry:",t)}}getPublicAPIMetricsPayload(t){const s={};return this.usageDefinitions.filter((s=>s.canAccept(this.className,this[o],t))).forEach((i=>{s[i.payloadKey]=i.payloadValue(t)})),c(s)?null:{publicAPIName:this.className,data:s}}}function l(t,s,i){const o=[];return s.map((t=>o.push({mapFrom:t,mapTo:"sendPublicAPIPayloadToTelemetry"}))),e(t,f,[],o,[t.name,i])}export{r as I,l as c}