@plaso-infi/whiteboard-sdk 0.9.9-alpha1.1 → 0.9.10-alpha1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/arc-f453aa24-001bbdd5.js +1 -0
- package/dist/esm/blockDiagram-38ab4fdb-5054d111-916200b0.js +1 -0
- package/dist/esm/c4Diagram-3d4e48cf-5c418a03-d69b6a9c.js +1 -0
- package/dist/esm/channel-d0c23f49-f259a6d1.js +1 -0
- package/dist/esm/classDiagram-70f12bd4-491ee226-467aef5f.js +1 -0
- package/dist/esm/classDiagram-v2-f2320105-e90ceb2f-abf81ed0.js +1 -0
- package/dist/esm/clone-f55b0cc7-e67cd753.js +1 -0
- package/dist/esm/createText-2e5e7dd3-dcc34ae8-3c64ca2d.js +1 -0
- package/dist/esm/edges-e0da2a9e-8abaed90-a3e3f930.js +1 -0
- package/dist/esm/erDiagram-9861fffd-20c9cea5-06108c89.js +1 -0
- package/dist/esm/{flowDb-956e92f1-05858601-f0b0a431.js → flowDb-956e92f1-3b9320a7-67f62d02.js} +1 -1
- package/dist/esm/flowDiagram-66a62f08-08a6f0e7-acbc8998.js +1 -0
- package/dist/esm/flowDiagram-v2-96b9c2cf-6b10acd5-d6f5b177.js +1 -0
- package/dist/esm/flowchart-elk-definition-4a651766-e5b3ba00-a86e3534.js +1 -0
- package/dist/esm/ganttDiagram-c361ad54-be9f4bb3-9fd6d707.js +1 -0
- package/dist/esm/{gitGraphDiagram-72cf32ee-6962610d-ce66735c.js → gitGraphDiagram-72cf32ee-a0e338f3-fedb2c3a.js} +1 -1
- package/dist/esm/graph-afe27007-8e18cc75.js +1 -0
- package/dist/esm/hls-8060cc31-cbc4e4b4.js +1 -0
- package/dist/esm/{index-0c25c9f2.js → index-167f08a0.js} +10 -10
- package/dist/esm/index-3862675e-87ca6a66-f6d07d04.js +1 -0
- package/dist/esm/index-43b715ff-0a40eb86.js +7 -0
- package/dist/esm/index.css +27675 -31377
- package/dist/esm/index.d.ts +6 -143
- package/dist/esm/index.js +1 -1
- package/dist/esm/{infoDiagram-f8f76790-ff02a986-1c2bb5a5.js → infoDiagram-f8f76790-4379e779-22c1733f.js} +1 -1
- package/dist/esm/journeyDiagram-49397b02-2cca535b-67946860.js +1 -0
- package/dist/esm/layout-ae3a065f-6e640144.js +1 -0
- package/dist/esm/{line-8bf27c33-c9dee662.js → line-7161536c-1eab81ab.js} +1 -1
- package/dist/esm/linear-5dc481fe-05c0f51e.js +1 -0
- package/dist/esm/lottie-e933e82b-ded8d0d3.js +1 -0
- package/dist/esm/mindmap-definition-fc14e90a-5dcd2e6e-eef8a18b.js +9 -0
- package/dist/esm/{ordinal-9e8754c0-c9285688.js → ordinal-03018387-faf5bec3.js} +1 -1
- package/dist/esm/pdf_lib-55fc68be-7c552411.js +1 -0
- package/dist/esm/{pieDiagram-8a3498a8-95075175-f271e7e0.js → pieDiagram-8a3498a8-6c705dfb-ac29777a.js} +1 -1
- package/dist/esm/quadrantDiagram-120e2f19-ce717132-2ca6a80f.js +1 -0
- package/dist/esm/{requirementDiagram-deff3bca-29300a5c-74399573.js → requirementDiagram-deff3bca-94ff9b49-53ba3062.js} +1 -1
- package/dist/esm/sankeyDiagram-04a897e0-7f5565ac-73d22dce.js +1 -0
- package/dist/esm/sequenceDiagram-704730f1-65919a25-99547f7a.js +1 -0
- package/dist/esm/stateDiagram-587899a1-2d298c91-69f94d43.js +1 -0
- package/dist/esm/stateDiagram-v2-d93cdb3a-d0d0a3cb-c5f54ac0.js +1 -0
- package/dist/esm/{styles-6aaf32cf-27c06757-9924063a.js → styles-6aaf32cf-9dfc64a7-73ae2457.js} +1 -1
- package/dist/esm/{styles-9a916d00-db7a32f0-40cad9b3.js → styles-9a916d00-f70df3fd-82031337.js} +1 -1
- package/dist/esm/styles-c10674c1-9ccf4241-d16c7c7b.js +1 -0
- package/dist/esm/{svgDrawCommon-08f97a94-12aefbff-7bed41c9.js → svgDrawCommon-08f97a94-6a32c869-fc129345.js} +1 -1
- package/dist/esm/{timeline-definition-85554ec2-475c323b-17118daa.js → timeline-definition-85554ec2-0d0b57da-737d18f2.js} +1 -1
- package/dist/esm/web-pinyin-dbdcf553.js +1 -0
- package/dist/esm/xychartDiagram-e933f94c-d01b914a-f5a15a41.js +1 -0
- package/package.json +2 -6
- package/dist/esm/arc-0fffff1f-cb15888d.js +0 -1
- package/dist/esm/blockDiagram-38ab4fdb-b22c3166-94cafbe4.js +0 -1
- package/dist/esm/c4Diagram-3d4e48cf-ab3a2217-04f37a60.js +0 -1
- package/dist/esm/channel-ff3e58f7-441d1956.js +0 -1
- package/dist/esm/classDiagram-70f12bd4-b7cecb7d-02f67aec.js +0 -1
- package/dist/esm/classDiagram-v2-f2320105-88330ff5-f9e02a46.js +0 -1
- package/dist/esm/clone-e72fc4b8-e0d9c611.js +0 -1
- package/dist/esm/createText-2e5e7dd3-3d197991-1dc23da3.js +0 -1
- package/dist/esm/edges-e0da2a9e-fba3c3a7-06d257f8.js +0 -1
- package/dist/esm/erDiagram-9861fffd-3dedc17c-b3410b98.js +0 -1
- package/dist/esm/export_as_markdown-b48293a8-00bd7ea7.js +0 -1
- package/dist/esm/flowDiagram-66a62f08-b3c97779-70248993.js +0 -1
- package/dist/esm/flowDiagram-v2-96b9c2cf-58d3ab5f-20c5bbe1.js +0 -1
- package/dist/esm/flowchart-elk-definition-4a651766-4ec085d8-a42f0ee1.js +0 -1
- package/dist/esm/ganttDiagram-c361ad54-25aec23c-d8a3f436.js +0 -1
- package/dist/esm/graph-a2efb7be-713af9a6.js +0 -1
- package/dist/esm/hls-2930c8f9-d0274088.js +0 -1
- package/dist/esm/index-069d79ba-7af162da.js +0 -7
- package/dist/esm/index-3862675e-b2881445-8d90f1dc.js +0 -1
- package/dist/esm/journeyDiagram-49397b02-8ee31d6c-be9e21a6.js +0 -1
- package/dist/esm/layout-f41a9481-b65a914c.js +0 -1
- package/dist/esm/linear-bf7a4ead-aef02647.js +0 -1
- package/dist/esm/lottie-b2af09ef-63710b41.js +0 -1
- package/dist/esm/mindmap-definition-fc14e90a-5d304050-073c89e4.js +0 -9
- package/dist/esm/pdf_lib-759c3824-5535ffeb.js +0 -1
- package/dist/esm/quadrantDiagram-120e2f19-8bb878d9-47628e3e.js +0 -1
- package/dist/esm/sankeyDiagram-04a897e0-8e1ff3ae-7e61ab0d.js +0 -1
- package/dist/esm/sequenceDiagram-704730f1-6a89eb72-b6d29a75.js +0 -1
- package/dist/esm/stateDiagram-587899a1-615f787b-70f1fbc3.js +0 -1
- package/dist/esm/stateDiagram-v2-d93cdb3a-0da1e02b-9d5b2272.js +0 -1
- package/dist/esm/styles-c10674c1-3e724aac-5b3a371b.js +0 -1
- package/dist/esm/web-pinyin-cc77b789.js +0 -1
- package/dist/esm/xychartDiagram-e933f94c-43d0ec04-d4af0981.js +0 -1
- /package/dist/esm/{Tableau10-0d093dcf-a3138301.js → Tableau10-e8b1eccc-4cef513c.js} +0 -0
- /package/dist/esm/{array-75b204b6-7055adac.js → array-5c028890-e9486e2e.js} +0 -0
- /package/dist/esm/{init-7e0ff151-92a0ac09.js → init-426b8023-e9aac3aa.js} +0 -0
- /package/dist/esm/{path-5bb65086-3ae6d6fa.js → path-a3e377ce-ded30e71.js} +0 -0
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
import { element_type, IWordsMap, AiThinkerStatus, AiThinkerHandlerT, classifyFiles } from '@plasosdk/upime-sdk';
|
|
2
|
-
export { SUPPORT_FILE_EXT } from '@plasosdk/upime-sdk';
|
|
3
1
|
import React$1, { FC, CSSProperties, ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* todo: 知识库
|
|
7
|
-
*/
|
|
8
|
-
declare enum AIInstructionType {
|
|
9
|
-
/** 正常智能体 */
|
|
10
|
-
default = "default",
|
|
11
|
-
/** 拥有预设提示词的智能体,它的行为跟正常智能体是一样的*/
|
|
12
|
-
defaultPrompt = "defaultPrompt",
|
|
13
|
-
/** 预设行为的智能体,行为是sdk内枚举出来的 */
|
|
14
|
-
preset = "preset",
|
|
15
|
-
controlled = "controlled",
|
|
16
|
-
agentFlow = "agentFlow",
|
|
17
|
-
start = "start",
|
|
18
|
-
agenticApi = "agenticApi"
|
|
19
|
-
}
|
|
20
|
-
declare enum AIInstructionPresetType {
|
|
21
|
-
genPPT = "genPPT",
|
|
22
|
-
genMindmap = "genMindmap",
|
|
23
|
-
genFlowChat = "genFlowChat",
|
|
24
|
-
webpageVideoHelper = "webpageVideoHelper"
|
|
25
|
-
}
|
|
2
|
+
import { IWordsMap, AiThinkerStatus, AiThinkerHandlerT, classifyFiles } from '@plasosdk/upime-sdk';
|
|
3
|
+
export { SUPPORT_FILE_EXT } from '@plasosdk/upime-sdk';
|
|
26
4
|
|
|
27
5
|
type PositionLike = {
|
|
28
6
|
x: number;
|
|
@@ -151,88 +129,6 @@ declare enum ExportFileTypeT {
|
|
|
151
129
|
Pptx = "pptx",
|
|
152
130
|
Image = "image"
|
|
153
131
|
}
|
|
154
|
-
declare enum AgentStitchType {
|
|
155
|
-
IN = "in",
|
|
156
|
-
OUT = "out"
|
|
157
|
-
}
|
|
158
|
-
declare enum AgentStitchValueType {
|
|
159
|
-
Text = "text",
|
|
160
|
-
Number = "number",
|
|
161
|
-
/** 这里跟sdk内的定义略有不同,这里需要把array和object区分开来 */
|
|
162
|
-
Array = "array",
|
|
163
|
-
Object = "object",
|
|
164
|
-
Document = "document",
|
|
165
|
-
Image = "image",
|
|
166
|
-
Audio = "audio",
|
|
167
|
-
Video = "video"
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* 针脚(业务定义)
|
|
171
|
-
*/
|
|
172
|
-
type AgentStitch = {
|
|
173
|
-
type: AgentStitchType;
|
|
174
|
-
valueType?: AgentStitchValueType | AgentStitchValueType[];
|
|
175
|
-
name: string;
|
|
176
|
-
description: string;
|
|
177
|
-
/** 对于out:
|
|
178
|
-
* 针脚的取值路径
|
|
179
|
-
* 1. name
|
|
180
|
-
* 2. obj.name
|
|
181
|
-
* 对于in:就是参数名
|
|
182
|
-
*/
|
|
183
|
-
path?: string;
|
|
184
|
-
/** 是否为预设的 */
|
|
185
|
-
isPreset?: boolean;
|
|
186
|
-
/** 是否是隐藏针脚 */
|
|
187
|
-
hidden?: boolean;
|
|
188
|
-
};
|
|
189
|
-
type AIInstructionBaseInfo = {
|
|
190
|
-
id?: string | number;
|
|
191
|
-
name: string;
|
|
192
|
-
keywords: string[];
|
|
193
|
-
coverFileUrl: string;
|
|
194
|
-
defaultPrompt?: string;
|
|
195
|
-
supportNetwork?: boolean;
|
|
196
|
-
supportReasoning?: boolean;
|
|
197
|
-
categoryId: string;
|
|
198
|
-
categoryName: string;
|
|
199
|
-
extraInfo?: {
|
|
200
|
-
/** 自动创建一些出口元素 */
|
|
201
|
-
autoCreateOutElements?: element_type[];
|
|
202
|
-
};
|
|
203
|
-
stitchList?: AgentStitch[];
|
|
204
|
-
agentVersion?: number;
|
|
205
|
-
tags?: string[];
|
|
206
|
-
};
|
|
207
|
-
type AIInstructionDefault = AIInstructionBaseInfo & {
|
|
208
|
-
type: AIInstructionType.default;
|
|
209
|
-
};
|
|
210
|
-
type AIInstructionDefaultPrompt = AIInstructionBaseInfo & {
|
|
211
|
-
type: AIInstructionType.defaultPrompt;
|
|
212
|
-
defaultPrompt: string;
|
|
213
|
-
};
|
|
214
|
-
type AIInstructionPreset = AIInstructionBaseInfo & {
|
|
215
|
-
type: AIInstructionType.preset;
|
|
216
|
-
presetType: AIInstructionPresetType;
|
|
217
|
-
presetExtraInfo?: any;
|
|
218
|
-
};
|
|
219
|
-
type AIInstructionControlled = AIInstructionBaseInfo & {
|
|
220
|
-
type: AIInstructionType.controlled;
|
|
221
|
-
presetExtraInfo: any;
|
|
222
|
-
};
|
|
223
|
-
type AIInstructionAgentFlow = AIInstructionBaseInfo & {
|
|
224
|
-
type: AIInstructionType.agentFlow;
|
|
225
|
-
agentFlowTemplateId: string;
|
|
226
|
-
};
|
|
227
|
-
type AIInstructionStart = AIInstructionBaseInfo & {
|
|
228
|
-
type: AIInstructionType.start;
|
|
229
|
-
};
|
|
230
|
-
type AIInstructionAgenticApi = AIInstructionBaseInfo & {
|
|
231
|
-
type: AIInstructionType.agenticApi;
|
|
232
|
-
/** agenticApi的Id */
|
|
233
|
-
agenticApiId: string;
|
|
234
|
-
};
|
|
235
|
-
type AIInstructionInfo = AIInstructionDefault | AIInstructionDefaultPrompt | AIInstructionPreset | AIInstructionControlled | AIInstructionAgentFlow | AIInstructionStart | AIInstructionAgenticApi;
|
|
236
132
|
|
|
237
133
|
type DocumentType = 'ppt' | 'pdf' | 'excel' | 'word';
|
|
238
134
|
type FileType = 'image' | 'document' | 'video' | 'audio';
|
|
@@ -629,6 +525,7 @@ type DownloadConfigT = {
|
|
|
629
525
|
enable: boolean;
|
|
630
526
|
fileEnable?: boolean;
|
|
631
527
|
imageEnable?: boolean;
|
|
528
|
+
targetType?: '_blank' | '_self' | 'auto';
|
|
632
529
|
};
|
|
633
530
|
type FullToolBarWidgetsConfigs = {
|
|
634
531
|
meeting: boolean;
|
|
@@ -695,6 +592,8 @@ type OperationGuideT = {
|
|
|
695
592
|
type PreferencesConfigT = {
|
|
696
593
|
isSync?: boolean;
|
|
697
594
|
accessSetting?: number;
|
|
595
|
+
toolBar?: string[];
|
|
596
|
+
toolBox?: string[];
|
|
698
597
|
};
|
|
699
598
|
type ExportConfigsT = {
|
|
700
599
|
/** 是否允许导出帧框为PPT */
|
|
@@ -933,10 +832,6 @@ interface GetSdkInstanceConfigs extends GetSdkInstanceAuthT {
|
|
|
933
832
|
hideRecommendationList?: boolean;
|
|
934
833
|
/** 是否暂时剩余 AI Creds 信息,默认隐藏 */
|
|
935
834
|
showRemainTip?: boolean;
|
|
936
|
-
/** 是否启用批量上传作业智能批改 */
|
|
937
|
-
enableBatchUploadAgentFlow?: boolean;
|
|
938
|
-
/** 是否支持开启 AI 智能转写 */
|
|
939
|
-
enableAIAsr?: boolean;
|
|
940
835
|
};
|
|
941
836
|
/** 智能体配置 */
|
|
942
837
|
agentConfig?: {
|
|
@@ -952,18 +847,6 @@ interface GetSdkInstanceConfigs extends GetSdkInstanceAuthT {
|
|
|
952
847
|
};
|
|
953
848
|
/** 是否显示智能体标签 */
|
|
954
849
|
enableTagAtElement?: boolean;
|
|
955
|
-
/** 查看详情 */
|
|
956
|
-
viewAgentDetail?: (id: Exclude<AIInstructionInfo['id'], undefined>) => void;
|
|
957
|
-
predictGenerationTime?: {
|
|
958
|
-
image: number;
|
|
959
|
-
video: number;
|
|
960
|
-
audio: number;
|
|
961
|
-
webpage: number;
|
|
962
|
-
};
|
|
963
|
-
getAgenticApiEnv?: () => Promise<Record<string, any>>;
|
|
964
|
-
getAIInstructionLatestVersion?: (agentIds: Exclude<AIInstructionInfo['id'], undefined>[]) => Promise<number[]>;
|
|
965
|
-
getAgentDetail?: (id: Exclude<AIInstructionInfo['id'], undefined>) => Promise<AIInstructionInfo>;
|
|
966
|
-
showBaseOrchestration?: boolean;
|
|
967
850
|
};
|
|
968
851
|
/** 是否开启远端板书实时渲染配置,开启该配置能一定程度上优化板书性能*/
|
|
969
852
|
enableSyncRemoteDrawing?: boolean;
|
|
@@ -977,8 +860,6 @@ interface GetSdkInstanceConfigs extends GetSdkInstanceAuthT {
|
|
|
977
860
|
/** AI 思想家 初始化的时候回调 */
|
|
978
861
|
onCreate?: (handler: AiThinkerHandlerT) => void;
|
|
979
862
|
};
|
|
980
|
-
/** 是否开启帧框重排功能 */
|
|
981
|
-
enableSortFrame?: boolean;
|
|
982
863
|
/** 链接跳转,返回值为string表示跳转元素id */
|
|
983
864
|
gotoLink?: (link: string) => string | undefined;
|
|
984
865
|
/** 判断链接是普通链接还是画布内跳转链接 */
|
|
@@ -1013,23 +894,6 @@ interface GetSdkInstanceConfigs extends GetSdkInstanceAuthT {
|
|
|
1013
894
|
* - 为避免 api 调用无效,需要在监听到 sdk_dom_ready 或 resource_ready 消息后执行
|
|
1014
895
|
*/
|
|
1015
896
|
initPortal?: (portal: ReactNode) => void;
|
|
1016
|
-
customTemplate?: {
|
|
1017
|
-
templateMode: 1 | 0;
|
|
1018
|
-
/** 当前是否为agentflow模板模式 */
|
|
1019
|
-
isAgentTemplate?: boolean;
|
|
1020
|
-
title: string;
|
|
1021
|
-
description: string;
|
|
1022
|
-
sdkTemplateRecordId?: string;
|
|
1023
|
-
type?: 1 | 2 | 3 | 4;
|
|
1024
|
-
subjectId: string;
|
|
1025
|
-
boardId: string;
|
|
1026
|
-
categoryIds?: number[];
|
|
1027
|
-
tagIds?: number[];
|
|
1028
|
-
successToast?: string;
|
|
1029
|
-
failedToast?: string;
|
|
1030
|
-
/** 其他透传数据 */
|
|
1031
|
-
extInfo?: Record<string, any>;
|
|
1032
|
-
};
|
|
1033
897
|
}
|
|
1034
898
|
/** 自定义文件上传类型声明,*/
|
|
1035
899
|
type CustomizeUploader = {
|
|
@@ -1650,5 +1514,4 @@ declare const VotingPlugin: ISdkPluginConstructor<InfiSdkPluginConfig>;
|
|
|
1650
1514
|
|
|
1651
1515
|
declare const _default: InfiWebSdkType;
|
|
1652
1516
|
|
|
1653
|
-
export { DefaultPerm, ExitMeetingStatus, ExportFileTypeT, FULL_TOOLBAR_CONFIG, FULL_USER_ACCESS, GridType, GroupTalkPlugin, HoverTip, InfiUploader, QUICK_USER_ACCESS, RemoteControlClientRole, RemoteControlEndReason, RemoteControlKickedOutReason, SvgIcon, SvgManager, USER_ACCESS, UploadErrorStatusCode, VotingPlugin, _default as default, getDocumentType, getFileType, useInfiWebSDK };
|
|
1654
|
-
export type { CanUploadInfo, ComponentProps, CustomizeUploader, EditMeetingCmpProp, ExternalFileAppend, FileMetaType, FollowGroupConfigT, GetSdkInstanceConfigs, GroupTalkConfig, IFollowGroupOperation, InfiSdkPluginType, InfiUploaderType, InfiUserInfoT, InfiWebSdkCustomPlugin, InfiWebSdkPlugin, InfiWebsdkInstanceType, InviteMemberCmpProp, MeetingConfigs, RemoteControlEndReasonT, SdkBottomRightPluginSlotType, SdkMeetingToolSlotType, SdkPluginSlotType, SelectRectCtrl, SelectRectCtrlConfigT, TemplateDataT, TemplateType, ToolBarType, ToolBarWidgetsConfigsT, UploadErrorMsgType, UploadRejectInfo, WebsdkEngineType };
|
|
1517
|
+
export { type CanUploadInfo, type ComponentProps, type CustomizeUploader, DefaultPerm, type EditMeetingCmpProp, ExitMeetingStatus, ExportFileTypeT, type ExternalFileAppend, FULL_TOOLBAR_CONFIG, FULL_USER_ACCESS, type FileMetaType, type FollowGroupConfigT, type GetSdkInstanceConfigs, GridType, type GroupTalkConfig, GroupTalkPlugin, HoverTip, type IFollowGroupOperation, type InfiSdkPluginType, InfiUploader, type InfiUploaderType, type InfiUserInfoT, type InfiWebSdkCustomPlugin, type InfiWebSdkPlugin, type InfiWebsdkInstanceType, type InviteMemberCmpProp, type MeetingConfigs, QUICK_USER_ACCESS, RemoteControlClientRole, RemoteControlEndReason, type RemoteControlEndReasonT, RemoteControlKickedOutReason, type SdkBottomRightPluginSlotType, type SdkMeetingToolSlotType, type SdkPluginSlotType, type SelectRectCtrl, type SelectRectCtrlConfigT, SvgIcon, SvgManager, type TemplateDataT, type TemplateType, type ToolBarType, type ToolBarWidgetsConfigsT, USER_ACCESS, type UploadErrorMsgType, UploadErrorStatusCode, type UploadRejectInfo, VotingPlugin, type WebsdkEngineType, _default as default, getDocumentType, getFileType, useInfiWebSDK };
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{bk as DefaultPerm,bo as ExitMeetingStatus,bp as ExportFileTypeT,bs as FULL_TOOLBAR_CONFIG,bt as FULL_USER_ACCESS,bj as GridType,bg as GroupTalkPlugin,bx as HoverTip,bA as InfiUploader,bv as QUICK_USER_ACCESS,bl as RemoteControlClientRole,bm as RemoteControlEndReason,bn as RemoteControlKickedOutReason,bC as SUPPORT_FILE_EXT,bw as SvgIcon,by as SvgManager,bu as USER_ACCESS,bB as UploadErrorStatusCode,bh as VotingPlugin,bi as default,br as getDocumentType,bq as getFileType,bz as useInfiWebSDK}from"./index-167f08a0.js";import"react";import"react-dom";import"stream";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as t,M as i,V as n}from"./index-167f08a0.js";import"react";import"react-dom";import"stream";var s=function(){var t=function(t,i,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=i);return n},i=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,i,n,s,e,r,o){switch(r.length,e){case 1:return s;case 4:break;case 6:s.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(i,[2,3]),t(i,[2,4]),t(i,[2,5]),t(i,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,i){if(!i.recoverable){var n=new Error(t);throw n.hash=i,n}this.trace(t)},parse:function(t){var i=[0],n=[],s=[null],e=[],r=this.table,o="",h=0,l=0,c=e.slice.call(arguments,1),a=Object.create(this.lexer),y={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(y.yy[u]=this.yy[u]);a.setInput(t,y.yy),y.yy.lexer=a,y.yy.parser=this,void 0===a.yylloc&&(a.yylloc={});var p=a.yylloc;e.push(p);var f=a.options&&a.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,m,_,d,k,x,b,v,I,w={};;){if(m=i[i.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==g&&(I=void 0,"number"!=typeof(I=n.pop()||a.lex()||1)&&(I instanceof Array&&(I=(n=I).pop()),I=this.symbols_[I]||I),g=I),_=r[m]&&r[m][g]),void 0===_||!_.length||!_[0]){var S;for(k in v=[],r[m])this.terminals_[k]&&k>2&&v.push("'"+this.terminals_[k]+"'");S=a.showPosition?"Parse error on line "+(h+1)+":\n"+a.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(S,{text:a.match,token:this.terminals_[g]||g,line:a.yylineno,loc:p,expected:v})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+g);switch(_[0]){case 1:i.push(g),s.push(a.yytext),e.push(a.yylloc),i.push(_[1]),g=null,l=a.yyleng,o=a.yytext,h=a.yylineno,p=a.yylloc;break;case 2:if(x=this.productions_[_[1]][1],w.$=s[s.length-x],w._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},f&&(w._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),void 0!==(d=this.performAction.apply(w,[o,l,h,y.yy,_[1],s,e].concat(c))))return d;x&&(i=i.slice(0,-1*x*2),s=s.slice(0,-1*x),e=e.slice(0,-1*x)),i.push(this.productions_[_[1]][0]),s.push(w.$),e.push(w._$),b=r[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var n,s,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in e)this[r]=e[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),r=0;r<e.length;r++)if((n=this._input.match(this.rules[e[r]]))&&(!i||n[0].length>i[0].length)){if(i=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,e[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,e[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,n,s){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function e(){this.yy={}}return n.lexer=s,e.prototype=n,n.Parser=e,new e}();s.parser=s;const e=!1;let r=e;const o={parser:s,db:{clear:()=>{r=e},setInfo:t=>{r=t},getInfo:()=>r},renderer:{draw:(s,e,r)=>{t.debug("rendering info diagram\n"+s);const o=i(e);n(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)}}};export{o as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,Q as e,t as n,o as i,X as s,$ as r,J as a,e as o,z as l,V as c}from"./index-167f08a0.js";import{e as h,r as u,o as y}from"./svgDrawCommon-08f97a94-6a32c869-fc129345.js";import{b as p}from"./arc-f453aa24-001bbdd5.js";import"react";import"react-dom";import"stream";import"./path-a3e377ce-ded30e71.js";var d=function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=[0],n=[],i=[null],s=[],r=this.table,a="",o=0,l=0,c=s.slice.call(arguments,1),h=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);h.setInput(t,u.yy),u.yy.lexer=h,u.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var p=h.yylloc;s.push(p);var d=h.options&&h.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,g,m,x,k,_,b,v,$,w={};;){if(g=e[e.length-1],this.defaultActions[g]?m=this.defaultActions[g]:(null==f&&($=void 0,"number"!=typeof($=n.pop()||h.lex()||1)&&($ instanceof Array&&($=(n=$).pop()),$=this.symbols_[$]||$),f=$),m=r[g]&&r[g][f]),void 0===m||!m.length||!m[0]){var M;for(k in v=[],r[g])this.terminals_[k]&&k>2&&v.push("'"+this.terminals_[k]+"'");M=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(M,{text:h.match,token:this.terminals_[f]||f,line:h.yylineno,loc:p,expected:v})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+f);switch(m[0]){case 1:e.push(f),i.push(h.yytext),s.push(h.yylloc),e.push(m[1]),f=null,l=h.yyleng,a=h.yytext,o=h.yylineno,p=h.yylloc;break;case 2:if(_=this.productions_[m[1]][1],w.$=i[i.length-_],w._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},d&&(w._$.range=[s[s.length-(_||1)].range[0],s[s.length-1].range[1]]),void 0!==(x=this.performAction.apply(w,[a,l,o,u.yy,m[1],i,s].concat(c))))return x;_&&(e=e.slice(0,-1*_*2),i=i.slice(0,-1*_),s=s.slice(0,-1*_)),e.push(this.productions_[m[1]][0]),i.push(w.$),s.push(w._$),b=r[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};function h(){this.yy={}}return l.lexer=c,h.prototype=l,l.Parser=h,new h}();d.parser=d;const f=d;let g="";const m=[],x=[],k=[],_=function(){let t=!0;for(const[e,n]of k.entries())k[e].processed,t=t&&n.processed;return t},b={getConfig:()=>t().journey,clear:function(){m.length=0,x.length=0,g="",k.length=0,e()},setDiagramTitle:n,getDiagramTitle:i,setAccTitle:s,getAccTitle:r,setAccDescription:a,getAccDescription:o,addSection:function(t){g=t,m.push(t)},getSections:function(){return m},getTasks:function(){let t=_(),e=0;for(;!t&&e<100;)t=_(),e++;return x.push(...k),x},addTask:function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:g,type:g,people:r,task:t,score:i};k.push(a)},addTaskOrg:function(t){const e={section:g,type:g,description:t,task:t,classes:[]};x.push(e)},getActors:function(){return function(){const t=[];return x.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},v=function(t,e){return u(t,e)},$=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n};let w=-1;const M=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,y=t.split(/<br\s*\/?>/gi);for(let t=0;t<y.length;t++){const l=t*h-h*(y.length-1)/2,p=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);p.append("tspan").attr("x",n+r/2).attr("dy",l).text(y[t]),p.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(p,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),T=$,E=function(t,e,n){const i=t.append("g"),s=y();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,v(i,s),M(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},S=function(t,e){return h(t,e)},I=function(t,e,n){const i=e.x+n.width/2,s=t.append("g");w++,s.append("line").attr("id","task"+w).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),function(t,e){t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");const n=t.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?function(t){const n=p().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(n):e.score<3?function(t){const n=p().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(n):n.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=y();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,v(s,r);let a=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:a,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};$(s,i),a+=10})),M(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)},A={},P=t().journey,j=P.leftMargin,C={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(e,n,i,s){const r=t().journey,a=this;let o=0;this.sequenceItems.forEach((function(t){o++;const l=a.sequenceItems.length-o+1;a.updateVal(t,"starty",n-l*r.boxMargin,Math.min),a.updateVal(t,"stopy",s+l*r.boxMargin,Math.max),a.updateVal(C.data,"startx",e-l*r.boxMargin,Math.min),a.updateVal(C.data,"stopx",i+l*r.boxMargin,Math.max),a.updateVal(t,"startx",e-l*r.boxMargin,Math.min),a.updateVal(t,"stopx",i+l*r.boxMargin,Math.max),a.updateVal(C.data,"starty",n-l*r.boxMargin,Math.min),a.updateVal(C.data,"stopy",s+l*r.boxMargin,Math.max)}))},insert:function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(C.data,"startx",s,Math.min),this.updateVal(C.data,"starty",a,Math.min),this.updateVal(C.data,"stopx",r,Math.max),this.updateVal(C.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},V=P.sectionFills,D=P.sectionColours,O={setConf:function(t){Object.keys(t).forEach((function(e){P[e]=t[e]}))},draw:function(e,n,i,s){const r=t().journey,a=t().securityLevel;let o;"sandbox"===a&&(o=l("#i"+n));const h=l("sandbox"===a?o.nodes()[0].contentDocument.body:"body");C.init();const u=h.select("#"+n);u.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");const y=s.db.getTasks(),p=s.db.getDiagramTitle(),d=s.db.getActors();for(const t in A)delete A[t];let f=0;d.forEach((t=>{A[t]={color:r.actorColours[f%r.actorColours.length],position:f},f++})),function(e){const n=t().journey;let i=60;Object.keys(A).forEach((t=>{const s=A[t].color,r={cx:20,cy:i,r:7,fill:s,stroke:"#000",pos:A[t].position};T(e,r);const a={x:40,y:i+7,fill:"#666",text:t,textMargin:5|n.boxTextMargin};S(e,a),i+=20}))}(u),C.insert(0,0,j,50*Object.keys(A).length),function(e,n,i){const s=t().journey;let r="";const a=i+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[t,i]of n.entries()){if(r!==i.section){l=V[o%V.length],h=o%V.length,c=D[o%D.length];let a=0;const u=i.section;for(let e=t;e<n.length&&n[e].section==u;e++)a+=1;const y={x:t*s.taskMargin+t*s.width+j,y:50,text:i.section,fill:l,num:h,colour:c,taskCount:a};E(e,y,s),r=i.section,o++}const u=i.people.reduce(((t,e)=>(A[e]&&(t[e]=A[e]),t)),{});i.x=t*s.taskMargin+t*s.width+j,i.y=a,i.width=s.diagramMarginX,i.height=s.diagramMarginY,i.colour=c,i.fill=l,i.num=h,i.actors=u,I(e,i,s),C.insert(i.x,i.y,i.x+i.width+s.taskMargin,450)}}(u,y,0);const g=C.getBounds();p&&u.append("text").text(p).attr("x",j).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=g.stopy-g.starty+2*r.diagramMarginY,x=j+g.stopx+2*r.diagramMarginX;c(u,m,x,r.useMaxWidth),u.append("line").attr("x1",j).attr("y1",4*r.height).attr("x2",x-j-4).attr("y2",4*r.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=p?70:0;u.attr("viewBox",`${g.startx} -25 ${x} ${m+k}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",m+k+25)}},L={parser:f,db:b,renderer:O,styles:t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,init:t=>{O.setConf(t.journey),b.clear()}};export{L as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as n,B as e,u as r,s as t,n as o,f as i,o as u,z as a,a as d,N as c,d as f,y as s,g,b as h,j as v,w as l,c as p,U as w,i as m,l as b,J as y,W as x}from"./graph-afe27007-8e18cc75.js";import{ac as k,ad as E,ae as N,af as _,ag as I,ah as R,ai as M,aj as T,ak as L,al as C,am as O,an as P,ao as S,ap as j,aq as V,ar as F,as as G,at as B}from"./index-167f08a0.js";var q=/\s/,Y=/^\s+/;var z=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,D=/^0o[0-7]+$/i,$=parseInt,J=1/0;function U(n){return n?(n=function(n){if("number"==typeof n)return n;if(a(n))return NaN;if(L(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=L(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;var r;n=(r=n)?r.slice(0,function(n){for(var e=n.length;e--&&q.test(n.charAt(e)););return e}(r)+1).replace(Y,""):r;var t=A.test(n);return t||D.test(n)?$(n.slice(2),t?2:8):z.test(n)?NaN:+n}(n))===J||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function W(e){return null!=e&&e.length?n(e,1):[]}var H=function(){return V.Date.now()},K=Object.prototype,Q=K.hasOwnProperty,X=k((function(n,e){n=Object(n);var r=-1,t=e.length,o=t>2?e[2]:void 0;for(o&&E(e[0],e[1],o)&&(t=1);++r<t;)for(var i=e[r],u=N(i),a=-1,d=u.length;++a<d;){var c=u[a],f=n[c];(void 0===f||_(f,K[c])&&!Q.call(n,c))&&(n[c]=i[c])}return n}));function Z(n){var e=null==n?0:n.length;return e?n[e-1]:void 0}var nn,en=Math.max,rn=(nn=function(n,e,r){var t=null==n?0:n.length;if(!t)return-1;var o,i,u=null==r?0:(i=(o=U(r))%1,o==o?i?o-i:o:0);return u<0&&(u=en(t+u,0)),x(n,d(e),u)},function(n,e,r){var t=Object(n);if(!T(n)){var o=d(e);n=y(n),e=function(n){return o(t[n],n,t)}}var i=nn(n,e,r);return i>-1?t[o?n[i]:i]:void 0});function tn(n,e){var r=-1,t=T(n)?Array(n.length):[];return i(n,(function(n,o,i){t[++r]=e(n,o,i)})),t}function on(n,r){return(P(n)?e:tn)(n,d(r))}function un(n,e){return n>e}function an(n,e){return n<e}function dn(n,e){var r={};return e=d(e),h(n,(function(n,t,o){F(r,t,e(n,t,o))})),r}function cn(n,e,r){for(var t=-1,o=n.length;++t<o;){var i=n[t],u=e(i);if(null!=u&&(void 0===d?u==u&&!a(u):r(u,d)))var d=u,c=i}return c}function fn(n){return n&&n.length?cn(n,M,un):void 0}function sn(n){return n&&n.length?cn(n,M,an):void 0}function gn(n,e){return n&&n.length?cn(n,d(e),an):void 0}function hn(n,e,r,o){if(!L(n))return n;for(var i=-1,a=(e=t(e,n)).length,d=a-1,c=n;null!=c&&++i<a;){var f=u(e[i]),s=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return n;if(i!=d){var g=c[f];void 0===(s=o?o(g,f,c):void 0)&&(s=L(g)?g:C(e[i+1])?[]:{})}O(c,f,s),c=c[f]}return n}function vn(n,e){if(n!==e){var r=void 0!==n,t=null===n,o=n==n,i=a(n),u=void 0!==e,d=null===e,c=e==e,f=a(e);if(!d&&!f&&!i&&n>e||i&&u&&c&&!d&&!f||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!f&&n<e||f&&r&&o&&!t&&!i||d&&r&&o||!u&&o||!c)return-1}return 0}var ln,pn=I(R(ln=function(n,e){return null==n?{}:function(n,e){return function(n,e,o){for(var i=-1,u=e.length,a={};++i<u;){var d=e[i],c=r(n,d);o(c,d)&&hn(a,t(d,n),c)}return a}(n,e,(function(e,r){return o(n,r)}))}(n,e)},void 0,W),ln+""),wn=Math.ceil,mn=Math.max,bn=function(n,e,r){return r&&"number"!=typeof r&&E(n,e,r)&&(e=r=void 0),n=U(n),void 0===e?(e=n,n=0):e=U(e),function(n,e,r,t){for(var o=-1,i=mn(wn((e-n)/(r||1)),0),u=Array(i);i--;)u[++o]=n,n+=r;return u}(n,e,r=void 0===r?n<e?1:-1:U(r))},yn=k((function(t,o){if(null==t)return[];var i=o.length;return i>1&&E(t,o[0],o[1])?o=[]:i>2&&E(o[0],o[1],o[2])&&(o=[o[0]]),function(n,t,o){t=t.length?e(t,(function(n){return P(n)?function(e){return r(e,1===n.length?n[0]:n)}:n})):[M];var i=-1;return t=e(t,S(d)),function(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}(tn(n,(function(n,r,o){return{criteria:e(t,(function(e){return e(n)})),index:++i,value:n}})),(function(n,e){return function(n,e,r){for(var t=-1,o=n.criteria,i=e.criteria,u=o.length,a=r.length;++t<u;){var d=vn(o[t],i[t]);if(d)return t>=a?d:d*("desc"==r[t]?-1:1)}return n.index-e.index}(n,e,o)}))}(t,n(o,1),[])})),xn=0;function kn(n){var e=++xn;return m(n)+e}class En{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return Nn(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&Nn(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,r=e._prev;r!==e;)n.push(JSON.stringify(r,_n)),r=r._prev;return"["+n.join(", ")+"]"}}function Nn(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function _n(n,e){if("_next"!==n&&"_prev"!==n)return e}var In=G(1);function Rn(n,e,r,t,o){var i=o?[]:void 0;return f(n.inEdges(t.v),(function(t){var u=n.edge(t),a=n.node(t.v);o&&i.push({v:t.v,w:t.w}),a.out-=u,Mn(e,r,a)})),f(n.outEdges(t.v),(function(t){var o=n.edge(t),i=t.w,u=n.node(i);u.in-=o,Mn(e,r,u)})),n.removeNode(t.v),i}function Mn(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Tn(n){var e="greedy"===n.graph().acyclicer?function(n,e){if(n.nodeCount()<=1)return[];var r=function(n,e){var r=new c,t=0,o=0;f(n.nodes(),(function(n){r.setNode(n,{v:n,in:0,out:0})})),f(n.edges(),(function(n){var i=r.edge(n.v,n.w)||0,u=e(n),a=i+u;r.setEdge(n.v,n.w,a),o=Math.max(o,r.node(n.v).out+=u),t=Math.max(t,r.node(n.w).in+=u)}));var i=bn(o+t+3).map((function(){return new En})),u=t+1;return f(r.nodes(),(function(n){Mn(i,u,r.node(n))})),{graph:r,buckets:i,zeroIdx:u}}(n,e||In),t=function(n,e,r){for(var t,o=[],i=e[e.length-1],u=e[0];n.nodeCount();){for(;t=u.dequeue();)Rn(n,e,r,t);for(;t=i.dequeue();)Rn(n,e,r,t);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(t=e[a].dequeue()){o=o.concat(Rn(n,e,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return W(on(t,(function(e){return n.outEdges(e.v,e.w)})))}(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],r={},t={};return f(n.nodes(),(function o(i){g(t,i)||(t[i]=!0,r[i]=!0,f(n.outEdges(i),(function(n){g(r,n.w)?e.push(n):o(n.w)})),delete r[i])})),e}(n);f(e,(function(e){var r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,kn("rev"))}))}function Ln(n,e,r,t){var o;do{o=kn(t)}while(n.hasNode(o));return r.dummy=e,n.setNode(o,r),o}function Cn(n){var e=new c({multigraph:n.isMultigraph()}).setGraph(n.graph());return f(n.nodes(),(function(r){n.children(r).length||e.setNode(r,n.node(r))})),f(n.edges(),(function(r){e.setEdge(r,n.edge(r))})),e}function On(n,e){var r,t,o=n.x,i=n.y,u=e.x-o,a=e.y-i,d=n.width/2,c=n.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*d>Math.abs(u)*c?(a<0&&(c=-c),r=c*u/a,t=c):(u<0&&(d=-d),r=d,t=d*a/u),{x:o+r,y:i+t}}function Pn(n){var e=on(bn(jn(n)+1),(function(){return[]}));return f(n.nodes(),(function(r){var t=n.node(r),o=t.rank;s(o)||(e[o][t.order]=r)})),e}function Sn(n,e,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),Ln(n,"border",o,e)}function jn(n){return fn(on(n.nodes(),(function(e){var r=n.node(e).rank;if(!s(r))return r})))}function Vn(n,e){H();try{return e()}finally{}}function Fn(n,e){return e()}function Gn(n,e,r,t,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],d=Ln(n,"border",u,r);o[e][i]=d,n.setParent(d,t),a&&n.setEdge(a,d,{weight:1})}function Bn(n){f(n.nodes(),(function(e){qn(n.node(e))})),f(n.edges(),(function(e){qn(n.edge(e))}))}function qn(n){var e=n.width;n.width=n.height,n.height=e}function Yn(n){n.y=-n.y}function zn(n){var e=n.x;n.x=n.y,n.y=e}function An(n){var e={};f(n.sources(),(function r(t){var o=n.node(t);if(g(e,t))return o.rank;e[t]=!0;var i=sn(on(n.outEdges(t),(function(e){return r(e.w)-n.edge(e).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))}function Dn(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function $n(n){var e,r,t=new c({directed:!1}),o=n.nodes()[0],i=n.nodeCount();for(t.setNode(o,{});Jn(t,n)<i;)e=Un(t,n),r=t.hasNode(e.v)?Dn(n,e):-Dn(n,e),Wn(t,n,r);return t}function Jn(n,e){return f(n.nodes(),(function r(t){f(e.nodeEdges(t),(function(o){var i=o.v,u=t===i?o.w:i;n.hasNode(u)||Dn(e,o)||(n.setNode(u,{}),n.setEdge(t,u,{}),r(u))}))})),n.nodeCount()}function Un(n,e){return gn(e.edges(),(function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return Dn(e,r)}))}function Wn(n,e,r){f(n.nodes(),(function(n){e.node(n).rank+=r}))}function Hn(n,e,r){P(e)||(e=[e]);var t=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],i={};return f(e,(function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);Kn(n,e,"post"===r,i,t,o)})),o}function Kn(n,e,r,t,o,i){g(t,e)||(t[e]=!0,r||i.push(e),f(o(e),(function(e){Kn(n,e,r,t,o,i)})),r&&i.push(e))}function Qn(n){n=function(n){var e=(new c).setGraph(n.graph());return f(n.nodes(),(function(r){e.setNode(r,n.node(r))})),f(n.edges(),(function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},o=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})})),e}(n),An(n);var e,r=$n(n);for(ne(r),Xn(r,n);e=re(r);)oe(r,n,e,te(r,n,e))}function Xn(n,e){var r=function(n,e){return Hn(n,e,"post")}(n,n.nodes());r=r.slice(0,r.length-1),f(r,(function(r){!function(n,e,r){var t=n.node(r).parent;n.edge(r,t).cutvalue=Zn(n,e,r)}(n,e,r)}))}function Zn(n,e,r){var t=n.node(r).parent,o=!0,i=e.edge(r,t),u=0;return i||(o=!1,i=e.edge(t,r)),u=i.weight,f(e.nodeEdges(r),(function(i){var a,d,c=i.v===r,f=c?i.w:i.v;if(f!==t){var s=c===o,g=e.edge(i).weight;if(u+=s?g:-g,a=r,d=f,n.hasEdge(a,d)){var h=n.edge(r,f).cutvalue;u+=s?-h:h}}})),u}function ne(n,e){arguments.length<2&&(e=n.nodes()[0]),ee(n,{},1,e)}function ee(n,e,r,t,o){var i=r,u=n.node(t);return e[t]=!0,f(n.neighbors(t),(function(o){g(e,o)||(r=ee(n,e,r,o,t))})),u.low=i,u.lim=r++,o?u.parent=o:delete u.parent,r}function re(n){return rn(n.edges(),(function(e){return n.edge(e).cutvalue<0}))}function te(n,e,r){var t=r.v,o=r.w;e.hasEdge(t,o)||(t=r.w,o=r.v);var i=n.node(t),u=n.node(o),a=i,d=!1;return i.lim>u.lim&&(a=u,d=!0),gn(p(e.edges(),(function(e){return d===ie(n,n.node(e.v),a)&&d!==ie(n,n.node(e.w),a)})),(function(n){return Dn(e,n)}))}function oe(n,e,r,t){var o=r.v,i=r.w;n.removeEdge(o,i),n.setEdge(t.v,t.w,{}),ne(n),Xn(n,e),function(n,e){var r=rn(n.nodes(),(function(n){return!e.node(n).parent})),t=function(n,e){return Hn(n,e,"pre")}(n,r);t=t.slice(1),f(t,(function(r){var t=n.node(r).parent,o=e.edge(r,t),i=!1;o||(o=e.edge(t,r),i=!0),e.node(r).rank=e.node(t).rank+(i?o.minlen:-o.minlen)}))}(n,e)}function ie(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function ue(n){switch(n.graph().ranker){case"network-simplex":default:!function(n){Qn(n)}(n);break;case"tight-tree":!function(n){An(n),$n(n)}(n);break;case"longest-path":ae(n)}}Qn.initLowLimValues=ne,Qn.initCutValues=Xn,Qn.calcCutValue=Zn,Qn.leaveEdge=re,Qn.enterEdge=te,Qn.exchangeEdges=oe;var ae=An;function de(n){var e=Ln(n,"root",{},"_root"),r=function(n){var e={};function r(t,o){var i=n.children(t);i&&i.length&&f(i,(function(n){r(n,o+1)})),e[t]=o}return f(n.children(),(function(n){r(n,1)})),e}(n),t=fn(v(r))-1,o=2*t+1;n.graph().nestingRoot=e,f(n.edges(),(function(e){n.edge(e).minlen*=o}));var i=function(n){return l(n.edges(),(function(e,r){return e+n.edge(r).weight}),0)}(n)+1;f(n.children(),(function(u){ce(n,e,o,i,t,r,u)})),n.graph().nodeRankFactor=o}function ce(n,e,r,t,o,i,u){var a=n.children(u);if(a.length){var d=Sn(n,"_bt"),c=Sn(n,"_bb"),s=n.node(u);n.setParent(d,u),s.borderTop=d,n.setParent(c,u),s.borderBottom=c,f(a,(function(a){ce(n,e,r,t,o,i,a);var f=n.node(a),s=f.borderTop?f.borderTop:a,g=f.borderBottom?f.borderBottom:a,h=f.borderTop?t:2*t,v=s!==g?1:o-i[u]+1;n.setEdge(d,s,{weight:h,minlen:v,nestingEdge:!0}),n.setEdge(g,c,{weight:h,minlen:v,nestingEdge:!0})})),n.parent(u)||n.setEdge(e,d,{weight:0,minlen:o+i[u]})}else u!==e&&n.setEdge(e,u,{weight:0,minlen:r})}function fe(n,e){for(var r=0,t=1;t<e.length;++t)r+=se(n,e[t-1],e[t]);return r}function se(n,e,r){for(var t=function(n,e){return function(n,e,r){for(var t=-1,o=n.length,i=e.length,u={};++t<o;){var a=t<i?e[t]:void 0;r(u,n[t],a)}return u}(n||[],e||[],O)}(r,on(r,(function(n,e){return e}))),o=W(on(e,(function(e){return yn(on(n.outEdges(e),(function(e){return{pos:t[e.w],weight:n.edge(e).weight}})),"pos")}))),i=1;i<r.length;)i<<=1;var u=2*i-1;i-=1;var a=on(new Array(u),(function(){return 0})),d=0;return f(o.forEach((function(n){var e=n.pos+i;a[e]+=n.weight;for(var r=0;e>0;)e%2&&(r+=a[e+1]),a[e=e-1>>1]+=n.weight;d+=n.weight*r}))),d}function ge(n,e){var r,t=function(n,e){var r={lhs:[],rhs:[]};return f(n,(function(n){!function(n){return g(n,"barycenter")}(n)?r.rhs.push(n):r.lhs.push(n)})),r}(n),o=t.lhs,i=yn(t.rhs,(function(n){return-n.i})),u=[],a=0,d=0,c=0;o.sort((r=!!e,function(n,e){return n.barycenter<e.barycenter?-1:n.barycenter>e.barycenter?1:r?e.i-n.i:n.i-e.i})),c=he(u,i,c),f(o,(function(n){c+=n.vs.length,u.push(n.vs),a+=n.barycenter*n.weight,d+=n.weight,c=he(u,i,c)}));var s={vs:W(u)};return d&&(s.barycenter=a/d,s.weight=d),s}function he(n,e,r){for(var t;e.length&&(t=Z(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function ve(n,e,r,t){var o=n.children(e),i=n.node(e),u=i?i.borderLeft:void 0,a=i?i.borderRight:void 0,d={};u&&(o=p(o,(function(n){return n!==u&&n!==a})));var c=function(n,e){return on(e,(function(e){var r=n.inEdges(e);if(r.length){var t=l(r,(function(e,r){var t=n.edge(r),o=n.node(r.v);return{sum:e.sum+t.weight*o.order,weight:e.weight+t.weight}}),{sum:0,weight:0});return{v:e,barycenter:t.sum/t.weight,weight:t.weight}}return{v:e}}))}(n,o);f(c,(function(e){if(n.children(e.v).length){var o=ve(n,e.v,r,t);d[e.v]=o,g(o,"barycenter")&&(u=o,s((i=e).barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u}));var h=function(n,e){var r={};return f(n,(function(n,e){var t=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:e};s(n.barycenter)||(t.barycenter=n.barycenter,t.weight=n.weight)})),f(e.edges(),(function(n){var e=r[n.v],t=r[n.w];s(e)||s(t)||(t.indegree++,e.out.push(r[n.w]))})),function(n){var e=[];function r(n){return function(e){e.merged||(s(e.barycenter)||s(n.barycenter)||e.barycenter>=n.barycenter)&&function(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}(n,e)}}function t(e){return function(r){r.in.push(e),0==--r.indegree&&n.push(r)}}for(;n.length;){var o=n.pop();e.push(o),f(o.in.reverse(),r(o)),f(o.out,t(o))}return on(p(e,(function(n){return!n.merged})),(function(n){return pn(n,["vs","i","barycenter","weight"])}))}(p(r,(function(n){return!n.indegree})))}(c,r);!function(n,e){f(n,(function(n){n.vs=W(n.vs.map((function(n){return e[n]?e[n].vs:n})))}))}(h,d);var v=ge(h,t);if(u&&(v.vs=W([u,v.vs,a]),n.predecessors(u).length)){var w=n.node(n.predecessors(u)[0]),m=n.node(n.predecessors(a)[0]);g(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+w.order+m.order)/(v.weight+2),v.weight+=2}return v}function le(n,e,r){return on(e,(function(e){return function(n,e,r){var t=function(n){for(var e;n.hasNode(e=kn("_root")););return e}(n),o=new c({compound:!0}).setGraph({root:t}).setDefaultNodeLabel((function(e){return n.node(e)}));return f(n.nodes(),(function(i){var u=n.node(i),a=n.parent(i);(u.rank===e||u.minRank<=e&&e<=u.maxRank)&&(o.setNode(i),o.setParent(i,a||t),f(n[r](i),(function(e){var r=e.v===i?e.w:e.v,t=o.edge(r,i),u=s(t)?0:t.weight;o.setEdge(r,i,{weight:n.edge(e).weight+u})})),g(u,"minRank")&&o.setNode(i,{borderLeft:u.borderLeft[e],borderRight:u.borderRight[e]}))})),o}(n,e,r)}))}function pe(n,e){var r=new c;f(n,(function(n){var t=n.graph().root,o=ve(n,t,r,e);f(o.vs,(function(e,r){n.node(e).order=r})),function(n,e,r){var t,o={};f(r,(function(r){for(var i,u,a=n.parent(r);a;){if((i=n.parent(a))?(u=o[i],o[i]=a):(u=t,t=a),u&&u!==a)return void e.setEdge(u,a);a=i}}))}(n,r,o.vs)}))}function we(n,e){f(e,(function(e){f(e,(function(e,r){n.node(e).order=r}))}))}function me(n,e,r){if(e>r){var t=e;e=r,r=t}var o=n[e];o||(n[e]=o={}),o[r]=!0}function be(n,e,r){if(e>r){var t=e;e=r,r=t}return g(n[e],r)}function ye(n){var e,r=Pn(n),t=j(function(n,e){var r={};return l(e,(function(e,t){var o=0,i=0,u=e.length,a=Z(t);return f(t,(function(e,d){var c=function(n,e){if(n.node(e).dummy)return rn(n.predecessors(e),(function(e){return n.node(e).dummy}))}(n,e),s=c?n.node(c).order:u;(c||e===a)&&(f(t.slice(i,d+1),(function(e){f(n.predecessors(e),(function(t){var i=n.node(t),u=i.order;!(u<o||s<u)||i.dummy&&n.node(e).dummy||me(r,t,e)}))})),i=d+1,o=s)})),t})),r}(n,r),function(n,e){var r={};function t(e,t,o,i,u){var a;f(bn(t,o),(function(t){a=e[t],n.node(a).dummy&&f(n.predecessors(a),(function(e){var t=n.node(e);t.dummy&&(t.order<i||t.order>u)&&me(r,e,a)}))}))}return l(e,(function(e,r){var o,i=-1,u=0;return f(r,(function(a,d){if("border"===n.node(a).dummy){var c=n.predecessors(a);c.length&&(o=n.node(c[0]).order,t(r,u,d,i,o),u=d,i=o)}t(r,u,r.length,o,e.length)})),r})),r}(n,r)),o={};f(["u","d"],(function(i){e="u"===i?r:v(r).reverse(),f(["l","r"],(function(r){"r"===r&&(e=on(e,(function(n){return v(n).reverse()})));var u=("u"===i?n.predecessors:n.successors).bind(n),a=function(n,e,r,t){var o={},i={},u={};return f(e,(function(n){f(n,(function(n,e){o[n]=n,i[n]=n,u[n]=e}))})),f(e,(function(n){var e=-1;f(n,(function(n){var a=t(n);if(a.length){a=yn(a,(function(n){return u[n]}));for(var d=(a.length-1)/2,c=Math.floor(d),f=Math.ceil(d);c<=f;++c){var s=a[c];i[n]===n&&e<u[s]&&!be(r,n,s)&&(i[s]=n,i[n]=o[n]=o[s],e=u[s])}}}))})),{root:o,align:i}}(0,e,t,u),d=function(n,e,r,t,o){var i={},u=function(n,e,r,t){var o=new c,i=n.graph(),u=function(n,e,r){return function(t,o,i){var u,a=t.node(o),d=t.node(i),c=0;if(c+=a.width/2,g(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(c+=r?u:-u),u=0,c+=(a.dummy?e:n)/2,c+=(d.dummy?e:n)/2,c+=d.width/2,g(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":u=d.width/2;break;case"r":u=-d.width/2}return u&&(c+=r?u:-u),u=0,c}}(i.nodesep,i.edgesep,t);return f(e,(function(e){var t;f(e,(function(e){var i=r[e];if(o.setNode(i),t){var a=r[t],d=o.edge(a,i);o.setEdge(a,i,Math.max(u(n,e,t),d||0))}t=e}))})),o}(n,e,r,o),a=o?"borderLeft":"borderRight";function d(n,e){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?n(t):(o[t]=!0,r.push(t),r=r.concat(e(t))),t=r.pop()}return d((function(n){i[n]=u.inEdges(n).reduce((function(n,e){return Math.max(n,i[e.v]+u.edge(e))}),0)}),u.predecessors.bind(u)),d((function(e){var r=u.outEdges(e).reduce((function(n,e){return Math.min(n,i[e.w]-u.edge(e))}),Number.POSITIVE_INFINITY),t=n.node(e);r!==Number.POSITIVE_INFINITY&&t.borderType!==a&&(i[e]=Math.max(i[e],r))}),u.successors.bind(u)),f(t,(function(n){i[n]=i[r[n]]})),i}(n,e,a.root,a.align,"r"===r);"r"===r&&(d=dn(d,(function(n){return-n}))),o[i+r]=d}))}));var i=function(n,e){return gn(v(e),(function(e){var r,t,o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return t=function(e,r){var t=function(n,e){return n.node(e).width}(n,r)/2;o=Math.max(e+t,o),i=Math.min(e-t,i)},null==(r=e)||B(r,b(t),N),o-i}))}(n,o);return function(n,e){var r=v(e),t=sn(r),o=fn(r);f(["u","d"],(function(r){f(["l","r"],(function(i){var u,a=r+i,d=n[a];if(d!==e){var c=v(d);(u="l"===i?t-sn(c):o-fn(c))&&(n[a]=dn(d,(function(n){return n+u})))}}))}))}(o,i),function(n,e){return dn(n.ul,(function(r,t){if(e)return n[e.toLowerCase()][t];var o=yn(on(n,t));return(o[1]+o[2])/2}))}(o,n.graph().align)}function xe(n,e){var r=e&&e.debugTiming?Vn:Fn;r("layout",(function(){var e=r(" buildLayoutGraph",(function(){return function(n){var e=new c({multigraph:!0,compound:!0}),r=Ce(n.graph());return e.setGraph(j({},Ee,Le(r,ke),pn(r,Ne))),f(n.nodes(),(function(r){var t=Ce(n.node(r));e.setNode(r,X(Le(t,_e),Ie)),e.setParent(r,n.parent(r))})),f(n.edges(),(function(r){var t=Ce(n.edge(r));e.setEdge(r,j({},Me,Le(t,Re),pn(t,Te)))})),e}(n)}));r(" runLayout",(function(){!function(n,e){e(" makeSpaceForEdgeLabels",(function(){!function(n){var e=n.graph();e.ranksep/=2,f(n.edges(),(function(r){var t=n.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)}))}(n)})),e(" removeSelfEdges",(function(){!function(n){f(n.edges(),(function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:n.edge(e)}),n.removeEdge(e)}}))}(n)})),e(" acyclic",(function(){Tn(n)})),e(" nestingGraph.run",(function(){de(n)})),e(" rank",(function(){ue(Cn(n))})),e(" injectEdgeLabelProxies",(function(){!function(n){f(n.edges(),(function(e){var r=n.edge(e);if(r.width&&r.height){var t=n.node(e.v),o={rank:(n.node(e.w).rank-t.rank)/2+t.rank,e:e};Ln(n,"edge-proxy",o,"_ep")}}))}(n)})),e(" removeEmptyRanks",(function(){!function(n){var e=sn(on(n.nodes(),(function(e){return n.node(e).rank}))),r=[];f(n.nodes(),(function(t){var o=n.node(t).rank-e;r[o]||(r[o]=[]),r[o].push(t)}));var t=0,o=n.graph().nodeRankFactor;f(r,(function(e,r){s(e)&&r%o!=0?--t:t&&f(e,(function(e){n.node(e).rank+=t}))}))}(n)})),e(" nestingGraph.cleanup",(function(){!function(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,f(n.edges(),(function(e){n.edge(e).nestingEdge&&n.removeEdge(e)}))}(n)})),e(" normalizeRanks",(function(){!function(n){var e=sn(on(n.nodes(),(function(e){return n.node(e).rank})));f(n.nodes(),(function(r){var t=n.node(r);g(t,"rank")&&(t.rank-=e)}))}(n)})),e(" assignRankMinMax",(function(){!function(n){var e=0;f(n.nodes(),(function(r){var t=n.node(r);t.borderTop&&(t.minRank=n.node(t.borderTop).rank,t.maxRank=n.node(t.borderBottom).rank,e=fn(e,t.maxRank))})),n.graph().maxRank=e}(n)})),e(" removeEdgeLabelProxies",(function(){!function(n){f(n.nodes(),(function(e){var r=n.node(e);"edge-proxy"===r.dummy&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))}))}(n)})),e(" normalize.run",(function(){!function(n){n.graph().dummyChains=[],f(n.edges(),(function(e){!function(n,e){var r,t,o,i=e.v,u=n.node(i).rank,a=e.w,d=n.node(a).rank,c=e.name,f=n.edge(e),s=f.labelRank;if(d!==u+1){for(n.removeEdge(e),o=0,++u;u<d;++o,++u)f.points=[],r=Ln(n,"edge",t={width:0,height:0,edgeLabel:f,edgeObj:e,rank:u},"_d"),u===s&&(t.width=f.width,t.height=f.height,t.dummy="edge-label",t.labelpos=f.labelpos),n.setEdge(i,r,{weight:f.weight},c),0===o&&n.graph().dummyChains.push(r),i=r;n.setEdge(i,a,{weight:f.weight},c)}}(n,e)}))}(n)})),e(" parentDummyChains",(function(){!function(n){var e=function(n){var e={},r=0;return f(n.children(),(function t(o){var i=r;f(n.children(o),t),e[o]={low:i,lim:r++}})),e}(n);f(n.graph().dummyChains,(function(r){for(var t=n.node(r),o=t.edgeObj,i=function(n,e,r,t){var o,i,u=[],a=[],d=Math.min(e[r].low,e[t].low),c=Math.max(e[r].lim,e[t].lim);o=r;do{o=n.parent(o),u.push(o)}while(o&&(e[o].low>d||c>e[o].lim));for(i=o,o=t;(o=n.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(n,e,o.v,o.w),u=i.path,a=i.lca,d=0,c=u[d],f=!0;r!==o.w;){if(t=n.node(r),f){for(;(c=u[d])!==a&&n.node(c).maxRank<t.rank;)d++;c===a&&(f=!1)}if(!f){for(;d<u.length-1&&n.node(c=u[d+1]).minRank<=t.rank;)d++;c=u[d]}n.setParent(r,c),r=n.successors(r)[0]}}))}(n)})),e(" addBorderSegments",(function(){!function(n){f(n.children(),(function e(r){var t=n.children(r),o=n.node(r);if(t.length&&f(t,e),g(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,u=o.maxRank+1;i<u;++i)Gn(n,"borderLeft","_bl",r,o,i),Gn(n,"borderRight","_br",r,o,i)}}))}(n)})),e(" order",(function(){!function(n){var e=jn(n),r=le(n,bn(1,e+1),"inEdges"),t=le(n,bn(e-1,-1,-1),"outEdges"),o=function(n){var e={},r=p(n.nodes(),(function(e){return!n.children(e).length})),t=fn(on(r,(function(e){return n.node(e).rank}))),o=on(bn(t+1),(function(){return[]})),i=yn(r,(function(e){return n.node(e).rank}));return f(i,(function r(t){if(!g(e,t)){e[t]=!0;var i=n.node(t);o[i.rank].push(t),f(n.successors(t),r)}})),o}(n);we(n,o);for(var i,u=Number.POSITIVE_INFINITY,a=0,d=0;d<4;++a,++d){pe(a%2?r:t,a%4>=2);var c=fe(n,o=Pn(n));c<u&&(d=0,i=w(o,5),u=c)}we(n,i)}(n)})),e(" insertSelfEdges",(function(){!function(n){var e=Pn(n);f(e,(function(e){var r=0;f(e,(function(e,t){var o=n.node(e);o.order=t+r,f(o.selfEdges,(function(e){Ln(n,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:t+ ++r,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(n)})),e(" adjustCoordinateSystem",(function(){!function(n){var e=n.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Bn(n)}(n)})),e(" position",(function(){!function(n){var e,r;(function(n){var e=Pn(n),r=n.graph().ranksep,t=0;f(e,(function(e){var o=fn(on(e,(function(e){return n.node(e).height})));f(e,(function(e){n.node(e).y=t+o/2})),t+=o+r}))})(n=Cn(n)),r=function(e,r){n.node(r).x=e},(e=ye(n))&&h(e,b(r))}(n)})),e(" positionSelfEdges",(function(){!function(n){f(n.nodes(),(function(e){var r=n.node(e);if("selfedge"===r.dummy){var t=n.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}}))}(n)})),e(" removeBorderNodes",(function(){!function(n){f(n.nodes(),(function(e){if(n.children(e).length){var r=n.node(e),t=n.node(r.borderTop),o=n.node(r.borderBottom),i=n.node(Z(r.borderLeft)),u=n.node(Z(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}})),f(n.nodes(),(function(e){"border"===n.node(e).dummy&&n.removeNode(e)}))}(n)})),e(" normalize.undo",(function(){!function(n){f(n.graph().dummyChains,(function(e){var r,t=n.node(e),o=t.edgeLabel;for(n.setEdge(t.edgeObj,o);t.dummy;)r=n.successors(e)[0],n.removeNode(e),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),e=r,t=n.node(e)}))}(n)})),e(" fixupEdgeLabelCoords",(function(){!function(n){f(n.edges(),(function(e){var r=n.edge(e);if(g(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}}))}(n)})),e(" undoCoordinateSystem",(function(){!function(n){var e=n.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(n){f(n.nodes(),(function(e){Yn(n.node(e))})),f(n.edges(),(function(e){var r=n.edge(e);f(r.points,Yn),g(r,"y")&&Yn(r)}))}(n),"lr"!==e&&"rl"!==e||(function(n){f(n.nodes(),(function(e){zn(n.node(e))})),f(n.edges(),(function(e){var r=n.edge(e);f(r.points,zn),g(r,"x")&&zn(r)}))}(n),Bn(n))}(n)})),e(" translateGraph",(function(){!function(n){var e=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,o=0,i=n.graph(),u=i.marginx||0,a=i.marginy||0;function d(n){var i=n.x,u=n.y,a=n.width,d=n.height;e=Math.min(e,i-a/2),r=Math.max(r,i+a/2),t=Math.min(t,u-d/2),o=Math.max(o,u+d/2)}f(n.nodes(),(function(e){d(n.node(e))})),f(n.edges(),(function(e){var r=n.edge(e);g(r,"x")&&d(r)})),e-=u,t-=a,f(n.nodes(),(function(r){var o=n.node(r);o.x-=e,o.y-=t})),f(n.edges(),(function(r){var o=n.edge(r);f(o.points,(function(n){n.x-=e,n.y-=t})),g(o,"x")&&(o.x-=e),g(o,"y")&&(o.y-=t)})),i.width=r-e+u,i.height=o-t+a}(n)})),e(" assignNodeIntersects",(function(){!function(n){f(n.edges(),(function(e){var r,t,o=n.edge(e),i=n.node(e.v),u=n.node(e.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(On(i,r)),o.points.push(On(u,t))}))}(n)})),e(" reversePoints",(function(){!function(n){f(n.edges(),(function(e){var r=n.edge(e);r.reversed&&r.points.reverse()}))}(n)})),e(" acyclic.undo",(function(){!function(n){f(n.edges(),(function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}}))}(n)}))}(e,r)})),r(" updateInputGraph",(function(){!function(n,e){f(n.nodes(),(function(r){var t=n.node(r),o=e.node(r);t&&(t.x=o.x,t.y=o.y,e.children(r).length&&(t.width=o.width,t.height=o.height))})),f(n.edges(),(function(r){var t=n.edge(r),o=e.edge(r);t.points=o.points,g(o,"x")&&(t.x=o.x,t.y=o.y)})),n.graph().width=e.graph().width,n.graph().height=e.graph().height}(n,e)}))}))}var ke=["nodesep","edgesep","ranksep","marginx","marginy"],Ee={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ne=["acyclicer","ranker","rankdir","align"],_e=["width","height"],Ie={width:0,height:0},Re=["minlen","weight","width","height","labeloffset"],Me={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Te=["labelpos"];function Le(n,e){return dn(pn(n,e),Number)}function Ce(n){var e={};return f(n,(function(n,r){e[r.toLowerCase()]=n})),e}export{xe as V,on as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./array-
|
|
1
|
+
import{r as n}from"./array-5c028890-e9486e2e.js";import{$ as t,_ as r}from"./path-a3e377ce-ded30e71.js";import{q as u}from"./index-167f08a0.js";function o(n){return n[0]}function e(n){return n[1]}function f(f,i){var l=r(!0),c=null,p=u,a=null,h=t(y);function y(t){var r,u,o,e=(t=n(t)).length,y=!1;for(null==c&&(a=p(o=h())),r=0;r<=e;++r)!(r<e&&l(u=t[r],r,t))===y&&((y=!y)?a.lineStart():a.lineEnd()),y&&a.point(+f(u,r,t),+i(u,r,t));if(o)return a=null,o+""||null}return f="function"==typeof f?f:void 0===f?o:r(f),i="function"==typeof i?i:void 0===i?e:r(i),y.x=function(n){return arguments.length?(f="function"==typeof n?n:r(+n),y):f},y.y=function(n){return arguments.length?(i="function"==typeof n?n:r(+n),y):i},y.defined=function(n){return arguments.length?(l="function"==typeof n?n:r(!!n),y):l},y.curve=function(n){return arguments.length?(p=n,null!=c&&(a=p(c)),y):p},y.context=function(n){return arguments.length?(null==n?c=a=null:a=p(c=n),y):c},y}export{f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a3 as n,a4 as t,a5 as r,a6 as e,a7 as i}from"./index-167f08a0.js";import{e as o}from"./init-426b8023-e9aac3aa.js";function a(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function u(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function c(n){let t,r,e;function i(n,e,i=0,o=n.length){if(i<o){if(0!==t(e,e))return o;do{const t=i+o>>>1;r(n[t],e)<0?i=t+1:o=t}while(i<o)}return i}return 2!==n.length?(t=a,r=(t,r)=>a(n(t),r),e=(t,r)=>n(t)-r):(t=n===a||n===u?n:l,r=n,e=n),{left:i,center:function(n,t,r=0,o=n.length){const a=i(n,t,r,o-1);return a>r&&e(n[a-1],t)>-e(n[a],t)?a-1:a},right:function(n,e,i=0,o=n.length){if(i<o){if(0!==t(e,e))return o;do{const t=i+o>>>1;r(n[t],e)<=0?i=t+1:o=t}while(i<o)}return i}}}function l(){return 0}const s=c(a).right;c((function(n){return null===n?NaN:+n})).center;var f=s;const h=Math.sqrt(50),m=Math.sqrt(10),g=Math.sqrt(2);function p(n,t,r){const e=(t-n)/Math.max(0,r),i=Math.floor(Math.log10(e)),o=e/Math.pow(10,i),a=o>=h?10:o>=m?5:o>=g?2:1;let u,c,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(n*l),c=Math.round(t*l),u/l<n&&++u,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*a,u=Math.round(n/l),c=Math.round(t/l),u*l<n&&++u,c*l>t&&--c),c<u&&.5<=r&&r<2?p(n,t,2*r):[u,c,l]}function v(n,t,r){return p(n=+n,t=+t,r=+r)[2]}function M(n,t,r){r=+r;const e=(t=+t)<(n=+n),i=e?v(t,n,r):v(n,t,r);return(e?-1:1)*(i<0?1/-i:i)}function d(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,i=t.slice();return function(o){for(r=0;r<e;++r)i[r]=n[r]*(1-o)+t[r]*o;return i}}function y(n,t){var r,e=t?t.length:0,i=n?Math.min(e,n.length):0,o=new Array(i),a=new Array(e);for(r=0;r<i;++r)o[r]=N(n[r],t[r]);for(;r<e;++r)a[r]=t[r];return function(n){for(r=0;r<i;++r)a[r]=o[r](n);return a}}function w(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function b(n,t){var r,e={},i={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=N(n[r],t[r]):i[r]=t[r];return function(n){for(r in e)i[r]=e[r](n);return i}}function N(o,a){var u,c,l=typeof a;return null==a||"boolean"===l?t(a):("number"===l?n:"string"===l?(u=r(a))?(a=u,e):i:a instanceof r?e:a instanceof Date?w:(c=a,!ArrayBuffer.isView(c)||c instanceof DataView?Array.isArray(a)?y:"function"!=typeof a.valueOf&&"function"!=typeof a.toString||isNaN(a)?b:n:d))(o,a)}function x(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function A(n,t){if((r=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var r,e=n.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+n.slice(r+1)]}function k(n){return(n=A(Math.abs(n)))?n[1]:NaN}var j,S=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function z(n){if(!(t=S.exec(n)))throw new Error("invalid format: "+n);var t;return new E({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function E(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function $(n,t){var r=A(n,t);if(!r)return n+"";var e=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+e:e.length>i+1?e.slice(0,i+1)+"."+e.slice(i+1):e+new Array(i-e.length+2).join("0")}z.prototype=E.prototype,E.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var P={"%":(n,t)=>(100*n).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>$(100*n,t),r:$,s:function(n,t){var r=A(n,t);if(!r)return n+"";var e=r[0],i=r[1],o=i-(j=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=e.length;return o===a?e:o>a?e+new Array(o-a+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+A(n,Math.max(0,t+o-1))[0]},X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function q(n){return n}var C,D,F,L=Array.prototype.map,O=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T(n){return+n}C=function(n){var t,r,e=void 0===n.grouping||void 0===n.thousands?q:(t=L.call(n.grouping,Number),r=n.thousands+"",function(n,e){for(var i=n.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>e&&(u=Math.max(1,e-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>e));)u=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===n.currency?"":n.currency[0]+"",o=void 0===n.currency?"":n.currency[1]+"",a=void 0===n.decimal?".":n.decimal+"",u=void 0===n.numerals?q:function(n){return function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}}(L.call(n.numerals,String)),c=void 0===n.percent?"%":n.percent+"",l=void 0===n.minus?"−":n.minus+"",s=void 0===n.nan?"NaN":n.nan+"";function f(n){var t=(n=z(n)).fill,r=n.align,f=n.sign,h=n.symbol,m=n.zero,g=n.width,p=n.comma,v=n.precision,M=n.trim,d=n.type;"n"===d?(p=!0,d="g"):P[d]||(void 0===v&&(v=12),M=!0,d="g"),(m||"0"===t&&"="===r)&&(m=!0,t="0",r="=");var y="$"===h?i:"#"===h&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",w="$"===h?o:/[%p]/.test(d)?c:"",b=P[d],N=/[defgprs%]/.test(d);function x(n){var i,o,c,h=y,x=w;if("c"===d)x=b(n)+x,n="";else{var A=(n=+n)<0||1/n<0;if(n=isNaN(n)?s:b(Math.abs(n),v),M&&(n=function(n){n:for(var t,r=n.length,e=1,i=-1;e<r;++e)switch(n[e]){case".":i=t=e;break;case"0":0===i&&(i=e),t=e;break;default:if(!+n[e])break n;i>0&&(i=0)}return i>0?n.slice(0,i)+n.slice(t+1):n}(n)),A&&0==+n&&"+"!==f&&(A=!1),h=(A?"("===f?f:l:"-"===f||"("===f?"":f)+h,x=("s"===d?O[8+j/3]:"")+x+(A&&"("===f?")":""),N)for(i=-1,o=n.length;++i<o;)if(48>(c=n.charCodeAt(i))||c>57){x=(46===c?a+n.slice(i+1):n.slice(i))+x,n=n.slice(0,i);break}}p&&!m&&(n=e(n,1/0));var k=h.length+n.length+x.length,S=k<g?new Array(g-k+1).join(t):"";switch(p&&m&&(n=e(S+n,S.length?g-x.length:1/0),S=""),r){case"<":n=h+n+x+S;break;case"=":n=h+S+n+x;break;case"^":n=S.slice(0,k=S.length>>1)+h+n+x+S.slice(k);break;default:n=S+h+n+x}return u(n)}return v=void 0===v?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),x.toString=function(){return n+""},x}return{format:f,formatPrefix:function(n,t){var r=f(((n=z(n)).type="f",n)),e=3*Math.max(-8,Math.min(8,Math.floor(k(t)/3))),i=Math.pow(10,-e),o=O[8+e/3];return function(n){return r(i*n)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),D=C.format,F=C.formatPrefix;var V=[0,1];function X(n){return n}function B(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function G(n,t,r){var e=n[0],i=n[1],o=t[0],a=t[1];return i<e?(e=B(i,e),o=r(a,o)):(e=B(e,i),o=r(o,a)),function(n){return o(e(n))}}function H(n,t,r){var e=Math.min(n.length,t.length)-1,i=new Array(e),o=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<e;)i[a]=B(n[a],n[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=f(n,t,1,e)-1;return o[r](i[r](t))}}function R(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function U(){return function(){var t,r,e,i,o,a,u=V,c=V,l=N,s=X;function f(){var n,t,r,e=Math.min(u.length,c.length);return s!==X&&(n=u[0],t=u[e-1],n>t&&(r=n,n=t,t=r),s=function(r){return Math.max(n,Math.min(t,r))}),i=e>2?H:G,o=a=null,h}function h(n){return null==n||isNaN(n=+n)?e:(o||(o=i(u.map(t),c,l)))(t(s(n)))}return h.invert=function(e){return s(r((a||(a=i(c,u.map(t),n)))(e)))},h.domain=function(n){return arguments.length?(u=Array.from(n,T),f()):u.slice()},h.range=function(n){return arguments.length?(c=Array.from(n),f()):c.slice()},h.rangeRound=function(n){return c=Array.from(n),l=x,f()},h.clamp=function(n){return arguments.length?(s=!!n||X,f()):s!==X},h.interpolate=function(n){return arguments.length?(l=n,f()):l},h.unknown=function(n){return arguments.length?(e=n,h):e},function(n,e){return t=n,r=e,f()}}()(X,X)}function Y(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)==(t=+t))return[n];const e=t<n,[i,o,a]=e?p(t,n,r):p(n,t,r);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(e)if(a<0)for(let n=0;n<u;++n)c[n]=(o-n)/-a;else for(let n=0;n<u;++n)c[n]=(o-n)*a;else if(a<0)for(let n=0;n<u;++n)c[n]=(i+n)/-a;else for(let n=0;n<u;++n)c[n]=(i+n)*a;return c}(r[0],r[r.length-1],null==n?10:n)},n.tickFormat=function(n,r){var e=t();return function(n,t,r,e){var i,o=M(n,t,r);switch((e=z(null==e?",f":e)).type){case"s":var a=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(i=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(k(t)/3)))-k(Math.abs(n)))}(o,a))||(e.precision=i),F(e,a);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,k(t)-k(n))+1}(o,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=function(n){return Math.max(0,-k(Math.abs(n)))}(o))||(e.precision=i-2*("%"===e.type))}return D(e)}(e[0],e[e.length-1],null==n?10:n,r)},n.nice=function(r){null==r&&(r=10);var e,i,o=t(),a=0,u=o.length-1,c=o[a],l=o[u],s=10;for(l<c&&(i=c,c=l,l=i,i=a,a=u,u=i);s-- >0;){if((i=v(c,l,r))===e)return o[a]=c,o[u]=l,t(o);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}e=i}return n},n}function Z(){var n=U();return n.copy=function(){return R(n,Z())},o.apply(n,arguments),Y(n)}export{Z as J,M,R as U,U as Z,c};
|