@ttsc/graph 0.30.4 → 0.31.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/README.md +122 -30
- package/lib/CapturedProcessOutput.d.ts +47 -0
- package/lib/CapturedProcessOutput.js +3 -0
- package/lib/CapturedProcessOutput.js.map +1 -0
- package/lib/ILauncherOption.d.ts +22 -0
- package/lib/ILauncherOption.js +3 -0
- package/lib/ILauncherOption.js.map +1 -0
- package/lib/IProjectOptions.d.ts +18 -0
- package/lib/IProjectOptions.js +3 -0
- package/lib/IProjectOptions.js.map +1 -0
- package/lib/ParsedLauncherOptions.d.ts +13 -0
- package/lib/ParsedLauncherOptions.js +3 -0
- package/lib/ParsedLauncherOptions.js.map +1 -0
- package/lib/TtscGraphApplication.d.ts +38 -1
- package/lib/TtscGraphApplication.js +26 -1
- package/lib/TtscGraphApplication.js.map +1 -1
- package/lib/TtscGraphLauncherArguments.d.ts +115 -0
- package/lib/TtscGraphLauncherArguments.js +181 -0
- package/lib/TtscGraphLauncherArguments.js.map +1 -0
- package/lib/TtscGraphViewSnapshot.d.ts +35 -0
- package/lib/TtscGraphViewSnapshot.js +48 -0
- package/lib/TtscGraphViewSnapshot.js.map +1 -0
- package/lib/index.d.ts +9 -24
- package/lib/index.js +6 -128
- package/lib/index.js.map +1 -1
- package/lib/internal/GraphProcessTrace.d.ts +1 -0
- package/lib/internal/GraphProcessTrace.js +235 -0
- package/lib/internal/GraphProcessTrace.js.map +1 -0
- package/lib/launcherArgs.d.ts +75 -16
- package/lib/launcherArgs.js +77 -8
- package/lib/launcherArgs.js.map +1 -1
- package/lib/model/IArtifactDirectory.d.ts +26 -0
- package/lib/model/IArtifactDirectory.js +3 -0
- package/lib/model/IArtifactDirectory.js.map +1 -0
- package/lib/model/IArtifactInputs.d.ts +19 -0
- package/lib/model/IArtifactInputs.js +3 -0
- package/lib/model/IArtifactInputs.js.map +1 -0
- package/lib/model/IPublishedArtifacts.d.ts +76 -0
- package/lib/model/IPublishedArtifacts.js +3 -0
- package/lib/model/IPublishedArtifacts.js.map +1 -0
- package/lib/model/IPublishedArtifactsResident.d.ts +19 -0
- package/lib/model/IPublishedArtifactsResident.js +3 -0
- package/lib/model/IPublishedArtifactsResident.js.map +1 -0
- package/lib/model/ITtscLintDaemonTarget.d.ts +20 -0
- package/lib/model/ITtscLintDaemonTarget.js +3 -0
- package/lib/model/ITtscLintDaemonTarget.js.map +1 -0
- package/lib/model/TtscGraphLinePeer.d.ts +146 -0
- package/lib/model/TtscGraphLinePeer.js +213 -0
- package/lib/model/TtscGraphLinePeer.js.map +1 -0
- package/lib/model/TtscGraphMemory.d.ts +156 -16
- package/lib/model/TtscGraphMemory.js +228 -222
- package/lib/model/TtscGraphMemory.js.map +1 -1
- package/lib/model/TtscGraphNativeArguments.d.ts +40 -0
- package/lib/model/TtscGraphNativeArguments.js +64 -0
- package/lib/model/TtscGraphNativeArguments.js.map +1 -0
- package/lib/model/TtscGraphNodeId.d.ts +55 -3
- package/lib/model/TtscGraphNodeId.js +40 -2
- package/lib/model/TtscGraphNodeId.js.map +1 -1
- package/lib/model/TtscGraphProjection.d.ts +156 -0
- package/lib/model/TtscGraphProjection.js +390 -0
- package/lib/model/TtscGraphProjection.js.map +1 -0
- package/lib/model/TtscGraphProtocol.d.ts +28 -0
- package/lib/model/TtscGraphProtocol.js +928 -0
- package/lib/model/TtscGraphProtocol.js.map +1 -0
- package/lib/model/TtscGraphReadonly.d.ts +15 -0
- package/lib/model/TtscGraphReadonly.js +3 -0
- package/lib/model/TtscGraphReadonly.js.map +1 -0
- package/lib/model/TtscGraphRequestOptions.d.ts +16 -0
- package/lib/model/TtscGraphRequestOptions.js +3 -0
- package/lib/model/TtscGraphRequestOptions.js.map +1 -0
- package/lib/model/TtscGraphSession.d.ts +82 -36
- package/lib/model/TtscGraphSession.js +164 -1238
- package/lib/model/TtscGraphSession.js.map +1 -1
- package/lib/model/TtscGraphSessionOptions.d.ts +20 -0
- package/lib/model/TtscGraphSessionOptions.js +3 -0
- package/lib/model/TtscGraphSessionOptions.js.map +1 -0
- package/lib/model/TtscGraphSessionState.d.ts +187 -0
- package/lib/model/TtscGraphSessionState.js +417 -0
- package/lib/model/TtscGraphSessionState.js.map +1 -0
- package/lib/model/TtscGraphShardStore.d.ts +64 -3
- package/lib/model/TtscGraphShardStore.js +85 -15
- package/lib/model/TtscGraphShardStore.js.map +1 -1
- package/lib/model/TtscGraphSourceReader.d.ts +31 -8
- package/lib/model/TtscGraphSourceReader.js +37 -13
- package/lib/model/TtscGraphSourceReader.js.map +1 -1
- package/lib/model/TtscLintDaemon.d.ts +35 -17
- package/lib/model/TtscLintDaemon.js +39 -117
- package/lib/model/TtscLintDaemon.js.map +1 -1
- package/lib/model/TtscLintDaemonState.d.ts +69 -0
- package/lib/model/TtscLintDaemonState.js +166 -0
- package/lib/model/TtscLintDaemonState.js.map +1 -0
- package/lib/model/copyGraphRecords.d.ts +14 -0
- package/lib/model/copyGraphRecords.js +19 -0
- package/lib/model/copyGraphRecords.js.map +1 -0
- package/lib/model/copyGraphSnapshot.d.ts +17 -0
- package/lib/model/copyGraphSnapshot.js +33 -0
- package/lib/model/copyGraphSnapshot.js.map +1 -0
- package/lib/model/loadGraph.d.ts +19 -10
- package/lib/model/loadGraph.js +21 -12
- package/lib/model/loadGraph.js.map +1 -1
- package/lib/model/publishedArtifacts.d.ts +78 -97
- package/lib/model/publishedArtifacts.js +271 -85
- package/lib/model/publishedArtifacts.js.map +1 -1
- package/lib/nativeExecutable.d.ts +19 -8
- package/lib/nativeExecutable.js +75 -15
- package/lib/nativeExecutable.js.map +1 -1
- package/lib/reduce.d.ts +19 -45
- package/lib/reduce.js +19 -3
- package/lib/reduce.js.map +1 -1
- package/lib/resolveGraphBinary.d.ts +9 -0
- package/lib/resolveGraphBinary.js +11 -3
- package/lib/resolveGraphBinary.js.map +1 -1
- package/lib/runGraph.d.ts +21 -0
- package/lib/runGraph.js +83 -0
- package/lib/runGraph.js.map +1 -0
- package/lib/server/IResolvedGraphHandle.d.ts +22 -0
- package/lib/server/IResolvedGraphHandle.js +3 -0
- package/lib/server/IResolvedGraphHandle.js.map +1 -0
- package/lib/server/createServer.d.ts +14 -10
- package/lib/server/createServer.js +42 -39
- package/lib/server/createServer.js.map +1 -1
- package/lib/server/exportSurface.d.ts +23 -1
- package/lib/server/exportSurface.js +23 -1
- package/lib/server/exportSurface.js.map +1 -1
- package/lib/server/formatGraphFailure.d.ts +20 -0
- package/lib/server/formatGraphFailure.js +35 -0
- package/lib/server/formatGraphFailure.js.map +1 -0
- package/lib/server/pathPolicy.d.ts +70 -5
- package/lib/server/pathPolicy.js +66 -4
- package/lib/server/pathPolicy.js.map +1 -1
- package/lib/server/resolveHandle.d.ts +10 -5
- package/lib/server/resolveHandle.js +39 -7
- package/lib/server/resolveHandle.js.map +1 -1
- package/lib/server/resultAudit.d.ts +17 -14
- package/lib/server/resultAudit.js +56 -27
- package/lib/server/resultAudit.js.map +1 -1
- package/lib/server/resultNext.d.ts +26 -1
- package/lib/server/resultNext.js +14 -0
- package/lib/server/resultNext.js.map +1 -1
- package/lib/server/runDetails.d.ts +72 -15
- package/lib/server/runDetails.js +104 -69
- package/lib/server/runDetails.js.map +1 -1
- package/lib/server/runEntrypoints.d.ts +9 -0
- package/lib/server/runEntrypoints.js +9 -0
- package/lib/server/runEntrypoints.js.map +1 -1
- package/lib/server/runLookup.d.ts +13 -3
- package/lib/server/runLookup.js +19 -6
- package/lib/server/runLookup.js.map +1 -1
- package/lib/server/runOverview.d.ts +13 -4
- package/lib/server/runOverview.js +13 -4
- package/lib/server/runOverview.js.map +1 -1
- package/lib/server/runTour.d.ts +9 -0
- package/lib/server/runTour.js +33 -65
- package/lib/server/runTour.js.map +1 -1
- package/lib/server/runTrace.d.ts +25 -1
- package/lib/server/runTrace.js +133 -88
- package/lib/server/runTrace.js.map +1 -1
- package/lib/server/startServer.d.ts +16 -0
- package/lib/server/startServer.js +24 -1
- package/lib/server/startServer.js.map +1 -1
- package/lib/structures/ITtscGraphApplication.d.ts +95 -41
- package/lib/structures/ITtscGraphDecorator.d.ts +18 -0
- package/lib/structures/ITtscGraphDetails.d.ts +81 -6
- package/lib/structures/ITtscGraphDocTag.d.ts +17 -8
- package/lib/structures/ITtscGraphDump.d.ts +106 -8
- package/lib/structures/ITtscGraphEdge.d.ts +14 -2
- package/lib/structures/ITtscGraphEntrypoints.d.ts +81 -6
- package/lib/structures/ITtscGraphEscape.d.ts +24 -2
- package/lib/structures/ITtscGraphEvidence.d.ts +9 -0
- package/lib/structures/ITtscGraphLookup.d.ts +42 -9
- package/lib/structures/ITtscGraphNext.d.ts +12 -1
- package/lib/structures/ITtscGraphNode.d.ts +38 -11
- package/lib/structures/ITtscGraphOverview.d.ts +81 -6
- package/lib/structures/ITtscGraphSnapshot.d.ts +97 -2
- package/lib/structures/ITtscGraphSpan.d.ts +9 -0
- package/lib/structures/ITtscGraphTour.d.ts +83 -9
- package/lib/structures/ITtscGraphTrace.d.ts +99 -14
- package/lib/structures/RawDump.d.ts +22 -0
- package/lib/structures/RawDump.js +3 -0
- package/lib/structures/RawDump.js.map +1 -0
- package/lib/structures/RawEdge.d.ts +20 -0
- package/lib/structures/RawEdge.js +3 -0
- package/lib/structures/RawEdge.js.map +1 -0
- package/lib/structures/RawNode.d.ts +26 -0
- package/lib/structures/RawNode.js +3 -0
- package/lib/structures/RawNode.js.map +1 -0
- package/lib/structures/TtscGraphArtifactNodeKind.d.ts +9 -0
- package/lib/structures/TtscGraphArtifactNodeKind.js +9 -0
- package/lib/structures/TtscGraphArtifactNodeKind.js.map +1 -1
- package/lib/structures/TtscGraphDumpEdgeKind.d.ts +15 -1
- package/lib/structures/TtscGraphDumpNodeKind.d.ts +9 -0
- package/lib/structures/TtscGraphEdgeKind.d.ts +13 -4
- package/lib/structures/TtscGraphNodeKind.d.ts +9 -0
- package/lib/structures/TtscGraphNodeModifier.d.ts +9 -0
- package/lib/structures/ViewerLink.d.ts +20 -0
- package/lib/structures/ViewerLink.js +3 -0
- package/lib/structures/ViewerLink.js.map +1 -0
- package/lib/structures/ViewerNode.d.ts +24 -0
- package/lib/structures/ViewerNode.js +3 -0
- package/lib/structures/ViewerNode.js.map +1 -0
- package/lib/structures/ViewerPayload.d.ts +42 -0
- package/lib/structures/ViewerPayload.js +3 -0
- package/lib/structures/ViewerPayload.js.map +1 -0
- package/lib/view.d.ts +9 -0
- package/lib/view.js +203 -91
- package/lib/view.js.map +1 -1
- package/lib/viewer/viewer.js +1 -1
- package/package.json +8 -6
- package/src/CapturedProcessOutput.ts +50 -0
- package/src/ILauncherOption.ts +24 -0
- package/src/IProjectOptions.ts +19 -0
- package/src/ParsedLauncherOptions.ts +13 -0
- package/src/TtscGraphApplication.ts +38 -1
- package/src/TtscGraphLauncherArguments.ts +207 -0
- package/src/TtscGraphViewSnapshot.ts +46 -0
- package/src/index.ts +9 -160
- package/src/internal/GraphProcessTrace.ts +242 -0
- package/src/launcherArgs.ts +89 -23
- package/src/model/IArtifactDirectory.ts +27 -0
- package/src/model/IArtifactInputs.ts +21 -0
- package/src/model/IPublishedArtifacts.ts +81 -0
- package/src/model/IPublishedArtifactsResident.ts +24 -0
- package/src/model/ITtscLintDaemonTarget.ts +22 -0
- package/src/model/TtscGraphLinePeer.ts +318 -0
- package/src/model/TtscGraphMemory.ts +284 -246
- package/src/model/TtscGraphNativeArguments.ts +67 -0
- package/src/model/TtscGraphNodeId.ts +57 -3
- package/src/model/TtscGraphProjection.ts +473 -0
- package/src/model/TtscGraphProtocol.ts +90 -0
- package/src/model/TtscGraphReadonly.ts +17 -0
- package/src/model/TtscGraphRequestOptions.ts +16 -0
- package/src/model/TtscGraphSession.ts +196 -475
- package/src/model/TtscGraphSessionOptions.ts +22 -0
- package/src/model/TtscGraphSessionState.ts +558 -0
- package/src/model/TtscGraphShardStore.ts +99 -23
- package/src/model/TtscGraphSourceReader.ts +37 -15
- package/src/model/TtscLintDaemon.ts +55 -136
- package/src/model/TtscLintDaemonState.ts +174 -0
- package/src/model/copyGraphRecords.ts +17 -0
- package/src/model/copyGraphSnapshot.ts +30 -0
- package/src/model/loadGraph.ts +23 -12
- package/src/model/publishedArtifacts.ts +361 -182
- package/src/nativeExecutable.ts +93 -26
- package/src/reduce.ts +24 -51
- package/src/resolveGraphBinary.ts +13 -3
- package/src/runGraph.ts +90 -0
- package/src/server/IResolvedGraphHandle.ts +24 -0
- package/src/server/createServer.ts +16 -22
- package/src/server/exportSurface.ts +23 -1
- package/src/server/formatGraphFailure.ts +32 -0
- package/src/server/pathPolicy.ts +70 -5
- package/src/server/resolveHandle.ts +45 -14
- package/src/server/resultAudit.ts +58 -27
- package/src/server/resultNext.ts +26 -1
- package/src/server/runDetails.ts +138 -73
- package/src/server/runEntrypoints.ts +13 -1
- package/src/server/runLookup.ts +23 -7
- package/src/server/runOverview.ts +17 -5
- package/src/server/runTour.ts +44 -82
- package/src/server/runTrace.ts +175 -102
- package/src/server/startServer.ts +29 -1
- package/src/structures/ITtscGraphApplication.ts +95 -41
- package/src/structures/ITtscGraphDecorator.ts +18 -0
- package/src/structures/ITtscGraphDetails.ts +81 -6
- package/src/structures/ITtscGraphDocTag.ts +17 -8
- package/src/structures/ITtscGraphDump.ts +106 -8
- package/src/structures/ITtscGraphEdge.ts +14 -2
- package/src/structures/ITtscGraphEntrypoints.ts +81 -6
- package/src/structures/ITtscGraphEscape.ts +24 -2
- package/src/structures/ITtscGraphEvidence.ts +9 -0
- package/src/structures/ITtscGraphLookup.ts +42 -9
- package/src/structures/ITtscGraphNext.ts +12 -1
- package/src/structures/ITtscGraphNode.ts +38 -11
- package/src/structures/ITtscGraphOverview.ts +88 -6
- package/src/structures/ITtscGraphSnapshot.ts +117 -2
- package/src/structures/ITtscGraphSpan.ts +9 -0
- package/src/structures/ITtscGraphTour.ts +83 -9
- package/src/structures/ITtscGraphTrace.ts +100 -14
- package/src/structures/RawDump.ts +25 -0
- package/src/structures/RawEdge.ts +22 -0
- package/src/structures/RawNode.ts +31 -0
- package/src/structures/TtscGraphArtifactNodeKind.ts +9 -0
- package/src/structures/TtscGraphDumpEdgeKind.ts +15 -1
- package/src/structures/TtscGraphDumpNodeKind.ts +9 -0
- package/src/structures/TtscGraphEdgeKind.ts +13 -4
- package/src/structures/TtscGraphNodeKind.ts +9 -0
- package/src/structures/TtscGraphNodeModifier.ts +9 -0
- package/src/structures/ViewerLink.ts +22 -0
- package/src/structures/ViewerNode.ts +28 -0
- package/src/structures/ViewerPayload.ts +52 -0
- package/src/view.ts +208 -110
- package/src/viewer/legend.ts +119 -27
package/lib/view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"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"}
|
package/lib/viewer/viewer.js
CHANGED
|
@@ -4607,4 +4607,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4607
4607
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4608
4608
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wM(n,e){return pM(n)||bM(n,e)||Wp(n,e)||MM()}function TM(n){return mM(n)||yM(n)||Wp(n)||SM()}function AM(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function EM(n){var e=AM(n,"string");return typeof e=="symbol"?e:e+""}function Wp(n,e){if(n){if(typeof n=="string")return xh(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xh(n,e):void 0}}var Mr=new WeakMap,Es=new WeakMap,Sr=new WeakMap,mh=new WeakMap,gh=new WeakMap,_h=new WeakMap,Xp=(function(){function n(){_M(this,n),br(this,Mr,new Map),br(this,Es,new Map),br(this,Sr,function(e){return e}),br(this,mh,function(){return{}}),br(this,gh,function(){}),br(this,_h,function(){})}return vM(n,[{key:"getObj",value:function(t){return Bt(Mr,this).get(Bt(Sr,this).call(this,t))}},{key:"getData",value:function(t){return Bt(Es,this).get(t)}},{key:"entries",value:function(){return TM(Bt(Es,this).entries()).map(function(t){var i=wM(t,2),r=i[0],s=i[1];return[s,r]})}},{key:"id",value:function(t){return nl(Sr,this,je(t)),this}},{key:"onCreateObj",value:function(t){return nl(mh,this,t),this}},{key:"onUpdateObj",value:function(t){return nl(gh,this,t),this}},{key:"onRemoveObj",value:function(t){return nl(_h,this,t),this}},{key:"digest",value:function(t){var i=this;t.filter(function(s){return!Bt(Mr,i).has(Bt(Sr,i).call(i,s))}).forEach(function(s){var a=Bt(mh,i).call(i,s);Bt(Mr,i).set(Bt(Sr,i).call(i,s),a),Bt(Es,i).set(a,s)});var r=new Map(t.map(function(s){return[Bt(Sr,i).call(i,s),s]}));return Bt(Mr,this).forEach(function(s,a){r.has(a)?Bt(gh,i).call(i,s,r.get(a)):(Bt(_h,i).call(i,s,a),Bt(Mr,i).delete(a),Bt(Es,i).delete(s))}),this}},{key:"clear",value:function(){return this.digest([]),this}}])})();function qp(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}var vh=Symbol("implicit");function Cs(){var n=new yr,e=[],t=[],i=vh;function r(s){let a=n.get(s);if(a===void 0){if(i!==vh)return i;n.set(s,a=e.push(s)-1)}return t[a%t.length]}return r.domain=function(s){if(!arguments.length)return e.slice();e=[],n=new yr;for(let a of s)n.has(a)||n.set(a,e.push(a)-1);return r},r.range=function(s){return arguments.length?(t=Array.from(s),r):t.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return Cs(e,t).unknown(i)},qp.apply(r,arguments),r}function Yp(n){for(var e=n.length/6|0,t=new Array(e),i=0;i<e;)t[i]="#"+n.slice(i*6,++i*6);return t}var yh=Yp("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function il(n){"@babel/helpers - typeof";return il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},il(n)}var CM=/^\s+/,RM=/\s+$/;function Ee(n,e){if(n=n||"",e=e||{},n instanceof Ee)return n;if(!(this instanceof Ee))return new Ee(n,e);var t=PM(n);this._originalInput=n,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}Ee.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,i,r,s,a,o;return t=e.r/255,i=e.g/255,r=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),.2126*s+.7152*a+.0722*o},setAlpha:function(e){return this._a=em(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=jp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=jp(this._r,this._g,this._b),t=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+i+"%, "+r+"%)":"hsva("+t+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=$p(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=$p(this._r,this._g,this._b),t=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+i+"%, "+r+"%)":"hsla("+t+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Zp(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return NM(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(dt(this._r,255)*100)+"%",g:Math.round(dt(this._g,255)*100)+"%",b:Math.round(dt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(dt(this._r,255)*100)+"%, "+Math.round(dt(this._g,255)*100)+"%, "+Math.round(dt(this._b,255)*100)+"%)":"rgba("+Math.round(dt(this._r,255)*100)+"%, "+Math.round(dt(this._g,255)*100)+"%, "+Math.round(dt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:qM[Zp(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Jp(this._r,this._g,this._b,this._a),i=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var s=Ee(e);i="#"+Jp(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+i+")"},toString:function(e){var t=!!e;e=e||this._format;var i=!1,r=this._a<1&&this._a>=0,s=!t&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return Ee(this.toString())},_applyModification:function(e,t){var i=e.apply(null,[this].concat([].slice.call(t)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(BM,arguments)},brighten:function(){return this._applyModification(kM,arguments)},darken:function(){return this._applyModification(zM,arguments)},desaturate:function(){return this._applyModification(UM,arguments)},saturate:function(){return this._applyModification(OM,arguments)},greyscale:function(){return this._applyModification(FM,arguments)},spin:function(){return this._applyModification(VM,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(WM,arguments)},complement:function(){return this._applyCombination(GM,arguments)},monochromatic:function(){return this._applyCombination(XM,arguments)},splitcomplement:function(){return this._applyCombination(HM,arguments)},triad:function(){return this._applyCombination(Kp,[3])},tetrad:function(){return this._applyCombination(Kp,[4])}};Ee.fromRatio=function(n,e){if(il(n)=="object"){var t={};for(var i in n)n.hasOwnProperty(i)&&(i==="a"?t[i]=n[i]:t[i]=Rs(n[i]));n=t}return Ee(n,e)};function PM(n){var e={r:0,g:0,b:0},t=1,i=null,r=null,s=null,a=!1,o=!1;return typeof n=="string"&&(n=ZM(n)),il(n)=="object"&&(jn(n.r)&&jn(n.g)&&jn(n.b)?(e=IM(n.r,n.g,n.b),a=!0,o=String(n.r).substr(-1)==="%"?"prgb":"rgb"):jn(n.h)&&jn(n.s)&&jn(n.v)?(i=Rs(n.s),r=Rs(n.v),e=LM(n.h,i,r),a=!0,o="hsv"):jn(n.h)&&jn(n.s)&&jn(n.l)&&(i=Rs(n.s),s=Rs(n.l),e=DM(n.h,i,s),a=!0,o="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=em(t),{ok:a,format:n.format||o,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function IM(n,e,t){return{r:dt(n,255)*255,g:dt(e,255)*255,b:dt(t,255)*255}}function $p(n,e,t){n=dt(n,255),e=dt(e,255),t=dt(t,255);var i=Math.max(n,e,t),r=Math.min(n,e,t),s,a,o=(i+r)/2;if(i==r)s=a=0;else{var l=i-r;switch(a=o>.5?l/(2-i-r):l/(i+r),i){case n:s=(e-t)/l+(e<t?6:0);break;case e:s=(t-n)/l+2;break;case t:s=(n-e)/l+4;break}s/=6}return{h:s,s:a,l:o}}function DM(n,e,t){var i,r,s;n=dt(n,360),e=dt(e,100),t=dt(t,100);function a(c,h,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?c+(h-c)*6*d:d<1/2?h:d<2/3?c+(h-c)*(2/3-d)*6:c}if(e===0)i=r=s=t;else{var o=t<.5?t*(1+e):t+e-t*e,l=2*t-o;i=a(l,o,n+1/3),r=a(l,o,n),s=a(l,o,n-1/3)}return{r:i*255,g:r*255,b:s*255}}function jp(n,e,t){n=dt(n,255),e=dt(e,255),t=dt(t,255);var i=Math.max(n,e,t),r=Math.min(n,e,t),s,a,o=i,l=i-r;if(a=i===0?0:l/i,i==r)s=0;else{switch(i){case n:s=(e-t)/l+(e<t?6:0);break;case e:s=(t-n)/l+2;break;case t:s=(n-e)/l+4;break}s/=6}return{h:s,s:a,v:o}}function LM(n,e,t){n=dt(n,360)*6,e=dt(e,100),t=dt(t,100);var i=Math.floor(n),r=n-i,s=t*(1-e),a=t*(1-r*e),o=t*(1-(1-r)*e),l=i%6,c=[t,a,s,s,o,t][l],h=[o,t,t,a,s,s][l],d=[s,s,o,t,t,a][l];return{r:c*255,g:h*255,b:d*255}}function Zp(n,e,t,i){var r=[Sn(Math.round(n).toString(16)),Sn(Math.round(e).toString(16)),Sn(Math.round(t).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function NM(n,e,t,i,r){var s=[Sn(Math.round(n).toString(16)),Sn(Math.round(e).toString(16)),Sn(Math.round(t).toString(16)),Sn(tm(i))];return r&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Jp(n,e,t,i){var r=[Sn(tm(i)),Sn(Math.round(n).toString(16)),Sn(Math.round(e).toString(16)),Sn(Math.round(t).toString(16))];return r.join("")}Ee.equals=function(n,e){return!n||!e?!1:Ee(n).toRgbString()==Ee(e).toRgbString()};Ee.random=function(){return Ee.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function UM(n,e){e=e===0?0:e||10;var t=Ee(n).toHsl();return t.s-=e/100,t.s=rl(t.s),Ee(t)}function OM(n,e){e=e===0?0:e||10;var t=Ee(n).toHsl();return t.s+=e/100,t.s=rl(t.s),Ee(t)}function FM(n){return Ee(n).desaturate(100)}function BM(n,e){e=e===0?0:e||10;var t=Ee(n).toHsl();return t.l+=e/100,t.l=rl(t.l),Ee(t)}function kM(n,e){e=e===0?0:e||10;var t=Ee(n).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Ee(t)}function zM(n,e){e=e===0?0:e||10;var t=Ee(n).toHsl();return t.l-=e/100,t.l=rl(t.l),Ee(t)}function VM(n,e){var t=Ee(n).toHsl(),i=(t.h+e)%360;return t.h=i<0?360+i:i,Ee(t)}function GM(n){var e=Ee(n).toHsl();return e.h=(e.h+180)%360,Ee(e)}function Kp(n,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Ee(n).toHsl(),i=[Ee(n)],r=360/e,s=1;s<e;s++)i.push(Ee({h:(t.h+s*r)%360,s:t.s,l:t.l}));return i}function HM(n){var e=Ee(n).toHsl(),t=e.h;return[Ee(n),Ee({h:(t+72)%360,s:e.s,l:e.l}),Ee({h:(t+216)%360,s:e.s,l:e.l})]}function WM(n,e,t){e=e||6,t=t||30;var i=Ee(n).toHsl(),r=360/t,s=[Ee(n)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,s.push(Ee(i));return s}function XM(n,e){e=e||6;for(var t=Ee(n).toHsv(),i=t.h,r=t.s,s=t.v,a=[],o=1/e;e--;)a.push(Ee({h:i,s:r,v:s})),s=(s+o)%1;return a}Ee.mix=function(n,e,t){t=t===0?0:t||50;var i=Ee(n).toRgb(),r=Ee(e).toRgb(),s=t/100,a={r:(r.r-i.r)*s+i.r,g:(r.g-i.g)*s+i.g,b:(r.b-i.b)*s+i.b,a:(r.a-i.a)*s+i.a};return Ee(a)};Ee.readability=function(n,e){var t=Ee(n),i=Ee(e);return(Math.max(t.getLuminance(),i.getLuminance())+.05)/(Math.min(t.getLuminance(),i.getLuminance())+.05)};Ee.isReadable=function(n,e,t){var i=Ee.readability(n,e),r,s;switch(s=!1,r=JM(t),r.level+r.size){case"AAsmall":case"AAAlarge":s=i>=4.5;break;case"AAlarge":s=i>=3;break;case"AAAsmall":s=i>=7;break}return s};Ee.mostReadable=function(n,e,t){var i=null,r=0,s,a,o,l;t=t||{},a=t.includeFallbackColors,o=t.level,l=t.size;for(var c=0;c<e.length;c++)s=Ee.readability(n,e[c]),s>r&&(r=s,i=Ee(e[c]));return Ee.isReadable(n,i,{level:o,size:l})||!a?i:(t.includeFallbackColors=!1,Ee.mostReadable(n,["#fff","#000"],t))};var bh=Ee.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},qM=Ee.hexNames=YM(bh);function YM(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function em(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function dt(n,e){$M(n)&&(n="100%");var t=jM(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function rl(n){return Math.min(1,Math.max(0,n))}function sn(n){return parseInt(n,16)}function $M(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function jM(n){return typeof n=="string"&&n.indexOf("%")!=-1}function Sn(n){return n.length==1?"0"+n:""+n}function Rs(n){return n<=1&&(n=n*100+"%"),n}function tm(n){return Math.round(parseFloat(n)*255).toString(16)}function Qp(n){return sn(n)/255}var Mn=(function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function jn(n){return!!Mn.CSS_UNIT.exec(n)}function ZM(n){n=n.replace(CM,"").replace(RM,"").toLowerCase();var e=!1;if(bh[n])n=bh[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Mn.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=Mn.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Mn.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=Mn.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Mn.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=Mn.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Mn.hex8.exec(n))?{r:sn(t[1]),g:sn(t[2]),b:sn(t[3]),a:Qp(t[4]),format:e?"name":"hex8"}:(t=Mn.hex6.exec(n))?{r:sn(t[1]),g:sn(t[2]),b:sn(t[3]),format:e?"name":"hex"}:(t=Mn.hex4.exec(n))?{r:sn(t[1]+""+t[1]),g:sn(t[2]+""+t[2]),b:sn(t[3]+""+t[3]),a:Qp(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=Mn.hex3.exec(n))?{r:sn(t[1]+""+t[1]),g:sn(t[2]+""+t[2]),b:sn(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function JM(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}function Eh(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=Array(e);t<e;t++)i[t]=n[t];return i}function KM(n){if(Array.isArray(n))return n}function QM(n){if(Array.isArray(n))return Eh(n)}function cm(n,e,t){if(typeof n=="function"?n===e:n.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function eS(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function hm(n,e,t){return e=wr(e),lS(n,Ih()?Reflect.construct(e,t||[],wr(n).constructor):e.apply(n,t))}function tS(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function um(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Mh(n,e){return n.get(cm(n,e))}function nm(n,e,t){tS(n,e),e.set(n,t)}function im(n,e,t){return n.set(cm(n,e),t),t}function fm(n,e,t){if(Ih())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var r=new(n.bind.apply(n,i));return r}function nS(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,mm(i.key),i)}}function dm(n,e,t){return e&&nS(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function ol(n,e,t){return(e=mm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ch(){return Ch=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,e,t){var i=cS(n,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(arguments.length<3?n:t):r.value}},Ch.apply(null,arguments)}function wr(n){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wr(n)}function pm(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&Rh(n,e)}function Ih(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ih=function(){return!!n})()}function iS(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function rS(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var i,r,s,a,o=[],l=!0,c=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(l=(i=s.call(t)).done)&&(o.push(i.value),o.length!==e);l=!0);}catch(h){c=!0,r=h}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw r}}return o}}function sS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4609
4609
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4610
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rm(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function oS(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?rm(Object(t),!0).forEach(function(i){ol(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):rm(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function lS(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eS(n)}function Rh(n,e){return Rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Rh(n,e)}function Ds(n,e){return KM(n)||rS(n,e)||gm(n,e)||sS()}function cS(n,e){for(;!{}.hasOwnProperty.call(n,e)&&(n=wr(n))!==null;);return n}function Sh(n,e,t,i){var r=Ch(wr(n.prototype),e,t);return typeof r=="function"?function(s){return r.apply(t,s)}:r}function wn(n){return QM(n)||iS(n)||gm(n)||aS()}function hS(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mm(n){var e=hS(n,"string");return typeof e=="symbol"?e:e+""}function Ph(n){"@babel/helpers - typeof";return Ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ph(n)}function gm(n,e){if(n){if(typeof n=="string")return Eh(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Eh(n,e):void 0}}var _m=function(e){e instanceof Array?e.forEach(_m):(e.map&&e.map.dispose(),e.dispose())},Dh=function(e){e.geometry&&e.geometry.dispose(),e.material&&_m(e.material),e.texture&&e.texture.dispose(),e.children&&e.children.forEach(Dh)},sm=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Dh(t)}},wh=new WeakMap,sl=new WeakMap,Ps=(function(n){function e(t){var i,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.dataBindAttr,a=s===void 0?"__data":s,o=r.objBindAttr,l=o===void 0?"__threeObj":o;return um(this,e),i=hm(this,e),ol(i,"scene",void 0),nm(i,wh,void 0),nm(i,sl,void 0),i.scene=t,im(wh,i,a),im(sl,i,l),i.onRemoveObj(function(){}),i}return pm(e,n),dm(e,[{key:"onCreateObj",value:function(i){var r=this;return Sh(e,"onCreateObj",this)([function(s){var a=i(s);return s[Mh(sl,r)]=a,a[Mh(wh,r)]=s,r.scene.add(a),a}]),this}},{key:"onRemoveObj",value:function(i){var r=this;return Sh(e,"onRemoveObj",this)([function(s,a){var o=Sh(e,"getData",r)([s]);i(s,a),r.scene.remove(s),Dh(s),delete o[Mh(sl,r)]}]),this}}])})(Xp),Is=function(e){return isNaN(e)?parseInt(Ee(e).toHex(),16):e},Th=function(e){return isNaN(e)?Ee(e).getAlpha():1},uS=Cs(yh);function am(n,e,t){!e||typeof t!="string"||n.filter(function(i){return!i[t]}).forEach(function(i){i[t]=uS(e(i))})}function fS(n,e){var t=n.nodes,i=n.links,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=r.nodeFilter,a=s===void 0?function(){return!0}:s,o=r.onLoopError,l=o===void 0?function(p){throw"Invalid DAG structure! Found cycle in node path: ".concat(p.join(" -> "),".")}:o,c={};t.forEach(function(p){return c[e(p)]={data:p,out:[],depth:-1,skip:!a(p)}}),i.forEach(function(p){var m=p.source,x=p.target,g=S(m),f=S(x);if(!c.hasOwnProperty(g))throw"Missing source node with id: ".concat(g);if(!c.hasOwnProperty(f))throw"Missing target node with id: ".concat(f);var v=c[g],M=c[f];v.out.push(M);function S(w){return Ph(w)==="object"?e(w):w}});var h=[];u(Object.values(c));var d=Object.assign.apply(Object,[{}].concat(wn(Object.entries(c).filter(function(p){var m=Ds(p,2),x=m[1];return!x.skip}).map(function(p){var m=Ds(p,2),x=m[0],g=m[1];return ol({},x,g.depth)}))));return d;function u(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=function(){var S=p[f];if(m.indexOf(S)!==-1){var w=[].concat(wn(m.slice(m.indexOf(S))),[S]).map(function(y){return e(y.data)});return h.some(function(y){return y.length===w.length&&y.every(function(A,_){return A===w[_]})})||(h.push(w),l(w)),1}x>S.depth&&(S.depth=x,u(S.out,[].concat(wn(m),[S]),x+(S.skip?0:1)))},f=0,v=p.length;f<v;f++)g()}}var Ne=window.THREE?window.THREE:{Group:Rn,Mesh:Xt,MeshLambertMaterial:Jr,Color:Xe,BufferGeometry:Ot,BufferAttribute:zt,Matrix4:ct,Vector3:U,SphereGeometry:jr,CylinderGeometry:or,TubeGeometry:Zr,ConeGeometry:qr,Line:Hr,LineBasicMaterial:sr,QuadraticBezierCurve3:Ri,CubicBezierCurve3:lr,Box3:In},om={graph:$d,forcelayout:lm.default},dS=2,Ah=new Ne.BufferGeometry().setAttribute?"setAttribute":"addAttribute",al=new Ne.BufferGeometry().applyMatrix4?"applyMatrix4":"applyMatrix",pS=Vp({props:{jsonUrl:{onChange:function(e,t){var i=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then(function(r){return r.json()}).then(function(r){t.fetchingJson=!1,t.onFinishLoading(r),i.graphData(r)}))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var i=t.d3ForceLayout.force("charge");i&&i.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y");function r(s,a){s.forEach(function(o){delete o[a],delete o["v".concat(a)]})}}},dagMode:{onChange:function(e,t){!e&&t.forceEngine==="d3"&&(t.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=i.fz=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},nodePositionUpdate:{triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},linkDirectionalParticleThreeObject:{},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,i){return i===void 0?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,i),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t=e.forceEngine!=="ngraph";return e.engineRunning&&i(),r(),s(),this;function i(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());var a=je(e.nodeThreeObjectExtend);e.nodeDataMapper.entries().forEach(function(u){var p=Ds(u,2),m=p[0],x=p[1];if(x){var g=t?m:e.layout.getNodePosition(m[e.nodeId]),f=a(m);(!e.nodePositionUpdate||!e.nodePositionUpdate(f?x.children[0]:x,{x:g.x,y:g.y,z:g.z},m)||f)&&(x.position.x=g.x,x.position.y=g.y||0,x.position.z=g.z||0)}});var o=je(e.linkWidth),l=je(e.linkCurvature),c=je(e.linkCurveRotation),h=je(e.linkThreeObjectExtend);e.linkDataMapper.entries().forEach(function(u){var p=Ds(u,2),m=p[0],x=p[1];if(x){var g=t?m:e.layout.getLinkPosition(e.layout.graph.getLink(m.source,m.target).id),f=g[t?"source":"from"],v=g[t?"target":"to"];if(!(!f||!v||!f.hasOwnProperty("x")||!v.hasOwnProperty("x"))){d(m);var M=h(m);if(!(e.linkPositionUpdate&&e.linkPositionUpdate(M?x.children[1]:x,{start:{x:f.x,y:f.y,z:f.z},end:{x:v.x,y:v.y,z:v.z}},m)&&!M)){var S=30,w=m.__curve,y=x.children.length?x.children[0]:x;if(y.type==="Line"){if(w){var _=w.getPoints(S);y.geometry.getAttribute("position").array.length!==_.length*3&&y.geometry[Ah]("position",new Ne.BufferAttribute(new Float32Array(_.length*3),3)),y.geometry.setFromPoints(_)}else{var A=y.geometry.getAttribute("position");(!A||!A.array||A.array.length!==6)&&y.geometry[Ah]("position",A=new Ne.BufferAttribute(new Float32Array(6),3)),A.array[0]=f.x,A.array[1]=f.y||0,A.array[2]=f.z||0,A.array[3]=v.x,A.array[4]=v.y||0,A.array[5]=v.z||0,A.needsUpdate=!0}y.geometry.computeBoundingSphere()}else if(y.type==="Mesh")if(w){y.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(y.position.set(0,0,0),y.rotation.set(0,0,0),y.scale.set(1,1,1));var R=Math.ceil(o(m)*10)/10,L=R/2,k=new Ne.TubeGeometry(w,S,L,e.linkResolution,!1);y.geometry.dispose(),y.geometry=k}else{if(!y.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var C=Math.ceil(o(m)*10)/10,D=C/2,P=new Ne.CylinderGeometry(D,D,1,e.linkResolution,1,!1);P[al](new Ne.Matrix4().makeTranslation(0,1/2,0)),P[al](new Ne.Matrix4().makeRotationX(Math.PI/2)),y.geometry.dispose(),y.geometry=P}var N=new Ne.Vector3(f.x,f.y||0,f.z||0),V=new Ne.Vector3(v.x,v.y||0,v.z||0),I=N.distanceTo(V);y.position.x=N.x,y.position.y=N.y,y.position.z=N.z,y.scale.z=I,y.parent.localToWorld(V),y.lookAt(V)}}}}});function d(u){var p=t?u:e.layout.getLinkPosition(e.layout.graph.getLink(u.source,u.target).id),m=p[t?"source":"from"],x=p[t?"target":"to"];if(!(!m||!x||!m.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var g=l(u);if(!g)u.__curve=null;else{var f=new Ne.Vector3(m.x,m.y||0,m.z||0),v=new Ne.Vector3(x.x,x.y||0,x.z||0),M=f.distanceTo(v),S,w=c(u);if(M>0){var y=x.x-m.x,A=x.y-m.y||0,_=new Ne.Vector3().subVectors(v,f),C=_.clone().multiplyScalar(g).cross(y!==0||A!==0?new Ne.Vector3(0,0,1):new Ne.Vector3(0,1,0)).applyAxisAngle(_.normalize(),w).add(new Ne.Vector3().addVectors(f,v).divideScalar(2));S=new Ne.QuadraticBezierCurve3(f,C,v)}else{var D=g*70,P=-w,N=P+Math.PI/2;S=new Ne.CubicBezierCurve3(f,new Ne.Vector3(D*Math.cos(N),D*Math.sin(N),0).add(f),new Ne.Vector3(D*Math.cos(P),D*Math.sin(P),0).add(f),v)}u.__curve=S}}}}function r(){var a=je(e.linkDirectionalArrowRelPos),o=je(e.linkDirectionalArrowLength),l=je(e.nodeVal);e.arrowDataMapper.entries().forEach(function(c){var h=Ds(c,2),d=h[0],u=h[1];if(u){var p=t?d:e.layout.getLinkPosition(e.layout.graph.getLink(d.source,d.target).id),m=p[t?"source":"from"],x=p[t?"target":"to"];if(!(!m||!x||!m.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var g=Math.cbrt(Math.max(0,l(m)||1))*e.nodeRelSize,f=Math.cbrt(Math.max(0,l(x)||1))*e.nodeRelSize,v=o(d),M=a(d),S=d.__curve?function(D){return d.__curve.getPoint(D)}:function(D){var P=function(V,I,R,L){return I[V]+(R[V]-I[V])*L||0};return{x:P("x",m,x,D),y:P("y",m,x,D),z:P("z",m,x,D)}},w=d.__curve?d.__curve.getLength():Math.sqrt(["x","y","z"].map(function(D){return Math.pow((x[D]||0)-(m[D]||0),2)}).reduce(function(D,P){return D+P},0)),y=g+v+(w-g-f-v)*M,A=S(y/w),_=S((y-v)/w);["x","y","z"].forEach(function(D){return u.position[D]=_[D]});var C=fm(Ne.Vector3,wn(["x","y","z"].map(function(D){return A[D]})));u.parent.localToWorld(C),u.lookAt(C)}}})}function s(){var a=je(e.linkDirectionalParticleSpeed),o=je(e.linkDirectionalParticleOffset);e.graphData.links.forEach(function(l){var c=e.particlesDataMapper.getObj(l),h=c&&c.children,d=l.__singleHopPhotonsObj&&l.__singleHopPhotonsObj.children;if(!((!d||!d.length)&&(!h||!h.length))){var u=t?l:e.layout.getLinkPosition(e.layout.graph.getLink(l.source,l.target).id),p=u[t?"source":"from"],m=u[t?"target":"to"];if(!(!p||!m||!p.hasOwnProperty("x")||!m.hasOwnProperty("x"))){var x=a(l),g=Math.abs(o(l)),f=l.__curve?function(M){return l.__curve.getPoint(M)}:function(M){var S=function(y,A,_,C){return A[y]+(_[y]-A[y])*C||0};return{x:S("x",p,m,M),y:S("y",p,m,M),z:S("z",p,m,M)}},v=[].concat(wn(h||[]),wn(d||[]));v.forEach(function(M,S){var w=M.parent.__linkThreeObjType==="singleHopPhotons";if(M.hasOwnProperty("__progressRatio")||(M.__progressRatio=w?x<0?1:0:(S+g)/h.length),M.__progressRatio+=x,M.__progressRatio>=1||M.__progressRatio<0)if(!w)M.__progressRatio=M.__progressRatio%1,M.__progressRatio<0&&M.__progressRatio++;else{M.parent.remove(M),sm(M);return}var y=M.__progressRatio,A=f(y);M.geometry.type!=="SphereGeometry"&&M.lookAt(A.x,A.y,A.z),["x","y","z"].forEach(function(_){return M.position[_]=A[_]})})}}})}},emitParticle:function(e,t){if(t&&e.graphData.links.includes(t)){if(!t.__singleHopPhotonsObj){var i=new Ne.Group;i.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=i,e.graphScene.add(i)}var r=je(e.linkDirectionalParticleThreeObject)(t);if(r&&e.linkDirectionalParticleThreeObject===r&&(r=r.clone()),!r){var s=je(e.linkDirectionalParticleWidth),a=Math.ceil(s(t)*10)/10/2,o=e.linkDirectionalParticleResolution,l=new Ne.SphereGeometry(a,o,o),c=je(e.linkColor),h=je(e.linkDirectionalParticleColor),d=h(t)||c(t)||"#f0f0f0",u=new Ne.Color(Is(d)),p=e.linkOpacity*3,m=new Ne.MeshLambertMaterial({color:u,transparent:!0,opacity:p});r=new Ne.Mesh(l,m)}t.__singleHopPhotonsObj.add(r)}return this},getGraphBbox:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};if(!e.initialised)return null;var i=(function r(s){var a=[];if(s.geometry){s.geometry.computeBoundingBox();var o=new Ne.Box3;o.copy(s.geometry.boundingBox).applyMatrix4(s.matrixWorld),a.push(o)}return a.concat.apply(a,wn((s.children||[]).filter(function(l){return!l.hasOwnProperty("__graphObjType")||l.__graphObjType==="node"&&t(l.__data)}).map(r)))})(e.graphScene);return i.length?Object.assign.apply(Object,wn(["x","y","z"].map(function(r){return ol({},r,[tl(i,function(s){return s.min[r]}),el(i,function(s){return s.max[r]})])}))):null}},stateInit:function(){return{d3ForceLayout:Qc().force("link",Yc()).force("charge",eh()).force("center",Hc()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e,t.nodeDataMapper=new Ps(e,{objBindAttr:"__threeObj"}),t.linkDataMapper=new Ps(e,{objBindAttr:"__lineObj"}),t.arrowDataMapper=new Ps(e,{objBindAttr:"__arrowObj"}),t.particlesDataMapper=new Ps(e,{objBindAttr:"__photonsObj"})},update:function(e,t){var i=function(z){return z.some(function($){return t.hasOwnProperty($)})};if(e.engineRunning=!1,typeof e.onUpdate=="function"&&e.onUpdate(),e.nodeAutoColorBy!==null&&i(["nodeAutoColorBy","graphData","nodeColor"])&&am(e.graphData.nodes,je(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&i(["linkAutoColorBy","graphData","linkColor"])&&am(e.graphData.links,je(e.linkAutoColorBy),e.linkColor),e._flushObjects||i(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=je(e.nodeThreeObject),s=je(e.nodeThreeObjectExtend),a=je(e.nodeVal),o=je(e.nodeColor),l=je(e.nodeVisibility),c={},h={};(e._flushObjects||i(["nodeThreeObject","nodeThreeObjectExtend"]))&&e.nodeDataMapper.clear(),e.nodeDataMapper.onCreateObj(function(Y){var z=r(Y),$=s(Y);z&&e.nodeThreeObject===z&&(z=z.clone());var te;return z&&!$?te=z:(te=new Ne.Mesh,te.__graphDefaultObj=!0,z&&$&&te.add(z)),te.__graphObjType="node",te}).onUpdateObj(function(Y,z){if(Y.__graphDefaultObj){var $=a(z)||1,te=Math.cbrt($)*e.nodeRelSize,ve=e.nodeResolution;(!Y.geometry.type.match(/^Sphere(Buffer)?Geometry$/)||Y.geometry.parameters.radius!==te||Y.geometry.parameters.widthSegments!==ve)&&(c.hasOwnProperty($)||(c[$]=new Ne.SphereGeometry(te,ve,ve)),Y.geometry.dispose(),Y.geometry=c[$]);var Me=o(z),xe=new Ne.Color(Is(Me||"#ffffaa")),Ze=e.nodeOpacity*Th(Me);(Y.material.type!=="MeshLambertMaterial"||!Y.material.color.equals(xe)||Y.material.opacity!==Ze)&&(h.hasOwnProperty(Me)||(h[Me]=new Ne.MeshLambertMaterial({color:xe,transparent:!0,opacity:Ze})),Y.material.dispose(),Y.material=h[Me])}}).digest(e.graphData.nodes.filter(l))}if(e._flushObjects||i(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","linkDirectionalParticleThreeObject"])){var d=je(e.linkThreeObject),u=je(e.linkThreeObjectExtend),p=je(e.linkMaterial),m=je(e.linkVisibility),x=je(e.linkColor),g=je(e.linkWidth),f={},v={},M={},S=e.graphData.links.filter(m);if((e._flushObjects||i(["linkThreeObject","linkThreeObjectExtend","linkWidth"]))&&e.linkDataMapper.clear(),e.linkDataMapper.onRemoveObj(function(Y){var z=Y.__data&&Y.__data.__singleHopPhotonsObj;z&&(z.parent.remove(z),sm(z),delete Y.__data.__singleHopPhotonsObj)}).onCreateObj(function(Y){var z=d(Y),$=u(Y);z&&e.linkThreeObject===z&&(z=z.clone());var te;if(!z||$){var ve=!!g(Y);if(ve)te=new Ne.Mesh;else{var Me=new Ne.BufferGeometry;Me[Ah]("position",new Ne.BufferAttribute(new Float32Array(6),3)),te=new Ne.Line(Me)}}var xe;return z?$?(xe=new Ne.Group,xe.__graphDefaultObj=!0,xe.add(te),xe.add(z)):xe=z:(xe=te,xe.__graphDefaultObj=!0),xe.renderOrder=10,xe.__graphObjType="link",xe}).onUpdateObj(function(Y,z){if(Y.__graphDefaultObj){var $=Y.children.length?Y.children[0]:Y,te=Math.ceil(g(z)*10)/10,ve=!!te;if(ve){var Me=te/2,xe=e.linkResolution;if(!$.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||$.geometry.parameters.radiusTop!==Me||$.geometry.parameters.radialSegments!==xe){if(!f.hasOwnProperty(te)){var Ze=new Ne.CylinderGeometry(Me,Me,1,xe,1,!1);Ze[al](new Ne.Matrix4().makeTranslation(0,1/2,0)),Ze[al](new Ne.Matrix4().makeRotationX(Math.PI/2)),f[te]=Ze}$.geometry.dispose(),$.geometry=f[te]}}var Ue=p(z);if(Ue)$.material=Ue;else{var qe=x(z),Qe=new Ne.Color(Is(qe||"#f0f0f0")),Oe=e.linkOpacity*Th(qe),it=ve?"MeshLambertMaterial":"LineBasicMaterial";if($.material.type!==it||!$.material.color.equals(Qe)||$.material.opacity!==Oe){var nt=ve?v:M;nt.hasOwnProperty(qe)||(nt[qe]=new Ne[it]({color:Qe,transparent:Oe<1,opacity:Oe,depthWrite:Oe>=1})),$.material.dispose(),$.material=nt[qe]}}}}).digest(S),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var w=je(e.linkDirectionalArrowLength),y=je(e.linkDirectionalArrowColor);e.arrowDataMapper.onCreateObj(function(){var Y=new Ne.Mesh(void 0,new Ne.MeshLambertMaterial({transparent:!0}));return Y.__linkThreeObjType="arrow",Y}).onUpdateObj(function(Y,z){var $=w(z),te=e.linkDirectionalArrowResolution;if(!Y.geometry.type.match(/^Cone(Buffer)?Geometry$/)||Y.geometry.parameters.height!==$||Y.geometry.parameters.radialSegments!==te){var ve=new Ne.ConeGeometry($*.25,$,te);ve.translate(0,$/2,0),ve.rotateX(Math.PI/2),Y.geometry.dispose(),Y.geometry=ve}var Me=y(z)||x(z)||"#f0f0f0";Y.material.color=new Ne.Color(Is(Me)),Y.material.opacity=e.linkOpacity*3*Th(Me)}).digest(S.filter(w))}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var A=je(e.linkDirectionalParticles),_=je(e.linkDirectionalParticleWidth),C=je(e.linkDirectionalParticleColor),D=je(e.linkDirectionalParticleThreeObject),P={},N={};e.particlesDataMapper.onCreateObj(function(){var Y=new Ne.Group;return Y.__linkThreeObjType="photons",Y.__photonDataMapper=new Ps(Y),Y}).onUpdateObj(function(Y,z){var $=!!Y.children.length&&Y.children[0],te=D(z),ve,Me;if(te)ve=te.geometry,Me=te.material;else{var xe=Math.ceil(_(z)*10)/10/2,Ze=e.linkDirectionalParticleResolution;$&&$.geometry.parameters.radius===xe&&$.geometry.parameters.widthSegments===Ze?ve=$.geometry:(N.hasOwnProperty(xe)||(N[xe]=new Ne.SphereGeometry(xe,Ze,Ze)),ve=N[xe]);var Ue=C(z)||x(z)||"#f0f0f0",qe=new Ne.Color(Is(Ue)),Qe=e.linkOpacity*3;$&&$.material.color.equals(qe)&&$.material.opacity===Qe?Me=$.material:(P.hasOwnProperty(Ue)||(P[Ue]=new Ne.MeshLambertMaterial({color:qe,transparent:!0,opacity:Qe})),Me=P[Ue])}$&&($.geometry!==ve&&$.geometry.dispose(),$.material!==Me&&$.material.dispose());var Oe=Math.round(Math.abs(A(z)));Y.__photonDataMapper.id(function(it){return it.idx}).onCreateObj(function(){return new Ne.Mesh(ve,Me)}).onUpdateObj(function(it){it.geometry=ve,it.material=Me}).digest(wn(new Array(Oe)).map(function(it,nt){return{idx:nt}}))}).digest(S.filter(A))}}if(e._flushObjects=!1,i(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach(function(Y){Y.source=Y[e.linkSource],Y.target=Y[e.linkTarget]});var V=e.forceEngine!=="ngraph",I;if(V){(I=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var R=e.d3ForceLayout.force("link");R&&R.id(function(Y){return Y[e.nodeId]}).links(e.graphData.links);var L=e.dagMode&&fS(e.graphData,function(Y){return Y[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),k=Math.max.apply(Math,wn(Object.values(L||[]))),ee=e.dagLevelDistance||e.graphData.nodes.length/(k||1)*dS*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu","zin","zout"].includes(t.dagMode)){var ne=["lr","rl"].includes(t.dagMode)?"fx":["td","bu"].includes(t.dagMode)?"fy":"fz";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(Y){return delete Y[ne]})}if(["lr","rl","td","bu","zin","zout"].includes(e.dagMode)){var he=["rl","td","zout"].includes(e.dagMode),q=function(z){return(L[z[e.nodeId]]-k/2)*ee*(he?-1:1)},J=["lr","rl"].includes(e.dagMode)?"fx":["td","bu"].includes(e.dagMode)?"fy":"fz";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(Y){return Y[J]=q(Y)})}e.d3ForceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?th(function(Y){var z=L[Y[e.nodeId]]||-1;return(e.dagMode==="radialin"?k-z:z)*ee}).strength(function(Y){return e.dagNodeFilter(Y)?1:0}):null)}else{var fe=om.graph();e.graphData.nodes.forEach(function(Y){fe.addNode(Y[e.nodeId])}),e.graphData.links.forEach(function(Y){fe.addLink(Y.source,Y.target)}),I=om.forcelayout(fe,oS({dimensions:e.numDimensions},e.ngraphPhysics)),I.graph=fe}for(var De=0;De<e.warmupTicks&&!(V&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);De++)I[V?"tick":"step"]();e.layout=I,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}});function mS(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=(function(r){function s(){var a;um(this,s);for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];return a=hm(this,s,[].concat(l)),a.__kapsuleInstance=fm(n,[].concat(wn(t?[a]:[]),l)),a}return pm(s,r),dm(s)})(e);return Object.keys(n()).forEach(function(r){return i.prototype[r]=function(){var s,a=(s=this.__kapsuleInstance)[r].apply(s,arguments);return a===this.__kapsuleInstance?this:a}}),i}var gS=window.THREE?window.THREE:{Group:Rn},xm=mS(pS,gS.Group,!0);var vm={type:"change"},Nh={type:"start"},bm={type:"end"},ll=new oi,ym=new ln,_S=Math.cos(70*_c.DEG2RAD),Tt=new U,$t=2*Math.PI,at={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lh=1e-6,cl=class extends rs{constructor(e,t=null){super(e,t),this.state=at.NONE,this.target=new U,this.cursor=new U,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:ui.ROTATE,MIDDLE:ui.DOLLY,RIGHT:ui.PAN},this.touches={ONE:fi.ROTATE,TWO:fi.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._cursorStyle="auto",this._domElementKeyEvents=null,this._lastPosition=new U,this._lastQuaternion=new en,this._lastTargetPosition=new U,this._quat=new en().setFromUnitVectors(e.up,new U(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new hr,this._sphericalDelta=new hr,this._scale=1,this._panOffset=new U,this._rotateStart=new Te,this._rotateEnd=new Te,this._rotateDelta=new Te,this._panStart=new Te,this._panEnd=new Te,this._panDelta=new Te,this._dollyStart=new Te,this._dollyEnd=new Te,this._dollyDelta=new Te,this._dollyDirection=new U,this._mouse=new Te,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=vS.bind(this),this._onPointerDown=xS.bind(this),this._onPointerUp=yS.bind(this),this._onContextMenu=ES.bind(this),this._onMouseWheel=SS.bind(this),this._onKeyDown=wS.bind(this),this._onTouchStart=TS.bind(this),this._onTouchMove=AS.bind(this),this._onMouseDown=bS.bind(this),this._onMouseMove=MS.bind(this),this._interceptControlDown=CS.bind(this),this._interceptControlUp=RS.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}set cursorStyle(e){this._cursorStyle=e,e==="grab"?this.domElement.style.cursor="grab":this.domElement.style.cursor="auto"}get cursorStyle(){return this._cursorStyle}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=""}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(vm),this.update(),this.state=at.NONE}pan(e,t){this._pan(e,t),this.update()}dollyIn(e){this._dollyIn(e),this.update()}dollyOut(e){this._dollyOut(e),this.update()}rotateLeft(e){this._rotateLeft(e),this.update()}rotateUp(e){this._rotateUp(e),this.update()}update(e=null){let t=this.object.position;Tt.copy(t).sub(this.target),Tt.applyQuaternion(this._quat),this._spherical.setFromVector3(Tt),this.autoRotate&&this.state===at.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(i)&&isFinite(r)&&(i<-Math.PI?i+=$t:i>Math.PI&&(i-=$t),r<-Math.PI?r+=$t:r>Math.PI&&(r-=$t),i<=r?this._spherical.theta=Math.max(i,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+r)/2?Math.max(i,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=a!=this._spherical.radius}if(Tt.setFromSpherical(this._spherical),Tt.applyQuaternion(this._quatInverse),t.copy(this.target).add(Tt),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){let o=Tt.length();a=this._clampDistance(o*this._scale);let l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){let o=new U(this._mouse.x,this._mouse.y,0);o.unproject(this.object);let l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;let c=new U(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),a=Tt.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):(ll.origin.copy(this.object.position),ll.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ll.direction))<_S?this.object.lookAt(this.target):(ym.setFromNormalAndCoplanarPoint(this.object.up,this.target),ll.intersectPlane(ym,this.target))))}else if(this.object.isOrthographicCamera){let a=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),a!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>Lh||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lh||this._lastTargetPosition.distanceToSquared(this.target)>Lh?(this.dispatchEvent(vm),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?$t/60*this.autoRotateSpeed*e:$t/60/60*this.autoRotateSpeed}_getZoomScale(e){let t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Tt.setFromMatrixColumn(t,0),Tt.multiplyScalar(-e),this._panOffset.add(Tt)}_panUp(e,t){this.screenSpacePanning===!0?Tt.setFromMatrixColumn(t,1):(Tt.setFromMatrixColumn(t,0),Tt.crossVectors(this.object.up,Tt)),Tt.multiplyScalar(e),this._panOffset.add(Tt)}_pan(e,t){let i=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;Tt.copy(r).sub(this.target);let s=Tt.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/i.clientHeight,this.object.matrix),this._panUp(2*t*s/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let i=this.domElement.getBoundingClientRect(),r=e-i.left,s=t-i.top,a=i.width,o=i.height;this._mouse.x=r/a*2-1,this._mouse.y=-(s/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft($t*this._rotateDelta.x/t.clientHeight),this._rotateUp($t*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp($t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-$t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft($t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-$t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(i,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(i,r)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(i*i+r*r);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let i=this._getSecondPointerPosition(e),r=.5*(e.pageX+i.x),s=.5*(e.pageY+i.y);this._rotateEnd.set(r,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft($t*this._rotateDelta.x/t.clientHeight),this._rotateUp($t*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(i,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(i*i+r*r);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new Te,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){let t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){let t=e.deltaMode,i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}};function xS(n){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(n.pointerId),this.domElement.ownerDocument.addEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(n)&&(this._addPointer(n),n.pointerType==="touch"?this._onTouchStart(n):this._onMouseDown(n),this._cursorStyle==="grab"&&(this.domElement.style.cursor="grabbing")))}function vS(n){this.enabled!==!1&&(n.pointerType==="touch"?this._onTouchMove(n):this._onMouseMove(n))}function yS(n){switch(this._removePointer(n),this._pointers.length){case 0:this.domElement.releasePointerCapture(n.pointerId),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(bm),this.state=at.NONE,this._cursorStyle==="grab"&&(this.domElement.style.cursor="grab");break;case 1:let e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function bS(n){let e;switch(n.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case ui.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(n),this.state=at.DOLLY;break;case ui.ROTATE:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=at.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=at.ROTATE}break;case ui.PAN:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=at.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=at.PAN}break;default:this.state=at.NONE}this.state!==at.NONE&&this.dispatchEvent(Nh)}function MS(n){switch(this.state){case at.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(n);break;case at.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(n);break;case at.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(n);break}}function SS(n){this.enabled===!1||this.enableZoom===!1||this.state!==at.NONE||(n.preventDefault(),this.dispatchEvent(Nh),this._handleMouseWheel(this._customWheelEvent(n)),this.dispatchEvent(bm))}function wS(n){this.enabled!==!1&&this._handleKeyDown(n)}function TS(n){switch(this._trackPointer(n),this._pointers.length){case 1:switch(this.touches.ONE){case fi.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(n),this.state=at.TOUCH_ROTATE;break;case fi.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(n),this.state=at.TOUCH_PAN;break;default:this.state=at.NONE}break;case 2:switch(this.touches.TWO){case fi.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(n),this.state=at.TOUCH_DOLLY_PAN;break;case fi.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(n),this.state=at.TOUCH_DOLLY_ROTATE;break;default:this.state=at.NONE}break;default:this.state=at.NONE}this.state!==at.NONE&&this.dispatchEvent(Nh)}function AS(n){switch(this._trackPointer(n),this.state){case at.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(n),this.update();break;case at.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(n),this.update();break;case at.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(n),this.update();break;case at.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(n),this.update();break;default:this.state=at.NONE}}function ES(n){this.enabled!==!1&&n.preventDefault()}function CS(n){n.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function RS(n){n.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var Sm={markdown_document:"#e8b4b8",markdown_section:"#d99ba0",prisma_model:"#b8a3e8",prisma_column:"#a08fd0",prisma_relation:"#8a76c0",swagger_operation:"#e8d9a0",module:"#d0d7de",class:"#36e2ee",interface:"#6ea8ff",function:"#3fb950",method:"#2bb673",type:"#f5b042",enum:"#c792ea",variable:"#8b97a8"},Uh={"value-call":"#3fb950","type-ref":"#f5b042","doc-ref":"#c07de0",heritage:"#6ea8ff",exports:"#7d8590"},wm="#565f6b",Tm="#ffffff55",Mm=new WeakSet;function Am(n){let e=n.getElementById("legend");e===null||Mm.has(e)||(Mm.add(e),e.prepend(...Object.entries(Uh).map(([t,i])=>{let r=n.createElement("span");r.className="dot";let s=n.createElement("span");return s.className="swatch",s.style.background=i,r.append(s,t),r})))}function Oh(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Em(n,e){let t=document.getElementById(n);t&&(t.textContent=e)}async function PS(){Am(document);let n=document.getElementById("graph");if(!n)return;let e;try{let v=await fetch("graph.json");if(!v.ok)throw new Error(`HTTP ${v.status}`);e=await v.json()}catch(v){n.textContent=`could not load the graph (${String(v)})`;return}e.project&&Em("project",e.project),Em("counts",`${e.nodes.length.toLocaleString()} nodes \xB7 ${e.links.length.toLocaleString()} edges`);let t=n.clientWidth||800,i=n.clientHeight||600,r=new kr;r.background=new Xe(658448),r.add(new ns(16777215,2));let s=new ts(16777215,.8);s.position.set(1,1,1),r.add(s);let a=new Nt(50,t/i,.1,1e6);a.position.set(0,0,320);let o=new Vo({antialias:!0});o.setPixelRatio(Math.min(window.devicePixelRatio,2)),o.setSize(t,i),n.appendChild(o.domElement);let l=new cl(a,o.domElement);l.enableDamping=!0,l.dampingFactor=.18;let c=new xm().nodeId("id").nodeRelSize(4).nodeResolution(12).nodeOpacity(.95).nodeVal(v=>1+Math.sqrt(v.degree)).nodeColor(v=>Sm[v.kind]??wm).linkColor(v=>Uh[v.kind]??Tm).linkOpacity(.4).linkWidth(0).warmupTicks(20).cooldownTicks(160);r.add(c);let h=()=>{let v=c.getGraphBbox();if(!v)return;let M=(v.x[0]+v.x[1])/2,S=(v.y[0]+v.y[1])/2,w=(v.z[0]+v.z[1])/2,A=Math.max((v.x[1]-v.x[0])/2,(v.y[1]-v.y[0])/2,(v.z[1]-v.z[0])/2,10)*2.6;a.position.set(M+A*.5,S+A*.32,w+A*.8),a.near=Math.max(.1,A/200),a.far=A*20,a.updateProjectionMatrix(),l.target.set(M,S,w),l.update()},d=new URLSearchParams(window.location.search).has("static"),u=-1,p=0;c.onEngineStop(()=>{h(),d&&u<0&&(u=p+4)});let m=document.createElement("div");m.className="tooltip",n.appendChild(m);let x=new is,g=new Te;o.domElement.addEventListener("pointermove",v=>{let M=o.domElement.getBoundingClientRect();g.x=(v.clientX-M.left)/M.width*2-1,g.y=-((v.clientY-M.top)/M.height)*2+1,x.setFromCamera(g,a);let S=x.intersectObjects(c.children,!0),w=null;for(let y of S){let A=y.object;for(;A;){let _=A;if(_.__graphObjType==="node"&&_.__data){w=_.__data;break}A=A.parent}if(w)break}if(!w){m.style.display="none";return}m.style.display="block",m.style.left=`${v.clientX-M.left+12}px`,m.style.top=`${v.clientY-M.top+12}px`,m.innerHTML=`${Oh(w.name)}<br/><span class="muted">${Oh(w.kind)} \xB7 ${Oh(w.file)}</span>`}),o.domElement.addEventListener("pointerleave",()=>{m.style.display="none"});let f=()=>{if(u>=0&&p>u){o.render(r,a);return}requestAnimationFrame(f),c.tickFrame(),l.update(),o.render(r,a),p++};f(),window.addEventListener("resize",()=>{let v=n.clientWidth||t,M=n.clientHeight||i;a.aspect=v/M,a.updateProjectionMatrix(),o.setSize(v,M)}),c.graphData({nodes:e.nodes,links:e.links}),window.setTimeout(h,700)}PS();})();
|
|
4610
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rm(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function oS(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?rm(Object(t),!0).forEach(function(i){ol(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):rm(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function lS(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eS(n)}function Rh(n,e){return Rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Rh(n,e)}function Ds(n,e){return KM(n)||rS(n,e)||gm(n,e)||sS()}function cS(n,e){for(;!{}.hasOwnProperty.call(n,e)&&(n=wr(n))!==null;);return n}function Sh(n,e,t,i){var r=Ch(wr(n.prototype),e,t);return typeof r=="function"?function(s){return r.apply(t,s)}:r}function wn(n){return QM(n)||iS(n)||gm(n)||aS()}function hS(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mm(n){var e=hS(n,"string");return typeof e=="symbol"?e:e+""}function Ph(n){"@babel/helpers - typeof";return Ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ph(n)}function gm(n,e){if(n){if(typeof n=="string")return Eh(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Eh(n,e):void 0}}var _m=function(e){e instanceof Array?e.forEach(_m):(e.map&&e.map.dispose(),e.dispose())},Dh=function(e){e.geometry&&e.geometry.dispose(),e.material&&_m(e.material),e.texture&&e.texture.dispose(),e.children&&e.children.forEach(Dh)},sm=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Dh(t)}},wh=new WeakMap,sl=new WeakMap,Ps=(function(n){function e(t){var i,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.dataBindAttr,a=s===void 0?"__data":s,o=r.objBindAttr,l=o===void 0?"__threeObj":o;return um(this,e),i=hm(this,e),ol(i,"scene",void 0),nm(i,wh,void 0),nm(i,sl,void 0),i.scene=t,im(wh,i,a),im(sl,i,l),i.onRemoveObj(function(){}),i}return pm(e,n),dm(e,[{key:"onCreateObj",value:function(i){var r=this;return Sh(e,"onCreateObj",this)([function(s){var a=i(s);return s[Mh(sl,r)]=a,a[Mh(wh,r)]=s,r.scene.add(a),a}]),this}},{key:"onRemoveObj",value:function(i){var r=this;return Sh(e,"onRemoveObj",this)([function(s,a){var o=Sh(e,"getData",r)([s]);i(s,a),r.scene.remove(s),Dh(s),delete o[Mh(sl,r)]}]),this}}])})(Xp),Is=function(e){return isNaN(e)?parseInt(Ee(e).toHex(),16):e},Th=function(e){return isNaN(e)?Ee(e).getAlpha():1},uS=Cs(yh);function am(n,e,t){!e||typeof t!="string"||n.filter(function(i){return!i[t]}).forEach(function(i){i[t]=uS(e(i))})}function fS(n,e){var t=n.nodes,i=n.links,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=r.nodeFilter,a=s===void 0?function(){return!0}:s,o=r.onLoopError,l=o===void 0?function(p){throw"Invalid DAG structure! Found cycle in node path: ".concat(p.join(" -> "),".")}:o,c={};t.forEach(function(p){return c[e(p)]={data:p,out:[],depth:-1,skip:!a(p)}}),i.forEach(function(p){var m=p.source,x=p.target,g=S(m),f=S(x);if(!c.hasOwnProperty(g))throw"Missing source node with id: ".concat(g);if(!c.hasOwnProperty(f))throw"Missing target node with id: ".concat(f);var v=c[g],M=c[f];v.out.push(M);function S(w){return Ph(w)==="object"?e(w):w}});var h=[];u(Object.values(c));var d=Object.assign.apply(Object,[{}].concat(wn(Object.entries(c).filter(function(p){var m=Ds(p,2),x=m[1];return!x.skip}).map(function(p){var m=Ds(p,2),x=m[0],g=m[1];return ol({},x,g.depth)}))));return d;function u(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=function(){var S=p[f];if(m.indexOf(S)!==-1){var w=[].concat(wn(m.slice(m.indexOf(S))),[S]).map(function(y){return e(y.data)});return h.some(function(y){return y.length===w.length&&y.every(function(A,_){return A===w[_]})})||(h.push(w),l(w)),1}x>S.depth&&(S.depth=x,u(S.out,[].concat(wn(m),[S]),x+(S.skip?0:1)))},f=0,v=p.length;f<v;f++)g()}}var Ne=window.THREE?window.THREE:{Group:Rn,Mesh:Xt,MeshLambertMaterial:Jr,Color:Xe,BufferGeometry:Ot,BufferAttribute:zt,Matrix4:ct,Vector3:U,SphereGeometry:jr,CylinderGeometry:or,TubeGeometry:Zr,ConeGeometry:qr,Line:Hr,LineBasicMaterial:sr,QuadraticBezierCurve3:Ri,CubicBezierCurve3:lr,Box3:In},om={graph:$d,forcelayout:lm.default},dS=2,Ah=new Ne.BufferGeometry().setAttribute?"setAttribute":"addAttribute",al=new Ne.BufferGeometry().applyMatrix4?"applyMatrix4":"applyMatrix",pS=Vp({props:{jsonUrl:{onChange:function(e,t){var i=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then(function(r){return r.json()}).then(function(r){t.fetchingJson=!1,t.onFinishLoading(r),i.graphData(r)}))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var i=t.d3ForceLayout.force("charge");i&&i.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y");function r(s,a){s.forEach(function(o){delete o[a],delete o["v".concat(a)]})}}},dagMode:{onChange:function(e,t){!e&&t.forceEngine==="d3"&&(t.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=i.fz=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},nodePositionUpdate:{triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},linkDirectionalParticleThreeObject:{},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,i){return i===void 0?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,i),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t=e.forceEngine!=="ngraph";return e.engineRunning&&i(),r(),s(),this;function i(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());var a=je(e.nodeThreeObjectExtend);e.nodeDataMapper.entries().forEach(function(u){var p=Ds(u,2),m=p[0],x=p[1];if(x){var g=t?m:e.layout.getNodePosition(m[e.nodeId]),f=a(m);(!e.nodePositionUpdate||!e.nodePositionUpdate(f?x.children[0]:x,{x:g.x,y:g.y,z:g.z},m)||f)&&(x.position.x=g.x,x.position.y=g.y||0,x.position.z=g.z||0)}});var o=je(e.linkWidth),l=je(e.linkCurvature),c=je(e.linkCurveRotation),h=je(e.linkThreeObjectExtend);e.linkDataMapper.entries().forEach(function(u){var p=Ds(u,2),m=p[0],x=p[1];if(x){var g=t?m:e.layout.getLinkPosition(e.layout.graph.getLink(m.source,m.target).id),f=g[t?"source":"from"],v=g[t?"target":"to"];if(!(!f||!v||!f.hasOwnProperty("x")||!v.hasOwnProperty("x"))){d(m);var M=h(m);if(!(e.linkPositionUpdate&&e.linkPositionUpdate(M?x.children[1]:x,{start:{x:f.x,y:f.y,z:f.z},end:{x:v.x,y:v.y,z:v.z}},m)&&!M)){var S=30,w=m.__curve,y=x.children.length?x.children[0]:x;if(y.type==="Line"){if(w){var _=w.getPoints(S);y.geometry.getAttribute("position").array.length!==_.length*3&&y.geometry[Ah]("position",new Ne.BufferAttribute(new Float32Array(_.length*3),3)),y.geometry.setFromPoints(_)}else{var A=y.geometry.getAttribute("position");(!A||!A.array||A.array.length!==6)&&y.geometry[Ah]("position",A=new Ne.BufferAttribute(new Float32Array(6),3)),A.array[0]=f.x,A.array[1]=f.y||0,A.array[2]=f.z||0,A.array[3]=v.x,A.array[4]=v.y||0,A.array[5]=v.z||0,A.needsUpdate=!0}y.geometry.computeBoundingSphere()}else if(y.type==="Mesh")if(w){y.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(y.position.set(0,0,0),y.rotation.set(0,0,0),y.scale.set(1,1,1));var R=Math.ceil(o(m)*10)/10,L=R/2,k=new Ne.TubeGeometry(w,S,L,e.linkResolution,!1);y.geometry.dispose(),y.geometry=k}else{if(!y.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var C=Math.ceil(o(m)*10)/10,D=C/2,P=new Ne.CylinderGeometry(D,D,1,e.linkResolution,1,!1);P[al](new Ne.Matrix4().makeTranslation(0,1/2,0)),P[al](new Ne.Matrix4().makeRotationX(Math.PI/2)),y.geometry.dispose(),y.geometry=P}var N=new Ne.Vector3(f.x,f.y||0,f.z||0),V=new Ne.Vector3(v.x,v.y||0,v.z||0),I=N.distanceTo(V);y.position.x=N.x,y.position.y=N.y,y.position.z=N.z,y.scale.z=I,y.parent.localToWorld(V),y.lookAt(V)}}}}});function d(u){var p=t?u:e.layout.getLinkPosition(e.layout.graph.getLink(u.source,u.target).id),m=p[t?"source":"from"],x=p[t?"target":"to"];if(!(!m||!x||!m.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var g=l(u);if(!g)u.__curve=null;else{var f=new Ne.Vector3(m.x,m.y||0,m.z||0),v=new Ne.Vector3(x.x,x.y||0,x.z||0),M=f.distanceTo(v),S,w=c(u);if(M>0){var y=x.x-m.x,A=x.y-m.y||0,_=new Ne.Vector3().subVectors(v,f),C=_.clone().multiplyScalar(g).cross(y!==0||A!==0?new Ne.Vector3(0,0,1):new Ne.Vector3(0,1,0)).applyAxisAngle(_.normalize(),w).add(new Ne.Vector3().addVectors(f,v).divideScalar(2));S=new Ne.QuadraticBezierCurve3(f,C,v)}else{var D=g*70,P=-w,N=P+Math.PI/2;S=new Ne.CubicBezierCurve3(f,new Ne.Vector3(D*Math.cos(N),D*Math.sin(N),0).add(f),new Ne.Vector3(D*Math.cos(P),D*Math.sin(P),0).add(f),v)}u.__curve=S}}}}function r(){var a=je(e.linkDirectionalArrowRelPos),o=je(e.linkDirectionalArrowLength),l=je(e.nodeVal);e.arrowDataMapper.entries().forEach(function(c){var h=Ds(c,2),d=h[0],u=h[1];if(u){var p=t?d:e.layout.getLinkPosition(e.layout.graph.getLink(d.source,d.target).id),m=p[t?"source":"from"],x=p[t?"target":"to"];if(!(!m||!x||!m.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var g=Math.cbrt(Math.max(0,l(m)||1))*e.nodeRelSize,f=Math.cbrt(Math.max(0,l(x)||1))*e.nodeRelSize,v=o(d),M=a(d),S=d.__curve?function(D){return d.__curve.getPoint(D)}:function(D){var P=function(V,I,R,L){return I[V]+(R[V]-I[V])*L||0};return{x:P("x",m,x,D),y:P("y",m,x,D),z:P("z",m,x,D)}},w=d.__curve?d.__curve.getLength():Math.sqrt(["x","y","z"].map(function(D){return Math.pow((x[D]||0)-(m[D]||0),2)}).reduce(function(D,P){return D+P},0)),y=g+v+(w-g-f-v)*M,A=S(y/w),_=S((y-v)/w);["x","y","z"].forEach(function(D){return u.position[D]=_[D]});var C=fm(Ne.Vector3,wn(["x","y","z"].map(function(D){return A[D]})));u.parent.localToWorld(C),u.lookAt(C)}}})}function s(){var a=je(e.linkDirectionalParticleSpeed),o=je(e.linkDirectionalParticleOffset);e.graphData.links.forEach(function(l){var c=e.particlesDataMapper.getObj(l),h=c&&c.children,d=l.__singleHopPhotonsObj&&l.__singleHopPhotonsObj.children;if(!((!d||!d.length)&&(!h||!h.length))){var u=t?l:e.layout.getLinkPosition(e.layout.graph.getLink(l.source,l.target).id),p=u[t?"source":"from"],m=u[t?"target":"to"];if(!(!p||!m||!p.hasOwnProperty("x")||!m.hasOwnProperty("x"))){var x=a(l),g=Math.abs(o(l)),f=l.__curve?function(M){return l.__curve.getPoint(M)}:function(M){var S=function(y,A,_,C){return A[y]+(_[y]-A[y])*C||0};return{x:S("x",p,m,M),y:S("y",p,m,M),z:S("z",p,m,M)}},v=[].concat(wn(h||[]),wn(d||[]));v.forEach(function(M,S){var w=M.parent.__linkThreeObjType==="singleHopPhotons";if(M.hasOwnProperty("__progressRatio")||(M.__progressRatio=w?x<0?1:0:(S+g)/h.length),M.__progressRatio+=x,M.__progressRatio>=1||M.__progressRatio<0)if(!w)M.__progressRatio=M.__progressRatio%1,M.__progressRatio<0&&M.__progressRatio++;else{M.parent.remove(M),sm(M);return}var y=M.__progressRatio,A=f(y);M.geometry.type!=="SphereGeometry"&&M.lookAt(A.x,A.y,A.z),["x","y","z"].forEach(function(_){return M.position[_]=A[_]})})}}})}},emitParticle:function(e,t){if(t&&e.graphData.links.includes(t)){if(!t.__singleHopPhotonsObj){var i=new Ne.Group;i.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=i,e.graphScene.add(i)}var r=je(e.linkDirectionalParticleThreeObject)(t);if(r&&e.linkDirectionalParticleThreeObject===r&&(r=r.clone()),!r){var s=je(e.linkDirectionalParticleWidth),a=Math.ceil(s(t)*10)/10/2,o=e.linkDirectionalParticleResolution,l=new Ne.SphereGeometry(a,o,o),c=je(e.linkColor),h=je(e.linkDirectionalParticleColor),d=h(t)||c(t)||"#f0f0f0",u=new Ne.Color(Is(d)),p=e.linkOpacity*3,m=new Ne.MeshLambertMaterial({color:u,transparent:!0,opacity:p});r=new Ne.Mesh(l,m)}t.__singleHopPhotonsObj.add(r)}return this},getGraphBbox:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};if(!e.initialised)return null;var i=(function r(s){var a=[];if(s.geometry){s.geometry.computeBoundingBox();var o=new Ne.Box3;o.copy(s.geometry.boundingBox).applyMatrix4(s.matrixWorld),a.push(o)}return a.concat.apply(a,wn((s.children||[]).filter(function(l){return!l.hasOwnProperty("__graphObjType")||l.__graphObjType==="node"&&t(l.__data)}).map(r)))})(e.graphScene);return i.length?Object.assign.apply(Object,wn(["x","y","z"].map(function(r){return ol({},r,[tl(i,function(s){return s.min[r]}),el(i,function(s){return s.max[r]})])}))):null}},stateInit:function(){return{d3ForceLayout:Qc().force("link",Yc()).force("charge",eh()).force("center",Hc()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e,t.nodeDataMapper=new Ps(e,{objBindAttr:"__threeObj"}),t.linkDataMapper=new Ps(e,{objBindAttr:"__lineObj"}),t.arrowDataMapper=new Ps(e,{objBindAttr:"__arrowObj"}),t.particlesDataMapper=new Ps(e,{objBindAttr:"__photonsObj"})},update:function(e,t){var i=function(z){return z.some(function($){return t.hasOwnProperty($)})};if(e.engineRunning=!1,typeof e.onUpdate=="function"&&e.onUpdate(),e.nodeAutoColorBy!==null&&i(["nodeAutoColorBy","graphData","nodeColor"])&&am(e.graphData.nodes,je(e.nodeAutoColorBy),e.nodeColor),e.linkAutoColorBy!==null&&i(["linkAutoColorBy","graphData","linkColor"])&&am(e.graphData.links,je(e.linkAutoColorBy),e.linkColor),e._flushObjects||i(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=je(e.nodeThreeObject),s=je(e.nodeThreeObjectExtend),a=je(e.nodeVal),o=je(e.nodeColor),l=je(e.nodeVisibility),c={},h={};(e._flushObjects||i(["nodeThreeObject","nodeThreeObjectExtend"]))&&e.nodeDataMapper.clear(),e.nodeDataMapper.onCreateObj(function(Y){var z=r(Y),$=s(Y);z&&e.nodeThreeObject===z&&(z=z.clone());var te;return z&&!$?te=z:(te=new Ne.Mesh,te.__graphDefaultObj=!0,z&&$&&te.add(z)),te.__graphObjType="node",te}).onUpdateObj(function(Y,z){if(Y.__graphDefaultObj){var $=a(z)||1,te=Math.cbrt($)*e.nodeRelSize,ve=e.nodeResolution;(!Y.geometry.type.match(/^Sphere(Buffer)?Geometry$/)||Y.geometry.parameters.radius!==te||Y.geometry.parameters.widthSegments!==ve)&&(c.hasOwnProperty($)||(c[$]=new Ne.SphereGeometry(te,ve,ve)),Y.geometry.dispose(),Y.geometry=c[$]);var Me=o(z),xe=new Ne.Color(Is(Me||"#ffffaa")),Ze=e.nodeOpacity*Th(Me);(Y.material.type!=="MeshLambertMaterial"||!Y.material.color.equals(xe)||Y.material.opacity!==Ze)&&(h.hasOwnProperty(Me)||(h[Me]=new Ne.MeshLambertMaterial({color:xe,transparent:!0,opacity:Ze})),Y.material.dispose(),Y.material=h[Me])}}).digest(e.graphData.nodes.filter(l))}if(e._flushObjects||i(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","linkDirectionalParticleThreeObject"])){var d=je(e.linkThreeObject),u=je(e.linkThreeObjectExtend),p=je(e.linkMaterial),m=je(e.linkVisibility),x=je(e.linkColor),g=je(e.linkWidth),f={},v={},M={},S=e.graphData.links.filter(m);if((e._flushObjects||i(["linkThreeObject","linkThreeObjectExtend","linkWidth"]))&&e.linkDataMapper.clear(),e.linkDataMapper.onRemoveObj(function(Y){var z=Y.__data&&Y.__data.__singleHopPhotonsObj;z&&(z.parent.remove(z),sm(z),delete Y.__data.__singleHopPhotonsObj)}).onCreateObj(function(Y){var z=d(Y),$=u(Y);z&&e.linkThreeObject===z&&(z=z.clone());var te;if(!z||$){var ve=!!g(Y);if(ve)te=new Ne.Mesh;else{var Me=new Ne.BufferGeometry;Me[Ah]("position",new Ne.BufferAttribute(new Float32Array(6),3)),te=new Ne.Line(Me)}}var xe;return z?$?(xe=new Ne.Group,xe.__graphDefaultObj=!0,xe.add(te),xe.add(z)):xe=z:(xe=te,xe.__graphDefaultObj=!0),xe.renderOrder=10,xe.__graphObjType="link",xe}).onUpdateObj(function(Y,z){if(Y.__graphDefaultObj){var $=Y.children.length?Y.children[0]:Y,te=Math.ceil(g(z)*10)/10,ve=!!te;if(ve){var Me=te/2,xe=e.linkResolution;if(!$.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||$.geometry.parameters.radiusTop!==Me||$.geometry.parameters.radialSegments!==xe){if(!f.hasOwnProperty(te)){var Ze=new Ne.CylinderGeometry(Me,Me,1,xe,1,!1);Ze[al](new Ne.Matrix4().makeTranslation(0,1/2,0)),Ze[al](new Ne.Matrix4().makeRotationX(Math.PI/2)),f[te]=Ze}$.geometry.dispose(),$.geometry=f[te]}}var Ue=p(z);if(Ue)$.material=Ue;else{var qe=x(z),Qe=new Ne.Color(Is(qe||"#f0f0f0")),Oe=e.linkOpacity*Th(qe),it=ve?"MeshLambertMaterial":"LineBasicMaterial";if($.material.type!==it||!$.material.color.equals(Qe)||$.material.opacity!==Oe){var nt=ve?v:M;nt.hasOwnProperty(qe)||(nt[qe]=new Ne[it]({color:Qe,transparent:Oe<1,opacity:Oe,depthWrite:Oe>=1})),$.material.dispose(),$.material=nt[qe]}}}}).digest(S),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var w=je(e.linkDirectionalArrowLength),y=je(e.linkDirectionalArrowColor);e.arrowDataMapper.onCreateObj(function(){var Y=new Ne.Mesh(void 0,new Ne.MeshLambertMaterial({transparent:!0}));return Y.__linkThreeObjType="arrow",Y}).onUpdateObj(function(Y,z){var $=w(z),te=e.linkDirectionalArrowResolution;if(!Y.geometry.type.match(/^Cone(Buffer)?Geometry$/)||Y.geometry.parameters.height!==$||Y.geometry.parameters.radialSegments!==te){var ve=new Ne.ConeGeometry($*.25,$,te);ve.translate(0,$/2,0),ve.rotateX(Math.PI/2),Y.geometry.dispose(),Y.geometry=ve}var Me=y(z)||x(z)||"#f0f0f0";Y.material.color=new Ne.Color(Is(Me)),Y.material.opacity=e.linkOpacity*3*Th(Me)}).digest(S.filter(w))}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var A=je(e.linkDirectionalParticles),_=je(e.linkDirectionalParticleWidth),C=je(e.linkDirectionalParticleColor),D=je(e.linkDirectionalParticleThreeObject),P={},N={};e.particlesDataMapper.onCreateObj(function(){var Y=new Ne.Group;return Y.__linkThreeObjType="photons",Y.__photonDataMapper=new Ps(Y),Y}).onUpdateObj(function(Y,z){var $=!!Y.children.length&&Y.children[0],te=D(z),ve,Me;if(te)ve=te.geometry,Me=te.material;else{var xe=Math.ceil(_(z)*10)/10/2,Ze=e.linkDirectionalParticleResolution;$&&$.geometry.parameters.radius===xe&&$.geometry.parameters.widthSegments===Ze?ve=$.geometry:(N.hasOwnProperty(xe)||(N[xe]=new Ne.SphereGeometry(xe,Ze,Ze)),ve=N[xe]);var Ue=C(z)||x(z)||"#f0f0f0",qe=new Ne.Color(Is(Ue)),Qe=e.linkOpacity*3;$&&$.material.color.equals(qe)&&$.material.opacity===Qe?Me=$.material:(P.hasOwnProperty(Ue)||(P[Ue]=new Ne.MeshLambertMaterial({color:qe,transparent:!0,opacity:Qe})),Me=P[Ue])}$&&($.geometry!==ve&&$.geometry.dispose(),$.material!==Me&&$.material.dispose());var Oe=Math.round(Math.abs(A(z)));Y.__photonDataMapper.id(function(it){return it.idx}).onCreateObj(function(){return new Ne.Mesh(ve,Me)}).onUpdateObj(function(it){it.geometry=ve,it.material=Me}).digest(wn(new Array(Oe)).map(function(it,nt){return{idx:nt}}))}).digest(S.filter(A))}}if(e._flushObjects=!1,i(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach(function(Y){Y.source=Y[e.linkSource],Y.target=Y[e.linkTarget]});var V=e.forceEngine!=="ngraph",I;if(V){(I=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var R=e.d3ForceLayout.force("link");R&&R.id(function(Y){return Y[e.nodeId]}).links(e.graphData.links);var L=e.dagMode&&fS(e.graphData,function(Y){return Y[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),k=Math.max.apply(Math,wn(Object.values(L||[]))),ee=e.dagLevelDistance||e.graphData.nodes.length/(k||1)*dS*(["radialin","radialout"].indexOf(e.dagMode)!==-1?.7:1);if(["lr","rl","td","bu","zin","zout"].includes(t.dagMode)){var ne=["lr","rl"].includes(t.dagMode)?"fx":["td","bu"].includes(t.dagMode)?"fy":"fz";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(Y){return delete Y[ne]})}if(["lr","rl","td","bu","zin","zout"].includes(e.dagMode)){var he=["rl","td","zout"].includes(e.dagMode),q=function(z){return(L[z[e.nodeId]]-k/2)*ee*(he?-1:1)},J=["lr","rl"].includes(e.dagMode)?"fx":["td","bu"].includes(e.dagMode)?"fy":"fz";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(Y){return Y[J]=q(Y)})}e.d3ForceLayout.force("dagRadial",["radialin","radialout"].indexOf(e.dagMode)!==-1?th(function(Y){var z=L[Y[e.nodeId]]||-1;return(e.dagMode==="radialin"?k-z:z)*ee}).strength(function(Y){return e.dagNodeFilter(Y)?1:0}):null)}else{var fe=om.graph();e.graphData.nodes.forEach(function(Y){fe.addNode(Y[e.nodeId])}),e.graphData.links.forEach(function(Y){fe.addLink(Y.source,Y.target)}),I=om.forcelayout(fe,oS({dimensions:e.numDimensions},e.ngraphPhysics)),I.graph=fe}for(var De=0;De<e.warmupTicks&&!(V&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);De++)I[V?"tick":"step"]();e.layout=I,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}});function mS(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Object,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=(function(r){function s(){var a;um(this,s);for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];return a=hm(this,s,[].concat(l)),a.__kapsuleInstance=fm(n,[].concat(wn(t?[a]:[]),l)),a}return pm(s,r),dm(s)})(e);return Object.keys(n()).forEach(function(r){return i.prototype[r]=function(){var s,a=(s=this.__kapsuleInstance)[r].apply(s,arguments);return a===this.__kapsuleInstance?this:a}}),i}var gS=window.THREE?window.THREE:{Group:Rn},xm=mS(pS,gS.Group,!0);var vm={type:"change"},Nh={type:"start"},bm={type:"end"},ll=new oi,ym=new ln,_S=Math.cos(70*_c.DEG2RAD),Tt=new U,$t=2*Math.PI,at={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lh=1e-6,cl=class extends rs{constructor(e,t=null){super(e,t),this.state=at.NONE,this.target=new U,this.cursor=new U,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:ui.ROTATE,MIDDLE:ui.DOLLY,RIGHT:ui.PAN},this.touches={ONE:fi.ROTATE,TWO:fi.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._cursorStyle="auto",this._domElementKeyEvents=null,this._lastPosition=new U,this._lastQuaternion=new en,this._lastTargetPosition=new U,this._quat=new en().setFromUnitVectors(e.up,new U(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new hr,this._sphericalDelta=new hr,this._scale=1,this._panOffset=new U,this._rotateStart=new Te,this._rotateEnd=new Te,this._rotateDelta=new Te,this._panStart=new Te,this._panEnd=new Te,this._panDelta=new Te,this._dollyStart=new Te,this._dollyEnd=new Te,this._dollyDelta=new Te,this._dollyDirection=new U,this._mouse=new Te,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=vS.bind(this),this._onPointerDown=xS.bind(this),this._onPointerUp=yS.bind(this),this._onContextMenu=ES.bind(this),this._onMouseWheel=SS.bind(this),this._onKeyDown=wS.bind(this),this._onTouchStart=TS.bind(this),this._onTouchMove=AS.bind(this),this._onMouseDown=bS.bind(this),this._onMouseMove=MS.bind(this),this._interceptControlDown=CS.bind(this),this._interceptControlUp=RS.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}set cursorStyle(e){this._cursorStyle=e,e==="grab"?this.domElement.style.cursor="grab":this.domElement.style.cursor="auto"}get cursorStyle(){return this._cursorStyle}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=""}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(vm),this.update(),this.state=at.NONE}pan(e,t){this._pan(e,t),this.update()}dollyIn(e){this._dollyIn(e),this.update()}dollyOut(e){this._dollyOut(e),this.update()}rotateLeft(e){this._rotateLeft(e),this.update()}rotateUp(e){this._rotateUp(e),this.update()}update(e=null){let t=this.object.position;Tt.copy(t).sub(this.target),Tt.applyQuaternion(this._quat),this._spherical.setFromVector3(Tt),this.autoRotate&&this.state===at.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(i)&&isFinite(r)&&(i<-Math.PI?i+=$t:i>Math.PI&&(i-=$t),r<-Math.PI?r+=$t:r>Math.PI&&(r-=$t),i<=r?this._spherical.theta=Math.max(i,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+r)/2?Math.max(i,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=a!=this._spherical.radius}if(Tt.setFromSpherical(this._spherical),Tt.applyQuaternion(this._quatInverse),t.copy(this.target).add(Tt),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){let o=Tt.length();a=this._clampDistance(o*this._scale);let l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){let o=new U(this._mouse.x,this._mouse.y,0);o.unproject(this.object);let l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;let c=new U(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),a=Tt.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):(ll.origin.copy(this.object.position),ll.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ll.direction))<_S?this.object.lookAt(this.target):(ym.setFromNormalAndCoplanarPoint(this.object.up,this.target),ll.intersectPlane(ym,this.target))))}else if(this.object.isOrthographicCamera){let a=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),a!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>Lh||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lh||this._lastTargetPosition.distanceToSquared(this.target)>Lh?(this.dispatchEvent(vm),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?$t/60*this.autoRotateSpeed*e:$t/60/60*this.autoRotateSpeed}_getZoomScale(e){let t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Tt.setFromMatrixColumn(t,0),Tt.multiplyScalar(-e),this._panOffset.add(Tt)}_panUp(e,t){this.screenSpacePanning===!0?Tt.setFromMatrixColumn(t,1):(Tt.setFromMatrixColumn(t,0),Tt.crossVectors(this.object.up,Tt)),Tt.multiplyScalar(e),this._panOffset.add(Tt)}_pan(e,t){let i=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;Tt.copy(r).sub(this.target);let s=Tt.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/i.clientHeight,this.object.matrix),this._panUp(2*t*s/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let i=this.domElement.getBoundingClientRect(),r=e-i.left,s=t-i.top,a=i.width,o=i.height;this._mouse.x=r/a*2-1,this._mouse.y=-(s/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft($t*this._rotateDelta.x/t.clientHeight),this._rotateUp($t*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp($t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-$t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft($t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-$t*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(i,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(i,r)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(i*i+r*r);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let i=this._getSecondPointerPosition(e),r=.5*(e.pageX+i.x),s=.5*(e.pageY+i.y);this._rotateEnd.set(r,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft($t*this._rotateDelta.x/t.clientHeight),this._rotateUp($t*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(i,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(i*i+r*r);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new Te,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){let t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){let t=e.deltaMode,i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}};function xS(n){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(n.pointerId),this.domElement.ownerDocument.addEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(n)&&(this._addPointer(n),n.pointerType==="touch"?this._onTouchStart(n):this._onMouseDown(n),this._cursorStyle==="grab"&&(this.domElement.style.cursor="grabbing")))}function vS(n){this.enabled!==!1&&(n.pointerType==="touch"?this._onTouchMove(n):this._onMouseMove(n))}function yS(n){switch(this._removePointer(n),this._pointers.length){case 0:this.domElement.releasePointerCapture(n.pointerId),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(bm),this.state=at.NONE,this._cursorStyle==="grab"&&(this.domElement.style.cursor="grab");break;case 1:let e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function bS(n){let e;switch(n.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case ui.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(n),this.state=at.DOLLY;break;case ui.ROTATE:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=at.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=at.ROTATE}break;case ui.PAN:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=at.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=at.PAN}break;default:this.state=at.NONE}this.state!==at.NONE&&this.dispatchEvent(Nh)}function MS(n){switch(this.state){case at.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(n);break;case at.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(n);break;case at.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(n);break}}function SS(n){this.enabled===!1||this.enableZoom===!1||this.state!==at.NONE||(n.preventDefault(),this.dispatchEvent(Nh),this._handleMouseWheel(this._customWheelEvent(n)),this.dispatchEvent(bm))}function wS(n){this.enabled!==!1&&this._handleKeyDown(n)}function TS(n){switch(this._trackPointer(n),this._pointers.length){case 1:switch(this.touches.ONE){case fi.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(n),this.state=at.TOUCH_ROTATE;break;case fi.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(n),this.state=at.TOUCH_PAN;break;default:this.state=at.NONE}break;case 2:switch(this.touches.TWO){case fi.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(n),this.state=at.TOUCH_DOLLY_PAN;break;case fi.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(n),this.state=at.TOUCH_DOLLY_ROTATE;break;default:this.state=at.NONE}break;default:this.state=at.NONE}this.state!==at.NONE&&this.dispatchEvent(Nh)}function AS(n){switch(this._trackPointer(n),this.state){case at.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(n),this.update();break;case at.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(n),this.update();break;case at.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(n),this.update();break;case at.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(n),this.update();break;default:this.state=at.NONE}}function ES(n){this.enabled!==!1&&n.preventDefault()}function CS(n){n.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function RS(n){n.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var Sm=Object.assign(Object.create(null),{markdown_document:"#e8b4b8",markdown_section:"#d99ba0",prisma_model:"#b8a3e8",prisma_column:"#a08fd0",prisma_relation:"#8a76c0",swagger_operation:"#e8d9a0",module:"#d0d7de",class:"#36e2ee",interface:"#6ea8ff",function:"#3fb950",method:"#2bb673",type:"#f5b042",enum:"#c792ea",variable:"#8b97a8"}),Uh=Object.assign(Object.create(null),{"value-call":"#3fb950","type-ref":"#f5b042","doc-ref":"#c07de0",heritage:"#6ea8ff",exports:"#7d8590"}),wm="#565f6b",Tm="#ffffff55",Mm=new WeakSet;function Am(n){let e=n.getElementById("legend");e===null||Mm.has(e)||(Mm.add(e),e.prepend(...Object.entries(Uh).map(([t,i])=>{let r=n.createElement("span");r.className="dot";let s=n.createElement("span");return s.className="swatch",s.style.background=i,r.append(s,t),r})))}function Oh(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Em(n,e){let t=document.getElementById(n);t&&(t.textContent=e)}async function PS(){Am(document);let n=document.getElementById("graph");if(!n)return;let e;try{let v=await fetch("graph.json");if(!v.ok)throw new Error(`HTTP ${v.status}`);e=await v.json()}catch(v){n.textContent=`could not load the graph (${String(v)})`;return}e.project&&Em("project",e.project),Em("counts",`${e.nodes.length.toLocaleString()} nodes \xB7 ${e.links.length.toLocaleString()} edges`);let t=n.clientWidth||800,i=n.clientHeight||600,r=new kr;r.background=new Xe(658448),r.add(new ns(16777215,2));let s=new ts(16777215,.8);s.position.set(1,1,1),r.add(s);let a=new Nt(50,t/i,.1,1e6);a.position.set(0,0,320);let o=new Vo({antialias:!0});o.setPixelRatio(Math.min(window.devicePixelRatio,2)),o.setSize(t,i),n.appendChild(o.domElement);let l=new cl(a,o.domElement);l.enableDamping=!0,l.dampingFactor=.18;let c=new xm().nodeId("id").nodeRelSize(4).nodeResolution(12).nodeOpacity(.95).nodeVal(v=>1+Math.sqrt(v.degree)).nodeColor(v=>Sm[v.kind]??wm).linkColor(v=>Uh[v.kind]??Tm).linkOpacity(.4).linkWidth(0).warmupTicks(20).cooldownTicks(160);r.add(c);let h=()=>{let v=c.getGraphBbox();if(!v)return;let M=(v.x[0]+v.x[1])/2,S=(v.y[0]+v.y[1])/2,w=(v.z[0]+v.z[1])/2,A=Math.max((v.x[1]-v.x[0])/2,(v.y[1]-v.y[0])/2,(v.z[1]-v.z[0])/2,10)*2.6;a.position.set(M+A*.5,S+A*.32,w+A*.8),a.near=Math.max(.1,A/200),a.far=A*20,a.updateProjectionMatrix(),l.target.set(M,S,w),l.update()},d=new URLSearchParams(window.location.search).has("static"),u=-1,p=0;c.onEngineStop(()=>{h(),d&&u<0&&(u=p+4)});let m=document.createElement("div");m.className="tooltip",n.appendChild(m);let x=new is,g=new Te;o.domElement.addEventListener("pointermove",v=>{let M=o.domElement.getBoundingClientRect();g.x=(v.clientX-M.left)/M.width*2-1,g.y=-((v.clientY-M.top)/M.height)*2+1,x.setFromCamera(g,a);let S=x.intersectObjects(c.children,!0),w=null;for(let y of S){let A=y.object;for(;A;){let _=A;if(_.__graphObjType==="node"&&_.__data){w=_.__data;break}A=A.parent}if(w)break}if(!w){m.style.display="none";return}m.style.display="block",m.style.left=`${v.clientX-M.left+12}px`,m.style.top=`${v.clientY-M.top+12}px`,m.innerHTML=`${Oh(w.name)}<br/><span class="muted">${Oh(w.kind)} \xB7 ${Oh(w.file)}</span>`}),o.domElement.addEventListener("pointerleave",()=>{m.style.display="none"});let f=()=>{if(u>=0&&p>u){o.render(r,a);return}requestAnimationFrame(f),c.tickFrame(),l.update(),o.render(r,a),p++};f(),window.addEventListener("resize",()=>{let v=n.clientWidth||t,M=n.clientHeight||i;a.aspect=v/M,a.updateProjectionMatrix(),o.setSize(v,M)}),c.graphData({nodes:e.nodes,links:e.links}),window.setTimeout(h,700)}PS();})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttsc/graph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Checker-resolved architecture graph over MCP for coding agents, backed by ttsc's in-process TypeScript-Go compiler.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
19
|
-
"@typia/mcp": "^
|
|
20
|
-
"typia": "^
|
|
19
|
+
"@typia/mcp": "^15.1.0",
|
|
20
|
+
"typia": "^15.1.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"ttsc": "^0.
|
|
23
|
+
"ttsc": "^0.31.0"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"ttsc",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"src"
|
|
36
36
|
],
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@wrtnlabs/evidence": "^0.3.1",
|
|
38
39
|
"@types/node": "^25.3.0",
|
|
39
40
|
"@types/three": "^0.184.1",
|
|
40
41
|
"esbuild": "^0.25.12",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"three": "^0.184.0",
|
|
43
44
|
"three-forcegraph": "^1.43.4",
|
|
44
45
|
"typescript": "^7.0.2",
|
|
45
|
-
"ttsc": "0.
|
|
46
|
+
"ttsc": "0.31.0"
|
|
46
47
|
},
|
|
47
48
|
"repository": {
|
|
48
49
|
"type": "git",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
},
|
|
56
57
|
"homepage": "https://ttsc.dev",
|
|
57
58
|
"scripts": {
|
|
58
|
-
"build": "rimraf lib && node node_modules/ttsc/lib/launcher/ttsc.js && node build/bundle-viewer.mjs"
|
|
59
|
+
"build": "rimraf lib && node node_modules/ttsc/lib/launcher/ttsc.js && node build/bundle-viewer.mjs",
|
|
60
|
+
"evidence": "evidence"
|
|
59
61
|
}
|
|
60
62
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owned temporary storage for one synchronous child stdout/stderr capture.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/common.md#principled-implementation Numeric descriptors can be passed directly to spawnSync while the stream union selects the matching captured text.
|
|
5
|
+
* @evidence contracts/common.md#clear-and-simple-design One handle groups two descriptors with read and disposal operations owned by the same capture.
|
|
6
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts File capture avoids a guessed pipe ceiling without modifying spawnSync internals.
|
|
7
|
+
* @evidence contracts/common.md#meaningful-documentation Native member comments state stream selection, caller ownership and the cleanup boundary.
|
|
8
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources signature only: the implementer owns any handle or retained state.
|
|
9
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms signature only: the implementer owns the algorithm and its cost.
|
|
10
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work signature only: the implementer decides what work is shared.
|
|
11
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation signature only: the implementer owns any path or process work.
|
|
12
|
+
*/
|
|
13
|
+
export interface CapturedProcessOutput {
|
|
14
|
+
/**
|
|
15
|
+
* Close the descriptors and remove the backing files once. Invoke after the
|
|
16
|
+
* child finishes, including failure paths; removal remains best effort.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation Disposal releases both capture descriptors before removing their containing directory.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design Cleanup is one owned operation rather than independent caller-managed paths.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Cleanup preserves the child outcome instead of replacing it with a secondary removal error.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose states invocation timing, failure coverage and best-effort removal.
|
|
22
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources signature only: the implementer owns any handle or retained state.
|
|
23
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms signature only: the implementer owns the algorithm and its cost.
|
|
24
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work signature only: the implementer decides what work is shared.
|
|
25
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation signature only: the implementer owns any path or process work.
|
|
26
|
+
*/
|
|
27
|
+
dispose(): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Read one stream's UTF-8 text after the child finishes. A failed spawn
|
|
31
|
+
* leaves its pre-created capture file empty; a filesystem read failure
|
|
32
|
+
* propagates.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation The stream discriminant selects its backing file and UTF-8 decoding returns the captured textual channel.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design One reader shares the same storage paths as the capture owner.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts An unreadable capture is not replaced with empty text that could disguise lost output.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose explains encoding, timing and read-failure propagation.
|
|
38
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources signature only: the implementer owns any handle or retained state.
|
|
39
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms signature only: the implementer owns the algorithm and its cost.
|
|
40
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work signature only: the implementer decides what work is shared.
|
|
41
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation signature only: the implementer owns any path or process work.
|
|
42
|
+
*/
|
|
43
|
+
read(stream: "stdout" | "stderr"): string;
|
|
44
|
+
|
|
45
|
+
/** Owned writable descriptor passed as the child's stderr destination. */
|
|
46
|
+
stderrFd: number;
|
|
47
|
+
|
|
48
|
+
/** Owned writable descriptor passed as the child's stdout destination. */
|
|
49
|
+
stdoutFd: number;
|
|
50
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type OptionKind = "value" | "string" | "flag" | "boolean";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One recognized launcher option and its accepted flag aliases.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/common.md#principled-implementation Key identifies the parsed value while aliases and kind determine accepted syntax.
|
|
7
|
+
* @evidence contracts/common.md#clear-and-simple-design One definition owns aliases and parsing mode so launchers share the same parser.
|
|
8
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Accepted tokens are explicit launcher grammar, not special cases for expected command output.
|
|
9
|
+
* @evidence contracts/common.md#meaningful-documentation Native member comments distinguish result key, accepted tokens and value/flag/boolean parsing.
|
|
10
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
11
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
12
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
13
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
14
|
+
*/
|
|
15
|
+
export interface ILauncherOption {
|
|
16
|
+
/** Canonical map key shared by every alias. */
|
|
17
|
+
key: string;
|
|
18
|
+
|
|
19
|
+
/** Accepted complete option tokens, including their leading hyphens. */
|
|
20
|
+
flags: readonly string[];
|
|
21
|
+
|
|
22
|
+
/** Value requires nonempty text; string preserves native empty/dash values. */
|
|
23
|
+
kind: OptionKind;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project coordinates passed to the native graph producer.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/common.md#principled-implementation Absolute working directory and configuration locator determine which project the producer loads.
|
|
5
|
+
* @evidence contracts/common.md#clear-and-simple-design Two shared coordinates prevent launcher lanes from owning competing project defaults.
|
|
6
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Configuration remains caller-selected rather than pinned to a named repository.
|
|
7
|
+
* @evidence contracts/common.md#meaningful-documentation Native member comments identify directory absoluteness and configuration relativity.
|
|
8
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
9
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
10
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
11
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
12
|
+
*/
|
|
13
|
+
export interface IProjectOptions {
|
|
14
|
+
/** Absolute project working directory. */
|
|
15
|
+
cwd: string;
|
|
16
|
+
|
|
17
|
+
/** Configuration path, relative to cwd unless already absolute. */
|
|
18
|
+
tsconfig: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed canonical option keys with textual or boolean values.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/common.md#principled-implementation ReadonlyMap represents absent options distinctly from false and empty text, with value kinds preserved.
|
|
5
|
+
* @evidence contracts/common.md#clear-and-simple-design One map avoids separate alias-indexed result objects.
|
|
6
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The public view is readonly rather than mutating consumer options during later validation.
|
|
7
|
+
* @evidence contracts/common.md#meaningful-documentation The native headline explains canonical keys and the two stored value categories.
|
|
8
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources data shape only: it holds no handle, task or retained state.
|
|
9
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms data shape only: it contains no loop or algorithm.
|
|
10
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work data shape only: it computes nothing another request could share.
|
|
11
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation data shape only: it touches no file, path or process.
|
|
12
|
+
*/
|
|
13
|
+
export type ParsedLauncherOptions = ReadonlyMap<string, string | boolean>;
|