@mochabug/adapt-sdk 0.4.24 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +14 -13
- package/dist/api/index.d.ts.map +1 -1
- package/dist/cjs/api.cjs +1 -1
- package/dist/cjs/api.cjs.map +4 -4
- package/dist/cjs/react.cjs +1 -1
- package/dist/cjs/react.cjs.map +3 -3
- package/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +4 -4
- package/dist/esm/api.mjs +1 -1
- package/dist/esm/api.mjs.map +4 -4
- package/dist/esm/react.mjs +1 -1
- package/dist/esm/react.mjs.map +4 -4
- package/dist/esm/router.mjs +1 -1
- package/dist/esm/router.mjs.map +4 -4
- package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts +9 -9
- package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts.map +1 -1
- package/dist/genproto/mochabugapis/adapt/graph/v1/exchange_pb.d.ts +96 -0
- package/dist/genproto/mochabugapis/adapt/graph/v1/exchange_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{jtd_schema_pb.d.ts → v1/jtd_schema_pb.d.ts} +18 -18
- package/dist/genproto/mochabugapis/adapt/graph/v1/jtd_schema_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{receiver_pb.d.ts → v1/receiver_pb.d.ts} +22 -10
- package/dist/genproto/mochabugapis/adapt/graph/v1/receiver_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{signal_binding_pb.d.ts → v1/signal_binding_pb.d.ts} +13 -13
- package/dist/genproto/mochabugapis/adapt/graph/v1/signal_binding_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{signal_data_pb.d.ts → v1/signal_data_pb.d.ts} +6 -6
- package/dist/genproto/mochabugapis/adapt/graph/v1/signal_data_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{signal_descriptor_pb.d.ts → v1/signal_descriptor_pb.d.ts} +8 -8
- package/dist/genproto/mochabugapis/adapt/graph/v1/signal_descriptor_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{signal_format_pb.d.ts → v1/signal_format_pb.d.ts} +9 -9
- package/dist/genproto/mochabugapis/adapt/graph/v1/signal_format_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/v1/transceiver_pb.d.ts +81 -0
- package/dist/genproto/mochabugapis/adapt/graph/v1/transceiver_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{transmitter_pb.d.ts → v1/transmitter_pb.d.ts} +27 -15
- package/dist/genproto/mochabugapis/adapt/graph/v1/transmitter_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/v1/user_defined_exchange_options_pb.d.ts +514 -0
- package/dist/genproto/mochabugapis/adapt/graph/v1/user_defined_exchange_options_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/graph/{vertex_metadata_pb.d.ts → v1/vertex_metadata_pb.d.ts} +16 -16
- package/dist/genproto/mochabugapis/adapt/graph/v1/vertex_metadata_pb.d.ts.map +1 -0
- package/dist/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts +3 -3
- package/dist/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts.map +1 -1
- package/dist/genproto/mochabugapis/adapt/runtime/v1/configurator_service_pb.d.ts +16 -16
- package/dist/genproto/mochabugapis/adapt/runtime/v1/configurator_service_pb.d.ts.map +1 -1
- package/dist/genproto/mochabugapis/adapt/runtime/v1/executor_service_pb.d.ts +12 -12
- package/dist/genproto/mochabugapis/adapt/runtime/v1/executor_service_pb.d.ts.map +1 -1
- package/dist/genproto/mochabugapis/adapt/runtime/v1/fileforge_service_pb.d.ts +29 -29
- package/dist/genproto/mochabugapis/adapt/runtime/v1/fileforge_service_pb.d.ts.map +1 -1
- package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.d.ts +32 -5
- package/dist/genproto/mochabugapis/adapt/runtime/v1/incoming_pb.d.ts.map +1 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/router/index.d.ts +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts +0 -77
- package/dist/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts +0 -77
- package/dist/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/user_defined_exchange_options_pb.d.ts +0 -353
- package/dist/genproto/mochabugapis/adapt/graph/user_defined_exchange_options_pb.d.ts.map +0 -1
- package/dist/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts.map +0 -1
package/dist/cjs/react.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var ee=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var Ve=Object.prototype.hasOwnProperty;var Ge=(s,e)=>{for(var t in e)ee(s,t,{get:e[t],enumerable:!0})},Ue=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Je(e))!Ve.call(s,n)&&n!==t&&ee(s,n,{get:()=>e[n],enumerable:!(i=We(e,n))||i.enumerable});return s};var Qe=s=>Ue(ee({},"__esModule",{value:!0}),s);var $t={};Ge($t,{FormatChip:()=>Pe,FormatViewer:()=>ze,SignalGroupHeader:()=>Te,SignalOption:()=>je,SignalSearch:()=>Ee,SignalSelector:()=>Nt,createSignalFilter:()=>Bt,flattenSignals:()=>xt,getFormatLabel:()=>Oe,getSchemaDescription:()=>Re,isArraySchema:()=>bt,isEmptySchema:()=>Le,isPrimitiveSchema:()=>q,signalReferenceKey:()=>Z});module.exports=Qe($t);var E=require("react");function O(s){return Array.isArray?Array.isArray(s):be(s)==="[object Array]"}function Ye(s){if(typeof s=="string")return s;if(typeof s=="bigint")return s.toString();let e=s+"";return e=="0"&&1/s==-1/0?"-0":e}function te(s){return s==null?"":Ye(s)}function M(s){return typeof s=="string"}function G(s){return typeof s=="number"}function Xe(s){return s===!0||s===!1||Ze(s)&&be(s)=="[object Boolean]"}function Ie(s){return typeof s=="object"}function Ze(s){return Ie(s)&&s!==null}function k(s){return s!=null}function V(s){return!s.trim().length}function be(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}var qe="Incorrect 'index' type",et=s=>`Invalid value for key ${s}`,tt=s=>`Pattern length exceeds max of ${s}.`,st=s=>`Missing ${s} property in key`,nt=s=>`Property 'weight' in key '${s}' must be a positive integer`,ye=Object.prototype.hasOwnProperty,se=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Be(i);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Be(s){let e=null,t=null,i=null,n=1,r=null;if(M(s)||O(s))i=s,e=Me(s),t=ne(s);else{if(!ye.call(s,"name"))throw new Error(st("name"));let o=s.name;if(i=o,ye.call(s,"weight")&&(n=s.weight,n<=0))throw new Error(nt(o));e=Me(o),t=ne(o),r=s.getFn}return{path:e,id:t,weight:n,src:i,getFn:r}}function Me(s){return O(s)?s:s.split(".")}function ne(s){return O(s)?s.join("."):s}function it(s,e){let t=[],i=!1,n=(r,o,a,c)=>{if(k(r))if(!o[a])t.push(c!==void 0?{v:r,i:c}:r);else{let h=o[a],l=r[h];if(!k(l))return;if(a===o.length-1&&(M(l)||G(l)||Xe(l)||typeof l=="bigint"))t.push(c!==void 0?{v:te(l),i:c}:te(l));else if(O(l)){i=!0;for(let d=0,f=l.length;d<f;d+=1)n(l[d],o,a+1,d)}else o.length&&n(l,o,a+1,c)}};return n(s,M(e)?e.split("."):e,0),i?t:t[0]}var rt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ot={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(s,e)=>s.score===e.score?s.idx<e.idx?-1:1:s.score<e.score?-1:1},at={location:0,threshold:.6,distance:100},ct={useExtendedSearch:!1,useTokenSearch:!1,getFn:it,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},p=Object.freeze({...ot,...rt,...at,...ct}),lt=/[^ ]+/g;function ut(s=1,e=3){let t=new Map,i=Math.pow(10,e);return{get(n){let r=n.match(lt).length;if(t.has(r))return t.get(r);let o=1/Math.pow(r,.5*s),a=parseFloat(Math.round(o*i)/i);return t.set(r,a),a},clear(){t.clear()}}}var H=class{constructor({getFn:e=p.getFn,fieldNormWeight:t=p.fieldNormWeight}={}){this.norm=ut(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,M(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();M(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let t=0,i=this.records.length;t<i;t+=1)this.records[t].i=t}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!k(e)||V(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,r)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(k(o)){if(O(o)){let a=[];for(let c=0,h=o.length;c<h;c+=1){let l=o[c];if(k(l)){if(M(l)){if(!V(l)){let d={v:l,i:c,n:this.norm.get(l)};a.push(d)}}else if(k(l.v)){let d=M(l.v)?l.v:te(l.v);if(!V(d)){let f={v:d,i:l.i,n:this.norm.get(d)};a.push(f)}}}}i.$[r]=a}else if(M(o)&&!V(o)){let a={v:o,n:this.norm.get(o)};i.$[r]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function xe(s,e,{getFn:t=p.getFn,fieldNormWeight:i=p.fieldNormWeight}={}){let n=new H({getFn:t,fieldNormWeight:i});return n.setKeys(s.map(Be)),n.setSources(e),n.create(),n}function ht(s,{getFn:e=p.getFn,fieldNormWeight:t=p.fieldNormWeight}={}){let{keys:i,records:n}=s,r=new H({getFn:e,fieldNormWeight:t});return r.setKeys(i),r.setIndexRecords(n),r}function dt(s=[],e=p.minMatchCharLength){let t=[],i=-1,n=-1,r=0;for(let o=s.length;r<o;r+=1){let a=s[r];a&&i===-1?i=r:!a&&i!==-1&&(n=r-1,n-i+1>=e&&t.push([i,n]),i=-1)}return s[r-1]&&r-i>=e&&t.push([i,r-1]),t}var K=32;function ft(s,e,t,{location:i=p.location,distance:n=p.distance,threshold:r=p.threshold,findAllMatches:o=p.findAllMatches,minMatchCharLength:a=p.minMatchCharLength,includeMatches:c=p.includeMatches,ignoreLocation:h=p.ignoreLocation}={}){if(e.length>K)throw new Error(tt(K));let l=e.length,d=s.length,f=Math.max(0,Math.min(i,d)),u=r,v=f,A=(S,F)=>{let w=S/l;if(h)return w;let P=Math.abs(f-F);return n?w+P/n:P?1:w},C=a>1||c,y=C?Array(d):[],I;for(;(I=s.indexOf(e,v))>-1;){let S=A(0,I);if(u=Math.min(S,u),v=I+l,C){let F=0;for(;F<l;)y[I+F]=1,F+=1}}v=-1;let _=[],b=1,L=l+d,T=1<<l-1;for(let S=0;S<l;S+=1){let F=0,w=L;for(;F<w;)A(S,f+w)<=u?F=w:L=w,w=Math.floor((L-F)/2+F);L=w;let P=Math.max(1,f-w+1),z=o?d:Math.min(f+w,d)+l,$=Array(z+2);$[z+1]=(1<<S)-1;for(let D=z;D>=P;D-=1){let B=D-1,R=t[s[B]];if(C&&(y[B]=+!!R),$[D]=($[D+1]<<1|1)&R,S&&($[D]|=(_[D+1]|_[D])<<1|1|_[D+1]),$[D]&T&&(b=A(S,B),b<=u)){if(u=b,v=B,v<=f)break;P=Math.max(1,2*f-v)}}if(A(S+1,f)>u)break;_=$}let j={isMatch:v>=0,score:Math.max(.001,b)};if(C){let S=dt(y,a);S.length?c&&(j.indices=S):j.isMatch=!1}return j}function gt(s){let e={};for(let t=0,i=s.length;t<i;t+=1){let n=s.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}function Ce(s){if(s.length<=1)return s;s.sort((t,i)=>t[0]-i[0]||t[1]-i[1]);let e=[s[0]];for(let t=1,i=s.length;t<i;t+=1){let n=e[e.length-1],r=s[t];r[0]<=n[1]+1?n[1]=Math.max(n[1],r[1]):e.push(r)}return e}var Ne={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00F8:"o",\u00D8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00DF:"ss"},pt=new RegExp("["+Object.keys(Ne).join("")+"]","g"),W=String.prototype.normalize?s=>s.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(pt,e=>Ne[e]):s=>s,J=class{constructor(e,{location:t=p.location,threshold:i=p.threshold,distance:n=p.distance,includeMatches:r=p.includeMatches,findAllMatches:o=p.findAllMatches,minMatchCharLength:a=p.minMatchCharLength,isCaseSensitive:c=p.isCaseSensitive,ignoreDiacritics:h=p.ignoreDiacritics,ignoreLocation:l=p.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:l},e=c?e:e.toLowerCase(),e=h?W(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let d=(u,v)=>{this.chunks.push({pattern:u,alphabet:gt(u),startIndex:v})},f=this.pattern.length;if(f>K){let u=0,v=f%K,A=f-v;for(;u<A;)d(this.pattern.substr(u,K),u),u+=K;if(v){let C=f-K;d(this.pattern.substr(C),C)}}else d(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:i,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=i?W(e):e,this.pattern===e){let A={isMatch:!0,score:0};return n&&(A.indices=[[0,e.length-1]]),A}let{location:r,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:h,ignoreLocation:l}=this.options,d=[],f=0,u=!1;this.chunks.forEach(({pattern:A,alphabet:C,startIndex:y})=>{let{isMatch:I,score:_,indices:b}=ft(e,A,C,{location:r+y,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:h,includeMatches:n,ignoreLocation:l});I&&(u=!0),f+=_,I&&b&&d.push(...b)});let v={isMatch:u,score:u?f/this.chunks.length:1};return u&&n&&(v.indices=Ce(d)),v}},N=class{constructor(e){this.pattern=e}static isMultiMatch(e){return _e(e,this.multiRegex)}static isSingleMatch(e){return _e(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function _e(s,e){let t=s.match(e);return t?t[1]:null}var ie=class extends N{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},re=class extends N{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}},oe=class extends N{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ae=class extends N{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},ce=class extends N{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},le=class extends N{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},U=class extends N{constructor(e,{location:t=p.location,threshold:i=p.threshold,distance:n=p.distance,includeMatches:r=p.includeMatches,findAllMatches:o=p.findAllMatches,minMatchCharLength:a=p.minMatchCharLength,isCaseSensitive:c=p.isCaseSensitive,ignoreDiacritics:h=p.ignoreDiacritics,ignoreLocation:l=p.ignoreLocation}={}){super(e),this._bitapSearch=new J(e,{location:t,threshold:i,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},Q=class extends N{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i,n=[],r=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+r,n.push([i,t-1]);let o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}},ue=[ie,Q,oe,ae,le,ce,re,U],Fe=ue.length,mt="\0",At="|";function vt(s){let e=[],t=s.length,i=0;for(;i<t;){for(;i<t&&s[i]===" ";)i++;if(i>=t)break;let n=i;for(;n<t&&s[n]!==" "&&s[n]!=='"';)n++;if(n<t&&s[n]==='"'){for(n++;n<t;){if(s[n]==='"'){let r=n+1;if(r>=t||s[r]===" "){n++;break}if(s[r]==="$"&&(r+1>=t||s[r+1]===" ")){n+=2;break}}n++}e.push(s.substring(i,n)),i=n}else{for(;n<t&&s[n]!==" ";)n++;e.push(s.substring(i,n)),i=n}}return e}function Ct(s,e={}){return s.replace(/\\\|/g,mt).split(At).map(i=>{let n=i.replace(/\u0000/g,"|"),r=vt(n.trim()).filter(a=>a&&!!a.trim()),o=[];for(let a=0,c=r.length;a<c;a+=1){let h=r[a],l=!1,d=-1;for(;!l&&++d<Fe;){let f=ue[d],u=f.isMultiMatch(h);u&&(o.push(new f(u,e)),l=!0)}if(!l)for(d=-1;++d<Fe;){let f=ue[d],u=f.isSingleMatch(h);if(u){o.push(new f(u,e));break}}}return o})}var Dt=new Set([U.type,Q.type]),he=class{constructor(e,{isCaseSensitive:t=p.isCaseSensitive,ignoreDiacritics:i=p.ignoreDiacritics,includeMatches:n=p.includeMatches,minMatchCharLength:r=p.minMatchCharLength,ignoreLocation:o=p.ignoreLocation,findAllMatches:a=p.findAllMatches,location:c=p.location,threshold:h=p.threshold,distance:l=p.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:n,minMatchCharLength:r,findAllMatches:a,ignoreLocation:o,location:c,threshold:h,distance:l},e=t?e:e.toLowerCase(),e=i?W(e):e,this.pattern=e,this.query=Ct(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:i,isCaseSensitive:n,ignoreDiacritics:r}=this.options;e=n?e:e.toLowerCase(),e=r?W(e):e;let o=0,a=[],c=0,h=!1;for(let l=0,d=t.length;l<d;l+=1){let f=t[l];a.length=0,o=0,h=!1;for(let u=0,v=f.length;u<v;u+=1){let A=f[u],{isMatch:C,indices:y,score:I}=A.search(e);if(C){o+=1,c+=I;let _=A.constructor.type;_.startsWith("inverse")&&(h=!0),i&&(Dt.has(_)?a.push(...y):a.push(y))}else{c=0,o=0,a.length=0,h=!1;break}}if(o){let u={isMatch:!0,score:c/o};return h&&(u.hasInverse=!0),i&&(u.indices=Ce(a)),u}}return{isMatch:!1,score:1}}},de=[];function De(...s){de.push(...s)}function Y(s,e){for(let t=0,i=de.length;t<i;t+=1){let n=de[t];if(n.condition(s,e))return new n(s,e)}return new J(s,e)}var X={AND:"$and",OR:"$or"},fe={PATH:"$path",PATTERN:"$val"},ge=s=>!!(s[X.AND]||s[X.OR]),Et=s=>!!s[fe.PATH],St=s=>!O(s)&&Ie(s)&&!ge(s),we=s=>({[X.AND]:Object.keys(s).map(e=>({[e]:s[e]}))});function $e(s,e,{auto:t=!0}={}){let i=n=>{if(M(n)){let c={keyId:null,pattern:n};return t&&(c.searcher=Y(n,e)),c}let r=Object.keys(n),o=Et(n);if(!o&&r.length>1&&!ge(n))return i(we(n));if(St(n)){let c=o?n[fe.PATH]:r[0],h=o?n[fe.PATTERN]:n[c];if(!M(h))throw new Error(et(c));let l={keyId:ne(c),pattern:h};return t&&(l.searcher=Y(h,e)),l}let a={children:[],operator:r[0]};return r.forEach(c=>{let h=n[c];O(h)&&h.forEach(l=>{a.children.push(i(l))})}),a};return ge(s)||(s=we(s)),i(s)}function pe(s,{ignoreFieldNorm:e=p.ignoreFieldNorm}){let t=1;return s.forEach(({key:i,norm:n,score:r})=>{let o=i?i.weight:null;t*=Math.pow(r===0&&o?Number.EPSILON:r,(o||1)*(e?1:n))}),t}function yt(s,{ignoreFieldNorm:e=p.ignoreFieldNorm}){s.forEach(t=>{t.score=pe(t.matches,{ignoreFieldNorm:e})})}var me=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let i=e-1>>1;if(t[e].score<=t[i].score)break;let n=t[e];t[e]=t[i],t[i]=n,e=i}}_sinkDown(e){let t=this.heap,i=t.length,n=e;do{e=n;let r=2*e+1,o=2*e+2;if(r<i&&t[r].score>t[n].score&&(n=r),o<i&&t[o].score>t[n].score&&(n=o),n!==e){let a=t[e];t[e]=t[n],t[n]=a}}while(n!==e)}};function Mt(s,e){let t=s.matches;e.matches=[],k(t)&&t.forEach(i=>{if(!k(i.indices)||!i.indices.length)return;let{indices:n,value:r}=i,o={indices:n,value:r};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function _t(s,e){e.score=s.score}function Ft(s,e,{includeMatches:t=p.includeMatches,includeScore:i=p.includeScore}={}){let n=[];return t&&n.push(Mt),i&&n.push(_t),s.map(r=>{let{idx:o}=r,a={item:e[o],refIndex:o};return n.length&&n.forEach(c=>{c(r,a)}),a})}var wt=/\b\w+\b/g;function Ae({isCaseSensitive:s=!1,ignoreDiacritics:e=!1}={}){return{tokenize(t){return s||(t=t.toLowerCase()),e&&(t=W(t)),t.match(wt)||[]}}}function kt(s,e,t){let i=new Map,n=new Map,r=0;function o(a,c,h,l){let d=t.tokenize(a);if(!d.length)return;r++;let f=new Map;for(let u of d)f.set(u,(f.get(u)||0)+1);for(let[u,v]of f){let A={docIdx:c,keyIdx:h,subIdx:l,tf:v},C=i.get(u);C||(C=[],i.set(u,C)),C.push(A),n.set(u,(n.get(u)||0)+1)}}for(let a of s){let{i:c,v:h,$:l}=a;if(h!==void 0){o(h,c,-1,-1);continue}if(l)for(let d=0;d<e;d++){let f=l[d];if(f)if(Array.isArray(f))for(let u of f)o(u.v,c,d,u.i??-1);else o(f.v,c,d,-1)}}return{terms:i,fieldCount:r,df:n}}function It(s,e,t,i){let{i:n,v:r,$:o}=e;function a(c,h,l){let d=i.tokenize(c);if(!d.length)return;s.fieldCount++;let f=new Map;for(let u of d)f.set(u,(f.get(u)||0)+1);for(let[u,v]of f){let A={docIdx:n,keyIdx:h,subIdx:l,tf:v},C=s.terms.get(u);C||(C=[],s.terms.set(u,C)),C.push(A),s.df.set(u,(s.df.get(u)||0)+1)}}if(r!==void 0){a(r,-1,-1);return}if(o)for(let c=0;c<t;c++){let h=o[c];if(h)if(Array.isArray(h))for(let l of h)a(l.v,c,l.i??-1);else a(h.v,c,-1)}}function ke(s,e){for(let[t,i]of s.terms){let n=i.filter(o=>o.docIdx!==e),r=i.length-n.length;r>0&&(s.fieldCount-=r,s.df.set(t,(s.df.get(t)||0)-r),n.length===0?(s.terms.delete(t),s.df.delete(t)):s.terms.set(t,n))}}var x=class{constructor(e,t,i){this.options={...p,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new se(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,i),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,i=Y(e,t);return this._lastQuery=e,this._lastSearcher=i,i}setCollection(e,t){if(this._docs=e,t&&!(t instanceof H))throw new Error(qe);if(this._myIndex=t||xe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let i=Ae({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=kt(this._myIndex.records,this._myIndex.keys.length,i)}}add(e){if(k(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let t=this._myIndex.records[this._myIndex.records.length-1],i=Ae({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});It(this._invertedIndex,t,this._myIndex.keys.length,i)}}remove(e=()=>!1){let t=[],i=[];for(let n=0,r=this._docs.length;n<r;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),i.push(n));if(i.length){if(this._invertedIndex)for(let n of i)ke(this._invertedIndex,n);for(let n=i.length-1;n>=0;n-=1)this._docs.splice(i[n],1);this._myIndex.removeAll(i)}return t}removeAt(e){this._invertedIndex&&ke(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:i=-1}=t||{},{includeMatches:n,includeScore:r,shouldSort:o,sortFn:a,ignoreFieldNorm:c}=this.options;if(M(e)&&!e.trim()){let d=this._docs.map((f,u)=>({item:f,refIndex:u}));return G(i)&&i>-1&&(d=d.slice(0,i)),d}let h=G(i)&&i>0&&M(e),l;if(h){let d=new me(i);M(this._docs[0])?this._searchStringList(e,{heap:d,ignoreFieldNorm:c}):this._searchObjectList(e,{heap:d,ignoreFieldNorm:c}),l=d.extractSorted(a)}else l=M(e)?M(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),yt(l,{ignoreFieldNorm:c}),o&&l.sort(a),G(i)&&i>-1&&(l=l.slice(0,i));return Ft(l,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e,{heap:t,ignoreFieldNorm:i}={}){let n=this._getSearcher(e),{records:r}=this._myIndex,o=t?null:[];return r.forEach(({v:a,i:c,n:h})=>{if(!k(a))return;let{isMatch:l,score:d,indices:f}=n.searchIn(a);if(l){let u={item:a,idx:c,matches:[{score:d,value:a,norm:h,indices:f}]};t?(u.score=pe(u.matches,{ignoreFieldNorm:i}),t.shouldInsert(u.score)&&t.insert(u)):o.push(u)}}),o}_searchLogical(e){let t=$e(e,this.options),i=(a,c,h)=>{if(!("children"in a)){let{keyId:u,searcher:v}=a,A;return u===null?(A=[],this._myIndex.keys.forEach((C,y)=>{A.push(...this._findMatches({key:C,value:c[y],searcher:v}))})):A=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(c,u),searcher:v}),A&&A.length?[{idx:h,item:c,matches:A}]:[]}let{children:l,operator:d}=a,f=[];for(let u=0,v=l.length;u<v;u+=1){let A=l[u],C=i(A,c,h);if(C.length)f.push(...C);else if(d===X.AND)return[]}return f},n=this._myIndex.records,r=new Map,o=[];return n.forEach(({$:a,i:c})=>{if(k(a)){let h=i(t,a,c);h.length&&(r.has(c)||(r.set(c,{idx:c,item:a,matches:[]}),o.push(r.get(c))),h.forEach(({matches:l})=>{r.get(c).matches.push(...l)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:i}={}){let n=this._getSearcher(e),{keys:r,records:o}=this._myIndex,a=t?null:[];return o.forEach(({$:c,i:h})=>{if(!k(c))return;let l=[],d=!1,f=!1;if(r.forEach((u,v)=>{let A=this._findMatches({key:u,value:c[v],searcher:n});A.length?(l.push(...A),A[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&l.length){let u={idx:h,item:c,matches:l};t?(u.score=pe(u.matches,{ignoreFieldNorm:i}),t.shouldInsert(u.score)&&t.insert(u)):a.push(u)}}),a}_findMatches({key:e,value:t,searcher:i}){if(!k(t))return[];let n=[];if(O(t))t.forEach(({v:r,i:o,n:a})=>{if(!k(r))return;let{isMatch:c,score:h,indices:l,hasInverse:d}=i.searchIn(r);c&&n.push({score:h,key:e,value:r,idx:o,norm:a,indices:l,hasInverse:d})});else{let{v:r,n:o}=t,{isMatch:a,score:c,indices:h,hasInverse:l}=i.searchIn(r);a&&n.push({score:c,key:e,value:r,norm:o,indices:h,hasInverse:l})}return n}},ve=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Ae({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let i=this.analyzer.tokenize(e),n=t._invertedIndex,{df:r,fieldCount:o}=n;this.termSearchers=[],this.idfWeights=[];for(let a of i){this.termSearchers.push(new J(a,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let c=r.get(a)||0,h=Math.log(1+(o-c+.5)/(c+.5));this.idfWeights.push(h)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],i=0,n=0,r=0;for(let c=0;c<this.termSearchers.length;c++){let h=this.termSearchers[c].searchIn(e),l=this.idfWeights[c];n+=l,h.isMatch&&(r++,i+=l*(1-h.score),h.indices&&t.push(...h.indices))}if(r===0)return{isMatch:!1,score:1};let o=n>0?1-i/n:0,a={isMatch:!0,score:Math.max(.001,o)};return this.options.includeMatches&&t.length&&(a.indices=Ce(t)),a}};x.version="7.3.0";x.createIndex=xe;x.parseIndex=ht;x.config=p;x.match=function(s,e,t){return Y(s,{...p,...t}).searchIn(e)};x.parseQuery=$e;De(he);De(ve);x.use=function(...s){s.forEach(e=>De(e))};var g=require("react/jsx-runtime");function q(s){return s.type?!(Array.isArray(s.enum)&&s.enum.length>0)&&!s.elements&&!(s.properties&&Object.keys(s.properties).length>0)&&!(s.optionalProperties&&Object.keys(s.optionalProperties).length>0)&&!s.values&&!s.discriminator&&!s.ref:!1}function Le(s){return!s.type&&!s.enum&&!s.elements&&!s.properties&&!s.optionalProperties&&!s.values&&!s.discriminator&&!s.ref}function bt(s){return s.elements!==void 0}function Re(s){return q(s)?s.type:s.enum?`enum (${s.enum.length} values)`:s.elements?"array":s.properties||s.optionalProperties?`object (${(s.properties?Object.keys(s.properties).length:0)+(s.optionalProperties?Object.keys(s.optionalProperties).length:0)} properties)`:s.values?"map":s.discriminator?"discriminated union":s.ref?`ref: ${s.ref}`:Le(s)?"empty schema":"complex schema"}function Oe(s){return s.mimeType?s.mimeType:s.jtdSchema?Re(s.jtdSchema):"unknown"}var Ee=class{fuse;data;constructor(e){this.fuse=new x(e,{includeScore:!1,threshold:.3,ignoreLocation:!0,useExtendedSearch:!0,keys:[{name:"node",weight:5},{name:"nodeLabel",weight:5},{name:"nodeDescription",weight:2},{name:"transmitter",weight:5},{name:"transmitterDescription",weight:2},{name:"signal.name",weight:5},{name:"signal.label",weight:5},{name:"signal.description",weight:2}]}),this.data=e}search(e){if(!e||e.trim().length===0)return this.fuse.search("").map(n=>n.item);if(!e.includes("/"))return this.fuse.search(e).map(n=>n.item);let t=e.split("/"),i="";return t[0]==="constant"&&t.length===2?t[1]?i={$and:[{node:"=constant"},{$or:[{"signal.name":t[1]},{"signal.label":t[1]},{"signal.description":t[1]}]}]}:i={node:"=constant"}:t.length===2&&t[1]===""&&t[0]?i={$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]}:t.length===2&&t[0]&&t[1]?i={$and:[{$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]},{$or:[{transmitter:t[1]},{transmitterDescription:t[1]}]}]}:t.length===3&&t[2]===""&&t[0]&&t[1]?i={$and:[{$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]},{$or:[{transmitter:t[1]},{transmitterDescription:t[1]}]}]}:t.length>=3&&t[0]&&t[1]&&t[2]&&(i={$and:[{$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]},{$or:[{transmitter:t[1]},{transmitterDescription:t[1]}]},{$or:[{"signal.name":t[2]},{"signal.label":t[2]},{"signal.description":t[2]}]}]}),this.fuse.search(i).map(n=>n.item)}allSignals(){return this.data}};function Bt(s){return(e,t)=>!t||t.length<2?e:s.search(t).sort((n,r)=>{let o=`${n.node}/${n.transmitter}`,a=`${r.node}/${r.transmitter}`;return o.localeCompare(a)})}function xt(s){let e=[];for(let t of s.vertices??[])for(let i of t.transmitters??[])for(let n of i.signals??[])e.push({node:t.id??"",nodeLabel:t.label??t.id??"",nodeDescription:t.description,nodeLogoId:t.logoId,transmitter:i.name??"",transmitterDescription:i.description,transmitterMode:i.mode,signal:n});for(let t of s.constants??[])e.push({node:"constant",nodeLabel:"Constants",transmitter:"",signal:t});return e}function Z(s){return s.node==="constant"?`constant/${s.signal.name}`:`${s.node}/${s.transmitter}/${s.signal.name}`}function Se(){return(0,g.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[(0,g.jsx)("path",{d:"M4,7v2c0,0.55-0.45,1-1,1H2v4h1c0.55,0,1,0.45,1,1v2c0,1.65,1.35,3,3,3h3v-2H7c-0.55,0-1-0.45-1-1v-2 c0-1.3-0.84-2.42-2-2.83v-0.34C5.16,11.42,6,10.3,6,9V7c0-0.55,0.45-1,1-1h3V4H7C5.35,4,4,5.35,4,7z"}),(0,g.jsx)("path",{d:"M21,10c-0.55,0-1-0.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c0.55,0,1,0.45,1,1v2c0,1.3,0.84,2.42,2,2.83v0.34 c-1.16,0.41-2,1.52-2,2.83v2c0,0.55-0.45,1-1,1h-3v2h3c1.65,0,3-1.35,3-3v-2c0-0.55,0.45-1,1-1h1v-4H21z"})]})}function Te(s){if(s.group==="constant")return(0,g.jsxs)("div",{className:`adapt-signal-group-header adapt-signal-group-header--constant ${s.className??""}`.trim(),children:[(0,g.jsx)("span",{className:"adapt-signal-group-icon adapt-signal-group-icon--constant",children:(0,g.jsx)(Se,{})}),(0,g.jsx)("span",{className:"adapt-signal-group-node-label adapt-signal-group-node-label--constant",children:"Constants"})]});let[t,i]=s.group.split("/"),n=s.references.find(a=>`${a.node}/${a.transmitter}`===s.group);if(!n)return null;let r=n.transmitterMode,o=r==="MODE_FAILURE"?"adapt-signal-group-transmitter--failure":r==="MODE_STREAM"?"adapt-signal-group-transmitter--stream":"adapt-signal-group-transmitter--standard";return(0,g.jsxs)("div",{className:`adapt-signal-group-header ${s.className??""}`.trim(),children:[n.nodeIcon&&(0,g.jsx)("span",{className:"adapt-signal-group-icon",children:n.nodeIcon}),(0,g.jsx)("span",{className:"adapt-signal-group-node-label",children:n.nodeLabel||t}),(0,g.jsxs)("span",{className:"adapt-signal-group-node-id",children:["(",t,")"]}),(0,g.jsx)("span",{className:"adapt-signal-group-separator"}),(0,g.jsx)("span",{className:`adapt-signal-group-transmitter ${o}`,children:i})]})}function je(s){let{reference:e}=s;return(0,g.jsxs)("div",{className:`adapt-signal-option ${s.className??""}`.trim(),children:[(0,g.jsxs)("div",{className:"adapt-signal-option-label",children:[(0,g.jsx)("span",{className:"adapt-signal-option-name",children:e.signal.label||e.signal.name}),e.signal.label&&(0,g.jsxs)("span",{className:"adapt-signal-option-code",children:["(",e.signal.name,")"]}),e.signal.optional&&(0,g.jsx)("span",{className:"adapt-signal-option-optional",children:"Optional"})]}),e.signal.formats&&(0,g.jsx)(ze,{formats:e.signal.formats})]})}function Pe(s){let{format:e,size:t="small",onDelete:i,onClick:n}=s,r=Oe(e),o="primitive";e.mimeType?o="mime":e.jtdSchema&&!q(e.jtdSchema)&&(o="complex");let a=o==="mime"||o==="complex";return(0,g.jsxs)("span",{className:`adapt-signal-format-chip adapt-signal-format-chip--${o} ${t==="medium"?"adapt-signal-format-chip--medium":""} ${s.className??""}`.trim(),onClick:n&&a?h=>{h.stopPropagation(),n()}:void 0,children:[r,i&&(0,g.jsx)("span",{className:"adapt-signal-format-chip-delete",onClick:h=>{h.stopPropagation(),i()},children:"\xD7"})]})}function ze(s){let{formats:e,maxVisible:t=3,onViewSchema:i}=s;if(e.length===0)return(0,g.jsx)("span",{className:`adapt-signal-format-viewer ${s.className??""}`.trim(),children:"No formats defined"});let n=[],r=0;for(let a=0;a<e.length;a++){let c=e[a];c&&(!c.mimeType&&!c.jtdSchema||(r++,n.length<t&&n.push((0,g.jsx)(Pe,{format:c,onClick:i&&c.jtdSchema&&!q(c.jtdSchema)?()=>i(c.jtdSchema):void 0},`fmt-${a}`))))}let o=r-n.length;return(0,g.jsxs)("div",{className:`adapt-signal-format-viewer ${s.className??""}`.trim(),children:[n,o>0&&(0,g.jsxs)("span",{className:"adapt-signal-format-overflow",children:["+",o]})]})}function Nt({currentReference:s,inputValue:e,availableReferences:t,filterOptions:i,disabled:n,hasError:r,errorMessage:o,placeholder:a="Search signals...",className:c,theme:h="auto",onInputChange:l,onReferenceChange:d}){let[f,u]=(0,E.useState)(!1),[v,A]=(0,E.useState)(-1),C=(0,E.useRef)(null),y=(0,E.useRef)(null),I=(0,E.useRef)(null),_=(0,E.useCallback)(()=>{d(null),l(""),u(!0),A(0),setTimeout(()=>y.current?.focus(),0)},[d,l]),b=(0,E.useMemo)(()=>{let m=[...t];return i(m,e)},[t,e,i]),L=(0,E.useMemo)(()=>{let m=new Map;for(let D of b){let B=D.node==="constant"?"constant":`${D.node}/${D.transmitter}`,R=m.get(B);R?R.push(D):m.set(B,[D])}return m},[b]),T=(0,E.useMemo)(()=>{let m=[];for(let D of L.values())m.push(...D);return m},[L]);(0,E.useEffect)(()=>{function m(D){C.current&&!C.current.contains(D.target)&&u(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);let j=(0,E.useCallback)(m=>{d(Z(m)),l(Z(m)),u(!1)},[d,l]),S=(0,E.useCallback)(m=>{if(s){if(m.key==="Backspace"||m.key==="Delete"){m.preventDefault(),_();return}if(m.key==="ArrowDown"||m.key==="ArrowUp"||m.key==="Enter"){m.preventDefault(),d(null),l(""),u(!0),A(0),setTimeout(()=>y.current?.focus(),0);return}if(m.key.length===1&&!m.ctrlKey&&!m.metaKey){m.preventDefault(),d(null),l(m.key),u(!0),A(0),setTimeout(()=>y.current?.focus(),0);return}return}m.key==="ArrowDown"?(m.preventDefault(),f?A(D=>Math.min(D+1,T.length-1)):(u(!0),A(0))):m.key==="ArrowUp"?(m.preventDefault(),A(D=>Math.max(D-1,0))):m.key==="Enter"?(m.preventDefault(),f&&v>=0&&T[v]&&j(T[v])):m.key==="Escape"&&u(!1)},[s,_,d,l,f,v,T,j]);(0,E.useEffect)(()=>{I.current&&v>=0&&I.current.querySelectorAll("[data-signal-option]")[v]?.scrollIntoView({block:"nearest"})},[v]);let F=[],w=0;for(let[m,D]of L){F.push((0,g.jsx)(Te,{group:m,references:b},`group-${m}`));for(let B of D){let R=w++,Ke=R===v;F.push((0,g.jsx)("div",{"data-signal-option":!0,className:`adapt-signal-selector-option ${Ke?"adapt-signal-selector-option--highlighted":""}`,onMouseDown:He=>{He.preventDefault(),j(B)},onMouseEnter:()=>A(R),children:(0,g.jsx)(je,{reference:B})},Z(B)))}}let P=["adapt-signal-selector",r&&"adapt-signal-selector--error",c].filter(Boolean).join(" "),z=s?.node==="constant",$=s?z?"adapt-signal-selector-selected-dot--constant":s.transmitterMode==="MODE_FAILURE"?"adapt-signal-selector-selected-dot--failure":s.transmitterMode==="MODE_STREAM"?"adapt-signal-selector-selected-dot--stream":"adapt-signal-selector-selected-dot--standard":"";return(0,g.jsxs)("div",{ref:C,className:P,"data-adapt-theme":h==="auto"?void 0:h,children:[s&&!n&&(0,g.jsxs)("div",{className:"adapt-signal-selector-selected",onClick:_,children:[z?(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon adapt-signal-selector-selected-icon--constant",children:(0,g.jsx)(Se,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:`adapt-signal-selector-selected-dot ${$}`}),s.nodeIcon&&(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon",children:s.nodeIcon})]}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-node",children:s.nodeLabel||s.node}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-sep",children:"\u203A"}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-signal",children:s.signal.label||s.signal.name}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-clear",onClick:m=>{m.stopPropagation(),_()},children:"\xD7"})]}),s&&n&&(0,g.jsxs)("div",{className:"adapt-signal-selector-selected adapt-signal-selector-selected--disabled",children:[z?(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon adapt-signal-selector-selected-icon--constant",children:(0,g.jsx)(Se,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:`adapt-signal-selector-selected-dot ${$}`}),s.nodeIcon&&(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon",children:s.nodeIcon})]}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-node",children:s.nodeLabel||s.node}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-sep",children:"\u203A"}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-signal",children:s.signal.label||s.signal.name})]}),(0,g.jsx)("input",{ref:y,type:"text",className:`adapt-signal-selector-input${s?" adapt-signal-selector-input--hidden":""}`,value:e,placeholder:a,disabled:n,onChange:m=>{l(m.target.value),u(!0),A(0),m.target.value||d(null)},onFocus:()=>{s||u(!0)},onKeyDown:S}),o&&(0,g.jsx)("span",{className:"adapt-signal-selector-error",children:o}),f&&!n&&(0,g.jsx)("div",{ref:I,className:"adapt-signal-selector-dropdown",children:T.length>0?F:(0,g.jsx)("div",{className:"adapt-signal-selector-no-results",children:"No signals found"})})]})}0&&(module.exports={FormatChip,FormatViewer,SignalGroupHeader,SignalOption,SignalSearch,SignalSelector,createSignalFilter,flattenSignals,getFormatLabel,getSchemaDescription,isArraySchema,isEmptySchema,isPrimitiveSchema,signalReferenceKey});
|
|
1
|
+
"use strict";var ee=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var Ve=Object.prototype.hasOwnProperty;var Ge=(s,e)=>{for(var t in e)ee(s,t,{get:e[t],enumerable:!0})},Ue=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Je(e))!Ve.call(s,n)&&n!==t&&ee(s,n,{get:()=>e[n],enumerable:!(i=We(e,n))||i.enumerable});return s};var Qe=s=>Ue(ee({},"__esModule",{value:!0}),s);var $t={};Ge($t,{FormatChip:()=>Pe,FormatViewer:()=>ze,SignalGroupHeader:()=>Te,SignalOption:()=>je,SignalSearch:()=>Ee,SignalSelector:()=>Nt,createSignalFilter:()=>Bt,flattenSignals:()=>xt,getFormatLabel:()=>Oe,getSchemaDescription:()=>Re,isArraySchema:()=>It,isEmptySchema:()=>Le,isPrimitiveSchema:()=>q,signalReferenceKey:()=>Z});module.exports=Qe($t);function O(s){return Array.isArray?Array.isArray(s):Ie(s)==="[object Array]"}function Ye(s){if(typeof s=="string")return s;if(typeof s=="bigint")return s.toString();let e=s+"";return e=="0"&&1/s==-1/0?"-0":e}function te(s){return s==null?"":Ye(s)}function M(s){return typeof s=="string"}function G(s){return typeof s=="number"}function Xe(s){return s===!0||s===!1||Ze(s)&&Ie(s)=="[object Boolean]"}function ke(s){return typeof s=="object"}function Ze(s){return ke(s)&&s!==null}function w(s){return s!=null}function V(s){return!s.trim().length}function Ie(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}var qe="Incorrect 'index' type",et=s=>`Invalid value for key ${s}`,tt=s=>`Pattern length exceeds max of ${s}.`,st=s=>`Missing ${s} property in key`,nt=s=>`Property 'weight' in key '${s}' must be a positive integer`,ye=Object.prototype.hasOwnProperty,se=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let n=Be(i);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Be(s){let e=null,t=null,i=null,n=1,r=null;if(M(s)||O(s))i=s,e=Me(s),t=ne(s);else{if(!ye.call(s,"name"))throw new Error(st("name"));let o=s.name;if(i=o,ye.call(s,"weight")&&(n=s.weight,n<=0))throw new Error(nt(o));e=Me(o),t=ne(o),r=s.getFn}return{path:e,id:t,weight:n,src:i,getFn:r}}function Me(s){return O(s)?s:s.split(".")}function ne(s){return O(s)?s.join("."):s}function it(s,e){let t=[],i=!1,n=(r,o,a,c)=>{if(w(r))if(!o[a])t.push(c!==void 0?{v:r,i:c}:r);else{let h=o[a],l=r[h];if(!w(l))return;if(a===o.length-1&&(M(l)||G(l)||Xe(l)||typeof l=="bigint"))t.push(c!==void 0?{v:te(l),i:c}:te(l));else if(O(l)){i=!0;for(let d=0,f=l.length;d<f;d+=1)n(l[d],o,a+1,d)}else o.length&&n(l,o,a+1,c)}};return n(s,M(e)?e.split("."):e,0),i?t:t[0]}var rt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ot={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(s,e)=>s.score===e.score?s.idx<e.idx?-1:1:s.score<e.score?-1:1},at={location:0,threshold:.6,distance:100},ct={useExtendedSearch:!1,useTokenSearch:!1,getFn:it,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},p=Object.freeze({...ot,...rt,...at,...ct}),lt=/[^ ]+/g;function ut(s=1,e=3){let t=new Map,i=Math.pow(10,e);return{get(n){let r=n.match(lt).length;if(t.has(r))return t.get(r);let o=1/Math.pow(r,.5*s),a=parseFloat(Math.round(o*i)/i);return t.set(r,a),a},clear(){t.clear()}}}var H=class{constructor({getFn:e=p.getFn,fieldNormWeight:t=p.fieldNormWeight}={}){this.norm=ut(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,M(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();M(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let t=0,i=this.records.length;t<i;t+=1)this.records[t].i=t}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!w(e)||V(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((n,r)=>{let o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(w(o)){if(O(o)){let a=[];for(let c=0,h=o.length;c<h;c+=1){let l=o[c];if(w(l)){if(M(l)){if(!V(l)){let d={v:l,i:c,n:this.norm.get(l)};a.push(d)}}else if(w(l.v)){let d=M(l.v)?l.v:te(l.v);if(!V(d)){let f={v:d,i:l.i,n:this.norm.get(d)};a.push(f)}}}}i.$[r]=a}else if(M(o)&&!V(o)){let a={v:o,n:this.norm.get(o)};i.$[r]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function xe(s,e,{getFn:t=p.getFn,fieldNormWeight:i=p.fieldNormWeight}={}){let n=new H({getFn:t,fieldNormWeight:i});return n.setKeys(s.map(Be)),n.setSources(e),n.create(),n}function ht(s,{getFn:e=p.getFn,fieldNormWeight:t=p.fieldNormWeight}={}){let{keys:i,records:n}=s,r=new H({getFn:e,fieldNormWeight:t});return r.setKeys(i),r.setIndexRecords(n),r}function dt(s=[],e=p.minMatchCharLength){let t=[],i=-1,n=-1,r=0;for(let o=s.length;r<o;r+=1){let a=s[r];a&&i===-1?i=r:!a&&i!==-1&&(n=r-1,n-i+1>=e&&t.push([i,n]),i=-1)}return s[r-1]&&r-i>=e&&t.push([i,r-1]),t}var K=32;function ft(s,e,t,{location:i=p.location,distance:n=p.distance,threshold:r=p.threshold,findAllMatches:o=p.findAllMatches,minMatchCharLength:a=p.minMatchCharLength,includeMatches:c=p.includeMatches,ignoreLocation:h=p.ignoreLocation}={}){if(e.length>K)throw new Error(tt(K));let l=e.length,d=s.length,f=Math.max(0,Math.min(i,d)),u=r,v=f,A=(S,F)=>{let b=S/l;if(h)return b;let P=Math.abs(f-F);return n?b+P/n:P?1:b},C=a>1||c,y=C?Array(d):[],k;for(;(k=s.indexOf(e,v))>-1;){let S=A(0,k);if(u=Math.min(S,u),v=k+l,C){let F=0;for(;F<l;)y[k+F]=1,F+=1}}v=-1;let _=[],I=1,L=l+d,T=1<<l-1;for(let S=0;S<l;S+=1){let F=0,b=L;for(;F<b;)A(S,f+b)<=u?F=b:L=b,b=Math.floor((L-F)/2+F);L=b;let P=Math.max(1,f-b+1),z=o?d:Math.min(f+b,d)+l,$=Array(z+2);$[z+1]=(1<<S)-1;for(let D=z;D>=P;D-=1){let B=D-1,R=t[s[B]];if(C&&(y[B]=+!!R),$[D]=($[D+1]<<1|1)&R,S&&($[D]|=(_[D+1]|_[D])<<1|1|_[D+1]),$[D]&T&&(I=A(S,B),I<=u)){if(u=I,v=B,v<=f)break;P=Math.max(1,2*f-v)}}if(A(S+1,f)>u)break;_=$}let j={isMatch:v>=0,score:Math.max(.001,I)};if(C){let S=dt(y,a);S.length?c&&(j.indices=S):j.isMatch=!1}return j}function gt(s){let e={};for(let t=0,i=s.length;t<i;t+=1){let n=s.charAt(t);e[n]=(e[n]||0)|1<<i-t-1}return e}function Ce(s){if(s.length<=1)return s;s.sort((t,i)=>t[0]-i[0]||t[1]-i[1]);let e=[s[0]];for(let t=1,i=s.length;t<i;t+=1){let n=e[e.length-1],r=s[t];r[0]<=n[1]+1?n[1]=Math.max(n[1],r[1]):e.push(r)}return e}var Ne={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00F8:"o",\u00D8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00DF:"ss"},pt=new RegExp("["+Object.keys(Ne).join("")+"]","g"),W=String.prototype.normalize?s=>s.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(pt,e=>Ne[e]):s=>s,J=class{constructor(e,{location:t=p.location,threshold:i=p.threshold,distance:n=p.distance,includeMatches:r=p.includeMatches,findAllMatches:o=p.findAllMatches,minMatchCharLength:a=p.minMatchCharLength,isCaseSensitive:c=p.isCaseSensitive,ignoreDiacritics:h=p.ignoreDiacritics,ignoreLocation:l=p.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:l},e=c?e:e.toLowerCase(),e=h?W(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let d=(u,v)=>{this.chunks.push({pattern:u,alphabet:gt(u),startIndex:v})},f=this.pattern.length;if(f>K){let u=0,v=f%K,A=f-v;for(;u<A;)d(this.pattern.substr(u,K),u),u+=K;if(v){let C=f-K;d(this.pattern.substr(C),C)}}else d(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:i,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=i?W(e):e,this.pattern===e){let A={isMatch:!0,score:0};return n&&(A.indices=[[0,e.length-1]]),A}let{location:r,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:h,ignoreLocation:l}=this.options,d=[],f=0,u=!1;this.chunks.forEach(({pattern:A,alphabet:C,startIndex:y})=>{let{isMatch:k,score:_,indices:I}=ft(e,A,C,{location:r+y,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:h,includeMatches:n,ignoreLocation:l});k&&(u=!0),f+=_,k&&I&&d.push(...I)});let v={isMatch:u,score:u?f/this.chunks.length:1};return u&&n&&(v.indices=Ce(d)),v}},N=class{constructor(e){this.pattern=e}static isMultiMatch(e){return _e(e,this.multiRegex)}static isSingleMatch(e){return _e(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function _e(s,e){let t=s.match(e);return t?t[1]:null}var ie=class extends N{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},re=class extends N{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}},oe=class extends N{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ae=class extends N{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},ce=class extends N{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},le=class extends N{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},U=class extends N{constructor(e,{location:t=p.location,threshold:i=p.threshold,distance:n=p.distance,includeMatches:r=p.includeMatches,findAllMatches:o=p.findAllMatches,minMatchCharLength:a=p.minMatchCharLength,isCaseSensitive:c=p.isCaseSensitive,ignoreDiacritics:h=p.ignoreDiacritics,ignoreLocation:l=p.ignoreLocation}={}){super(e),this._bitapSearch=new J(e,{location:t,threshold:i,distance:n,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:h,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},Q=class extends N{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i,n=[],r=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+r,n.push([i,t-1]);let o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}}},ue=[ie,Q,oe,ae,le,ce,re,U],Fe=ue.length,mt="\0",At="|";function vt(s){let e=[],t=s.length,i=0;for(;i<t;){for(;i<t&&s[i]===" ";)i++;if(i>=t)break;let n=i;for(;n<t&&s[n]!==" "&&s[n]!=='"';)n++;if(n<t&&s[n]==='"'){for(n++;n<t;){if(s[n]==='"'){let r=n+1;if(r>=t||s[r]===" "){n++;break}if(s[r]==="$"&&(r+1>=t||s[r+1]===" ")){n+=2;break}}n++}e.push(s.substring(i,n)),i=n}else{for(;n<t&&s[n]!==" ";)n++;e.push(s.substring(i,n)),i=n}}return e}function Ct(s,e={}){return s.replace(/\\\|/g,mt).split(At).map(i=>{let n=i.replace(/\u0000/g,"|"),r=vt(n.trim()).filter(a=>a&&!!a.trim()),o=[];for(let a=0,c=r.length;a<c;a+=1){let h=r[a],l=!1,d=-1;for(;!l&&++d<Fe;){let f=ue[d],u=f.isMultiMatch(h);u&&(o.push(new f(u,e)),l=!0)}if(!l)for(d=-1;++d<Fe;){let f=ue[d],u=f.isSingleMatch(h);if(u){o.push(new f(u,e));break}}}return o})}var Dt=new Set([U.type,Q.type]),he=class{constructor(e,{isCaseSensitive:t=p.isCaseSensitive,ignoreDiacritics:i=p.ignoreDiacritics,includeMatches:n=p.includeMatches,minMatchCharLength:r=p.minMatchCharLength,ignoreLocation:o=p.ignoreLocation,findAllMatches:a=p.findAllMatches,location:c=p.location,threshold:h=p.threshold,distance:l=p.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:n,minMatchCharLength:r,findAllMatches:a,ignoreLocation:o,location:c,threshold:h,distance:l},e=t?e:e.toLowerCase(),e=i?W(e):e,this.pattern=e,this.query=Ct(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:i,isCaseSensitive:n,ignoreDiacritics:r}=this.options;e=n?e:e.toLowerCase(),e=r?W(e):e;let o=0,a=[],c=0,h=!1;for(let l=0,d=t.length;l<d;l+=1){let f=t[l];a.length=0,o=0,h=!1;for(let u=0,v=f.length;u<v;u+=1){let A=f[u],{isMatch:C,indices:y,score:k}=A.search(e);if(C){o+=1,c+=k;let _=A.constructor.type;_.startsWith("inverse")&&(h=!0),i&&(Dt.has(_)?a.push(...y):a.push(y))}else{c=0,o=0,a.length=0,h=!1;break}}if(o){let u={isMatch:!0,score:c/o};return h&&(u.hasInverse=!0),i&&(u.indices=Ce(a)),u}}return{isMatch:!1,score:1}}},de=[];function De(...s){de.push(...s)}function Y(s,e){for(let t=0,i=de.length;t<i;t+=1){let n=de[t];if(n.condition(s,e))return new n(s,e)}return new J(s,e)}var X={AND:"$and",OR:"$or"},fe={PATH:"$path",PATTERN:"$val"},ge=s=>!!(s[X.AND]||s[X.OR]),Et=s=>!!s[fe.PATH],St=s=>!O(s)&&ke(s)&&!ge(s),be=s=>({[X.AND]:Object.keys(s).map(e=>({[e]:s[e]}))});function $e(s,e,{auto:t=!0}={}){let i=n=>{if(M(n)){let c={keyId:null,pattern:n};return t&&(c.searcher=Y(n,e)),c}let r=Object.keys(n),o=Et(n);if(!o&&r.length>1&&!ge(n))return i(be(n));if(St(n)){let c=o?n[fe.PATH]:r[0],h=o?n[fe.PATTERN]:n[c];if(!M(h))throw new Error(et(c));let l={keyId:ne(c),pattern:h};return t&&(l.searcher=Y(h,e)),l}let a={children:[],operator:r[0]};return r.forEach(c=>{let h=n[c];O(h)&&h.forEach(l=>{a.children.push(i(l))})}),a};return ge(s)||(s=be(s)),i(s)}function pe(s,{ignoreFieldNorm:e=p.ignoreFieldNorm}){let t=1;return s.forEach(({key:i,norm:n,score:r})=>{let o=i?i.weight:null;t*=Math.pow(r===0&&o?Number.EPSILON:r,(o||1)*(e?1:n))}),t}function yt(s,{ignoreFieldNorm:e=p.ignoreFieldNorm}){s.forEach(t=>{t.score=pe(t.matches,{ignoreFieldNorm:e})})}var me=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let i=e-1>>1;if(t[e].score<=t[i].score)break;let n=t[e];t[e]=t[i],t[i]=n,e=i}}_sinkDown(e){let t=this.heap,i=t.length,n=e;do{e=n;let r=2*e+1,o=2*e+2;if(r<i&&t[r].score>t[n].score&&(n=r),o<i&&t[o].score>t[n].score&&(n=o),n!==e){let a=t[e];t[e]=t[n],t[n]=a}}while(n!==e)}};function Mt(s,e){let t=s.matches;e.matches=[],w(t)&&t.forEach(i=>{if(!w(i.indices)||!i.indices.length)return;let{indices:n,value:r}=i,o={indices:n,value:r};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function _t(s,e){e.score=s.score}function Ft(s,e,{includeMatches:t=p.includeMatches,includeScore:i=p.includeScore}={}){let n=[];return t&&n.push(Mt),i&&n.push(_t),s.map(r=>{let{idx:o}=r,a={item:e[o],refIndex:o};return n.length&&n.forEach(c=>{c(r,a)}),a})}var bt=/\b\w+\b/g;function Ae({isCaseSensitive:s=!1,ignoreDiacritics:e=!1}={}){return{tokenize(t){return s||(t=t.toLowerCase()),e&&(t=W(t)),t.match(bt)||[]}}}function wt(s,e,t){let i=new Map,n=new Map,r=0;function o(a,c,h,l){let d=t.tokenize(a);if(!d.length)return;r++;let f=new Map;for(let u of d)f.set(u,(f.get(u)||0)+1);for(let[u,v]of f){let A={docIdx:c,keyIdx:h,subIdx:l,tf:v},C=i.get(u);C||(C=[],i.set(u,C)),C.push(A),n.set(u,(n.get(u)||0)+1)}}for(let a of s){let{i:c,v:h,$:l}=a;if(h!==void 0){o(h,c,-1,-1);continue}if(l)for(let d=0;d<e;d++){let f=l[d];if(f)if(Array.isArray(f))for(let u of f)o(u.v,c,d,u.i??-1);else o(f.v,c,d,-1)}}return{terms:i,fieldCount:r,df:n}}function kt(s,e,t,i){let{i:n,v:r,$:o}=e;function a(c,h,l){let d=i.tokenize(c);if(!d.length)return;s.fieldCount++;let f=new Map;for(let u of d)f.set(u,(f.get(u)||0)+1);for(let[u,v]of f){let A={docIdx:n,keyIdx:h,subIdx:l,tf:v},C=s.terms.get(u);C||(C=[],s.terms.set(u,C)),C.push(A),s.df.set(u,(s.df.get(u)||0)+1)}}if(r!==void 0){a(r,-1,-1);return}if(o)for(let c=0;c<t;c++){let h=o[c];if(h)if(Array.isArray(h))for(let l of h)a(l.v,c,l.i??-1);else a(h.v,c,-1)}}function we(s,e){for(let[t,i]of s.terms){let n=i.filter(o=>o.docIdx!==e),r=i.length-n.length;r>0&&(s.fieldCount-=r,s.df.set(t,(s.df.get(t)||0)-r),n.length===0?(s.terms.delete(t),s.df.delete(t)):s.terms.set(t,n))}}var x=class{constructor(e,t,i){this.options={...p,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new se(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,i),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,i=Y(e,t);return this._lastQuery=e,this._lastSearcher=i,i}setCollection(e,t){if(this._docs=e,t&&!(t instanceof H))throw new Error(qe);if(this._myIndex=t||xe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let i=Ae({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=wt(this._myIndex.records,this._myIndex.keys.length,i)}}add(e){if(w(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let t=this._myIndex.records[this._myIndex.records.length-1],i=Ae({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});kt(this._invertedIndex,t,this._myIndex.keys.length,i)}}remove(e=()=>!1){let t=[],i=[];for(let n=0,r=this._docs.length;n<r;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),i.push(n));if(i.length){if(this._invertedIndex)for(let n of i)we(this._invertedIndex,n);for(let n=i.length-1;n>=0;n-=1)this._docs.splice(i[n],1);this._myIndex.removeAll(i)}return t}removeAt(e){this._invertedIndex&&we(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:i=-1}=t||{},{includeMatches:n,includeScore:r,shouldSort:o,sortFn:a,ignoreFieldNorm:c}=this.options;if(M(e)&&!e.trim()){let d=this._docs.map((f,u)=>({item:f,refIndex:u}));return G(i)&&i>-1&&(d=d.slice(0,i)),d}let h=G(i)&&i>0&&M(e),l;if(h){let d=new me(i);M(this._docs[0])?this._searchStringList(e,{heap:d,ignoreFieldNorm:c}):this._searchObjectList(e,{heap:d,ignoreFieldNorm:c}),l=d.extractSorted(a)}else l=M(e)?M(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),yt(l,{ignoreFieldNorm:c}),o&&l.sort(a),G(i)&&i>-1&&(l=l.slice(0,i));return Ft(l,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e,{heap:t,ignoreFieldNorm:i}={}){let n=this._getSearcher(e),{records:r}=this._myIndex,o=t?null:[];return r.forEach(({v:a,i:c,n:h})=>{if(!w(a))return;let{isMatch:l,score:d,indices:f}=n.searchIn(a);if(l){let u={item:a,idx:c,matches:[{score:d,value:a,norm:h,indices:f}]};t?(u.score=pe(u.matches,{ignoreFieldNorm:i}),t.shouldInsert(u.score)&&t.insert(u)):o.push(u)}}),o}_searchLogical(e){let t=$e(e,this.options),i=(a,c,h)=>{if(!("children"in a)){let{keyId:u,searcher:v}=a,A;return u===null?(A=[],this._myIndex.keys.forEach((C,y)=>{A.push(...this._findMatches({key:C,value:c[y],searcher:v}))})):A=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(c,u),searcher:v}),A&&A.length?[{idx:h,item:c,matches:A}]:[]}let{children:l,operator:d}=a,f=[];for(let u=0,v=l.length;u<v;u+=1){let A=l[u],C=i(A,c,h);if(C.length)f.push(...C);else if(d===X.AND)return[]}return f},n=this._myIndex.records,r=new Map,o=[];return n.forEach(({$:a,i:c})=>{if(w(a)){let h=i(t,a,c);h.length&&(r.has(c)||(r.set(c,{idx:c,item:a,matches:[]}),o.push(r.get(c))),h.forEach(({matches:l})=>{r.get(c).matches.push(...l)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:i}={}){let n=this._getSearcher(e),{keys:r,records:o}=this._myIndex,a=t?null:[];return o.forEach(({$:c,i:h})=>{if(!w(c))return;let l=[],d=!1,f=!1;if(r.forEach((u,v)=>{let A=this._findMatches({key:u,value:c[v],searcher:n});A.length?(l.push(...A),A[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&l.length){let u={idx:h,item:c,matches:l};t?(u.score=pe(u.matches,{ignoreFieldNorm:i}),t.shouldInsert(u.score)&&t.insert(u)):a.push(u)}}),a}_findMatches({key:e,value:t,searcher:i}){if(!w(t))return[];let n=[];if(O(t))t.forEach(({v:r,i:o,n:a})=>{if(!w(r))return;let{isMatch:c,score:h,indices:l,hasInverse:d}=i.searchIn(r);c&&n.push({score:h,key:e,value:r,idx:o,norm:a,indices:l,hasInverse:d})});else{let{v:r,n:o}=t,{isMatch:a,score:c,indices:h,hasInverse:l}=i.searchIn(r);a&&n.push({score:c,key:e,value:r,norm:o,indices:h,hasInverse:l})}return n}},ve=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Ae({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let i=this.analyzer.tokenize(e),n=t._invertedIndex,{df:r,fieldCount:o}=n;this.termSearchers=[],this.idfWeights=[];for(let a of i){this.termSearchers.push(new J(a,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let c=r.get(a)||0,h=Math.log(1+(o-c+.5)/(c+.5));this.idfWeights.push(h)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],i=0,n=0,r=0;for(let c=0;c<this.termSearchers.length;c++){let h=this.termSearchers[c].searchIn(e),l=this.idfWeights[c];n+=l,h.isMatch&&(r++,i+=l*(1-h.score),h.indices&&t.push(...h.indices))}if(r===0)return{isMatch:!1,score:1};let o=n>0?1-i/n:0,a={isMatch:!0,score:Math.max(.001,o)};return this.options.includeMatches&&t.length&&(a.indices=Ce(t)),a}};x.version="7.3.0";x.createIndex=xe;x.parseIndex=ht;x.config=p;x.match=function(s,e,t){return Y(s,{...p,...t}).searchIn(e)};x.parseQuery=$e;De(he);De(ve);x.use=function(...s){s.forEach(e=>De(e))};var E=require("react"),g=require("react/jsx-runtime");function q(s){return s.type?!(Array.isArray(s.enum)&&s.enum.length>0)&&!s.elements&&!(s.properties&&Object.keys(s.properties).length>0)&&!(s.optionalProperties&&Object.keys(s.optionalProperties).length>0)&&!s.values&&!s.discriminator&&!s.ref:!1}function Le(s){return!s.type&&!s.enum&&!s.elements&&!s.properties&&!s.optionalProperties&&!s.values&&!s.discriminator&&!s.ref}function It(s){return s.elements!==void 0}function Re(s){return q(s)?s.type:s.enum?`enum (${s.enum.length} values)`:s.elements?"array":s.properties||s.optionalProperties?`object (${(s.properties?Object.keys(s.properties).length:0)+(s.optionalProperties?Object.keys(s.optionalProperties).length:0)} properties)`:s.values?"map":s.discriminator?"discriminated union":s.ref?`ref: ${s.ref}`:Le(s)?"empty schema":"complex schema"}function Oe(s){return s.mimeType?s.mimeType:s.jtdSchema?Re(s.jtdSchema):"unknown"}var Ee=class{fuse;data;constructor(e){this.fuse=new x(e,{includeScore:!1,threshold:.3,ignoreLocation:!0,useExtendedSearch:!0,keys:[{name:"node",weight:5},{name:"nodeLabel",weight:5},{name:"nodeDescription",weight:2},{name:"transmitter",weight:5},{name:"transmitterDescription",weight:2},{name:"signal.name",weight:5},{name:"signal.label",weight:5},{name:"signal.description",weight:2}]}),this.data=e}search(e){if(!e||e.trim().length===0)return this.fuse.search("").map(n=>n.item);if(!e.includes("/"))return this.fuse.search(e).map(n=>n.item);let t=e.split("/"),i="";return t[0]==="constant"&&t.length===2?t[1]?i={$and:[{node:"=constant"},{$or:[{"signal.name":t[1]},{"signal.label":t[1]},{"signal.description":t[1]}]}]}:i={node:"=constant"}:t.length===2&&t[1]===""&&t[0]?i={$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]}:t.length===2&&t[0]&&t[1]?i={$and:[{$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]},{$or:[{transmitter:t[1]},{transmitterDescription:t[1]}]}]}:t.length===3&&t[2]===""&&t[0]&&t[1]?i={$and:[{$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]},{$or:[{transmitter:t[1]},{transmitterDescription:t[1]}]}]}:t.length>=3&&t[0]&&t[1]&&t[2]&&(i={$and:[{$or:[{node:t[0]},{nodeLabel:t[0]},{nodeDescription:t[0]}]},{$or:[{transmitter:t[1]},{transmitterDescription:t[1]}]},{$or:[{"signal.name":t[2]},{"signal.label":t[2]},{"signal.description":t[2]}]}]}),this.fuse.search(i).map(n=>n.item)}allSignals(){return this.data}};function Bt(s){return(e,t)=>!t||t.length<2?e:s.search(t).sort((n,r)=>{let o=`${n.node}/${n.transmitter}`,a=`${r.node}/${r.transmitter}`;return o.localeCompare(a)})}function xt(s){let e=[];for(let t of s.vertices??[])for(let i of t.transmitters??[])for(let n of i.signals??[])e.push({node:t.id??"",nodeLabel:t.label??t.id??"",nodeDescription:t.description,nodeLogoId:t.logoId,transmitter:i.name??"",transmitterLabel:i.label,transmitterDescription:i.description,transmitterMode:i.mode,signal:n});for(let t of s.constants??[])e.push({node:"constant",nodeLabel:"Constants",transmitter:"",signal:t});return e}function Z(s){return s.node==="constant"?`constant/${s.signal.name}`:`${s.node}/${s.transmitter}/${s.signal.name}`}function Se(){return(0,g.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[(0,g.jsx)("path",{d:"M4,7v2c0,0.55-0.45,1-1,1H2v4h1c0.55,0,1,0.45,1,1v2c0,1.65,1.35,3,3,3h3v-2H7c-0.55,0-1-0.45-1-1v-2 c0-1.3-0.84-2.42-2-2.83v-0.34C5.16,11.42,6,10.3,6,9V7c0-0.55,0.45-1,1-1h3V4H7C5.35,4,4,5.35,4,7z"}),(0,g.jsx)("path",{d:"M21,10c-0.55,0-1-0.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c0.55,0,1,0.45,1,1v2c0,1.3,0.84,2.42,2,2.83v0.34 c-1.16,0.41-2,1.52-2,2.83v2c0,0.55-0.45,1-1,1h-3v2h3c1.65,0,3-1.35,3-3v-2c0-0.55,0.45-1,1-1h1v-4H21z"})]})}function Te(s){if(s.group==="constant")return(0,g.jsxs)("div",{className:`adapt-signal-group-header adapt-signal-group-header--constant ${s.className??""}`.trim(),children:[(0,g.jsx)("span",{className:"adapt-signal-group-icon adapt-signal-group-icon--constant",children:(0,g.jsx)(Se,{})}),(0,g.jsx)("span",{className:"adapt-signal-group-node-label adapt-signal-group-node-label--constant",children:"Constants"})]});let[t,i]=s.group.split("/"),n=s.references.find(a=>`${a.node}/${a.transmitter}`===s.group);if(!n)return null;let r=n.transmitterMode,o=r==="MODE_FAILURE"?"adapt-signal-group-transmitter--failure":r==="MODE_STREAM"?"adapt-signal-group-transmitter--stream":"adapt-signal-group-transmitter--standard";return(0,g.jsxs)("div",{className:`adapt-signal-group-header ${s.className??""}`.trim(),children:[n.nodeIcon&&(0,g.jsx)("span",{className:"adapt-signal-group-icon",children:n.nodeIcon}),(0,g.jsx)("span",{className:"adapt-signal-group-node-label",children:n.nodeLabel||t}),(0,g.jsxs)("span",{className:"adapt-signal-group-node-id",children:["(",t,")"]}),(0,g.jsx)("span",{className:"adapt-signal-group-separator"}),(0,g.jsx)("span",{className:`adapt-signal-group-transmitter ${o}`,children:n.transmitterLabel||i})]})}function je(s){let{reference:e}=s;return(0,g.jsxs)("div",{className:`adapt-signal-option ${s.className??""}`.trim(),children:[(0,g.jsxs)("div",{className:"adapt-signal-option-label",children:[(0,g.jsx)("span",{className:"adapt-signal-option-name",children:e.signal.label||e.signal.name}),e.signal.label&&(0,g.jsxs)("span",{className:"adapt-signal-option-code",children:["(",e.signal.name,")"]}),e.signal.optional&&(0,g.jsx)("span",{className:"adapt-signal-option-optional",children:"Optional"})]}),e.signal.formats&&(0,g.jsx)(ze,{formats:e.signal.formats})]})}function Pe(s){let{format:e,size:t="small",onDelete:i,onClick:n}=s,r=Oe(e),o="primitive";e.mimeType?o="mime":e.jtdSchema&&!q(e.jtdSchema)&&(o="complex");let a=o==="mime"||o==="complex";return(0,g.jsxs)("span",{className:`adapt-signal-format-chip adapt-signal-format-chip--${o} ${t==="medium"?"adapt-signal-format-chip--medium":""} ${s.className??""}`.trim(),onClick:n&&a?h=>{h.stopPropagation(),n()}:void 0,children:[r,i&&(0,g.jsx)("span",{className:"adapt-signal-format-chip-delete",onClick:h=>{h.stopPropagation(),i()},children:"\xD7"})]})}function ze(s){let{formats:e,maxVisible:t=3,onViewSchema:i}=s;if(e.length===0)return(0,g.jsx)("span",{className:`adapt-signal-format-viewer ${s.className??""}`.trim(),children:"No formats defined"});let n=[],r=0;for(let a=0;a<e.length;a++){let c=e[a];c&&(!c.mimeType&&!c.jtdSchema||(r++,n.length<t&&n.push((0,g.jsx)(Pe,{format:c,onClick:i&&c.jtdSchema&&!q(c.jtdSchema)?()=>i(c.jtdSchema):void 0},`fmt-${a}`))))}let o=r-n.length;return(0,g.jsxs)("div",{className:`adapt-signal-format-viewer ${s.className??""}`.trim(),children:[n,o>0&&(0,g.jsxs)("span",{className:"adapt-signal-format-overflow",children:["+",o]})]})}function Nt({currentReference:s,inputValue:e,availableReferences:t,filterOptions:i,disabled:n,hasError:r,errorMessage:o,placeholder:a="Search signals...",className:c,theme:h="auto",onInputChange:l,onReferenceChange:d}){let[f,u]=(0,E.useState)(!1),[v,A]=(0,E.useState)(-1),C=(0,E.useRef)(null),y=(0,E.useRef)(null),k=(0,E.useRef)(null),_=(0,E.useCallback)(()=>{d(null),l(""),u(!0),A(0),setTimeout(()=>y.current?.focus(),0)},[d,l]),I=(0,E.useMemo)(()=>{let m=[...t];return i(m,e)},[t,e,i]),L=(0,E.useMemo)(()=>{let m=new Map;for(let D of I){let B=D.node==="constant"?"constant":`${D.node}/${D.transmitter}`,R=m.get(B);R?R.push(D):m.set(B,[D])}return m},[I]),T=(0,E.useMemo)(()=>{let m=[];for(let D of L.values())m.push(...D);return m},[L]);(0,E.useEffect)(()=>{function m(D){C.current&&!C.current.contains(D.target)&&u(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);let j=(0,E.useCallback)(m=>{d(Z(m)),l(Z(m)),u(!1)},[d,l]),S=(0,E.useCallback)(m=>{if(s){if(m.key==="Backspace"||m.key==="Delete"){m.preventDefault(),_();return}if(m.key==="ArrowDown"||m.key==="ArrowUp"||m.key==="Enter"){m.preventDefault(),d(null),l(""),u(!0),A(0),setTimeout(()=>y.current?.focus(),0);return}if(m.key.length===1&&!m.ctrlKey&&!m.metaKey){m.preventDefault(),d(null),l(m.key),u(!0),A(0),setTimeout(()=>y.current?.focus(),0);return}return}m.key==="ArrowDown"?(m.preventDefault(),f?A(D=>Math.min(D+1,T.length-1)):(u(!0),A(0))):m.key==="ArrowUp"?(m.preventDefault(),A(D=>Math.max(D-1,0))):m.key==="Enter"?(m.preventDefault(),f&&v>=0&&T[v]&&j(T[v])):m.key==="Escape"&&u(!1)},[s,_,d,l,f,v,T,j]);(0,E.useEffect)(()=>{k.current&&v>=0&&k.current.querySelectorAll("[data-signal-option]")[v]?.scrollIntoView({block:"nearest"})},[v]);let F=[],b=0;for(let[m,D]of L){F.push((0,g.jsx)(Te,{group:m,references:I},`group-${m}`));for(let B of D){let R=b++,Ke=R===v;F.push((0,g.jsx)("div",{"data-signal-option":!0,className:`adapt-signal-selector-option ${Ke?"adapt-signal-selector-option--highlighted":""}`,onMouseDown:He=>{He.preventDefault(),j(B)},onMouseEnter:()=>A(R),children:(0,g.jsx)(je,{reference:B})},Z(B)))}}let P=["adapt-signal-selector",r&&"adapt-signal-selector--error",c].filter(Boolean).join(" "),z=s?.node==="constant",$=s?z?"adapt-signal-selector-selected-dot--constant":s.transmitterMode==="MODE_FAILURE"?"adapt-signal-selector-selected-dot--failure":s.transmitterMode==="MODE_STREAM"?"adapt-signal-selector-selected-dot--stream":"adapt-signal-selector-selected-dot--standard":"";return(0,g.jsxs)("div",{ref:C,className:P,"data-adapt-theme":h==="auto"?void 0:h,children:[s&&!n&&(0,g.jsxs)("div",{className:"adapt-signal-selector-selected",onClick:_,children:[z?(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon adapt-signal-selector-selected-icon--constant",children:(0,g.jsx)(Se,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:`adapt-signal-selector-selected-dot ${$}`}),s.nodeIcon&&(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon",children:s.nodeIcon})]}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-node",children:s.nodeLabel||s.node}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-sep",children:"\u203A"}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-signal",children:s.signal.label||s.signal.name}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-clear",onClick:m=>{m.stopPropagation(),_()},children:"\xD7"})]}),s&&n&&(0,g.jsxs)("div",{className:"adapt-signal-selector-selected adapt-signal-selector-selected--disabled",children:[z?(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon adapt-signal-selector-selected-icon--constant",children:(0,g.jsx)(Se,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:`adapt-signal-selector-selected-dot ${$}`}),s.nodeIcon&&(0,g.jsx)("span",{className:"adapt-signal-selector-selected-icon",children:s.nodeIcon})]}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-node",children:s.nodeLabel||s.node}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-sep",children:"\u203A"}),(0,g.jsx)("span",{className:"adapt-signal-selector-selected-signal",children:s.signal.label||s.signal.name})]}),(0,g.jsx)("input",{ref:y,type:"text",className:`adapt-signal-selector-input${s?" adapt-signal-selector-input--hidden":""}`,value:e,placeholder:a,disabled:n,onChange:m=>{l(m.target.value),u(!0),A(0),m.target.value||d(null)},onFocus:()=>{s||u(!0)},onKeyDown:S}),o&&(0,g.jsx)("span",{className:"adapt-signal-selector-error",children:o}),f&&!n&&(0,g.jsx)("div",{ref:k,className:"adapt-signal-selector-dropdown",children:T.length>0?F:(0,g.jsx)("div",{className:"adapt-signal-selector-no-results",children:"No signals found"})})]})}0&&(module.exports={FormatChip,FormatViewer,SignalGroupHeader,SignalOption,SignalSearch,SignalSelector,createSignalFilter,flattenSignals,getFormatLabel,getSchemaDescription,isArraySchema,isEmptySchema,isPrimitiveSchema,signalReferenceKey});
|
|
2
2
|
//# sourceMappingURL=react.cjs.map
|